Blockland Forums > Suggestions & Requests
Event: fireRelayBack
<< < (5/6) > >>
HellsHero:
So, how specific do you want the fireRelayBack thing to be? To the last brick in the server that sent a relay to the brick with the event?
Niliscro:

--- Quote from: HellsHero on June 01, 2010, 07:02:47 PM ---So, how specific do you want the fireRelayBack thing to be? To the last brick in the server that sent a relay to the brick with the event?

--- End quote ---
To the last brick which sent that specific brick a relay.
If Brick 1 sent Brick 2 a relay, then Brick 1 would be the most recent one to send Brick 2 a relay until another brick sends Brick 2 a relay.
mctwist:
Isn't setEventEnabled good for you?

Even though, this can be done, but the worst bug you would get is that two bricks sending to each other with different delay would override the other one, making the relay twice on same brick.
Niliscro:

--- Quote from: mctwist on June 02, 2010, 02:33:56 PM ---Isn't setEventEnabled good for you?

Even though, this can be done, but the worst bug you would get is that two bricks sending to each other with different delay would override the other one, making the relay twice on same brick.

--- End quote ---
I can see how you might use setEventEnabled for this, but it's a bit of a hassle once you start to involve more than 5 bricks.

And please explain that last part in coherent English?
mctwist:
1. Place three bricks.
2. Brick 1 you setup like this:

--- Code: ---33 - onActivate -> Brick 3 -> fireRelay
5000 - fireRelay -> Self -> playSound [AnySound.wav]
--- End code ---
3. BRick 2 is almost the same:

--- Code: ---33 - onActivate -> Brick 3 -> fireRelay
1000 - fireRelay -> Self -> playSound [AnySound.wav]
--- End code ---
4. And you might understand what comes next:

--- Code: ---0 - onRelay -> Self -> fireRelayBack
0 - fireRelay -> Self -> fakeKillBrick [stuff]
--- End code ---
5. Click first brick 1 and then brick 2 within 4 seconds. Brick 1 wont fire the relay.
Navigation
Message Index
Next page
Previous page

Go to full version