GameLogic

I am trying to acess the GameLogic Module so I can resize a health bar object relative to one of it’s properties, but It’s not working! This is what I put:

import Blender

import GameLogic

hbar = Blender.Object.Get(“Health Bar”)

hbar.SizeX = hbar.Health

all of this with Health as being the property and “Health Bar” being the object.
I don’t know very much about python. %|

is the game engine running?

second, the Blender module is mostly useless in the game engine. To get objects you would do:

import GameLogic
# cont is the controller that called this script
cont = GameLogic.getCurrentController()
# obj is the object that owns cont
obj = cont.getOwner()

(I may have the case wrong a bit, it could be GetCurrentController() )