a simple health bar or timer system

Subscribers:
1,510
Published on ● Video Link: https://www.youtube.com/watch?v=Fg-1RuWZpH8



Duration: 4:16
62 views
1


if you have a object that has it's origin to one side, and scale it, it makes a nice health bar,

property changed--------python

this assumes 100% = full (int 100)

import bge
cont = bge.logic.getCurrentController()
own = cont.owner

own.localScale = ( 1, property*.01, 1)