• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with an easy problem

Status
Not open for further replies.
Level 5
Joined
Jul 13, 2022
Messages
19
Im making custom Warcraft 3 cinematics and the characters keep playing their animations while they are talking, and with some characters like Maiev it's really annoying and stometimes they spam it, it kinda ruins the vibe. Is there a way where the character can just stay still doing the stand animation and not do that thing they do like looking around or stuff like that?
I have tryied with "unit make stand animation" but they still do the thing were they look around. I need them to stay completely still and just breathe, so freezing their animation isn't an option.

MaievSin título.png
 
Level 39
Joined
Feb 27, 2007
Messages
5,037
Silly but probably workable solution: liberally use SetUnitAnimationByIndex() and perhaps set the animation speed of these units to be lower (temporarily). That function is inaccessible in GUI so to use it you'll assign variables to the 2 arguments (a unit and an integer):
  • Set LoopUnit = (Warden 001 <gen>)
  • Set LoopIndex = 4
  • Custom script: call SetUnitAnimationByIndex(udg_LoopUnit, udg_LoopIndex)
What that does is play a specific animation from the model (in this case the animation with index 4). If you can figure out the best animations to use, you could slow down the animation speed of the unit and then make a periodic trigger that would keep playing the same animation (either when it's done or before it gets to a part where the unit moves too much) while it's needed.
 
Level 39
Joined
Feb 27, 2007
Messages
5,037
would this just work?
The problem for the OP is that some of those stand animations have movement they don't want.

Im a bit of a noob when it comes to the set tool, how can i set the loop?
I don't think I really understand your question but what I mean is something like this:
  • -------- In some trigger that runs your cinematic --------
  • Set LoopUnit = (Warden 069 <gen>)
  • Set LoopIndex = 4
  • Set LoopLength = 1.48
  • Set LoopSpeed = 85.00
  • Set LoopCount = 3 //will play 3 times total (can be interrupted)
  • Set LoopStart = True
  • Trigger - Run LoopAnimation <gen> (ignoring conditions)
  • LoopAnimation
    • Events
      • Time - LoopTimer expires
    • Conditions
    • Actions
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • LoopStart equal to True
        • Then - Actions
          • Set LoopStart = False
          • Countdown Timer - Start LoopTimer as a Periodic timer that will expire in LoopLength Seconds
          • Unit - Set LoopUnit's Animation Speed to LoopSpeed % of it's original speed
        • Else - Actions
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • LoopCount greater than 0
        • Then - Actions
          • Animation - Reset LoopUnit's animation
          • Custom script: call SetUnitAnimationByIndex(udg_LoopUnit, udg_LoopIndex) //change these to match your variable names but keep the udg_ prefix
        • Else - Actions
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • LoopCount less than or equal to 0
        • Then - Actions
          • Countdown Timer - Pause LoopTimer
          • Unit - Set LoopUnit's Animation Speed to 100.00 % of it's original speed
          • Unit - Reset LoopUnit's Animation //optional, you may not want to do this here because it could fuck with other animation queues in your cinematic
        • Else - Actions
      • Set LoopCount = (LoopCount - 1)
Totally possible that this looks awful, though.
 
Level 5
Joined
Jul 13, 2022
Messages
19
Nah mon. "Play Unit Animation" will play de animation only once. Ya Pibesabe mon should use "Play Unit Animation (Specify Rarity)" action using common animations.
Like dis:
Animation - Play DUDE <gen>'s stand animation, using only Common animations

It'll work my mon
This worked! Thank you old one, stay away from the Vodoo
 
Status
Not open for further replies.
Top