health bar help for 2.62

so i followed blenderman911 tutorial for making a health bar, it works in 2.49 but not in 2.62. anyone have any idea how i can make it so once the health gets to zero it cant go below that? i have no python experience btw.
Thanks for all your help. here the vid i used

I learned in 2.6 from this one

its for 2.5 but i learned it in 2.6 I think everything was the same

i learned mine from this one http://www.youtube.com/watch?v=PR4RIMSCLB8&list=UU04Z-Va0lMZ0grb_Z06Dirg&index=9&feature=plcp
hope it helped

thanks. my main issue is with ammo. i know the same concepts apply as it does with health, but how do i make sure i doesnt go into the negatives?

create a sensor for the property that defines how many bullets you have saying not equal to 0 and add it to the logic that triggers the negative bullet count when you ‘fire your gun’.
This way you can not fire your gun when the property that defines how many bullets you have is 0.
I don’t know if you are using python or not but this is my way with logic bricks :slight_smile:

Edit: i guess you could translate this to python offcourse

Edit 2: In case you are using logic bricks you can also work with an expression which is much simpler.

Just change the controller from the ‘fire your gun’ trigger to an expression type one and in the textbox
you just type the name of the property that defines how many bullets you have left followed by > 0
So, for example : property > 0
The effect is the same as the above method.

never mind, i figured it out. thanks for your help