i lost some of my games cause my comp got screwed yesterday.anyway…i lost the health script and now i don’t remember how to “fix” the health problem.please take a look and see if you can help me: http://mysite.iptic.com/gargola/FantasiaBay.zip the cube represents the monsters that take away your health if you touch it.and the sphere represents the life.the problem is the same…when the health bar gets to the max(the limit) it keeps adding health points and the bar keeps growing.i tried the solutions you guys give me last time,but it doesn’t work anymore! :-? please help me!
You can use an expression controller (unless this is a python script) and type in the health property and then a < than sign and then whatever the max health is.
yes it’s a python script :(.saluk…i’m afraid i’ll need more help than “code blah!” LOL something has changed in this code since you guys helped me and i don’t know why it doesn’t work now.i have tried anything to fix it myself,but i can’t make it work.please help!!! LOL
:-? … well, gimme a little bit to look around. all the posting I have been doing lately has been on my grandma’s business computer, as MY computer is currently in the shop, getting repairs (CD burner, scanner, and printer issues.). When I get it back, I think I have a link that will teach you how to build a health bar. it should only be a matter of a day or so, so be patient, m’kay? Don’t hold me to it; I may have lost it if they had to reinitialise the PC, and if thats the case, I’ll have to look it up on the net again.
Well gargola, I looked at your script and it looks a bit over complicated. Here’s what I suggest:
Give the health bar a size ipo - add a key for full size on frame 100, then go to frame 1 and scale it all the way down to add a key there. Then give it always->and->ipo and make the ipo PROPERTY mode. Give the health bar a prop, call it frame. Put frame in the ipo actuator’s textbox. Set the frame prop to 100 (So it will be full at start). When it gets the message that you were hurt, subtract an amount from the frame prop. When it gets the message that you got health, add something to the prop. Then make sure the prop doesn’t go above 100 or below 1.
well, thats good. I’ll keep looking for that link anyway, and post it… somewhere; everyone could use new tutorials, and a health bar tutorial is valuable, so yeah. good to know you got your problem solved.