| Blockland Forums > Modification Help |
| Checking for deleted bricks... |
| (1/1) |
| Trader:
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. ? |
| The Prophet:
That seems to be natural script lag, I don't think you could make the script go faster, unless you maybe raise timescale. I have a schedule looped script that does messagesent with a message and went to a server with around 1.5-2 timescale and it was accelerated, messaging pretty fast. |
| Space Guy:
The function fxDTSbrick::killbrick(%brick); might help ("Destroys the brick and any bricks left floating from it", same function probably applied to ones left floating). In F11, the brick still exists for a second after being destroyed - the "falling away" effect appears to be part of the brick's code, not a new object. |
| Night-Stalker:
Maybe this is due to the bricks having a delete function after the particle is finished. Delayed brick destruction was in v0002. |
| Navigation |
| Message Index |