In my map i have a ship which moves constantly in one direction. When pressing the right or left keys, i want the unit to smoothly turn in that direction while not slowing down (at least, not to the point it eventually stops)
i think a while ago they had something like this in car maps and they were able to achieve this kind of effect, anyone know how?
Conditions
ButtonLeftDown/RightDown = true <--- set the variable to true when the left/right button is pressed,
and set it to false again when not pressing it
Actions
Variable: Set "UnitFacing" = Facing of <unit> +/- 6
And then set the direction of the move order to the value saved in the "UnitFacing" variable :)
(sorry for translation mistakes, I'm using the german editor :P)
In my map i have a ship which moves constantly in one direction. When pressing the right or left keys, i want the unit to smoothly turn in that direction while not slowing down (at least, not to the point it eventually stops)
i think a while ago they had something like this in car maps and they were able to achieve this kind of effect, anyone know how?
you should do a "While loop"
While (conditions) are true
Conditions
ButtonLeftDown/RightDown = true <--- set the variable to true when the left/right button is pressed,
and set it to false again when not pressing it
Actions
Variable: Set "UnitFacing" = Facing of <unit> +/- 6
And then set the direction of the move order to the value saved in the "UnitFacing" variable :)
(sorry for translation mistakes, I'm using the german editor :P)
Thanks Ousnius, i was playing around with the editor this morning and found a similar solution to urs, however yours is slightly cleaner, cheers