• 🏆 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] Make Devour heal

Status
Not open for further replies.

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
So do you want the Kodo to be healed (over time?) when he Devours (/digests) something? Or do you want the Devoured unit to be healed?

If the former, I have a neat trick I'm excited to see used.
If the latter... Devour is hard-coded to damage AFAIK (done some testing, but it's been a while). It's possible if you simply 'recreate' the Devour effect with triggers (to begin to answer your above question:
Devour can be caught like any other ability ("Unit Starts the Effect of an Ability" // "Ability being Cast = (modded) Devour").
And you can catch when a Devoured unit is killed by Devour (i.e. gone) with "Hidden Unit" (i.e. "A Unit is Killed" // "Killed Unit = Hidden" & "Killer = Kodo Beast (or other Devouring unit"), since the Devoured unit is considered 'hidden'.
 
Level 8
Joined
Jan 28, 2016
Messages
486
I know that I have to trigger it... but how do I trigger it? How do I check if the unit has devoured someone and if the devoured unit is still in his stomach?

I see. Well I'd add the Kodo and devoured unit in an array and use a periodic trigger to heal and check if the unit is still alive respectively. You might want to look at Bribes GUI DDS; I think it has an event for when a unit is loaded/unloaded but I'm not sure.

If the former, I have a neat trick I'm excited to see used.

Now I'm curious. What's the trick, o' wise magician?
 
Level 23
Joined
Oct 18, 2008
Messages
937
fun fact kodos count as transports. they can even unload things if you give them the ability.

set the damage per second to 0 from the "devour cargo" ability. then add these two triggers:

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Untitled Trigger 002 <gen> the event (Unit - (Entering unit) Takes damage)
  • Untitled Trigger 002
    • Events
    • Conditions
      • ((Triggering unit) is loaded into (Damage source)) Equal to True
      • (Damage taken) Equal to 0.00
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 1.00)
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
I see. Well I'd add the Kodo and devoured unit in an array and use a periodic trigger to heal and check if the unit is still alive respectively. You might want to look at Bribes GUI DDS; I think it has an event for when a unit is loaded/unloaded but I'm not sure.
Blah, no need for all that bloat. See above.

Dehua_Darbuya said:
Now I'm curious. What's the trick, o' wise magician?
Bah, nothing that impressive. But like I said, you can 'catch' the loading, 'catch' the unloading, and have access to the 'loader' and the 'loadee'. That's all you need to (trigger) add/remove custom (passive) abilities (Spellbooked if necessary) for the modification of either (well, hopefully. You can definitely mess with the 'loader', though).

The "healing" can be done like so, using a hidden passive HP regen ability (super-pseudo-code FTW):
i.e.
Trigger 1: "A kodo Devours any other unit --> add HP regen ability"
Trigger 2: "A kodo kills a hidden unit --> remove HP regen ability"

Rinse & repeat for whatever kind of ability/ies you wish.

He just told you.
Did I?

fun fact kodos count as transports. they can even unload things if you give them the ability.

set the damage per second to 0 from the "devour cargo" ability. then add these two triggers:

  • Untitled Trigger 001
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Untitled Trigger 002 <gen> the event (Unit - (Entering unit) Takes damage)
  • Untitled Trigger 002
    • Events
    • Conditions
      • ((Triggering unit) is loaded into (Damage source)) Equal to True
      • (Damage taken) Equal to 0.00
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 1.00)
Ooh-hoo, that looks useful... So you can (with triggers) mess with the guy inside? And with the stock Unload ability they can 'disgorge' themselves?

Question: Why do you have two separate triggers (& one that just adds an event to the other)? Why not 1 trigger (Trigger 002) with the event already in place??

I assumed he had another alternative for healing the Kodo Rider other than using the same method he stated in his post.
Yep. See above.
 
Level 23
Joined
Oct 18, 2008
Messages
937
Ooh-hoo, that looks useful... So you can (with triggers) mess with the guy inside? And with the stock Unload ability they can 'disgorge' themselves?

Question: Why do you have two separate triggers (& one that just adds an event to the other)? Why not 1 trigger (Trigger 002) with the event already in place??

to my knowledge this is the only sensible way to use damage events since they have to be "specific unit" gets damaged instead of "any unit" gets damaged. so the other trigger adds the specific unit event for every unit there is.

if you have preplaced units you'll need another trigger to add the event for those, as well.
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
to my knowledge this is the only sensible way to use damage events since they have to be "specific unit" gets damaged instead of "any unit" gets damaged. so the other trigger adds the specific unit event for every unit there is.

if you have preplaced units you'll need another trigger to add the event for those, as well.
No worries about pre-placed; I work with "melee additions" only so that's unnecessary.

Re-he-he-he-eally? So you're saying there isn't just a "Unit takes damaged" event? But that this sorta gets around it? How in the world... I never knew.

So could this let you actually (sorta) make "(Any) Unit is Damaged" triggers, catching the damager & damage-ee & doing things to them?? That would be fantastic.
 
Level 11
Joined
Jun 26, 2014
Messages
497
Ok, and that'll work... But AFAIK looping/periodic triggers are rather intensive on the game, requiring a relatively high amount of computer power. My solution avoids that.

Yeh but it's a lot more complex and I'm a noob so I'm not sure what to do exactly. Also I don't think that one trigger will be that intensive, you have to overload a map A LOT for it to lag.
 
Status
Not open for further replies.
Top