- Joined
- Dec 31, 2014
- Messages
- 68
Hello
I have made a trigger that when a player controlled unit uses the defend ability it creates a special effect overhead the unit using it. When ordered to undefend the special effect dissappears.
This is for a multiplayer map and I want this to function for all players.
This is what I have:
I created a special effect Variable named 'p1defend'
Turn On Defend for Player 1
The above trigger works but I believe it would cause leaks?
I tried the point variable method but the most I was able to do was set the point to the position of the unit using the ability but it doesn't attach itself to the unit and remain there, it only occurs at the specified point.
Does anyone have any suggestions as to how I can do this leak free?
Thanks.
I have made a trigger that when a player controlled unit uses the defend ability it creates a special effect overhead the unit using it. When ordered to undefend the special effect dissappears.
This is for a multiplayer map and I want this to function for all players.
This is what I have:
I created a special effect Variable named 'p1defend'
Turn On Defend for Player 1
-
P1 Defend
-
Events
- Unit - A unit owned by Player 1 (Red) Is issued an order with no target
-
Conditions
- (Issued order) Equal to (Order(defend))
-
Actions
- Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Items\AIda\AIdaTarget.mdl
- Set p1defend = (Last created special effect)
-
Events
-
P1 Undefend
-
Events
- Unit - A unit owned by Player 1 (Red) Is issued an order with no target
-
Conditions
- (Issued order) Equal to (Order(undefend))
-
Actions
- Special Effect - Destroy p1defend
-
Events
The above trigger works but I believe it would cause leaks?
I tried the point variable method but the most I was able to do was set the point to the position of the unit using the ability but it doesn't attach itself to the unit and remain there, it only occurs at the specified point.
Does anyone have any suggestions as to how I can do this leak free?
Thanks.