Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for broken objects
Author Message
Rinacath Offline
Junior Member

Posts: 4
Joined: Feb 2012
Reputation: 0
Post: #1
Check for broken objects
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.
02-15-2012 07:17 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #2
RE: Check for broken objects
I wouldn't know how to do this btw, but I think checking for the broken version of the object would be easier.

02-15-2012 07:26 AM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #3
RE: Check for broken objects
If you're lucky, GetPropHealth will return 0 when broken, greater than 0 when not broken.

Tutorials: From Noob to Pro
02-15-2012 07:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #4
RE: Check for broken objects
I would guess that if GetPropHealth(*)==0 would work.
02-15-2012 05:34 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)