- Joined
- Mar 5, 2008
- Messages
- 3,887
Hello and happy holidays!
Ok, I'm making some spell for my friend, its like from Diablo 2 ability from Barbarian that gives you and nearby units life and mana bonus(not regeneration)
The problem is that everything works nice, but the abilities i add by using unit group don't get removed after a period of time.
Here is the trigger
-BZR-
Ok, I'm making some spell for my friend, its like from Diablo 2 ability from Barbarian that gives you and nearby units life and mana bonus(not regeneration)
The problem is that everything works nice, but the abilities i add by using unit group don't get removed after a period of time.
Here is the trigger
-
Battle Orders
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to BO
-
Actions
- Set TempLoc1 = (Position of (Triggering unit))
-
For each (Integer A) from 1 to 36, do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempLoc1 facing Default building facing degrees
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Unit - Add BO(effect) to (Last created unit)
- Set TempLoc1_Cast = (TempLoc1 offset by 50.00 towards (10.00 x (Real((Integer A)))) degrees)
- Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm TempLoc1_Cast
- Custom script: call RemoveLocation (udg_TempLoc1_Cast)
-
Loop - Actions
- Set GroupVar = (Units within 600.00 of TempLoc1 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
- Custom script: call RemoveLocation (udg_TempLoc1)
-
Unit Group - Pick every unit in GroupVar and do (Actions)
-
Loop - Actions
- Set UnitVarPicked = (Picked unit)
- Unit - Add Life bonus to UnitVarPicked
- Unit - Set level of Life bonus for UnitVarPicked to (Level of BO for (Triggering unit))
- Unit - Add Mana Bonus to UnitVarPicked
- Unit - Set level of Mana Bonus for UnitVarPicked to (Level of BO for (Triggering unit))
-
Loop - Actions
- Custom script: call DestroyGroup (udg_GroupVar)
- Wait 20.00 game-time seconds
- Unit - Remove Life bonus from UnitVarPicked
- Unit - Remove Mana Bonus from UnitVarPicked
-
Events
-BZR-