• 🏆 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] Is there anything wrong with this code?

Status
Not open for further replies.
Level 3
Joined
Dec 24, 2009
Messages
22
Is there anything wrong with my trigger because I think that when I gave my hero a spell, after a period of time(6,7,8 seconds), it doesn't remove the spell from my hero and instead continue as if nothing happened. -__-''

  • Dash
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dash
    • Actions
      • Set Dasher = (Casting unit)
      • Unit - Add Dash (Neutral Hostile) to Dasher
      • Unit - Set level of Dash (Neutral Hostile) for Dasher to 1
      • Trigger - Run Dash CD <gen> (checking conditions)
  • Dash CD
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Dash_CD = (Dash_CD + 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dash for Dasher) Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dash_CD Greater than or equal to 6.00
            • Then - Actions
              • Unit - Remove Dash (Neutral Hostile) from Dasher
              • Set Dash_CD = 0.00
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dash for Dasher) Equal to 2
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dash_CD Greater than or equal to 7.00
            • Then - Actions
              • Unit - Remove Dash (Neutral Hostile) from Dasher
              • Set Dash_CD = 0.00
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dash for Dasher) Equal to 3
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dash_CD Greater than or equal to 8.00
            • Then - Actions
              • Unit - Remove Dash (Neutral Hostile) from Dasher
              • Set Dash_CD = 0.00
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
 
do only one hero use this?

you turn off DASH CD when you reach a certain time but then you dont turn it on again when you recast the spell... you should change the last line of the first trigger...

  • Trigger - Run Dash CD <gen> (checking conditions)
  • change this to
    • Trigger - Turn on DASH CD
other than that, I dont see any problems...

btw, use Unit - A unit starts the effect of an ability rather than Unit begins casting...

also you dont need to set Dasher level to 1 since when you give it to a unit it is automatically at level 1...
 
Status
Not open for further replies.
Top