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.
"It seemed to work fine for me."
Here, it's hard to say; the problem could have been in the previous part of the script. In general, there were more than enough bugs related to the script on this map.
As confirmation that the `if` statement can be completed in the middle of the script, here's a snippet from the script of that same map:
```
function Urgashs_help()
if flag == 1 then
if GetDate(DAY) == 2 then
AddObjectCreatures('Oddrema', CREATURE_DEVIL, 3)
elseif GetDate(DAY) == 3 then
AddObjectCreatures('Oddrema', 18 , 250)
end;
elseif GetDate(DAY) == 4 then
AddObjectCreatures('Oddrema', 22, 150)
AddObjectCreatures('Maeve', 2, 300)
AddObjectCreatures('Maeve', 4, 150)
AddObjectCreatures('Maeve', 6, 100)
AddObjectCreatures('Maeve',8, 50)
AddObjectCreatures('Maeve',110, 25)
AddObjectCreatures('Maeve',12, 25)
AddObjectCreatures('Maeve',13, 25)
end;
end;
Trigger(NEW_DAY_TRIGGER, 'Urgashs_help')
```
GnomKRAG
Could you please explain what you meant?
Sincerely.
Well, I don't know what you guys are talking about, but you need AddObjectCreatures for creatures and AddHeroCreatures for heroes. It's not difficult to do all the other manipulations with the army, if only I knew what exactly needs to be done. ;)
GnomKRAG, how do you make creatures attack? :confused: (or maybe make the hero attack them?)
"AddObjectCreatures is needed for objects, and AddHeroCreatures is needed for heroes." The first one is definitely universal; I don't know about the second one, I haven't tried it. Sincerely.
PlayObjectAnimation(ObjectName, animName, action), where ObjectName is the name of the monster, animName is the desired animation, and action specifies the repetition (play once, repeat cyclically, etc.). Constants and further explanations can be found in the manual (Game folder/Editor Documentation/HOMM5_A2_Script_Functions), page 38. Sincerely,
INVISIBLE – (special) the object becomes invisible The object becomes invisible. IDLE – the animation is played cyclically, until it is replaced by another animation It plays until it is replaced by another animation. ONESHOT_STILL – the animation is played once, and after it is finished, the object remains in the posture it took in the last frame of the animation Plays once and freezes in the last pose of the animation. ONESHOT – the animation is played once, and after it the object’s standard idle animation is started Plays once and freezes in the initial position. NON_ESSENTIAL – same as ONESHOT, but the animation is only played in case if the object is not ‘busy’, which means that nothing plays on it except the IDLE animation. I don't know. Literally: Same as the previous one, but the animation plays if the object is "not busy," which means that no animation is playing on it except the cyclical one. (c) Manual Sincerely.
Added after 22 hours and 33 minutes Good afternoon! The question is: what are the IDs for summoning the Hive and the Staff of the Underworld? Regarding the staff, I saw one, but I'm not sure, and there's nothing about the Hive in the manual. Wasp Swarm is the Hive; it can be obtained without using scripts, but for some reason, there's no mention of the Hive itself. Sincerely.
for future use, the editor allows you to immediately identify the constant of an item; for NPCs, go to the shared tab: type, because the developers named the constants differently from the names of the items themselves in the game, and some even mixed them up (example: "bag of infinite gold" has the constant name "sack of infinite gold", although these are completely different items).