Alternating unit Walking and Running

mango

Member
Reaction score
0
I'm trying to run some triggers to make a unit use both his walk and run animations.

To begin, I'm using a Mouse Movement system, so that when the left button is clicked, the unit moves in that direction, and continues to move while the left click is held. What I'd like to do is make it so that if the left click is a certain distance away from the unit, your unit runs quickly towards the destination (and plays a corresponding run animation), and if the click is close to the unit he walks. I've already successfully made the movement speed adjust correctly, but changing the animations is giving me trouble.

From what I can see, a unit can only have 1 "walk" animation baseline in the data editor, so adding a "run" or "walk" animation property via triggers isn't working. I've spent all morning searching for help, and it seems others have had this problem too:

http://www.sc2mapster.com/forums/de...-data-alternating-walk-and-run-animations/#p3

http://www.sc2mapster.com/forums/development/map-development/4149-make-unit-walk-then-run/#p2

http://www.sc2mapster.com/forums/de...data-using-walk-slow-animation-for-marine/#p8

There are a handful of "edit the data in actor events" suggestions, which I've tried, but have had no success. Maybe I'm not understanding the actor events data? If this is a solution, I'd love any help here.

In this example, it seems he found a solution, but I have no idea what the solver is talking about:

http://www.sc2mapster.com/forums/development/data/22715-alternating-a-baseline-animation/#p5

Hope someone can help!! Thanks in advance!
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I'm not very experienced with what you're trying to do, but I have an idea for something that might work.

Since you already have some kind of trigger that changes the speed depending on the distance, you should be able to send different actor messages depending on the distance.

Therefore, in the same trigger as your movement adjusting trigger, add a new trigger action called "Send Actor Message To Unit". Send the actor message "Animation Set Time Scale". You can then tweak the time scale differently depending on if it's supposed to run or not.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top