Car follow

I have the script so that you can controle a car with the arrow keys but for one of the misions on my gta2 style game i would like an enemy car to follow you. The car has to stay facing the right way acording to the way the street though, this is the only bit i cant think of i also need boundries.

Hi and Welcome to the forum!
:thumb:
I am sorry to say I cannot help you there :frowning: .
I’m not a great actionscripter.
For a while now I have been trying to develop a gta2 style game (so its real good to bump into you) and I have designed a game but…

I cannot get the landscape to scroll! If your game has scrolling terrain that scrolls according to key presses, could you please send it to me?
I have looking for absolutly [FONT=arial][SIZE=4] AGES[/SIZE][/FONT] now and cannot find what I am looking for. So if you could send me your game, that would be great! (I promise I wont steal any of your idea’s)

My email is [email protected]

Oh yeah and BUMP

Originally posted by zeka *
:thumb:
I cannot get the landscape to scroll! If your game has scrolling terrain that scrolls according to key presses, could you please send it to me?
BUMP
**

I’ll give you the code for making the background scroll. You just goto this forum on the first page of this thread(the one in the link) is a code for a car then to make the background scroll give it the instance of bacground and instead of .this put .background. I’ll try to get the intire script writen out.

Car with walls:

onClipEvent (load) {
// Set the move speed
moveSpeed = 15;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
if (_root.Walls.hitTest(getBounds(_root).xMax,_y,true)) {
} else {
root.background._x += moveSpeed;
this.gotoAndStop(3);
}
// Move Right
} else if (Key.isDown(Key.UP)) {
if (_root.Walls.hitTest(_x,getBounds(_root).yMin,true)) {
} else {
root.background._y -= moveSpeed;
this.gotoAndStop(2);
}
// Move Up
} else if (Key.isDown(Key.DOWN)) {
if (_root.Walls.hitTest(_x,getBounds(_root).yMax,true)) {
} else {
root.background._y += moveSpeed;
this.gotoAndStop(5);
}
// Move Down
} else if (Key.isDown(Key.LEFT)) {
if (_root.Walls.hitTest(getBounds(_root).xMin,_y,true)) {
} else {
root.background._x -= moveSpeed;
this.gotoAndStop(4);
}
// Move Left
}
}
NOTE: To activate the walls, you must make a movieclip labelled “Walls” and the background should have an instance of background.