• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Whats wrong with this trigger?!

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
I wanted to increase the speed of the hero but somehow it doesn't works..

  • Speed
    • Events
      • Unit - A Unit casts an abillity
    • Conditions
      • (Abillity being cast) equal Volt Tackle
      • Unit has buff Volt Tackle equal true
    • Actions
      • Set Volt_Caster = (casting unit)
      • Unit - set Volt_Caster movement speed to (default movement speed of Volt_caster) + 100
      • Trigger - turn on Speed Loop <gen>
  • Speed Loop
  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
    • Abillity being cast equal Volt Tackle
    • Unit has buff Volt Tackle equal true
  • Then - Actions
    • Unit - Set Volt_Caster movement speed to (Current movement speed of Volt_Caster) - 100
    • Trigger - Turn off this trigger
  • Else - Actions
 
Last edited:
Level 4
Joined
Dec 7, 2010
Messages
62
Trigger: Speed
1: Use "Unit BEGIN casting a ability"
2: The condition only says "unit"(?), it should be "Casting Unit"
3: Have you made sure the "Speed Loop" trigger is DISABLED?

Trigger: Speed Loop
1: The conditions don't work, you will need to set the ability casted as a Variable. You must also set the Unit as a variable.

If you need more help or don't understand, PM me and i'll fix it for you :)
 

Attachments

  • Volt Speed.w3x
    17.2 KB · Views: 40
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
In my day, I used to merge multi threads like this... Sigh, these young mods (lol, cough cough)...

The problem is that the natives that return values involved with events only last until the end of the thread (probably cause they are stored on its stack). This means in your perodic trigger, "Abillity being cast " is returning 0 as the code is not run in response to any ability being cast.

I also advise using the starts an ability effect event instead of the one you are using as there are potential bugs people can perform (like no CD, no mana drain) that the event you are using permits.
 
Status
Not open for further replies.
Top