Health Bar -- Blender Game Engine



pageok

 
6.  Add an AND Controller to Player

Player selected

Buttons Window menu >> Logic (F4)
Controllers Add
AND Controller

    
7.  Add a Message Actuator to Player

Note:
We are sending the message to a Message Sensor connected to HealthBar.
It is triggered by the Subject "Damage_5Points"

Player selected

Buttons Window menu >> Logic (F4)
Actuators Add
Message Actuator
To:  HealthBar
Subject:  Damage_5Points

   
8.  Connect the Keyboard Sensor >> AND Controller >> Message Actuator

Player selected

Buttons Window menu >> Logic (F4)
Pull wire from brass bumps to brass dimples

   
9.  Start Game Engine

P key
or
User Preference menu >> Game >> Start Game  

Use Uparrow key to increase health.  Downarrow key to decrease health.


  
  
pageok