Author Topic: returnRelay  (Read 536 times)

An event that fires a relay to the last brick that fired a relay at it, basically like a function return or something. Don't know if it's possible, but would be useful in situations where you want to use a single brick as a condition for multiple evented bricks.

onactivate self firerelaydirrection the brick you want do onrelay self firerelay direction the brick is at

You didn't quite understand me did you. Technically you'd still need to know the direction you got the relay from in the first place. I'm talking about an event that fires back to the brick that initially fired to it.

Brick 1's events:
onActivate>Brick3>fireRelay
onRelay>Self>playSound

Brick 2's events:
onActivate>Brick3>fireRelay
onRelay>Self>doorOpen

Brick 3's events:
onRelay>Self>ifAdmin
VariableTrue>returnRelay


That's a basic example of how a structure could work. Essentially what I am asking for is the ability to create event functions.

People really do try to overcomplicate the events system. Variables was going far enough, but functions?

A function in the sense that a brick has a set of events, such as conditions, that can be used by multiple bricks and return a relay if they are true. There have been times where something like that could be useful, but I've had to repeat the same events over and over.

couldn't you just select the brick brick again?

Onrelay>named brick (whatever brick name)> fire relay
 
or better yet to work variables in:

Onrelayy>self>ifplayerId(or whatever)
Variabletrue>namedbrick(whatever)>fire relay

or  maybe I am not understanding you
« Last Edit: February 19, 2009, 06:05:10 PM by Littledude1222 »