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.
Are you setting the animation type to IDLE? They are (probably) incorrectly defined for these creatures. I suggest creating a battle as a sequence of ONESHOT animations. It works perfectly, and you can also set a variable interval between attacks, which looks much more realistic. That's how I always did it:
function BattleThread() while (true) do if (IsObjectExists(CREATURE 1)) then PlayObjectAnimation(CREATURE 1, 'attack00', ONESHOT); end sleep(random(10)+5); if (IsObjectExists(CREATURE 2)) then PlayObjectAnimation(CREATURE 2, 'attack00', ONESHOT); end sleep(random(10)+5); end end
startThread(BattleThread);
You can experiment with the intervals, types of attacks; you can set it so that when one creature attacks, the other receives the attack, and a whole lot more.
Hmm, is it necessary to select the animations themselves in the shared properties of the creatures? I have some fire and water element animations selected there, but your function doesn't work, and the units just stand there. Here's what I entered, just in case. Also, the print statement doesn't indicate that the animation is complete.
function BattleThread() while (true) do if (IsObjectExists(elemF)) then PlayObjectAnimation("elemF", "attack00", ONESHOT); end sleep(random(10)+5); if (IsObjectExists(elemW)) then PlayObjectAnimation("elemW", "attack00", ONESHOT); end sleep(random(10)+5); print("animation elemov complete") end end