• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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