- Joined
- May 22, 2006
- Messages
- 14
I have a trigger so that every time a unit casts Anti-Magic Shell, a dummy pops up, casts AMS on the caster and then disapears, so its as if you cast it on yourself and the target at the same time.
Events
Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(antimagicshell))
Actions
Unit - Create 1 Dummy Caster for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
Wait 0.20 seconds
Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Triggering unit)
Unit - Remove (Last created unit) from the game
This works perfectly until the very end, when both my units that I want have the buff, but the dummy isn't removed! I've tried playing around with this but no matter what way I change it, either I get 2 dummys, all my units get removed or best of all my game crashes.
Any help is welcome.
Events
Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(antimagicshell))
Actions
Unit - Create 1 Dummy Caster for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
Wait 0.20 seconds
Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Triggering unit)
Unit - Remove (Last created unit) from the game
This works perfectly until the very end, when both my units that I want have the buff, but the dummy isn't removed! I've tried playing around with this but no matter what way I change it, either I get 2 dummys, all my units get removed or best of all my game crashes.
Any help is welcome.