I have a perfectly working trigger that when a unit dies creates another one and some random other stuff. But when I put a wait game time in front of it, now it gives me errors, anyone else have this issue? ask me if you need more info
EDIT:
I found a workaround, where I created the unit right away and hid it. Waited game time then showed it.
When a unit dies, the trash delete all references of this unit.
If you want to create another unit on the position of the dying unit, you must to save the position of the dying unit on a variable before the wait action. The dyign unit will be deleted, but not this position.
I think if you have a death time for the unit, it won't delete the reference until perhaps after the death time has expired. I didn't test if that was the case but I know i've used waits successfully with units that have a death time.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a perfectly working trigger that when a unit dies creates another one and some random other stuff. But when I put a wait game time in front of it, now it gives me errors, anyone else have this issue? ask me if you need more info
EDIT: I found a workaround, where I created the unit right away and hid it. Waited game time then showed it.
@Gaurus: Go
It might be because it can't find the unit that died because it had to wait.
I could be totally wrong.
When a unit dies, the trash delete all references of this unit.
If you want to create another unit on the position of the dying unit, you must to save the position of the dying unit on a variable before the wait action. The dyign unit will be deleted, but not this position.
Seems that :
I think if you have a death time for the unit, it won't delete the reference until perhaps after the death time has expired. I didn't test if that was the case but I know i've used waits successfully with units that have a death time.