Game Fix

I’m making a game for computer science. In the game I make these car spawn in random(400000) for x and random(600) for the y. I debugged the preview so when the robber car (you) pass around coordinate X 45000 there are no more obstacles in front. Is there a way to respawn them so it looks like they will never stop coming in front of you?

Wouldn’t it be easier to make them spawn at Player.X()+800 pixels?
That way, no matter where the player is, the cars will always spawn ahead of him.
No need to work with that much of big numbers.

That would be :

[code]If timer MyTimer > random(8)+2
---- reset MyTimer
---- create object MyCar at Player.X()+800;Random(500)+50

If MyCar not in collision with MyPlayer then add -2 to X of MyCar[/code]

You could even do it on a single 800x600 map, with the background moving instead of the player.

Lemme attach the gdg file
CNR.gdg (352 KB)

i think i figured it out