- Joined
- Jun 8, 2009
- Messages
- 6
(For u dudes and chicks (if ther is any1) this trigger will cast chain heal on ur target and then target the one who have the lowest hp using %)
My "chain heal" spell dosent work as it should and dont know why sometimes it heals 3 as it should and sometimes it heals the 1 and 3 target but it allways heals the 1 target. Pleas dont tell me to use "healing wave" becouse i want to use a trigger that activates when they are targeted by the spell the dummy target cast so i can use other variables on the heal that will change under the game.Oh yeah and the dummy target allwasy spawn at the right place for me but dont cast the spell. (have reamoved all the leaks on my own trigger ,(they i know about so if u see any leak in the image plz tell me)).(the healing way used in trigger are a one target heal). I whould be happy if u write something if u have read this thread so i know if i can w8 for awnser or put this spell / trigger in the garbage.

Chain heal
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chain Heal
Actions
Set CH_prev = (Triggering unit)
Set CH_targ = (Target unit of ability being cast)
Set CH_point = (Position of CH_prev)
Set CH_tp = (Position of CH_targ)
Unit Group - Add CH_targ to Chain_heal
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call RemoveLocation(udg_CH_tp)
Wait 0.30 seconds
Set CH_prev = CH_targ
Set CH_point = (Position of CH_prev)
Set CH_grp = (Units within CH_range of CH_point matching ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is in Chain_heal) Not equal to True)))
Set CH_lowHP = (Random unit from CH_grp)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Unit Group - Pick every unit in CH_grp and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of (Picked unit)) Less than CH_lowHProt
Then - Actions
Set CH_lowHP = (Picked unit)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Else - Actions
Do nothing
Set CH_targ = CH_lowHP
Set CH_tp = (Position of CH_targ)
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Unit Group - Add CH_targ to Chain_heal
Set CH_lowHProt = 100.00
Custom script: call RemoveLocation(udg_CH_tp)
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call DestroyGroup(udg_CH_grp)
Wait 0.30 seconds
Set CH_prev = CH_targ
Set CH_point = (Position of CH_prev)
Set CH_grp = (Units within CH_range of CH_point matching ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is in Chain_heal) Not equal to True)))
Set CH_lowHP = (Random unit from CH_grp)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Unit Group - Pick every unit in CH_grp and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in Chain_heal) Not equal to True
(Percentage life of (Picked unit)) Less than CH_lowHProt
Then - Actions
Set CH_lowHP = (Picked unit)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Else - Actions
Do nothing
Set CH_targ = CH_lowHP
Set CH_tp = (Position of CH_targ)
Unit Group - Add CH_targ to Chain_heal
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Unit Group - Remove all units from Chain_heal
Set CH_lowHProt = 100.00
Custom script: call RemoveLocation(udg_CH_tp)
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call DestroyGroup(udg_CH_grp)
My "chain heal" spell dosent work as it should and dont know why sometimes it heals 3 as it should and sometimes it heals the 1 and 3 target but it allways heals the 1 target. Pleas dont tell me to use "healing wave" becouse i want to use a trigger that activates when they are targeted by the spell the dummy target cast so i can use other variables on the heal that will change under the game.Oh yeah and the dummy target allwasy spawn at the right place for me but dont cast the spell. (have reamoved all the leaks on my own trigger ,(they i know about so if u see any leak in the image plz tell me)).(the healing way used in trigger are a one target heal). I whould be happy if u write something if u have read this thread so i know if i can w8 for awnser or put this spell / trigger in the garbage.

Chain heal
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chain Heal
Actions
Set CH_prev = (Triggering unit)
Set CH_targ = (Target unit of ability being cast)
Set CH_point = (Position of CH_prev)
Set CH_tp = (Position of CH_targ)
Unit Group - Add CH_targ to Chain_heal
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call RemoveLocation(udg_CH_tp)
Wait 0.30 seconds
Set CH_prev = CH_targ
Set CH_point = (Position of CH_prev)
Set CH_grp = (Units within CH_range of CH_point matching ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is in Chain_heal) Not equal to True)))
Set CH_lowHP = (Random unit from CH_grp)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Unit Group - Pick every unit in CH_grp and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of (Picked unit)) Less than CH_lowHProt
Then - Actions
Set CH_lowHP = (Picked unit)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Else - Actions
Do nothing
Set CH_targ = CH_lowHP
Set CH_tp = (Position of CH_targ)
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Unit Group - Add CH_targ to Chain_heal
Set CH_lowHProt = 100.00
Custom script: call RemoveLocation(udg_CH_tp)
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call DestroyGroup(udg_CH_grp)
Wait 0.30 seconds
Set CH_prev = CH_targ
Set CH_point = (Position of CH_prev)
Set CH_grp = (Units within CH_range of CH_point matching ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is in Chain_heal) Not equal to True)))
Set CH_lowHP = (Random unit from CH_grp)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Unit Group - Pick every unit in CH_grp and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in Chain_heal) Not equal to True
(Percentage life of (Picked unit)) Less than CH_lowHProt
Then - Actions
Set CH_lowHP = (Picked unit)
Set CH_lowHProt = (Percentage life of CH_lowHP)
Else - Actions
Do nothing
Set CH_targ = CH_lowHP
Set CH_tp = (Position of CH_targ)
Unit Group - Add CH_targ to Chain_heal
Unit - Create 1 CH for Player 1 (Red) at CH_point facing CH_tp
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave to (Last created unit)
Unit - Set level of Healing Wave for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave CH_targ
Unit Group - Remove all units from Chain_heal
Set CH_lowHProt = 100.00
Custom script: call RemoveLocation(udg_CH_tp)
Custom script: call RemoveLocation(udg_CH_point)
Custom script: call DestroyGroup(udg_CH_grp)
Last edited: