Xebarsis
New Member
- Reaction score
- 7
In my game, every time you die you immediately respawn with a new unit. I want to make it so that if you're killed by the unit called "Dummy killer" that the new unit you respawn with will be invulnerable for a split second, and then have the invulnerability removed.
Adding invulnerable isn't the problem. Once I add a wait after it, nothing after the wait ever happens, so I can't remove the ability.
I can't get any trigger to work past the 0.50 second wait, and I'm not sure why. Even if I make it a .01 second wait, everything past it never happens. Even if I add just a simple chat message after the wait, that doesn't even happen.
How do I get any code past the wait to work? The invulnerability MUST remain on the unit for at least a brief amount of time.
Adding invulnerable isn't the problem. Once I add a wait after it, nothing after the wait ever happens, so I can't remove the ability.
Trigger:
- Death Via Nuke
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Killing unit)) Equal to Dummy Killer
- Actions
- Set NukePreventionGroup[(Player number of (Owner of (Dying unit)))] = (Units in (Playable map area) owned by (Owner of (Dying unit)))
- Unit Group - Pick every unit in NukePreventionGroup[(Player number of (Owner of (Dying unit)))] and do (Actions)
- Loop - Actions
- Unit - Add Invulnerable (Neutral) to (Picked unit)
- Wait 0.50 seconds
- Unit - Remove Invulnerable (Neutral) from (Picked unit)
- Unit Group - Remove (Picked unit) from NukePreventionGroup[(Player number of (Owner of (Dying unit)))]
- Loop - Actions
- Events
I can't get any trigger to work past the 0.50 second wait, and I'm not sure why. Even if I make it a .01 second wait, everything past it never happens. Even if I add just a simple chat message after the wait, that doesn't even happen.
How do I get any code past the wait to work? The invulnerability MUST remain on the unit for at least a brief amount of time.