- Joined
- Sep 20, 2013
- Messages
- 29
Hi,
Recently I've been creating a trigger standing for just a simple triggered version of renamed Holy Light Spell, concretely Sing of Life, with different description and healing amount. The spell is also supposed to damage and enemy unit for half of its basic healing amount, which in turn works properly as well as healing itself. The main problem however is the fact that the healing part of the trigger is still run even when a targeted unit is at full health despite the fact that it shouldn't happen at all as actions responsible for it shouldn't be even executed in this case according to the trigger code. The whole trigger is by the way split in 3 parts as separated triggers, whereas 2 of them just stand for the actions related to floating text used by the main trigger.
Here is the trigger code:
Main Trigger:
2nd Trigger:
3rd Trigger:
Please, if it's possible, advise me based on these pictures what should i change while modifying trigger to make it not to leak. Thanks in advance.
Recently I've been creating a trigger standing for just a simple triggered version of renamed Holy Light Spell, concretely Sing of Life, with different description and healing amount. The spell is also supposed to damage and enemy unit for half of its basic healing amount, which in turn works properly as well as healing itself. The main problem however is the fact that the healing part of the trigger is still run even when a targeted unit is at full health despite the fact that it shouldn't happen at all as actions responsible for it shouldn't be even executed in this case according to the trigger code. The whole trigger is by the way split in 3 parts as separated triggers, whereas 2 of them just stand for the actions related to floating text used by the main trigger.
Here is the trigger code:
Main Trigger:
-
Sign Of Life
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Sign of Life
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is Magic Immune) Equal to False
-
-
Then - Actions
-
Set SignOfLifeTarget = (Target unit of ability being cast)
-
Set SignOfLifeCaster = (Triggering unit)
-
Special Effect - Create a special effect attached to the origin of SignOfLifeTarget using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(SignOfLifeTarget belongs to an enemy of (Owner of SignOfLifeCaster)) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of HUMAN for SignOfLifeTarget) Not equal to 1
-
-
Then - Actions
-
Sound - Play HolyBolt <gen>
-
Unit - Cause SignOfLifeCaster to damage SignOfLifeTarget, dealing (SignOfLifeAmount[(Level of Sign of Life for SignOfLifeCaster)] / 2.00) damage of attack type Spells and damage type Normal
-
-
Else - Actions
-
Unit - Order (Triggering unit) to Stop
-
Trigger - Run Human Warning Floating Text <gen> (checking conditions)
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage life of SignOfLifeTarget) Equal to 100.00
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Stop
-
Trigger - Run Full Health Floating Text <gen> (checking conditions)
-
-
Else - Actions
-
Sound - Play HolyBolt <gen>
-
Unit - Set life of SignOfLifeTarget to ((Life of SignOfLifeTarget) + SignOfLifeAmount[(Level of Sign of Life for SignOfLifeCaster)])
-
-
-
-
-
-
Else - Actions
-
Unit - Order (Triggering unit) to Stop
-
-
-
-
-
Full Health Floating Text
-
Events
-
Conditions
-
((This trigger) is on) Equal to True
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Floating Text - Create floating text that reads Already at full hea... above SignOfLifeCaster with Z offset 0.00, using font size 10.00, color (VertexColorRed%, VertexColorGreen%, VertexColorBlue%), and 0.00% transparency
-
Set FullHealth = (Last created floating text)
-
Wait 4.50 seconds
-
Floating Text - Destroy FullHealth
-
Trigger - Turn on (This trigger)
-
-
-
Human Warning Floating Text
-
Events
-
Conditions
-
((This trigger) is on) Equal to True
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Floating Text - Create floating text that reads Can't target an ene... above SignOfLifeCaster with Z offset 0.00, using font size 10.00, color (VertexColorRed%, VertexColorGreen%, VertexColorBlue%), and 0.00% transparency
-
Set HumanWarning = (Last created floating text)
-
Wait 4.50 seconds
-
Floating Text - Destroy HumanWarning
-
Trigger - Turn on (This trigger)
-
-
Please, if it's possible, advise me based on these pictures what should i change while modifying trigger to make it not to leak. Thanks in advance.