Author Topic: How do I make a brick dissapear for +30s?  (Read 1138 times)

I know its possible, as I've seen it done with relays before?
Anyone have any ideas?


The variable is in seconds


The variable is in seconds
I think its got a limit of 30 seconds in that box, once you set the event it'll set back to 30?

I think its got a limit of 30 seconds in that box, once you set the event it'll set back to 30?
Oh my bad, I didn't check that.
I just assumed it since it disappeared on when set to 40 seconds.

You could register a new event for it, or just overwrite the current event if the cap is 30 seconds.

function fxDTSBrick::longDisappear(%this, %seconds)
{
    %this.setRendering(0);
    %this.setColliding(0);
    %this.setRaycasting(0);
    %this.schedule(%seconds, setRendering, 1);
    %this.schedule(%seconds, setColliding, 1);
    %this.schedule(%seconds, setRaycasting, 1);
}

registerOutputEvent("fxDTSBrick", "longDisappear", "int -1 100 5");

Not tested.

0 onActivate self disappear 30
30,000 onActivate self disappear 30

You could use a VCE loop

Code: [Select]

[0] [x] [0] [OnActivate] [Self] [Disappear] [-1]
[1] [x] [0] [OnActivate] [Self] [VCE_ModVariable] [Count] [Set] [0]
[2] [x] [0] [OnActivate] [Self] [FireRelay]
[3] [x] [33] [OnRelay] [Self] [VCE_ModVariable] [Add] [1]
[4] [x] [1000] [OnRelay] [Self] [VCE_IfVariable] [Count] [==] [30] [5 7]
[5] [x] [0] [OnVariableFalse] [Self] [FireRelay]
[6] [x] [0] [OnVariableTrue] [Self] [Disappear] [0]
[7] [x] [0] [OnVariableTrue] [Self] [VCE_ModVariable] [Set] [0]


"Count" is the variable, and the "30" can be changed to any number to increase the necessary time.  You can also increase the delay on line 4 up to 30 seconds if you want, and that would elongate time even further.

Disappear -1, fire relay to bricks next to each other for every extra 30 seconds you need, target named brick and disappear 0.

Quote
On Activate-Self-disappear [-1]
On Activate-self-fire Relay
(30000) On relay-self-disappear [0 ]