Frictional Games Forum (read-only)

Full Version: Prop Health
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Came across this function on the wiki list while coding. How does this work exactly....

lets say you have a collide callback area covering a door. and you pick up some object and start swinging it in the collide area, or 'hitting it' so to speak. How would you set up the prop health function to cause the door to break, and how much health does a prop have anyway?
Props tend to have 100 health. Yes, SetPropHealth() damages the door to make it look like it is breaking if you set the health below 100. Use GetPropHealth() to get the current health and subtract how much health you want taken off, then pass that to SetPropHealth().
Could setPropHealth be used on anything else? Also, would be cool is someone used SetPropHealth to blowup doors as if you launched a rocket at them. Tongue
Prop health will blow open a door, break open a box, and such. Anything breakable, it will break.