Kusanagi Kuro
Hosted Project: SC
- Joined
- Mar 11, 2012
- Messages
- 708
Hi guys. I make a passive spell which will reduce the damage taken from the front and if the hp of the hero drops below 20%, it will give him a huge hp regen. The damage reduction part work but the heal isnt. Here is my trigger:
I explain the work:
-If both the Guts_Boolean and Guts_RegenBoolean are true and the hp of the hero is belows 20%, then heal himself and set Guts_Boolen to False.
-If Guts_Boolean is false and Guts_RegenBoolean is true, then the heal has already started and it wont make the spell stack.
-If both of them are False, then the spell will go on cooldown.
That's how I want it to work. But I dont know why it doesnt turn out like that.
Can anyone point out where I did it wrong?
-
Guts Work
-
Events
- Game - DamageModifierEvent becomes Equal to 1.00
-
Conditions
- (Level of Guts for DamageEventTarget) Greater than 0
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Facing of DamageEventSource) Greater than or equal to (Facing of DamageEventTarget)
-
Then - Actions
- Set TempReal = ((Facing of DamageEventSource) - (Facing of DamageEventTarget))
-
Else - Actions
- Set TempReal = ((Facing of DamageEventTarget) - (Facing of DamageEventSource))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- TempReal Greater than or equal to 165.00
- TempReal Less than or equal to 195.00
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Set DamageEventAmount = (DamageEventAmount x (0.85 - (0.05 x (Real((Level of Guts for DamageEventTarget))))))
- Else - Actions
-
If - Conditions
- Set CV = (Custom value of DamageEventTarget)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Percentage life of DamageEventTarget) Less than or equal to 20.0
- Guts_Boolean[CV] Equal to True
- Guts_RegenBoolean[CV] Equal to True
-
Then - Actions
- Set Guts_Duration[CV] = 5.00
- Set Guts_Regen[CV] = (50.00 + (25.00 x (Real((Level of Guts for DamageEventTarget)))))
- Set Guts_Boolean[CV] = False
- Special Effect - Create a special effect attached to the origin of DamageEventTarget using Abilities\Spells\Orc\Voodoo\VoodooAuraTarget.mdl
- Set Guts_Effect[CV] = (Last created special effect)
- Unit Group - Add DamageEventTarget to Guts_CDGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Guts Cooldown <gen> is on) Equal to True
- Then - Actions
-
Else - Actions
- Trigger - Turn on Guts Cooldown <gen>
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Guts Cooldown
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Guts_CDGroup is empty) Equal to True
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
-
Unit Group - Pick every unit in Guts_CDGroup and do (Actions)
-
Loop - Actions
- Set CV = (Custom value of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Guts_Duration[CV] Greater than 0.00
-
Then - Actions
- Set Guts_Duration[CV] = (Guts_Duration[CV] - 0.10)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Guts_RegenBoolean[CV] Equal to False
-
Then - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Guts_Regen[CV] / 10.00))
- Else - Actions
-
If - Conditions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Guts_RegenBoolean[CV] Equal to False
-
Then - Actions
- Set Guts_Duration[CV] = 120.00
- Set Guts_RegenBoolean[CV] = True
- Special Effect - Destroy Guts_Effect[CV]
-
Else - Actions
- Set Guts_Boolean[CV] = False
- Set Guts_RegenBoolean[CV] = False
- Unit Group - Remove (Picked unit) from Guts_CDGroup
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in Guts_CDGroup and do (Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-If both the Guts_Boolean and Guts_RegenBoolean are true and the hp of the hero is belows 20%, then heal himself and set Guts_Boolen to False.
-If Guts_Boolean is false and Guts_RegenBoolean is true, then the heal has already started and it wont make the spell stack.
-If both of them are False, then the spell will go on cooldown.
That's how I want it to work. But I dont know why it doesnt turn out like that.
Can anyone point out where I did it wrong?
Last edited: