Check for broken objects - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Check for broken objects (/thread-13353.html) |
Check for broken objects - Rinacath - 02-15-2012 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. RE: Check for broken objects - flamez3 - 02-15-2012 I wouldn't know how to do this btw, but I think checking for the broken version of the object would be easier. RE: Check for broken objects - Your Computer - 02-15-2012 If you're lucky, GetPropHealth will return 0 when broken, greater than 0 when not broken. RE: Check for broken objects - Dobbydoo - 02-15-2012 I would guess that if GetPropHealth(*)==0 would work. |