Health Bar -- Blender Game Engine



pageok

  
4.  Add an Ipo Actuator to HealthBar

Note:
The Ipo Actuator must be named health.  It can't be named Health or fred_health or blood.  The python script looks for an attached actuator named health.  If you want it to have another name, you'll have to change the python script.

HealthBar selected

Buttons Window menu >> Logic (F4)
Actuators Add
Ipo Actuator
Name:  health
Type:  Property


 

   
5.  Connect the Always Sensor >> Python Controller >> Ipo Actuator

HealthBar selected

Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple


   
6.  Add a Message Sensor to HealthBar

Note:
A Message Sensor receives a message.  This message sensor is triggered by a message with the Subject "updateHealth"

HealthBar selected

Buttons Window menu >> Logic (F4)
Sensors Add
Message Sensor
Subject:  update
       

   
7.  Connect the Message Sensor >> Python Controller 

HealthBar selected

Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple



   
  
pageok