Jump to content
Sign in to follow this  
StarvinMarvin

How to detect if a static building is destroyed

Recommended Posts

How do i detect if a certain static building (already on map) is destroyed?

thanks // Marv

Share this post


Link to post
Share on other sites

yeah i tried that.. like this.. probably some silly bug in it thou wink_o.gif cause it didnt work

_building = nearestBuilding cone

#loop

hint "checking"

?not alive _building : goto "dead"

~1

goto "loop"

#dead

hint "building is destroyed"

exit

Share this post


Link to post
Share on other sites

Just drop a trigger on the building, set the radius to 0, and set it to not present. Then close the trigger dialog and group the trigger to the building. Anything you want to happen can be execed in the on act field.

Share this post


Link to post
Share on other sites

Put a gamelogic on the buiding called say, pos2 and put something like this in the activation

getDammage (getPos pos2 nearestObject 302314) >0.9

Change the 302314 to what ever the ID is of the building you want to detect destroyed.

You may have to make the 0.9 closer to 1, but it should work.

Cheers

GC

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×