Frictional Games Forum (read-only)

Full Version: Check for broken objects
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a map in which I'd like to run a script every time something is broken (mostly those display cases, but possibly also the breakable windows and doors). Would I have to write it again for each display case, or is there a way to check for any broken object in game?
Come to think of it, I'm not completely sure how to check the health/state of an object like that. I assume I'd use a callback...? I don't know.
I wouldn't know how to do this btw, but I think checking for the broken version of the object would be easier.
If you're lucky, GetPropHealth will return 0 when broken, greater than 0 when not broken.
I would guess that if GetPropHealth(*)==0 would work.