make an object "reset"

im trying to make a game for a school project. ive chosen to make a jet racing game(like f-zero) well i was wondering how could i make it so that when the player falls off course he resets at the place he was before he fell off? i already have it so that when he falls off he resets to the start finish line, i was thinking what if i could get the player object to snap to another object, and while a ray sensor is true(seeing the track) it will create an empty at the spot of the ship. and then when the player falls off the player object snaps to the position of the last “waypoint” maybe :confused: this is the script im currently using:

# get the controller
cont = GameLogic.getCurrentController()

# get the actuator attached to the controller named act
act = cont.actuators["act"]
act2 = cont.actuators["p2"]

# get brick owner
obj1 = act.owner
obj2 = act2.owner

gop1 = obj1.sensors["p1reset"] 
gop2 = obj2.sensors["p2reset"]

if gop1.positive:
     obj1.worldPosition = [-2, -4.473, 7.000]
     obj1.setLinearVelocity(0, False)

if gop2.positive:
     obj2.worldPosition = [-5, -4.473, 7.000]
     obj2.setLinearVelocity(0, False)

also i am using blender version 2.49
any help is greatly apreciated :slight_smile:
{edit} p.s its a two player game

… That’s a bit complex. Just set his reset position every frame, then when he falls off of the track, the car goes back to the last position. Of course, this would be right on the edge, but you could also set his reset velocity every frame (just like his reset position) and set him back to his previous position PLUS the velocity * times a few frames (i.e. back towards the middle of the track). P.S. Sorry, but it would be nice if you could improve your grammar and punctuation; it’s a bit hard to understand your post.

ive rigged up a new test, and this is the code ive got now, it works, except it set the x, and y, coordinates are way off. i have no clue whats wrong.

cont = GameLogic.getCurrentController()

act1 = cont.actuators["act"]
act2 = cont.actuators["resetpoint"]

bot1 = act1.owner
reset1 = act2.owner

gop1 = bot1.sensors["p1reset"]

resetposx = reset1.worldPosition[0]
resetposy = reset1.worldPosition[1]
resetposz = reset1.worldPosition[2]

if gop1.positive:
     bot1.position = [resetposx, resetposy, resetposz]

I don’t know, but it looks like there’s different objects (two different owners) and you’re resetting the first object by the second object’s reset values? You’ll want to set the reset values only if the ship is on the track (obviously not if it’s falling off). EDIT: You may want to simplify this by just having a single button to press to reset the ship, and testing that out. If you reset the ship, make sure to take off its velocity, too (if it’s falling at 100 units a frame and you put it back on the ground, it won’t turn out too pretty.)