Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
it isn't really hard if you have the heart for it...
-make a dummy spell.
- save the caster unit (preferably in a hashtable) when it casts the dummy spell then add him to a caster group.
-save other data such as number of jumps and such things in the hashtable. -heal the target unit and save the target to the hashtable
-a periodic trigger that picks every unit in the caster group then
-->Load target(last one that got hit) unit
-->Pick every unit within range of target(matching unit is not equal to target)
-->Pick a random unit from that group
-->set him as the new target then heal, then adjust the variables saved in the hashtable.
make sure you remove the caster when the jumps get to 0 or when there are no units in the units within range of target... and of course clean leaks. if you want lightning effects you need to save the location of the last target and the new target.
Set IntInteger = (Intelligence of (Triggering unit) (Include bonuses))
This makes the integer the intelligence amount of the triggering unit. Then just do something like...
Unit - Set (Life of YourUnit) to (Life of YourUnit) + (Real(IntInteger x YourAmount))
Do one of this for each unit that has been hit.
Ex. for a chain heal hitting 4 units.
Untitled Trigger 004
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Chain Heal
Actions
Set IntInteger = (Intelligence of (Triggering unit) (Include bonuses))
Set Position[1] = (Position of (Target unit of ability being cast))
Set UnitGroup = (Units within 500.00 of Position[1] matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True))
Set Unit[1] = (Random unit from UnitGroup)
Set Position[2] = (Position of Unit[1])
Set UnitGroup2 = (Units within 500.00 of Position[2] matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True) and ((Matching unit) Not equal to (Target unit of ability being cast))))
Set Unit[2] = (Random unit from UnitGroup2)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Real(IntInteger)) x 2.50))
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Real(IntInteger)) x 5.00))
Unit - Set life of Unit[1] to ((Life of Unit[1]) + ((Real(IntInteger)) x 2.50))
Unit - Set life of Unit[2] to ((Life of Unit[2]) + ((Real(IntInteger)) x 1.25))
EDIT: Updated code, fix logic error, everything should work fine now. The above code includes debug message. If you don't understand you can download the map below.
**Note that this is not a chain spell but just a single spell that checks for the lowest health. Just to give you some idea.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.