Basically, after a few minutes of testing, i found out that this trigger:
occasionally fails, because AT_Real (where AT is short for "Allgemein Temporär", which means it is a 'General, temporarily used' variable) gets a new value between the first and the second Display action. The new value seemingly comes from a callback function using it which should be executed every 0.25 seconds.
Now, originally when i came up with the whole temp var concept, i thought a trigger is fully executed before the next trigger is picked from the trigger queue. With the time i found out that some triggers instantly execute another one (damaging a unit will cause triggers with the "unit takes damage" to be executed before the damaging trigger continues; other examples are the item drop event and such); but this timer-event really messes things up.
To reduce the paranoia that this issue brings up, i just want to aks if anybody knows:
when the heck is a periodic trigger executed? after every call? after every user defined function? can it interrupt anything happening in the trigger? does that mean that even using LastCreatedEffectBj is never ever save anymore from the point where you have a timer-based trigger? dafuq?
Trigger:
- inflBurn
- Events
- Player - Spieler 1 (Rot) types a chat message containing -inflBurn as Ein Teil-String
- Conditions
- Actions
- Set AT_Real = (Real((Substring((Entered chat string), 11, (Length of (Entered chat string))))))
- Game - Display to (All players) the text: (vorher; + (String(AT_Real)))
- Unit Group - Pick every unit in (Units currently selected by Spieler 1 (Rot)) and do (Actions)
- Loop - Actions
- Game - Display to (All players) the text: (vorher; + (String(AT_Real)))
- Custom script: set udg_AT_Int = inflBurn(GetEnumUnit(), GetEnumUnit(), udg_AT_Real)
- Game - Display to (All players) the text: ((String(AT_Real)) + ( - + (String(AT_Int))))
- Loop - Actions
- Events
occasionally fails, because AT_Real (where AT is short for "Allgemein Temporär", which means it is a 'General, temporarily used' variable) gets a new value between the first and the second Display action. The new value seemingly comes from a callback function using it which should be executed every 0.25 seconds.
Now, originally when i came up with the whole temp var concept, i thought a trigger is fully executed before the next trigger is picked from the trigger queue. With the time i found out that some triggers instantly execute another one (damaging a unit will cause triggers with the "unit takes damage" to be executed before the damaging trigger continues; other examples are the item drop event and such); but this timer-event really messes things up.
To reduce the paranoia that this issue brings up, i just want to aks if anybody knows:
when the heck is a periodic trigger executed? after every call? after every user defined function? can it interrupt anything happening in the trigger? does that mean that even using LastCreatedEffectBj is never ever save anymore from the point where you have a timer-based trigger? dafuq?