Hopefully somebody can help me with this problem I am having. I think it may just be something I don’t understand or a stupid mistake but anyways this is my problem:
I have three objects and bellow I have listed them along with their properties:
Integer - Damage_Value: 0
Float - RDamage: 0.000
Boolean - RedPlayer: True
So hopefully you may know now what this game involves ;)… anyway the DamageBar is a plane that is attached to an IPO that controls its growth on the X axis. Now what I have setup to happen is this:
The Bullet object, when a it detects a collision, adds a value of 50 to RedTank’s RDamage property and then an Always sensor attached to RedTank connects to a python script (called: HUD_Controller) which is as follows
import GameLogic as g cont = g.getCurrentController() own = cont.getOwner() g.Damage_Value = own.RDamage
Now over in the DamageBar object we have an Always sensor connected via an AND controller to an IPO Actuator which is set to property and points to Damage_Value.
When the game is run and the collision happens, the damage bar doesn’t move as it should. Also just to see if it was my IPO setup I set the DamageBar’s property Damage_Value to 50 manually and then ran the game and the bar had increased so the IPO setup is working fine.
If anyone could help me with this, it would be great.
P.S Also I am not sure if the python script is necessary, perhaps it isn’t. Oh and the other thing is, no errors are returned in the command prompt window that accompanies blender.