Cloak_Master
Active Member
- Reaction score
- 41
Code:
Spirit Bond 2
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Bondedunitgroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Picked unit)) and (Position of Bondedunit[(Player number of (Owner of (Picked unit)))])) Less than or equal to 500.00
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 150.00)
Unit - Set life of Bondedunit[(Player number of (Owner of (Picked unit)))] to ((Life of Bondedunit[(Player number of (Owner of (Picked unit)))]) + 150.00)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of Bondedunit[(Player number of (Owner of (Picked unit)))] using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
Special Effect - Destroy (Last created special effect)
Lightning - Create a Spirit Link lightning effect from source (Position of (Picked unit)) to target (Position of Bondedunit[(Player number of (Owner of (Picked unit)))])
Set Lighting[(Player number of (Owner of (Picked unit)))] = (Last created lightning effect)
Trigger - Run Spirit Bond FX <gen> (ignoring conditions)
Else - Actions
Do nothing
Unit Group - Pick every unit in Bondedunitgroup[2] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Picked unit)) and (Position of Bondedunit[(Player number of (Owner of (Picked unit)))])) Less than or equal to 500.00
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 150.00)
Unit - Set life of Bondedunit[(Player number of (Owner of (Picked unit)))] to ((Life of Bondedunit[(Player number of (Owner of (Picked unit)))]) + 150.00)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of Bondedunit[(Player number of (Owner of (Picked unit)))] using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
Special Effect - Destroy (Last created special effect)
Lightning - Create a Spirit Link lightning effect from source (Position of (Picked unit)) to target (Position of Bondedunit[(Player number of (Owner of (Picked unit)))])
Set Lighting[(Player number of (Owner of (Picked unit)))] = (Last created lightning effect)
Trigger - Run Spirit Bond FX <gen> (ignoring conditions)
Else - Actions
Do nothing
Just gave you two pieces of a 10 piece trigger there. For some reason, this trigger works for red and not for any of the other players. Primer triggers:
Code:
Spirit Bond
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Spirit Bond (Neutral Hostile)
Actions
Unit Group - Remove all units of Bondedunitgroup[(Player number of (Owner of (Casting unit)))] from Bondedunitgroup[(Player number of (Owner of (Casting unit)))]
Unit Group - Add (Target unit of ability being cast) to Bondedunitgroup[(Player number of (Owner of (Casting unit)))]
Set Bondedunit[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Would love it if someone could help me out, thanks. (Edit, I already tried using an Integer A loop instead, still doesn't work)