- Joined
- Aug 3, 2004
- Messages
- 2,906
Code:
HpRecall
Events
Unit - A unit Is attacked
Conditions
Actions
Set RecalledUnit = (Attacked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(RecalledUnit has buff Recall ) Equal to True
(Life of RecalledUnit) Less than or equal to (((Max life of RecalledUnit) / 100.00) x 10.00)
Then - Actions
Special Effect - Create a special effect attached to the overhead of RecalledUnit using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
Unit Group - Pick every unit in (Units owned by (Owner of RecalledUnit) of type Salvation Spire) and do (Actions)
Loop - Actions
Set TempLoc50 = (Position of (Picked unit))
Unit - Move RecalledUnit instantly to TempLoc50
Unit - Set mana of RecalledUnit to 0.00
Special Effect - Create a special effect attached to the overhead of RecalledUnit using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Else - Actions
Set RecalledUnit = No unit
Custom script: call RemoveLocation (udg_TempLoc50)
This works perfectly except both the special effects play at the same time. The first is meant to play at the units position when it is attacked, and the second at its new location.
Keep in mind this must be MUI so no wait functions.