i am working on a first person shooter and i was wondering how you give “bad guys” health and how you make them die.
quite easy, here’s a basic ex:
add an “Int” property named “life” to one of the bads with value 10
Collision Sensor - Property/material-projectile/bullet/whatever_here - > AND - Property Actuator - add - property:life Value: -1
This way when a “projectile” collides with the “bad” character the “life” prop will decrease one point
To make some “dead” action happens when the life" prop gets to 0:
Add a Property Sensor - Equal - Value:0 -> AND - Action Actuator - dead/whatever_action_name_here