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

[Trigger] Ordering a unit to move without restarting its animation

Status
Not open for further replies.
Level 14
Joined
Apr 21, 2007
Messages
1,465
Well, there is a way I know of but it is rather stupid and wont really work good in anything besides a cinematic. You could set a move trigger every 0.05 seconds and every X seconds play the units walk animation. Something like this:

Code:
Event - Every 0.05 seconds
Condition - Something like unit is not under attack or something similar
Action - Unit - Move YOURUNIT instantly to Position of YOURUNIT offset by 5 towards facing of YOURUNIT degrees

And also add the animation, for this case I used the Human Peasant walking animation(0.8 seconds)

Code:
Event - Every 0.8 seconds
Condition - Same as last
Action - Animation - play YOURUNIT walk animation

Like I already said this is a crappy way to do this, but sadly it is the only one I can think of at this moment. If I think up of something else in the meantime I will tell you.
 
Level 9
Joined
Jul 20, 2005
Messages
414
What are you trying to accomplish? Like some kind of Mario map where Mario always goes forward or something?

Explanation would help :p

Also, you could always add conditions to disallow going through walls, for example:
Dirt represents a cliff, grass represents passable,

Code:
Event - Every 0.05 seconds
Condition - Something like unit is not under attack or something similar
             - Unit is on terrain type (dirt) equal to False
Action - Unit - Move YOURUNIT instantly to Position of YOURUNIT offset by 5 towards facing of YOURUNIT degrees
 
Level 7
Joined
Dec 8, 2005
Messages
319
um if your just focused on making a unit do an spell animation constantly. like say you have the fire lord on a hill and he is just laughing away(spell animation) or so it looks like. and he is there for show. well then just simply make a loop and queque up that animation and wait how ever long that animation is... you can check to see how long the animation is in the WC3 above the window where you see the units. you can also change the animation speed and length of the animation. via triggers and object manager. like everyone is says. a more detail explanation would help. i hope this helps =D
 
Level 9
Joined
Jul 24, 2007
Messages
308
The way im using the system is alike arrow movement system, that picks all players matching ARROW_UP = true and order the unit to move up a small distance every 0.X seconds

whenever i order the unit to move his animation is restarted, so he walks like a jerk))
 
Level 12
Joined
Mar 23, 2008
Messages
942
The way im using the system is alike arrow movement system, that picks all players matching ARROW_UP = true and order the unit to move up a small distance every 0.X seconds

whenever i order the unit to move his animation is restarted, so he walks like a jerk))

Set a random variable to 1 every time you do that comand, and a triger that change units animation to walk (looping) always the variable is on.

This may work.
 
Status
Not open for further replies.
Top