I have a td map and I need some help.
Some of the creeps have special abilitys, I had all ability working but when I made some optimising some of the triggers stopped working.
EDIT: To make less confusion the trigger works, but my wc3 turns itself off when the trigger is running.
I will post 2 abilitys 1 that works and 1 that doesn't.
Here is the working:
There is nothing wrong with using this trigger, but then only the targeted creep will start the ability.
Here is the trigger to locate units, so they will activate the ability when they take damage instead of being targeted.
I deleted the end of the trigger.
Here is the non working:
Here is another one but this works:
I think there is a problem when a trigger summoned unit is involved.
Could please somewhone help me? If you didn't understand or have questions please ask.
Some of the creeps have special abilitys, I had all ability working but when I made some optimising some of the triggers stopped working.
EDIT: To make less confusion the trigger works, but my wc3 turns itself off when the trigger is running.
I will post 2 abilitys 1 that works and 1 that doesn't.
Here is the working:
Code:
Level 9 Magic Shield
Events
Unit - A unit Is attacked
Conditions
(Mana of (Triggering unit)) Greater than or equal to 10.00
(Unit-type of (Triggering unit)) Equal to Level 9
Actions
Unit - Create 1 (level 9) for Neutral Hostile at (Position of (Triggering unit)) facing (Position of (Triggering unit))
Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Triggering unit)
Unit - Add a 0.35 second Generic expiration timer to (Last created unit)
Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - 10.00)
There is nothing wrong with using this trigger, but then only the targeted creep will start the ability.
Here is the trigger to locate units, so they will activate the ability when they take damage instead of being targeted.
I deleted the end of the trigger.
Code:
add event
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Set Locate_Unit = (Entering unit)
Trigger - Add to ice tower <gen> the event (Unit - Locate_Unit Takes damage)
Trigger - Add to duffman <gen> the event (Unit - Locate_Unit Takes damage)
Trigger - Add to Level 6 run Copy <gen> the event (Unit - Locate_Unit Takes damage)
Trigger - Add to Level 9 Magic Shield Copy <gen> the event (Unit - Locate_Unit Takes damage)
Here is the non working:
Code:
Level 9 Magic Shield Copy
Events
Conditions
(Mana of (Attacked unit)) Greater than or equal to 10.00
(Unit-type of (Attacked unit)) Equal to Level 9
Actions
Unit - Create 1 (level 9) for Neutral Hostile at (Position of (Attacked unit)) facing (Position of (Attacked unit))
Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Attacked unit)
Unit - Add a 0.35 second Generic expiration timer to (Last created unit)
Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) - 10.00)
Here is another one but this works:
Code:
Level 6 run Copy
Events
Conditions
(Mana of (Attacked unit)) Greater than or equal to 10.00
(Unit-type of (Attacked unit)) Equal to Level 6
Actions
Special Effect - Create a special effect attached to the origin of (Attacked unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) - 10.00)
Unit - Add (level 6) to (Attacked unit)
Wait 2.50 game-time seconds
Unit - Remove (level 6) from (Attacked unit)
I think there is a problem when a trigger summoned unit is involved.
Could please somewhone help me? If you didn't understand or have questions please ask.