Hi, I followed the tutorial in the link below to step #4. I only want the health bar.
I did everything as the tutorial said it.
However, the tutorial has basic python and was made in 2008, so I imagine the python part changed.
Basically, the health bar starts out at it’s smallest point and stays that way.
I tried using the left/right arrow keys to decrease/increase the size of the bar and it didn’t work.
I am not very experienced at all with Python, so I wouldn’t know what changes to the code need to be made to work.
If you can’t get to the page for some reason, here is the code:
cont = GameLogic.getCurrentController()
own = cont.getOwner()
own.percent = own.health * 100 / own.healthMax
YES, I named the file correctly and made the actuators just as the tutorial says.
Will someone update this code?
If you do and it works, I’ll post you a picture of a kitten.
I suppose I should actually have tried to figure out the code.
The code is irrelevant to the problem, in fact. It’s obviously just for the percentage.
In that case, I must have to do something else different in Blender 2.49.