Help me with game properties

I need to access the game properties per object with a python script in blender. Just to make sure you know what I mean, I need to access the string/float/int/etc… properties you add by pushing the “Add property” button in the game menu. Help me out please.

Here is a small example.

Hope it helps.

import Blender
import GameLogic

cont = GameLogic.getCurrentController()

own = cont.getOwner()

print own.someProperty

It says no such module “GameLogic”


from GameLogic import *

I’m making an export script and for it I need to give objects certain properties. I need to use game properties or use empties. The only problem with empties is that you can’t have a lonjg enough name. Help help help!

It works for me. I am using Blender 2.34.

ALT+P will give you that error. The only way i know properties can be accessed is during runtime mode [P_KEY].