I was trying to come up with some AI for a car so it had set checkpoints to meet. the code might not look like it now but its what i hope to make, if someone knows a better way to make some car ai plz let me know, but anyways i was trying todo some code and i did this:
cords = new Array();
cords.push([100, 150]);
cords.push([500, 200]);
var num = 0;
function moveobj(obj) {
trace("X:"+cords[num][0]+" Y:"+cords[num][1]);
obj._x = cords[num][0];
obj._y = cords[num][1];
num++;
}
setInterval(moveobj(circle), 1000);
the setinterval doesnt work, if anyone knows how i could get it to work plz let me know, thanks.