Author Topic: Event: fireRelayBack  (Read 2112 times)

\
What's the "%something?"
There might be something, I don't know

There might be something, I don't know
You could probably just use the brick's ID, unless .lastRelayBrick is specific.

You could probably just use the brick's ID, unless .lastRelayBrick is specific.
Well how do you expect the brick to be remembered after:
Brick 1 fires a relay on brick 2, (brick 2 records brick 1 as lastRelayBrick)
Brick 2 does something.
Brick 2 finally fires a relay on brick 1(lastRelayBrick)

Well how do you expect the brick to be remembered after:
Brick 1 fires a relay on brick 2, (brick 2 records brick 1 as lastRelayBrick)
Brick 2 does something.
Brick 2 finally fires a relay on brick 1(lastRelayBrick)
I really don't know much about Torque, but I would assume that the brick's ID would be a good idea.


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?

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?
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.

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.

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.
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?

1. Place three bricks.
2. Brick 1 you setup like this:
Code: [Select]
33 - onActivate -> Brick 3 -> fireRelay
5000 - fireRelay -> Self -> playSound [AnySound.wav]
3. BRick 2 is almost the same:
Code: [Select]
33 - onActivate -> Brick 3 -> fireRelay
1000 - fireRelay -> Self -> playSound [AnySound.wav]
4. And you might understand what comes next:
Code: [Select]
0 - onRelay -> Self -> fireRelayBack
0 - fireRelay -> Self -> fakeKillBrick [stuff]
5. Click first brick 1 and then brick 2 within 4 seconds. Brick 1 wont fire the relay.

1. Place three bricks.
2. Brick 1 you setup like this:
Code: [Select]
33 - onActivate -> Brick 3 -> fireRelay
5000 - fireRelay -> Self -> playSound [AnySound.wav]
3. BRick 2 is almost the same:
Code: [Select]
33 - onActivate -> Brick 3 -> fireRelay
1000 - fireRelay -> Self -> playSound [AnySound.wav]
4. And you might understand what comes next:
Code: [Select]
0 - onRelay -> Self -> fireRelayBack
0 - fireRelay -> Self -> fakeKillBrick [stuff]
5. Click first brick 1 and then brick 2 within 4 seconds. Brick 1 wont fire the relay.
It won't fire the relay, or Brick 3 wouldn't fire one back to Brick 1?