world23wc3
Member
- Reaction score
- 6
Can you tell me how to make a unit cast an ability using triggers?
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!
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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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!