trying to get a car to drive to a certain position in a surface

i am trying to make a car move in a surface. i have made functions to drive straight and turn. i can read out to what section ineed to go but now i need to write what it has to do when but i have no clue because it has to remember what it did last and how many times it has to do something. does anyone have any idea how i can make this work?

Zoofa:
i am trying to make a car move in a surface. i have made functions to drive straight and turn. i can read out to what section ineed to go but now i need to write what it has to do when but i have no clue because it has to remember what it did last and how many times it has to do something. does anyone have any idea how i can make this work?

You store that sort of information in an array of values. But you failed to include the amount of time to perform such a function. That assumes the speed will always be the same for each function.

Paul

Without some external position reference (such as a white line on the ground) it will be almost impossible to get a vehicle to follow a course - even a simple straight line - because every small uncertainty will accumulate into a large error.

...R