I am fairly new to python using Blender and basically I am trying to port the 3rd person template of cray (http://blenderartists.org/forum/showthread.php?t=153042) to make it work in 2.6.
Has anyone done it already?
There are 5 scripts: move the character, control the camera, avoid the collision of the camera using a ray and two more regarding counters of the game and special movements.
The first problems I am finding is just after the imports. Before you could import GameLogic or GameKeys, whereas now you should import bge.logic or bge.events.
from bge import logic from bge import events
However, the following code still gives errors:
cont = logic.getCurrentController() //Before it was GameLogic.getCurrentController() own = cont.getOwner() <----- ERROR objList = logic.getCurrentScene().getObjectList() <----- ERROR front_tget = objList["OBfront"] back_tget = objList["OBback"] left_tget = objList["OBleft"] right_tget = objList["OBright"] front_right_tget = objList["OBfront_right"] front_left_tget = objList["OBfront_left"] back_left_tget = objList["OBback_left"] back_right_tget = objList["OBback_right"]
In all the scripts I get errors due to getObjectList() and getOwner(). What would be the way of doing this with the 2.6 API?
Any help is welcome.