Skip to content

Current questions and answers regarding the map editor.

User Avatar
#3187
Auto-translated
Juss456
I want the monster to change its position on the map every day. I won't say why. Of course, if it gets stuck somewhere in a mountain or in a tree, it won't be good.

Maybe like this?

Xp={};
Yp={};
p=0;

for i=80,160 do
for j=50,120 do
if IsTilePassable(i, j, 0)==true then
Xp[p]=i;
Yp[p]=j;
p=p+1;
end;
end;
end;

function poslal()
posl=random(p);
SetObjectPosition("name", X[posl], Y[posl], 0);
end;

by the way, regarding this topic. Does the CanMoveHero function also only take into account static objects?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира

Statistics

Welcome our newest member: leyu