Connection ErrorBad RequestSession 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.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Hmm. I think so. You can simply count them (excluding non-summonable units and those summonable units that died). But you definitely need to experiment. Because the game might calculate that all summonable creatures died at the end of the battle, and in this case, you would have to create special victory conditions to first count everything and then end the battle.
In general, you can determine when one of the sides has no units left, then use BlockGame, count the summoned units, unblock the game, and end the battle.
I think that in this case, the unit counting mechanism built into the game will handle its task faster, and the battle will end before the BlockGame command is executed.
I have the following question. Let's say, according to the plot, the hero has to choose which path to take. If he takes a specific path, his army will decrease each day. This can be done using New_day_trigger. Let's assume that in this case, the variable h is assigned the value 1. Then: Trigger(NEW_DAY_TRIGGER, "hello") function hello() if GetDate(DAY) == 2 and h==1 then RemoveHeroCreatures(...); elseif GetDate(DAY) == 3 and h==1 then RemoveHeroCreatures(...); and so on end; end; but this way, you have to specify it for each day. Is there a way to reset the day count at a certain point so that you don't have to write so much?
Мои карты: Town Готовится:Чума (40%), Сосиска(42%), Война Грааля
I have a question. Let's say, according to the plot, the hero has to choose which path to take. If he goes down a certain road, his army will decrease each day. This can be done using New_day_trigger. Let's assume that in this case, the variable h is assigned the value 1. Then Trigger(NEW_DAY_TRIGGER, "hello") function hello() if GetDate(DAY) == 2 and h==1 then RemoveHeroCreatures(...); elseif GetDate(DAY) == 3 and h==1 then RemoveHeroCreatures(...); and so on end; end; but this way you have to write it for each day. Is there a way to reset the day count at a certain point so that you don't have to write so much?
Well, if your variable h=1, then it will remove part of the army every day. And there's no need for these complicated things with determining the date. If you don't want this feature, just change the value of h to anything other than one.
well, if you have a variable h=1, then it will indeed remove a portion of the army every day. And there's no need for these complicated date calculations. If the feature becomes unnecessary, you can change the value of h to any number other than one.
:smile11: how could I not have figured that out myself?
Мои карты: Town Готовится:Чума (40%), Сосиска(42%), Война Грааля
Yes, you change the value of a variable in a specific place, and that's it. Two region triggers without stopping the hero, changing the value + launching a new thread. If my line of thinking is correct, then: h = 0
function RemoveCreaturesStart() h = 1 startThread(RemoveCreatureProgress) Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC1', nil) end; Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC1','RemoveCreaturesStart')
function RemoveCreatureProgress() while 1 do if h == 1 then RemoveObjectCreatures('Oddrema', CREATURE_CERBERI,28) end; sleep(1) end; end;
function RemoveCreatureStop() if h == 1 then h=2 else if (h == 2) or (h == 0) then h = 1 end; Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC2',nil) end; Trigger(REGION_ENTER_WITHOUT_STOP_TRIGGER,'RC2','RemoveCreatureStop') Sincerely.