| Rinacath   Junior Member
 
 Posts: 4
 Threads: 2
 Joined: Feb 2012
 Reputation: 
0
 | 
			| 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 |  | 
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| 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 |  | 
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Check for broken objects 
 
				If you're lucky, GetPropHealth will return 0 when broken, greater than 0 when not broken.
			 
 |  | 
	| 02-15-2012, 07:37 AM |  | 
	
		| Dobbydoo   Member
 
 Posts: 50
 Threads: 6
 Joined: Aug 2011
 Reputation: 
0
 | 
			| RE: Check for broken objects 
 
				I would guess that if GetPropHealth(*)==0 would work.
 |  | 
	| 02-15-2012, 05:34 PM |  |