• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Request - Negative Spirit Link

Status
Not open for further replies.
Level 5
Joined
Jan 29, 2014
Messages
38
Hello guys, i am creating an rpg style map with alot of heroes, however im not the best when it comes to triggers, and i wanted to make spell that is like Spirit Link but vice-versa.
I want this spirit link to be able to target enemies and self, however i want when the Caster (Hero) takes damage, the damage to be distributed among the enemies but when the enemies take damage to be not distributed to the Caster (Hero). Is there a way to make this work our its too much pain in the ass to make such custom spell?

Thanks in advance, if no one can land me a hand there, i will just skip the kit i have in mind for my hero as my abilities to create good custom spells sometimes fail :D
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
^ I would go for DamageEngine and Unit Indexer. ;)
Since this is just a public request and not a public submission;
(There are lots of ways one can easily achieve this and each
with advantages/disadvantages for map-specific circumstances)

onCast, save the caster and create an indexed group. I supposed
spirit linking/chaining process is just instant. If that's so you may
include the picked units already in the indexed group in this event.
(excluding those who are already in the indexed group of course)
Then insert the caster into the global group for each caster iteration.

OnPeriod, the purpose of this periodic event is to iterate each caster
and track the buff removals. Each caster owns a unit group where
its linked/chained enemy units are contained. Iterating these owned
groups for removing the units who don't have the buff anymore too.
(interval of operations matter than precision in this case: 1/10 or 0.10)

onDamage, a damage detector should come in handy, I highly recommend
Bribe's damage engine for this as it's being maintained up to this date.
On this event you'll detect units that were taking damage that belongs to
the global group (where we contained the casters) and get this amount of
damage to calculate and distribute the result to the units in their owned
groups. And that's only the mechanics to achieve this properly and MUI.
 
Level 5
Joined
Jan 29, 2014
Messages
38

Attachments

  • var error.png
    var error.png
    52.8 KB · Views: 39
Level 24
Joined
Feb 9, 2009
Messages
1,787
Re-uploaded with damage engine folder not in "triggers unique to this map."
Be sure to copy it over, and in your preferences in the editor "general" tab that "automatically create unknown variables" is ticked on.

Copy over the Dummy unit, spell, and buff with ReSp tag and in the config settings that matching variables are set to them.

If that fails try updating the damage engine to the latest version as I'm using the last one that was usable on 1.31.

Edit:
Wow big whoops on my part, left out the custom script to remove the group & location leaks!
Paste has next version.
 
Last edited:
Level 5
Joined
Jan 29, 2014
Messages
38
Re-uploaded with damage engine folder not in "triggers unique to this map."
Be sure to copy it over, and in your preferences in the editor "general" tab that "automatically create unknown variables" is ticked on.

Copy over the Dummy unit, spell, and buff with ReSp tag and in the config settings that matching variables are set to them.

If that fails try updating the damage engine to the latest version as I'm using the last one that was usable on 1.31.

Edit:
Wow big whoops on my part, left out the custom script to remove the group & location leaks!
Paste has next version.

Hey dude, after trying for seevral times i managed to successfuly upload it! Thank you so much mate, i will be sure to put your name into credits once i finish my map which will be probably mid august. If there is some other way for me to express my gratidude and it is in my power, sure. Thanks again, the spell works great just like i imagined it:)
 
Status
Not open for further replies.
Top