Skip to content
#230
Auto-translated
Perhaps there is another option. Personally, I think: before entering the zone, create a local event, let's say, "entering the dangerous zone." In the script, the variable "Entering the dangerous zone" is set to True. We create a calendar event in the properties of the army/hero: 1 day, repeat every first day, if the variable "Entering the dangerous zone" is equal to True, then perform the necessary actions. Before the local event "Entering the dangerous zone," we create a local event "Exiting the dangerous zone," which sets the variable "Entering the dangerous zone" to False. On the second entry/exit from the dangerous zone, we create two more such events.
The downside of this idea: it is impossible to predict whether the hero will go into the zone with the entire army in one unit, or whether he will create separate units. That is, a separate unit may set the variable "Entering the dangerous zone" to True, and the player will receive some negative effects that should not exist while he is not in the zone.
However, this can be solved by the same global placement of local events on each cell of the dangerous zone. That is, let's say, if there is no hero in this unit, then an invincible army attacks this unit.
In general, this is the idea.
I was thinking about a similar option, but because we cannot find out in advance who and when will come there, it is not suitable. There may be both creatures and heroes (including those hired by the player during the game), both a human and a computer... and it should work for everyone, without any side effects. But if it were possible to find out in advance, then your solution would be optimal.

Statistics

Welcome our newest member: dodoD0D0