• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[vJASS] I need the event when a passive skill is activated

Status
Not open for further replies.
Level 9
Joined
Jun 21, 2012
Messages
432
Hi all! I have recently been working on a passive spell, but I can not get the event when it is activated as they not have a basic orderid... The skill with which I am working is the reincarnation of the tauren boss.

A clear example is in dota: when the king leoric dies, after a few seconds this is resurrected and then a dummy unit casts an ability that slows all enemies in a AoE around of 400 (if I remember).

:ogre_rage: I hope someone can help me with this! Thx!
 
It depends on the ability. The easiest way is to trigger your passive skills. That way, you'll always know when the spell actually fires. For example, if you have a skill like Leoric's, you'll detect death, wait a few seconds, and that is when the passive will fire.

So in the end, it is better to just make an ability that is passive that does nothing. Then trigger the effects manually. It really depends on the spell. If it is something that procs, you will just use a random integer and see if it is under a particular amount. For example, if you have a 40% chance of something happening, you'll choose a random number from 1 to 100 and see if it is less than or equal to 40, and then perform the spell's passive effect.

If you describe your passive spell, maybe we can give you a better solution on what to do.
 
Level 9
Joined
Jun 21, 2012
Messages
432
this is my spell (based on the reincarnation of boss tauren): is the unit life become < 0.4, then a passive effect will activated: the unit caster will not die and your life it will increase periodically up around to 60% of your total life.

:fp: Finally applied the cooldown of the skill, this is the most important part: the Ability cooldown, so I chose this skill, that can only be activated after the "death" of the unit, and to have a cooldown...
 
Status
Not open for further replies.
Top