| 02-05-2006, 03:20 AM | #1 |
Is there anyway to make a unit walk backwards but still look forward? |
| 02-05-2006, 03:57 AM | #2 |
| 02-05-2006, 05:09 AM | #3 |
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 |
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 |
is custom script Jass? if so I can't use it, cuz I don't know Jass |
| 02-05-2006, 08:01 AM | #6 |
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 |
Jass is too confusing. |
| 02-05-2006, 08:50 AM | #8 |
In that case, it's impossible to make a unit walk backwards. |
| 02-05-2006, 09:08 AM | #9 |
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 |
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 |
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 |
| 02-05-2006, 02:45 PM | #12 |
SetUnitFacing does not stop animations anyways. Remove the BJ from that call |
| 02-05-2006, 03:00 PM | #13 |
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 |
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 |
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 |
