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

Make Unit MOVE BACKWARD but Facing Front Angle

Status
Not open for further replies.
Level 3
Joined
Feb 11, 2013
Messages
28
Order Unit to MOVE BACKWARD but Facing Front Angle

Does anyone have any ideas?
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,381
Level 15
Joined
Oct 29, 2012
Messages
1,474
I translated the info of Nichilus into GUI =)
  • Events
    • Time - Every 0.03 seconds
  • Actions
    • Unit - Make 'Unit' face 'Whatever' in 0.00 seconds
    • Set tempPoint = ((Position of 'Unit') offset by 20 towards ( 'facing of 'Unit' - 180°))
    • Unit - Move 'Unit' intantly to 'tempPoint'
    • Custom script: call SetUnitAnimationByIndex(udg_'Unit', 'Index of Walking Animation')
    • Custom script: call RemoveLocation(udg_tempPoint)
Of Course it's SUI
 
Level 5
Joined
Nov 30, 2012
Messages
200
Keep in mind that if you don't want any leaks you must use two variables for points if you are using polar offsets. For example,

set tempPoint1 = (Position of Unit)
set tempPoint2 = tempPoint1 offset by 20.00 towards (Facing of Unit - 180.00)

Then, of course, you must remove the locations with

call RemoveLocation( udg_tempPoint1 )
call RemoveLocation( udg_tempPoint2 )
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Keep in mind that if you don't want any leaks you must use two variables for points if you are using polar offsets. For example,

  • Set tempPoint1 = (Position of Unit)
  • Set tempPoint2 = tempPoint1 offset by 20.00 towards (Facing of Unit - 180.00)
Then, of course, you must remove the locations with
  • Custom script: call RemoveLocation( udg_tempPoint1 )
  • Custom script: call RemoveLocation( udg_tempPoint2 )

My dumb leaks -_- . Well Good Notice
 
Hey if you want to make the unit move backwards and look fine also set there animation negative to make it look like they are actually walking backwards.

I would paste the code here although I don't have access to WE.
If you can't make the value a negative for the GUI version, make it anyway and convert it to jass. The native name isn't exactly obvious..
 
Status
Not open for further replies.
Top