HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

MAke a unit "Moonwalk"

12-10-2007, 08:27 PM#1
botanic
i have an arrow key thing I am doing however I need to make a unit move backwords as well as forwards. Like a moonwalk kind of thing. Any ideas?
12-10-2007, 09:04 PM#2
Anopob
Not sure if this will work but issue the unit moving forward (or wherever they're facing) while moving the unit bit by bit backwards.
12-10-2007, 09:15 PM#3
HINDYhat
Just play the walk animation and move a unit towards the opposite of their facing:

Collapse JASS:
call SetUnitX(yourUnit, GetUnitX(yourUnit)-distance*Cos( GetUnitFacing(yourUnit) * bj_DEGTORAD))
call SetUnitY(yourUnit, GetUnitY(yourUnit)-distance*Sin( GetUnitFacing(yourUnit) * bj_DEGTORAD))
12-10-2007, 11:06 PM#4
MaD[Lion]
u can play walk animation and set animation speed to -1 then it will walk backward
12-11-2007, 10:04 AM#5
Malf
Parts of the animation have to be played first before you reverse it. Much like you can't reverse a front flip to back flip without even doing the front flip first.