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

Small trigger Issue for freezing models in their stand ready animation

Status
Not open for further replies.
Level 5
Joined
Dec 22, 2007
Messages
103
I'm using a unit's model for some destructibles in my map (statues). As statues they need to freeze as done in
the change animation speed action, and play their stand ready animation. The trigger I have to do this is
  • Destructible - Pick every destructible in Jail <gen> and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Destructible-type of (Picked destructible)) Equal to Fiend Statue
        • Then - Actions
          • Animation - Play (Picked destructible)'s stand ready animation
          • Wait 2.00 seconds
          • Animation - Change (Picked destructible)'s animation speed to 0.00% of its original speed
        • Else - Actions
The models aren't freezing when I run the campaign, any ideas on how to fix this? All help is appreciated.
 
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
You do realise that because you have the Wait in a loop, you're waiting 2 seconds per destructable?

Change it to this:
  • Destructible - Pick every destructible in Jail <gen> and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Destructible-type of (Picked destructible)) Equal to Fiend Statue
        • Then - Actions
          • Animation - Play (Picked destructible)'s stand ready animation
        • Else - Actions
  • Wait 2.00 seconds
  • Destructible - Pick every destructible in Jail <gen> and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Destructible-type of (Picked destructible)) Equal to Fiend Statue
        • Then - Actions
          • Animation - Change (Picked destructible)'s animation speed to 0.00% of its original speed
        • Else - Actions
Never put waits in loops/picks or if/then/elses. In fact, never use waits. Ever.
 
Level 9
Joined
Aug 7, 2009
Messages
380
Why do you need to change the animation speed to 0%?
As default, after the animation play of a unit, it will freeze itself already unless you reset the animation or make the unit play another animation
BTW, just some info, hope it's useful but it can be useless since the problem is solved
 
Status
Not open for further replies.
Top