EDIT: Problem has been resolved thanks to Sim88.
Object names start with OB, so if the object is called Portal it should be [“OBPortal”]
in blender 2.49 an later use:
cont = GameLogic.getCurrentController() own = cont.owner portal2 = GameLogic.getCurrentScene().objects["OB+portal's name goes here"] own.position = portal2.position
This one is simple. So simple that it has dumbfounded me. I have Google searched all over the place for this subject and couldn’t find anything that works with Blender 2.49 and/or Python 2.6. I need for my “player” object to get the position of “portal2” and then set it’s own position to that one recorded for portal2; all when it collides with portal1. I’m thinking something along the rough and obviously not correct lines of:
cont = GameLogic.getCurrentController() own = cont.getOwner() p1 = object.getPosition("portal1") owner.setPosition("p1")
My idea for this is a lot similar to the Portal game by Valve. I want to be able to place a portal anywhere while playing in the Game Engine, rather than setting it up prior to playing the game. I attached the .blend file so you know what I’m talking about.
portal teleport.blend (168 KB)