Health Bar -- Blender Game Engine


  
pageok


  
8.  Add IPO key for  0% health

Note:
Can't set animation frame to 0.  Set to 1 instead.

HealthBar selected -- Object Mode

Set animation frame to 1
Buttons Windows menu >> Animation Frame box
Set animation frame to 100
Select Animation Frame box
    Enter 1

Scale HealthBar to 0 on x-axis.
Transform Properties
N key
or
3D View menu >> Object >> Transform Properties
ScaleX = 0.0; ScaleY = 1.0; ScaleZ = 1.0

3D View window >> I key
Insert Key >> Scale
 


   
9.  Set IPO Curve to Linear

IPO Curve Editor >> Select
Select/Deselect all
IPO Curve Editor menu >> Curve >> Interpolation Mode 
Linear

 
   
10.  HealthBar -- Add Property named Player

Note:
The property name must be Player.  It can't be player or Hero or George.  The python script looks for a property named Player.

Note:
Enter the object name of your "Hero".  (The object name of my hero (ie Player) is Fred.)

Buttons Window menu >> Logic (F4)
Add Property
Type: string
Name:  Player
Object Name:  Fred

 


 
 
pageok