How do I make a unit move forward and turn left or right whenever I press the left or right key? I actually already made a trigger for it but it only seems to make the unit move forward...
And yes I did try changing the order of the triggers. Still the same results.
Help will be appreciated
And yes I did try changing the order of the triggers. Still the same results.
Help will be appreciated
Code:
Boat Control Right Player 1
Events
Player - Player 1 (Red) Presses the Right Arrow key
Conditions
Actions
Set Transport_Boat_Group[1] = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 1 (Red)) and ((Unit-type of (Matching unit)) Equal to Transport Boat)))
Unit Group - Pick every unit in Transport_Boat_Group[1] and do (Actions)
Loop - Actions
Set Transport_Boat_Point[1] = (Position of (Picked unit))
Set Transport_Boat_Point[5] = (Transport_Boat_Point[1] offset by 1000.00 towards (Facing of (Picked unit)) degrees)
Unit - Order (Picked unit) to Move To Transport_Boat_Point[5]
Unit - Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) + 20.00)
Unit - Make (Picked unit) face ((Facing of (Picked unit)) - 150.00) over 0.00 seconds
Custom script: call DestroyGroup(udg_Transport_Boat_Group[1])
Custom script: call RemoveLocation(udg_Transport_Boat_Point[1])
Custom script: call RemoveLocation(udg_Transport_Boat_Point[5])