# [Trigger]Spell help.

Status
Not open for further replies.

#### Lethien

Level 3
So, Im probably just doing something wrong again. Kinda used to it now, but for some reason, my 'healing spell' based on holy light, (nearly) kills the hero when cast at an enemy unit. I have absolutely no idea, and it only occours about 33% of the times. the spell can be found here: http://www.hiveworkshop.com/forums/spells-569/greater-heal-v1-3b-gui-173905/

Make sure u don't forget to spend the talents, and then just try it out a few times. If I'm not mistaken, using the spell offensively SOMETIMES either kills the hero or leaves the hero with ~260 hp. about the amount it would normally heal/damage the target unit.

Oh, and heres the trigger:
• Greater Heal
• Events
• Unit - A unit Starts the effect of an ability
• Conditions
• (Ability being cast) Equal to Greater Heal
• ((Target unit of ability being cast) is alive) Equal to True
• Actions
• Set Loc[1] = (Position of (Triggering unit))
• Set Loc[2] = (Position of (Target unit of ability being cast))
• Set Group = (Units within 800.00 of Loc[2] matching (((Matching unit) Not equal to (Target unit of ability being cast)) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of (Target unit of ability being cast))) Equal to
• Set GreaterHeal = ((75.00 + ((Real((Random integer number between 1 and 25))) + (3.00 x ((Real((Level of Greater Heal for (Triggering unit)))) + (Real((Intelligence of (Triggering unit) (Include bonuses)))))))) / 5.00)
• Set CriticalStrikeCalculator = (Random integer number between 1 and 100)
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Level of Focus for (Triggering unit)) Greater than 0
• Then - Actions
• Set GreaterHeal = (GreaterHeal x ((Real((Level of Focus for (Triggering unit)))) x 1.03))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Random integer number between 1 and 100) Less than or equal to (5 + (5 x (Level of Focus for (Triggering unit))))
• Then - Actions
• Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + ((Max mana of (Triggering unit)) x (0.05 x (Real((Level of Focus for (Triggering unit)))))))
• Special Effect - Create a special effect at Loc[1] using Abilities\Spells\Items\AIma\AImaTarget.mdl
• Special Effect - Destroy (Last created special effect)
• Floating Text - Create floating text that reads (String((Integer((((Mana of (Triggering unit)) x 0.05) x (Real((Level of Focus for (Triggering unit))))))))) above (Triggering unit) with Z offset 70.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Else - Actions
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• ((Owner of (Target unit of ability being cast)) is an ally of (Owner of (Triggering unit))) Equal to True
• Then - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• CriticalStrikeCalculator Less than or equal to (15 + (1 x ((Intelligence of (Casting unit) (Include bonuses)) / 5)))
• Then - Actions
• Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (GreaterHeal x 2.00))
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x 2.00))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 15.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Level of Holy Excess for (Triggering unit)) Greater than or equal to 1
• Then - Actions
• Unit Group - Pick every unit in Group and do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Picked unit) Equal to (Triggering unit)
• Then - Actions
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GreaterHeal x ((0.15 x (Real((Level of Holy Excess for (Triggering unit))))) x 2.00)))
• Special Effect - Create a special effect at Loc[1] using Abilities\Spells\Human\Heal\HealTarget.mdl
• Special Effect - Destroy (Last created special effect)
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x (0.15 x ((Real((Level of Holy Excess for (Triggering unit)))) x 2.00))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Else - Actions
• Set Loc[3] = (Position of (Picked unit))
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GreaterHeal x ((0.10 x (Real((Level of Holy Excess for (Triggering unit))))) x 2.00)))
• Special Effect - Create a special effect at Loc[3] using Abilities\Spells\Human\Heal\HealTarget.mdl
• Special Effect - Destroy (Last created special effect)
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x (0.10 x ((Real((Level of Holy Excess for (Triggering unit)))) x 2.00))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Custom script: call RemoveLocation (udg_Loc[3])
• Else - Actions
• Else - Actions
• Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + GreaterHeal)
• Floating Text - Create floating text that reads (String((Integer(GreaterHeal)))) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Level of Holy Excess for (Triggering unit)) Greater than or equal to 1
• Then - Actions
• Unit Group - Pick every unit in Group and do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Picked unit) Equal to (Triggering unit)
• Then - Actions
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GreaterHeal x (0.15 x (Real((Level of Holy Excess for (Triggering unit)))))))
• Special Effect - Create a special effect at Loc[1] using Abilities\Spells\Human\Heal\HealTarget.mdl
• Special Effect - Destroy (Last created special effect)
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x (0.15 x (Real((Level of Holy Excess for (Triggering unit)))))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Else - Actions
• Set Loc[3] = (Position of (Picked unit))
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))
• Special Effect - Create a special effect at Loc[3] using Abilities\Spells\Human\Heal\HealTarget.mdl
• Special Effect - Destroy (Last created special effect)
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Custom script: call RemoveLocation (udg_Loc[3])
• Else - Actions
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• CriticalStrikeCalculator Less than or equal to (15 + (1 x ((Intelligence of (Casting unit) (Include bonuses)) / 5)))
• Then - Actions
• Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - GreaterHeal)
• Floating Text - Create floating text that reads (String((Integer(GreaterHeal)))) above (Target unit of ability being cast) with Z offset 0.00, using font size 15.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Level of Holy Excess for (Triggering unit)) Greater than or equal to 1
• Then - Actions
• Unit Group - Pick every unit in Group and do (Actions)
• Loop - Actions
• Unit - Set life of (Triggering unit) to ((Life of (Picked unit)) - (GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Else - Actions
• Else - Actions
• Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (GreaterHeal / 2.00))
• Floating Text - Create floating text that reads (String((Integer((GreaterHeal / 2.00))))) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Level of Holy Excess for (Triggering unit)) Greater than or equal to 1
• Then - Actions
• Unit Group - Pick every unit in Group and do (Actions)
• Loop - Actions
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((GreaterHeal / 2.00) x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))
• Floating Text - Create floating text that reads (String((Integer(((GreaterHeal / 2.00) x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
• Floating Text - Change (Last created floating text): Disable permanence
• Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
• Else - Actions
• Custom script: call RemoveLocation (udg_Loc[1])
• Custom script: call RemoveLocation (udg_Loc[2])
• Custom script: call DestroyGroup (udg_Group)
keep in mind it only happens when used offensively, maybe when critical strike occours?

#### Lethien

Level 3
Problem solved, Im sorry.

• Unit - Set life of (Triggering unit) to ((Life of (Picked unit)) - (GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))
should have been
• Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (GreaterHeal x (0.10 x (Real((Level of Holy Excess for (Triggering unit)))))))

Status
Not open for further replies.

Replies
20
Views
1K
Replies
3
Views
542
Replies
10
Views
913
[Trigger] Lag?
Replies
4
Views
752
Replies
4
Views
535