- Joined
- Sep 10, 2012
- Messages
- 39
Goes Wrong the Second Time (Solved)
I have created an ability that, when used, increases maximum and current life and mana by 500. When the ability expires, the 500 life and mana, both maximum and current, are lost. When used the first time, the ability functions without flaw. When used the second time... all units who were previously affected by the ability die.
Ability is cast
I have created an ability that, when used, increases maximum and current life and mana by 500. When the ability expires, the 500 life and mana, both maximum and current, are lost. When used the first time, the ability functions without flaw. When used the second time... all units who were previously affected by the ability die.
Ability is cast
-
Last Stand Cast Lv1
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (Morlar, Conquerer) Last Stand
-
Actions
- Set LSCasterLoc = (Position of (Triggering unit))
- Countdown Timer - Start LSTimer as a One-shot timer that will expire in 15.10 seconds
-
Unit Group - Pick every unit in (Units within 1000.00 of LSCasterLoc matching (((Owner of (Matching unit)) Equal to Player 1 (Red)) or (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to LSTargets
-
Loop - Actions
- Trigger - Run Last Stand Effect Lv1 <gen> (ignoring conditions)
- Trigger - Turn on Last Stand Expire Lv1 <gen>
-
Events
-
Last Stand Effect Lv1
- Events
- Conditions
-
Actions
-
Unit Group - Pick every unit in LSTargets and do (Actions)
-
Loop - Actions
- Hashtable - Save ((Life of (Picked unit)) + 500.00) as 1 of (Key (Picked unit)) in LSTargetTable
- Hashtable - Save ((Mana of (Picked unit)) + 500.00) as 2 of (Key (Picked unit)) in LSTargetTable
- Unit - Add LS Armor Bonus to (Picked unit)
- Unit - Add LS Damage Bonus to (Picked unit)
- Unit - Add LS Max Life Bonus to (Picked unit)
- Unit - Add LS Max Mana Bonus to (Picked unit)
- Unit - Add LS Attack Speed Bonus to (Picked unit)
- Unit - Add LS Move Speed Bonus to (Picked unit)
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 500.00)
- Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + 500.00)
- Unit - Set life of (Picked unit) to (Load 1 of (Key (Picked unit)) from LSTargetTable)
- Unit - Set mana of (Picked unit) to (Load 2 of (Key (Picked unit)) from LSTargetTable)
-
Loop - Actions
-
Unit Group - Pick every unit in LSTargets and do (Actions)
-
Last Stand Expire Lv1
-
Events
- Time - LSTimer expires
- Conditions
-
Actions
-
Unit Group - Pick every unit in LSTargets and do (Actions)
-
Loop - Actions
- Hashtable - Save ((Life of (Picked unit)) - 500.00) as 1 of (Key (Picked unit)) in LSTargetTable
- Hashtable - Save ((Mana of (Picked unit)) - 500.00) as 2 of (Key (Picked unit)) in LSTargetTable
- Unit - Remove LS Armor Bonus from (Picked unit)
- Unit - Remove LS Damage Bonus from (Picked unit)
- Unit - Remove LS Attack Speed Bonus from (Picked unit)
- Unit - Remove LS Move Speed Bonus from (Picked unit)
- Unit - Remove LS Max Life Bonus from (Picked unit)
- Unit - Remove LS Max Mana Bonus from (Picked unit)
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 500.00)
- Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 500.00)
- Unit - Set life of (Picked unit) to (Load 1 of (Key (Picked unit)) from LSTargetTable)
- Unit - Set mana of (Picked unit) to (Load 2 of (Key (Picked unit)) from LSTargetTable)
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in LSTargetTable
-
Loop - Actions
- Hashtable - Clear LSTargetTable
- Unit Group - Remove all units from LSTargets
- Trigger - Turn off (This trigger)
-
Unit Group - Pick every unit in LSTargets and do (Actions)
-
Events
Last edited: