pkleiss Posted January 10, 2010 Share Posted January 10, 2010 Terminals can get a bit tricky, but they work the same as everything else. Lets say you have a series of lights that are all setup with a specific Xmarker as their enable parent. You can set all of the lights and the Xmarker to be initially disabled (meaning - off). Now you want to be able to turn them on and off again from a terminal. You will need to put two options into the terminal; one for ON and one for OFF. But if the light are on, you don't want to see the option to turn them on and if the lights are off, you don't want to see the option to turn them off. This is where conditions come into play. For the ON condition, you would add a condition that used the function "GetDisabled" and choose the "Run on" to be a "reference". Once you select reference, you will get a window that lets you choose the reference. You would then pick the cell and Editor Reference ID of your Xmarker. So In this case, we want our GetDisabled (Xmarker) == 1. This will evaluate true when the Xmarker is disabled, so we will get the ON option only when the XMarker is "off". For the "OFF: option, we do the opposite: GetDisabled (Xmarker) == 0. This will evaluate true only if the Xmarker is "on". This way we will only see the ON and OFF options one-at-a-time and never see them both at the same time. Now, in the "Results Scripts" for each option, you need to put in the code that will turn the xmarker (and light) on and off. So in the results script for the ON option, put: XmarkerRef.enable, and in the OFF option results scripts, put: XmarkerRef.disable. The only thing else you need to do is set the "Force Redraw" for both of these options. The Force Redraw forces the terminal to redraw the options after you have changed some settings. If you did not do this, you would get the same options appearing as the last time. If you have options in your terminal that don't change settings that decide which options will be displayed, then you don't need to set the Force Redraw. And that is a brief overview of terminals. Link to comment Share on other sites More sharing options...
biscut247 Posted January 10, 2010 Author Share Posted January 10, 2010 You see, my problem with if statements and terminals is that SOMEHOW, the line that contains the word "ELSE" is flawed. and as for the lights, i find it to be a nusence to have to script a submenue for lights. gotta make a WHOLE NEW terminal to controll the lights in one room. too much clutter in my ID list for me Link to comment Share on other sites More sharing options...
biscut247 Posted January 10, 2010 Author Share Posted January 10, 2010 pkliess, that was very helpful. i didnt notice you posted that little overview untill just now because i didnt notice that my topic had gotton a second page. Link to comment Share on other sites More sharing options...
Recommended Posts