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

How can I fix this?

Status
Not open for further replies.
How can I fix this trigger, the size is not changing, What Should I do??

  • Rasen Shuriken SizePerSec
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set RS_SizePerSecond = (RS_SizePerSecond + 20.00)
          • Animation - Change RS_Shuriken's size to (RS_SizePerSecond%, RS_SizePerSecond%, RS_SizePerSecond%) of its original size
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (RS_Caster is dead) Equal to True
                  • (RS_Caster is Stunned) Equal to True
                  • (RS_Caster is Snared) Equal to True
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Unit - Remove RS_Clone[1] from the game
              • Unit - Remove RS_Clone[2] from the game
              • Special Effect - Create a special effect at RS_CloneLoc[1] using RS_CloneSFX
              • Special Effect - Create a special effect at RS_CloneLoc[2] using RS_CloneSFX
              • Custom script: call RemoveLocation(udg_RS_CasterLoc)
              • Custom script: call RemoveLocation(udg_RS_CloneLoc[1])
              • Custom script: call RemoveLocation(udg_RS_CloneLoc[2])
              • Custom script: call RemoveLocation(udg_RS_ShurikenLoc)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RS_SizePerSecond Equal to 200.00
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Trigger - Turn on Rasen Shuriken Strike <gen>
              • Unit - Remove RS_Clone[1] from the game
              • Unit - Remove RS_Clone[2] from the game
              • Special Effect - Create a special effect at RS_CloneLoc[1] using RS_CloneSFX
              • Special Effect - Create a special effect at RS_CloneLoc[2] using RS_CloneSFX
              • Set RS_SizePerSecond = 0.00
            • Else - Actions
 
Level 8
Joined
Aug 13, 2009
Messages
466
There are no waits in your loop, despite it being something to decrease the shuriken's size over time? Oo

Also wrong forum etc etc
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
There are no waits in your loop, despite it being something to decrease the shuriken's size over time? Oo
Waits can destroy loops (because "Integer A" can be overwritten). I recommend to never use them in a loop anyway.

That doesn't change the fact that the trigger is indeed quite weird.
You loop from 1 to 10, each time changing RS_SizePerSecond by 20, yet you check whether that value is 200?
That's the maximum value, so you don't have to check it: if the trigger reaches the end, it will /always/ be 200.
(Meaning that all actions within the ITE ( = If Then Else ) can be moved outside the loop and it will always do the same thing, even without the ITE).

Zakamutt also correctly pointed out that it's an instant-trigger, not a periodic one (which would make a lot more sense when increasing a size).

Another note is that "Trigger - turn off (this trigger)" will not disable the other actions in the trigger. The trigger will still run until the end.
I thought I had to point that out, because "Turn off this trigger" for an elapsed game time-event seems weird (it can only happen once anyway).


What exactly is it you're trying to achieve, maybe you can start with that :)
Edit: just for clarification, we know you're trying to change the size. I'm asking for some specific details here, such as when to change the size, change it periodically? Did you mean for the event to be "Every 0.03 second of game time"?
 
Status
Not open for further replies.
Top