Cloak_Master
Active Member
- Reaction score
- 41
I'm having a slight problem with a spell that is supposed to allow a hero to "link" to a unit. The thing is, only if the unit takes damage the hero will regain 50% of the damage the unit takes. My trigger goes...
And apparantly it bulks the heroes life up too much? Anything I'm doing wrong? Oh, and just for refrence...
Thanks.
Code:
Spinal Tap
Events
Unit - A unit Is attacked
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Attacked unit) Equal to Spinal_Tap_Array[(Integer A)]
Then - Actions
Set Real_Life[(Player number of (Player((Integer A))))] = (Life of Spinal_Tap_Array[(Player number of (Owner of Spinal_Tap_Array[(Integer A)]))])
Wait 0.10 seconds
Set Control_Array[(Player number of (Owner of Spinal_Tap_Array[(Integer A)]))] = (Real_Life[(Player number of (Player((Integer A))))] - ((Life of Spinal_Tap_Array[(Player number of (Owner of Spinal_Tap_Array[(Integer A)]))]) / 2.00))
Set Control_Array2[(Player number of (Owner of Spinal_Tap_Array[(Integer A)]))] = (Control_Array[(Player number of (Player((Integer A))))] + (Life of (Random unit from (Units owned by (Owner of Spinal_Tap_Array[(Integer A)]) matching (((Matching unit) is A Hero) Equal to True)))))
Unit Group - Pick every unit in (Units owned by (Owner of Spinal_Tap_Array[(Integer A)]) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to Control_Array2[(Player number of (Owner of (Picked unit)))]
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Do nothing
And apparantly it bulks the heroes life up too much? Anything I'm doing wrong? Oh, and just for refrence...
Code:
Spinal Initiate
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Spinal Tap
Actions
Set Spinal_Tap_Array[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
Thanks.