Author Topic: Brick Destroy help!  (Read 958 times)

i dont like that i have chain activated here,is there anyway to make the bricks like float?
Code: [Select]
registerOutputEvent("fxDtsBrick", "KillBrick", "", 1);
function fxDtsBrick::Destroy(%brick)
{
if(!%brick.willCauseChainKill())
%brick.killBrick();
}



Remove
Code: [Select]
if(!%brick.willCauseChainKill())
%brick.killBrick();
and replace it with
Code: [Select]
%brick.delete();

Remove
Code: [Select]
if(!%brick.willCauseChainKill())
%brick.killBrick();
and replace it with
Code: [Select]
%brick.delete();
Thanks again!

Note that if you change the function name to fxDTSBrick::Destroy you also need to change it in here: registerOutputEvent("fxDtsBrick", "Destroy", "", 1);

is it possible to use/mimic killbrick without causing a chain reaction?
or would it have to create a temporary invisible brick in the same position/datablock as the one being killed, then kill the visible one, and delete the temporary?

is it possible to use/mimic killbrick without causing a chain reaction?
or would it have to create a temporary invisible brick in the same position/datablock as the one being killed, then kill the visible one, and delete the temporary?

Placing bricks inside of other bricks does all sorts of weird server desync stuff. I doubt it would work.

Something more likely is to place a static shape (with collision) in place of the brick, resized to be its shape, that will support the bricks above it, then killing the brick. I don't know if bricks can handle themselves just suddenly being connected to the 'ground' though, might be a function to do it.

Play the sound, fake kill, and delete after a short time.

Not perfect (you don't get the fade, plus you also get physics if they're turned on), but close to it and reliable.

I was thinking that since it's invisible, hopefully clients won't ever notice the temp brick is there

and I was thinking about the sound + fake killing, but physics on really ruins it