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()
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
getOwner is deprecated, use owner instead.
I think that if you use .objects() it might work!
use sensors instead of getSensor.
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!
April 21, 2011, 10:09am
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
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
Sry for double post
listen to this one please
April 21, 2011, 1:52pm
Are you sure it’s actually executing the script? See if you type ‘print(obj.position)’, will it print?
April 21, 2011, 1:59pm
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.
April 21, 2011, 5:18pm
in case you wanted help, i have a demo on my site;
look at “teleport”