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.
Create a new script (xdb and lua) and link it to your hero using the function SetHeroCombatScript("Hero Name", "/Path to script/ScriptName.xdb#xpointer(/Script)")
In the combat script itself:
function Start() --We only consider the case when our hero attacks; if the "bad counter" increased when we were attacked, it would be unfair.
local EnemyCreat = GetDefenderCreatures() flag = 1 for key, unit in EnemyCreat do if GetCreatureType(unit)=="Bad ID" or GetCreatureType(unit)=="Bad ID 2" then --N blocks of "bad ID" checks SetGameVar("BadCounter", GetGameVar("BadCounter")+1) flag = nil break end end if flag then SetGameVar("GoodCounter", GetGameVar("GoodCounter")+1) end end
Thank you, I'll try it. And thank you for the explanation about ~= . Regarding the gates - I understand, we'll wait. 😎