- Joined
- Mar 5, 2011
- Messages
- 199
Hello!
I've been trying to do this spell:
Sacrifice
When the hero's life gets less than 10%/15%/20% of its max life, he can activate this spell to cause damage around units. The damage inflicted is per missing life of an enemy unit. The hero cannot activated this spell if his life is greater than 10%/15%/20%.
level 1 - when life gets less than 10%, damage all the units within 800 aoe
level 2 - " "
level 3 - " "
The problem is that my trigger isn't working and I assume that it leaks. Please help in improving this trigger. Thank you very very very very very/....
I've been trying to do this spell:
Sacrifice
When the hero's life gets less than 10%/15%/20% of its max life, he can activate this spell to cause damage around units. The damage inflicted is per missing life of an enemy unit. The hero cannot activated this spell if his life is greater than 10%/15%/20%.
level 1 - when life gets less than 10%, damage all the units within 800 aoe
level 2 - " "
level 3 - " "
The problem is that my trigger isn't working and I assume that it leaks. Please help in improving this trigger. Thank you very very very very very/....
-
Sakripisyo
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Sakripisyo
-
Actions
- Set Pnt_Message = Rizal's Life must be less than the required HP
- Set Maxi_Life = (Max life of (Triggering unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sakripisyo for (Triggering unit)) Equal to 1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of (Triggering unit)) Less than (Maxi_Life x 0.10)
-
Then - Actions
- Trigger - Run Sakripisyo Cast <gen> (checking conditions)
-
Else - Actions
- Unit - Order (Triggering unit) to Stop
- Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 15, "|cffffcc00" + udg_Pnt_Message)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sakripisyo for (Triggering unit)) Equal to 2
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of (Triggering unit)) Less than (Maxi_Life x 0.15)
-
Then - Actions
- Trigger - Run Sakripisyo Cast <gen> (checking conditions)
-
Else - Actions
- Unit - Order (Triggering unit) to Stop
- Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 15, "|cffffcc00" + udg_Pnt_Message)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Sakripisyo for (Triggering unit)) Equal to 3
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of (Triggering unit)) Less than (Maxi_Life x 0.20)
-
Then - Actions
- Trigger - Run Sakripisyo Cast <gen> (checking conditions)
-
Else - Actions
- Unit - Order (Triggering unit) to Stop
- Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 15, "|cffffcc00" + udg_Pnt_Message)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
-
Sakripisyo Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Sakripisyo
-
Actions
- -------- Store position of caster --------
- Set Caster_Pnt = (Position of (Triggering unit))
- -------- Create cast target effect --------
- Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
- Special Effect - Destroy (Last created special effect)
- -------- Load dummy --------
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Pnt facing 0.00 degrees
- Custom script: call UnitAddAbility( bj_lastCreatedUnit, 'Aloc' ) // Makes unit unselectable
- Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Unit Group - Pick every unit in (Units within 99999.00 of Caster_Pnt) and do (Actions)
-
Loop - Actions
- -------- Deal damage per point of life missing --------
- Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing (((Max life of (Target unit of ability being cast)) - (Life of (Target unit of ability being cast))) x (0.30 x (Real((Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Chaos and damage type Normal
-
Loop - Actions
- -------- Clear location leak --------
- Custom script: call RemoveLocation( udg_Caster_Pnt )
- Custom script: set udg_Caster_Pnt = null
-
Events