How do I make a unit cast an ability using triggers?

world23wc3

Member
Reaction score
6
Can you tell me how to make a unit cast an ability using triggers?

Trigger:
  • F2 Santa War Stomp
    • Events
      • Unit - Santa 0057 <gen> Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • f2_santa_was_attacked_recently Equal to 0
        • Then - Actions
          • Set f2_santa_was_attacked_recently = 1
          • Game - Display to (All players) the text: (String(f2_santa_was_attacked_recently))
          • Unit - Order Santa 0057 <gen> to Human Mountain King - Storm Bolt (Attacking unit)
          • Wait 5.00 seconds
          • Set f2_santa_was_attacked_recently = 0
          • Game - Display to (All players) the text: (String(f2_santa_was_attacked_recently))
        • Else - Actions
          • Do nothing


This is what i tried but it doesn't work. It's the "Unit - Order Santa 0057 <gen> to Human Mountain King - Storm Bolt (Attacking unit)" part that doesn't work.
I'm sure because the integer is printed and has the correct value. The only reason why I use integers is because I couldn't find a way to "print" the value of a boolean in game.
I saw other people using "Unit - Order Santa 0057 <gen> to Human Mountain King - Storm Bolt (Attacking unit)" but if it's possible to cast custom abilities please tell.
I appreciate all possible help!
Thanks!
 

world23wc3

Member
Reaction score
6
What's the dummy spell based on?

War Stomp from the Tauren Chieftain (orc). I'm not sure if I answered you correctly, but I want it to stun everyone around it, war stomp seemed appropriate but I couldn't find it under "Unit - Order Santa 0057 <gen> to Human Mountain King - Storm Bolt (Attacking unit)" action.
 

Smitty

Member
Reaction score
20
Well ordering the unit to storm bolt won't be much help if the ability is based on war stomp. Lots of similar abilities share IDs, for example I believe there's also a neutral war stomp, which should have the same ID as the Orc one. Try ordering that instead.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Try Issue Order With No Target. There should be an Orc Tauren Chieftain - War Stomp on the list.
 

world23wc3

Member
Reaction score
6
Well ordering the unit to storm bolt won't be much help if the ability is based on war stomp. Lots of similar abilities share IDs, for example I believe there's also a neutral war stomp, which should have the same ID as the Orc one. Try ordering that instead.

Yes, thank you very much! It worked :)
Thanks for your time!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top