event: any unit dies
condition: number of live units == 0
then: do action
...work flawlessly? Does it check the condition after the unit died, or while its dying, so when it can still be counted as alive unit? So basically is it checking condition in before or after the event happens? We know that there is no state between 1 and 0 when it comes to unit being alive or dead, so will it count is as dead, alive or random thing between these two states depending on the timing?
First question: You can just do another condition if needed and subtract the Dying unit. And there are no "is-dead-in-10-milliseconds"-stages or anything like that.
Second question: Check "Status Of Player" instead. You can select "Left The Game", "Playing", and "Unused".
Yes, I'm sure. I've never done that specific trigger, but I've used a lot of triggers like "unit enters region, number of units in region = 12" and it works just like I said: conditions are tested after the events occur.
We're not killing Schrödinger's cat here. The condition is checked after the event is triggered because it's a condition for the action to run, not for the event to happen - thus it's checked right after the unit's state went from Alive to Dead, but before the actions are run.
The chronological timing is always like that:
Event happens -> Local variables are initialized -> Conditions are checked -> Actions are run.
Will the trigger looking like:
event: any unit dies
condition: number of live units == 0
then: do action
...work flawlessly? Does it check the condition after the unit died, or while its dying, so when it can still be counted as alive unit? So basically is it checking condition in before or after the event happens? We know that there is no state between 1 and 0 when it comes to unit being alive or dead, so will it count is as dead, alive or random thing between these two states depending on the timing?
Yeah, it'll work. It checks the conditions the instant after the event occurs.
@dgh64: Go
You sure about it?
btw. Another question that i would like to have a sure nswer is:
If player leaves the controller is set to "none", "neutral", "computer" or some other?
@Azzaaer: Go
First question: You can just do another condition if needed and subtract the Dying unit. And there are no "is-dead-in-10-milliseconds"-stages or anything like that.
Second question: Check "Status Of Player" instead. You can select "Left The Game", "Playing", and "Unused".
@Azzaaer: Go
Yes, I'm sure. I've never done that specific trigger, but I've used a lot of triggers like "unit enters region, number of units in region = 12" and it works just like I said: conditions are tested after the events occur.
@Azzaaer: Go
We're not killing Schrödinger's cat here. The condition is checked after the event is triggered because it's a condition for the action to run, not for the event to happen - thus it's checked right after the unit's state went from Alive to Dead, but before the actions are run.
The chronological timing is always like that:
Event happens -> Local variables are initialized -> Conditions are checked -> Actions are run.
@s3rius: Go
thanks guys