• 🏆 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!

[SOLVED] How to track the source unit of a buff (a unit who use the buff to attack)?

Status
Not open for further replies.
Level 3
Joined
Mar 27, 2018
Messages
23
Hi.

I'm currently designing a passive ability: A attack B, then B will get a Buff until it died, and unit C will be born from B.

Imagine "Zombie" killed human, then the human becomes a zombie.

But the question is if there are multiple "zombie" players, how do I know the latest buff come from? How do I know the owner of the last buff?
I want to create the zombie for the last player who apply the zombie virus (not the last unit who attack the zombie) to the dead human, but I need to track the source unit of that buff.

Or the question is: "Is there any event to know who is adding a buff to another unit?"

I'm currently using ability disease cloud ('Aap1') as my template.

Thank you for any help!

2018-8-10 11:15:08 Edit:

I've got another thread about this ([Spell] - A unit takes damage issue - disease cloud - GUI (~SOLVED)), the question has been solved.
 
Last edited:
Level 13
Joined
Oct 12, 2016
Messages
769
Ever try out the Black Arrow spell?
You can make it melee with no missile, cost no mana, and deal no damage. Whenever a unit is killed with the debuff from that spell, it creates a unit of your choice (in this case, a zombie)
I think you can also do this with the item ability for black arrow, making it a passive instead of autocast ability.
 
Level 3
Joined
Mar 27, 2018
Messages
23
Ever try out the Black Arrow spell?
You can make it melee with no missile, cost no mana, and deal no damage. Whenever a unit is killed with the debuff from that spell, it creates a unit of your choice (in this case, a zombie)
I think you can also do this with the item ability for black arrow, making it a passive instead of autocast ability.
Great help! Thank you! I'll try that.
 
Status
Not open for further replies.
Top