as you can see i’m trying to use a health bar as a distance indicator in a car game. for example, car is getting nearer and nearer to another car in traffic and my health bar is becoming red, indicating that something’s wrong.
any ideas? suggestions? please, if you have some, feel free to say.
Usually it is tha same logic. It should not matter if you measure a health property or a speed or a distance property.
It is just a question how you fill the value (and what is the max) ;).
i already have ray sensors in front and back of the car. i’m printing distance by a debug properties. so if there’s some way to connect that measured distance with a health bar with a python script(easier to me) or with logic bricks(if it’s easier to you).
max value is 50. but i figure that health bar would react only on distance of 20 and lower.
The point is: I do not know your healthbars. So I can’t tell you how you should use them. Usually you put the distance that you get in the “health” (or whatever) property of the healthbar. That’s it.