Teleport help

hello there, i need help making a teleporter, i need to could teleport to another place on the map, without destroying him, i got a script but i couldnt get i working

here is the script i tried to use

cont = GameLogic.getCurrentController()
own = cont.getOwner()
warppoint = GameLogic.getCurrentScene().getObjectList()[“OBemp”]
warp = cont.getSensor(“warp1”)
warpto = warppoint.getPosition()
if warp.isPositive():
own.setPosition(warpto)

please if u can get this script working, or can make your own, please send it to me… or just tell me how to do it

thanks anyways:eyebrowlift:

  1. getOwner is deprecated, use owner instead.
  2. I think that if you use .objects() it might work!
  3. use sensors instead of getSensor.
  4. warpto = warpoint.worldPosition
    5: own.worldposition=warpto might do the job.

Then again, I’m also an apprentice so, this is educational for me as well!
Good luck!

You’re using Blender 2.49, huh? Are there any errors in the console? Also, I think Tora means objects[‘OBemp’], not objects() (it’s not a function). Other than that, his suggestions will help, though I’m not exactly sure what the problem is without seeing the console’s error - what does that say?

ehh… it dosent say any erros if it is that you mean, it just wont send the player to the place he should get to, but i am using 2.57 that much i know :smiley:

Well im using 2.57, but it dosent show any bugs, it just wont send the player to the other place… i rly cant get it working :frowning:

Sry for double post

listen to this one please

Are you sure it’s actually executing the script? See if you type ‘print(obj.position)’, will it print?

Hmm, 2.49 scripts (like the one you have) don’t work in 2.57.
See if you can find a 2.57 script for the same thing. Or you can do the cheating way, using ipo’s. That’s what I do and it works fine.

in case you wanted help, i have a demo on my site;
http://blenderarchive.hostilestudios.com/list.php
look at “teleport”