Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Error Details:
Share Link
Current questions and answers regarding the map editor.
Rhenish, if simplified to the extreme, without animations and monster movements, it would be something like this:
Trigger(NEW_DAY_TRIGGER, 'NewDay');
-- here we list all the monsters that can attack
attacking_mummy_array = {'mummy01', 'mummy02'};
function NewDay()
if(not IsObjectExists('HERO_NAME')) then return end
local hero_x, hero_y, hero_f = GetObjectPosition('HERO_NAME');
for i, mummy in attacking_mummy_array do
if(IsObjectExists(mummy)) then
local monster_x, monster_y, monster_f = GetObjectPosition(mummy);
local diff_x = hero_x - monster_x;
local diff_y = hero_y - monster_y;
if( (sqrt((diff_x * diff_x) + (diff_y * diff_y)) <= 6) and (hero_f == monster_f)) then
MakeHeroInteractWithObject('HERO_NAME', mummy);
break
end
end
end
end
upd: Oops, I was late with the advice.
upd: Added a check for existence.