- Joined
- Jul 19, 2007
- Messages
- 825
I have imported a spell from a spellpack into my map but I'm not sure the triggers of it is correct because I can't see where in the triggers I can set the amount percent of healing it should do to friendly units when an allied unit dies.
Stand and Fight; If a friendly unit dies under effect of the Aura. A percent of the max health of the unit will be spreaded among the other friendly units which are under the effect of the Aura.|n|n|cffffcc00Level 1|r - Heals 10% of the dying unit's max health.|n|cffffcc00Level 2|r - Heals 20% of the dying unit's max health.|n|cffffcc00Level 3|r - Heals 30% of the dying unit's max health.|n|cffffcc00Level 4|r - Heals 40% of the dying unit's max health.|n|n|cffFF0000AOE: |r 800|n|cff0000FFMana Cost: |r 40/50/60/70|n|cff99ccffCooldown: |r 0 seconds.
Stand and Fight; If a friendly unit dies under effect of the Aura. A percent of the max health of the unit will be spreaded among the other friendly units which are under the effect of the Aura.|n|n|cffffcc00Level 1|r - Heals 10% of the dying unit's max health.|n|cffffcc00Level 2|r - Heals 20% of the dying unit's max health.|n|cffffcc00Level 3|r - Heals 30% of the dying unit's max health.|n|cffffcc00Level 4|r - Heals 40% of the dying unit's max health.|n|n|cffFF0000AOE: |r 800|n|cff0000FFMana Cost: |r 40/50/60/70|n|cff99ccffCooldown: |r 0 seconds.
-
AuraNAct
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Stand and Fight
-
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to (Player((Integer A)))
-
-
Then - Actions
-
Set VariableSet AS_Hero[(Integer A)] = (Triggering unit)
-
Set VariableSet AS_HeroPos[(Integer A)] = (Position of (Triggering unit))
-
Unit - Create 1 Dummy (SaF) for (Owner of (Triggering unit)) at AS_HeroPos[(Integer A)] facing Default building facing degrees
-
Unit - Hide (Last created unit)
-
Set VariableSet AS_Dummy[(Integer A)] = (Last created unit)
-
Custom script: call RemoveLocation(udg_AS_HeroPos[bj_forLoopAIndex])
-
-
Else - Actions
-
-
-
-
-
-
AuraNDeact
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(AS_Hero[(Integer A)] has buff Stand and Fight Caster ) Equal to True
-
-
Then - Actions
-
Set VariableSet AS_HeroPosMove[(Integer A)] = (Position of AS_Hero[(Integer A)])
-
Unit - Move AS_Dummy[(Integer A)] instantly to AS_HeroPosMove[(Integer A)]
-
Custom script: call RemoveLocation(udg_AS_HeroPosMove[bj_forLoopAIndex])
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AS_Dummy[(Integer A)] Not equal to No unit
-
-
Then - Actions
-
Unit - Remove AS_Dummy[(Integer A)] from the game
-
Set VariableSet AS_Dummy[(Integer A)] = No unit
-
-
Else - Actions
-
-
-
-
-
-
-
-
AuraNDeter
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Dying unit)) Equal to (Player((Integer A)))
-
-
Then - Actions
-
Set VariableSet AS_MaxHP[(Integer A)] = (Integer((Max life of (Dying unit))))
-
Set VariableSet AS_DyingUnitPos[(Integer A)] = (Position of (Dying unit))
-
Set VariableSet AS_TmpGroup1[(Integer A)] = (Units within 800.00 of AS_DyingUnitPos[(Integer A)] matching (((Matching unit) belongs to an ally of (Owner of (Dying unit)).) Equal to True).)
-
Unit Group - Pick every unit in AS_TmpGroup1[(Integer A)] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Stand and Fight for (Picked unit)) Greater than or equal to 1
-
-
Then - Actions
-
Set VariableSet AS_Hero[(Integer A)] = (Picked unit)
-
Set VariableSet AS_HeroPos[(Integer A)] = (Position of AS_Hero[(Integer A)])
-
Set VariableSet AS_AbilityLVL[(Integer A)] = (Level of Stand and Fight for AS_Hero[(Integer A)])
-
Set VariableSet AS_TmpGroup2[(Integer A)] = (Units within 800.00 of AS_HeroPos[(Integer A)] matching (((Matching unit) has buff Stand and Fight ) Equal to True).)
-
Set VariableSet AS_UnitCount[(Integer A)] = (Number of units in AS_TmpGroup2[(Integer A)])
-
Set VariableSet AS_HpAdd[(Integer A)] = (AS_MaxHP[(Integer A)] / AS_UnitCount[(Integer A)])
-
If (AS_AbilityLVL[(Integer A)] Equal to 1) then do (Set VariableSet AS_HpAdd[(Integer A)] = (AS_HpAdd[(Integer A)] / 4)) else do (Do nothing)
-
If (AS_AbilityLVL[(Integer A)] Equal to 2) then do (Set VariableSet AS_HpAdd[(Integer A)] = (AS_HpAdd[(Integer A)] / 2)) else do (Do nothing)
-
If (AS_AbilityLVL[(Integer A)] Equal to 3) then do (Set VariableSet AS_HpAdd[(Integer A)] = (AS_HpAdd[(Integer A)] / (Integer(1.33)))) else do (Do nothing)
-
If (AS_AbilityLVL[(Integer A)] Equal to 4) then do (Set VariableSet AS_HpAdd[(Integer A)] = (AS_HpAdd[(Integer A)] / 1)) else do (Do nothing)
-
Special Effect - Create a special effect at AS_DyingUnitPos[(Integer A)] using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in AS_TmpGroup2[(Integer A)] and do (Actions)
-
Loop - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(AS_HpAdd[(Integer A)])))
-
Set VariableSet AS_PickedUnit[(Integer A)] = (Position of (Picked unit))
-
Special Effect - Create a special effect at AS_PickedUnit[(Integer A)] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_AS_PickedUnit[bj_forLoopAIndex])
-
-
-
Custom script: call DestroyGroup(udg_AS_TmpGroup2[bj_forLoopAIndex])
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_AS_HeroPos[bj_forLoopAIndex])
-
Custom script: call RemoveLocation(udg_AS_DyingUnitPos[bj_forLoopAIndex])
-
Custom script: call DestroyGroup(udg_AS_TmpGroup1[bj_forLoopAIndex])
-
-
Else - Actions
-
-
-
-
-