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

Triggering passive spell question

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
I was attempting to trigger a spell that was like the tauren smash passive but instead casted frost nova on the position of the casting target.

What sort of events and conditions do i need?

I've tried using the event "unit is attacked" but it don't work.

Is there a way of tracking if my hero actually did damage instead of attacking a unit? (this has to apply to any units attacked that are enemies)

BTW i don't want to use an orb ability because they don't fit very well since they look disabled and whatnot
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Base this spell off evasion with 0% chance of success and give it to the unit. Have a dummy unit with a flame strike but with different effects and no casting delay. And now, let's have a look at the triggers.

Event - An unit is attacked
Conditions - Attacking Unit has level of YourAbility greater than 0
- Random Integer between 1 and 100 less than or equal to YourChangeOfSuccess
Actions - Create dummy unit at position of Attacking Unit
- Set 1 second expiration timer to Last Created Unit
- Order (Last Created Unit) to Flame Strike at (Position of (Attacking Unit)).

For the chilling stuff you can try and pick every enemy unit and cast frost nova at them, but with no AoE nor damage, and with no effects. ;)
 
Level 10
Joined
Apr 9, 2004
Messages
502
the problem with that is it always occurs before he attacks. I wanted to incorporate an animation into this and playing his anymation woukl look wierd some times because he doesn't have to face a unit to start attacking it therefor he could cast it on a unit he selected to attack that was attacking from behind him. There has to be another way. Perhaps there's a away to detect if he does use the passive % chance skill.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Drain Pipe said:
the problem with that is it always occurs before he attacks. I wanted to incorporate an animation into this and playing his anymation woukl look wierd some times because he doesn't have to face a unit to start attacking it therefor he could cast it on a unit he selected to attack that was attacking from behind him. There has to be another way. Perhaps there's a away to detect if he does use the passive % chance skill.

Doesn't (An Unit Is Damaged) have an (Attacking Unit) as well? In this case, the problem would be solved. As for detecting if a passive takes effect, from my knowledge it is like manipulating cooldowns (more than just reseting them all). So in conclusion -> Impossible. I read this at wc3c as well and this was said at the FAQ. I'll try the first stuff right away and if it doesn't work, I'll edit my post.
 
Level 10
Joined
Apr 9, 2004
Messages
502
hen you do that the unit damaged has to be specific, and you can't set it up while the unit is attacked. Generally, the crit strike affectsany unit.

So using the "unit takes damage" trigger will only work on heroes, and even then it would look wierd. I guess making one like this is not very possible, unless you got one that worked like bash and you detected when the unit had the custom buff to add the effect since the rightly timed attack animation. The only problem is it would interupt. Is there another passive chance thats gives a buff other than stunning?

That could solve my problem. (just make a periodic event to check and see that the unit has the right buff and just get it to cast if the unit does and remove the initatl buff.)

would that work?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Ok... If you know JASS then it is very simple. Just make the main trigger activate when the unit attacks and the spell should work. Now... Into the main actions add a new local trigger which activates when (Attacked Unit Is Damaged) and wait until (GetTriggerEvalCount(t)>0), t being your local trigger. After that, do the rest of the actions. Sorry, but it's the best thing I can think of.
 
Level 10
Joined
Apr 9, 2004
Messages
502
first of all i don't know JASS and second of all, i've already tried that way, but it screws up. That won't work because i've already tested it. You cannot classify the unit and simultaiously classify it as something else.

I tried an "add event" (attacked unit takes damage). And then checked for the damaging unit and it screwed up. Still, couldn't i use bash and set it to check for the bash custom buff?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
You can't check if passives actually work (aka Evasion)... And one more thing, my JASS method actually uses a LOCAL TRIGGER so you practically didn't try it. You set as Damaged Unit into the actions of the local trigger. But since you don't know JASS, I won't bug you with this.

~Daelin
 
Level 10
Joined
Apr 9, 2004
Messages
502
You missunderstood my entire approach. Some spells, bash for instance, actaully put a buff onto the units when the chance attack occurs. Therefore, couldn't i check for that specific buff and then simply use that to track chance and also for casting my ability?

What my idea is to make a trigger that checks to see whenever a unit has the custom buff after being hit by the bash based ability, and when they do, it removes the buff and casts the extra spell onto the unit, in my case, the flamestrike via dummy unit.

Wouldn't that work? Because i am using the actual skill for the chance and simply adding the spell the instant he does it (because he adds the buff almost instantly so theoretically, i could get it to be timed almost perfectly with the actual slam animation and be 0.01 seconds late)


BTW....


I;m afraid that even if your idea worked (which was the same way i based my idea in the first place), it still wouldn't look as good becuase the attack animation starts before the unit takes damage, and thus it ruins the whole point of my hero attacking and having the attack slam animation going while delaing the extra damage. All that has to be checked before my hero deals damage. What i figured would happen your way would be that the unit deals the damage, and then adds an extra attack right after (but not at the smae time).

Still, this is only theory; if you made a test map and included the JASS and how to work it, perhaps i could incorporate this instead.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Well then... Does this sound like a request? Because if it does... I would be glad to help you! :D Just tell me once again what you need and I will make it for you and send it to you through email. And believe me, what I mentioned would work. I will fill it with info and comments... So don't worry! You will be able to implement it easily.
 
Level 10
Joined
Apr 9, 2004
Messages
502
ok then. I simply want a passive ability where my hero uses his slam aniamtion (it's the earth pandaren animation). He slows units in a relatively small area and also creates fire on the ground (like with flamestrike). That's pretty much it.

E-mail it to me as soon as you can. BTW my only concern with your method is that it will occur after he starts to attack. and thus seem like the heor attacks twice, but if you say it works properly, then send it to me whenever you get the chance.

[edit] forget it i figured out a workable way to do it.
 
Status
Not open for further replies.
Top