Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for broken objects
Rinacath Offline
Junior Member

Posts: 4
Threads: 2
Joined: Feb 2012
Reputation: 0
#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
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#4
RE: Check for broken objects

I would guess that if GetPropHealth(*)==0 would work.
02-15-2012, 05:34 PM
Find




Users browsing this thread: 1 Guest(s)