This might be useful in case i've done something else wrong; this is the part in question.
- {l Code}: {l Select All Code}
//laser control on/off (there are 6 beams, each with 3 lasers)
room3_laser1_red = 0
room3_laser1_green = 0
room3_laser1_blue = 0
room3_laser2_red = 0
room3_laser2_green = 0
room3_laser2_blue = 0
room3_laser3_red = 0
room3_laser3_green = 0
room3_laser3_blue = 0
room3_laser4_red = 0
room3_laser4_green = 0
room3_laser4_blue = 0
room3_laser5_red = 0
room3_laser5_green = 0
room3_laser5_blue = 0
room3_laser6_red = 0
room3_laser6_green = 0
room3_laser6_blue = 0
//laser control trigger function (interact with console)
on_trigger_59 = [
newgui laser_console [
guistayopen [
guiheader "laser control"
guitext "select wavelength output
guistrut 1
guibar
guistrut 1
guitext "beam 1"
guibutton "Toggle ^fr650 nm" [ sound 253; exectrigger 61; if ($room3_laser1_red 0) [ room3_laser1_red = 1 ][ room3_laser1_red = 0 ]]
guibutton "Toggle ^fr532 nm" [ sound 253; exectrigger 60; if ($room3_laser1_green 0) [ room3_laser1_green = 1 ][ room3_laser1_blue = 0 ]]
guibutton "Toggle ^fr488 nm" [ sound 253; exectrigger 62; if ($room3_laser1_blue 0) [ room3_laser1_blue = 1 ][ room3_laser1_blue = 0 ]]
// beam 2... etc
// ....................
// ....................
]
]
showgui laser_console
]
I can't screenshot it right now, but i have started a gimmick style map that has puzzle rooms with small minigames to unlock the next door etc, this room in particular has 6 beams.
Screenshot:
http://s21.postimg.org/sx8df44yu/20131002222749.jpgThat is, 6 devices where a laser travels from point A to B. You can toggle a red a blue and a green laser in each beam.... so if you enable the red and the blue beam, you get a purple one.
There is a passcode that requires you do mix the lasers so that each beams colour matches up, hoping that makes sense as to what i'm trying to do. That's the idea, I just can't seem to get the lasers to actually toggle from within a gui / guibutton.