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

Using Triggers to activate skill

Status
Not open for further replies.
Level 1
Joined
Dec 1, 2013
Messages
4
Hello, I just started to use WE

I'd like to ask how i can activate a skill using triggers

an exaple is: I want to activate war stomp when i use the skill taunt. and one last thing, do i need to include the skill(war stomp) to a hero(with taunt) before i can activate it or does the trigger do it for me?

if there is a similar post or a guide about skill triggers please give me the link. I dont want to spam post :) thanks
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
This is the wrong section for this btw, use the WEHZ.

So when you cast taunt you want the "same" unit to cast warstomp? Besides from countering the purpose of the taunt ability I'm confused on what's tripping you up.

Unit starts the effect of an ability

Ability being cast == taunt

Set tempunit = triggering unit
Set temppoint = position of tempunit
Create a dummy for owner of tempunit at temppoint
Set tempunit2 = last created unit
Add war stomp to tempunit2
Order tempunit2 to orc tc warstomp
Add 1 second generic Expiration timer to tempunit2
Custom script: call RemoveLocation(udg_temppoint)

Be sure the dummy has no model, locust ability, and no backswing, or cast point, death type is set to can't raise does not decay
Make sure the war stomp ability has no mana cost

In the future you should look into dealing the damage (I'm assuming warstomp will do dmg thru the trigger editor.) Object editor damage can be unreliable, and triggering the damage gives you more control.

You should take a look at the tutorial section, it has a lot of good info
 
Level 1
Joined
Dec 1, 2013
Messages
4
This is the wrong section for this btw, use the WEHZ.

So when you cast taunt you want the "same" unit to cast warstomp? Besides from countering the purpose of the taunt ability I'm confused on what's tripping you up.

Unit starts the effect of an ability

Ability being cast == taunt

Set tempunit = triggering unit
Set temppoint = position of tempunit
Create a dummy for owner of tempunit at temppoint
Set tempunit2 = last created unit
Add war stomp to tempunit2
Order tempunit2 to orc tc warstomp
Add 1 second generic Expiration timer to tempunit2
Custom script: call RemoveLocation(udg_temppoint)

Be sure the dummy has no model, locust ability, and no backswing, or cast point, death type is set to can't raise does not decay
Make sure the war stomp ability has no mana cost

In the future you should look into dealing the damage (I'm assuming warstomp will do dmg thru the trigger editor.) Object editor damage can be unreliable, and triggering the damage gives you more control.

You should take a look at the tutorial section, it has a lot of good info

Hi pOke, Whenever I try to use taunt I cant see warstomp effect (i guess it's not casted) i used Shade Unit as dummy unit, removed artmodel, backswing, castpoint, include locust and no model file.

i cant upload the image i dont know why but here's the link
https://www.facebook.com/photo.php?...225.1073741826.100004690051150&type=1&theater

thanks
 
Last edited:
Level 7
Joined
Mar 6, 2006
Messages
282
This line:

  • Unit - Create 1 Dummy unit - War Stomp for (Owner of temUnit) at temPoint facing (Position of (TriggeringUnit))
It doesn't matter the facing of the dummy unit, so set that to the preset "Default Unit Facing". (Position of() ) leaks if you don't set it to a variable and destroy it afterwards.

Remove the "Set temUnit = (TriggeringUnit)" and in the create unit line, just use "for (Owner of (TriggeringUnit))". TriggeringUnit does not leak.

Also, not necessary, but you could just add War Stomp to your dummy unit's list of abilities.

And a little tip for testing: if your triggered spell isn't working correctly, you can always change your dummy's model to normal, take off locust, and remove the Expiration Timer in the trigger, so then you can figure out in game why your dummy isn't behaving. Then you would have noticed that it couldn't cast War Stomp because it costed mana.
 
Level 25
Joined
Sep 26, 2009
Messages
2,387
If you call something more than twice, it's better to save it inside variable (including triggering unit) - it's more efficient that way since you will make less function calls (like calling triggering unit).

Indeed, if you have dummy for war stomp only, it's better to add War Stomp to this unit-type in Object Editor, however if you have same dummy (as in same unit-type) for many spells, it's better to add the ability via triggers
 
Status
Not open for further replies.
Top