I'm coding something in which I need to know whether a brick exists. However, for some reason if I hammer the brick or undo the brick, it takes a moment to register that the brick is no longer there. This results in being able to perform a particular action that is not desired if the brick is still there.
I've tried the following tests to check for brick presence:
if(!%brick.isDead && !%brick.isFakeDead && isObject(%brick) && %brick.isPlanted)
None of those are able to catch the brick disappearing until 2-3 seconds after it is no longer planted.
What can I do to catch this immediately after it's hammered, undone, etc. ?