HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

walking backwards

02-05-2006, 03:20 AM#1
Linera
Is there anyway to make a unit walk backwards but still look forward?
02-05-2006, 03:57 AM#2
PCPharaoh
Trigger:
Untitled Trigger 001
Events
Conditions
Collapse Actions
Unit - Move (Triggering unit) instantly to ((Position of (Triggering unit)) offset by MyMovementDistanceVariable towards (Facing of (Triggering unit)) degrees)
02-05-2006, 05:09 AM#3
Linera
Is this the only possible way?

I'm planning to use it in a arrow key movement.

What i'm trying to do is make smooth movement found in games like WoW and EQ
02-05-2006, 07:37 AM#4
Jazradel
You can use animations by using:
Custom Script: call SetUnitX(unit, x)
Custom Script: call SetUnitY(unit, y)
02-05-2006, 08:00 AM#5
Linera
is custom script Jass? if so I can't use it, cuz I don't know Jass
02-05-2006, 08:01 AM#6
Blade.dk
Then learn it. You can only make the unit do things while you move it if you use SetUnitX/Y.
02-05-2006, 08:45 AM#7
Linera
Jass is too confusing.
02-05-2006, 08:50 AM#8
Anitarf
In that case, it's impossible to make a unit walk backwards.
02-05-2006, 09:08 AM#9
Blade.dk
Try to make a more advanced thing, such as an inventory system. First make it in GUI then make it in JASS, and tell us what was most confusing. That will no doubt be the GUI one.
02-05-2006, 09:16 AM#10
Jacek
There are some triggers like Set Body-part facing, if used correctly they should make an effect of walking backwards (it will look strange anyways).
02-05-2006, 01:16 PM#11
R3N3G4D3
Jazradel, your custom code just teleports the unit to x,y location on the map, it does not make the unit animation face a different way.

Jacek, the set body part triggers only work when unit is not moving. As soon as it starts moving again, it faces the direction of movement (unless you mean having a trigger reset its facing direction every 0.1 seconds but I don't know how well that would go, would probably look more like the unit is spazzing out).

Linera, Blade.dk is right about JASS making things simpler if you're not afraid of it. For example, this code (which I use to upgrade units on my map) would use a plethora of IF-THEN-ELSE statements in GUI and probably be 10 pages long:
Code:
function Trig_unittypeup_Actions takes nothing returns nothing
call IssueTrainOrderByIdBJ( udg_unit, GetUnitTypeId (udg_unit)+1 )
endfunction
As for your original question, I don't know how to do it through triggering, but perhaps you can open the unit graphic with WinMPQ, and reverse front and back there.
02-05-2006, 02:45 PM#12
Vexorian
SetUnitFacing does not stop animations anyways.

Remove the BJ from that call
02-05-2006, 03:00 PM#13
Ant
You don't need to learn JASS since Jazradel effectively gave you all the JASS you need to know for this. You can use GUI triggers to set the values of X and Y, and all you need to do is insert custom script into the GUI triggers, and it's about the same as using purely GUI.

I don't know any JASS, but it's good to useful lines of custom script to remove memory leaks n stuff.

And I had no idea SetUnitX and SetUnitY were any different from the GUI trigger Move unit (Instantly). Eek.
02-05-2006, 04:09 PM#14
Linera
I'd learn Jass but its too confusing.

I even tried one of those Jass Editors thinking it would make Jass coding easier, which I was wrong.
02-05-2006, 05:46 PM#15
Chuckle_Brother
JASS isn't required for this, it could be done with GUI, but jass would look better, since you can use 'SetUnitAnimationByIndex' for the walking motion, and then just make a walk system, so the unit is moving as long as the key is being pushed