Health Bar -- Blender Game Engine


 

  
1.  Add HealthBar.py to the Text Editor

Note:
If you downloaded either the starting blend or the finished blend, you can find HealthBar.py in the Text Editor.  

Download:

Text Editor menu >> Text >> Open
Rename HealthBar.txt to HealthBar.py


 

   
2.  Add an Always Sensor to HealthBar.  Set to run once

Note:
Always Sensor >> Python Controller >> Ipo Actuator
This will initialize the health bar with the player's health

HealthBar selected

Buttons Window menu >> Logic (F4)
Sensors Add
Always Sensor
Set to Run Once


 

   
3.  Add Python Controller:  Use HealthBar.py

HealthBar selected

Buttons Window menu >> Logic (F4)
Controllers Add
Python Controller
Script:  HealthBar.py





 
  
Download free seamless game textures or you can create your own seamless game textures. Use reference photos to add realism to the seamless texture you create. Textures let you create the style and mood for your computer game. Textures are a way to add detail and color to 3D graphics. Photo realistic textures add realism. Download free game models for your video game or create your own game models. Use the game models in First Person Shooter, role playing games, racing simulations and more. Download free textures to add detail to your game models. You can use the free game models you downloaded or model your own game models.