Python Scripting problems within BGE

Hi,

Been trying to play around with some vehicle physics using Python (for the first time, hence pretty much completely relying on tutorials and demos).

I am totally new to this, so I’m sure it’ll be a very basic question for many people on these forums… First off I’m using Blender version 2.49 and have Python versions 2.7 and 3.2 installed on my PC.

I gather that at the start of the script I will need to import the relevant python modules needed to run the game logic and physics constraints, but when I type in “import GameLogic” it comes up with an error and there is no such module. Same thing goes for PhysicsConstraints.

Any help would be massively appreciated; this project is driving me nuts and I’m half tempted to switch to Unity for the physics constraints… would this be an easier option?

Many thanks

Jem

You need to run the Python code via Python controller in Script mode or Module mode.

You can use the visual vehicle wrapper. You can find it in the resources of my signature. Much easier to use no need to worry about Python code. Runs in 2.49 and 2.5x

Thank you, looks like a great resource, I’ll try it out later and hopefully get something working.

Many thanks for all your help

In 2.49 you don’t need to import GameLogic.