Hello Bl4ckSh33p;
I tried to get the kind of control you are talking about to work with the car movement. Here is what I came up with.
yours
winkr7
+ Touch: Is touching moveControl
// tam
| Local number thetaOpp = 0
| Local number theta = 0
| Local boolean finished = false
| Local number curPilot = 0
| Local constant number steeringAngleExtra = 0.1
| Local string asc =
| Local string apc =
| Local constant number reverseBackAngle = 30
//
----+ (no conditions)
-----> [DISABLED] System: Set curPilot to Functions.retrieveStore("currentPilot")
-----> System: Set curPilot to Functions.getCurrentPilot
-----> System: Set theta to angle(moveControl.X,moveControl.Y,Touch.X("hudTch"),Touch.Y("hudTch"))
-----> System: Set thetaOpp to theta+180
-----> System: Set asc to Functions.spCoord(moveControl.UID)
----+ pilot: Pick instance with UID curPilot
--------+ pilot: Within reverseBackAngle degrees of thetaOpp
------------+ (no conditions)
-------------> pilot: Simulate pilotCar pressing Brake
-------------> redMoveArrow: Set position to (moveControl.X, moveControl.Y)
-------------> redMoveArrow: Set angle to theta degrees
-------------> redMoveArrow: Set width to moveControl.Width
-------------> redMoveArrow: redArrowFade: restart fade
-------------> System: Set finished to True
----------------+ pilot: [X] Within 2 degrees of thetaOpp
--------------------+ pilot: Is clockwise from thetaOpp
------------------------+ (no conditions)
-------------------------> pilot: Simulate pilotCar pressing Steer left
--------------------+ System: Else
------------------------+ (no conditions)
-------------------------> pilot: Simulate pilotCar pressing Steer right
--------------------+ (no conditions)
---------------------> (no actions)
--------+ System: [X] Is finished
--------+ pilot: Within (180-reverseBackAngle) degrees of theta
------------+ (no conditions)
-------------> pilot: Simulate pilotCar pressing Accelerate
-------------> greenMoveArrow: Set position to (moveControl.X, moveControl.Y)
-------------> greenMoveArrow: Set angle to theta degrees
-------------> greenMoveArrow: Set width to moveControl.Width
-------------> greenMoveArrow: greenArrowFade: restart fade
-------------> System: Set finished to True
------------+ pilot: [X] Within 2 degrees of theta
----------------+ pilot: Is clockwise from theta
--------------------+ (no conditions)
---------------------> pilot: Simulate pilotCar pressing Steer left
---------------------> pilot: Rotate steeringAngleExtra degrees counter-clockwise
----------------+ System: Else
--------------------+ (no conditions)
---------------------> pilot: Simulate pilotCar pressing Steer right
---------------------> pilot: Rotate steeringAngleExtra degrees clockwise
----------------+ (no conditions)
-----------------> (no actions)