LongRaider Posted August 31, 2015 Share Posted August 31, 2015 Hello all!I'm developing a house mod and one of its key abilities is its interaction.I currently have many, many switches that act to disable and then re-enable objects in the mod, all linked via an xmarker.My question: how do I do this via terminal? I (think I) know how to create a terminal. I created a new terminal new base and reference ID and all that jazz.Then I placed it in my house, gave it a welcome text and a menu item.I simply copy and pasted my script I use on the buttons (a very ghetto script, I borrowed from a lights on and off script that i re purposed to enable and disable my objects) into the item result script.In-game, I open the terminal, select the option and close the terminal.The items aren't enabled, (or disabled) and when I try to re open the terminal, I can't. Next I saw I had to link the terminal to my object so I linked the terminal to my xmarker.Then in the item result script I simply wrote this script to disable the xmarker (and its enable children) that are initially enabled. ref myLinkREFset myLinkREF to GetLinkedRedmyLinkREF.Disable That was the script used on the tutorial that suggested I link the terminal and xmarker. I changed the "myLinkREF" to the refid of my xmarker.In game I had the same result as before, no change, unable to re access terminal. Basically what I want is this one menu item will disable the xmarker if is enabled and enable it if it is disabled.Any help would be much appreciated. Thank you! EDIT: The ghetto script was working with the switches and here it is. with my unique refids scn ExampleScript Short LightsOn Begin OnActivate If LightsOn != 1 board1marker.EnableSet LightsOn to 1ReturnElseIf LightsOn == 1board1marker.DisableSet LightsOn to 0ReturnEndif End Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted September 4, 2015 Share Posted September 4, 2015 if (XmarkerRef.Enabled) XmarkerRef.Disable else XmarkerRef.Enable endif That should disable if enabled and enable if disabled. You don't need to link the terminal to the xmarker if you have given the xmarker a unique name, just us the unique name in place of 'XmarkerRef'. Link to comment Share on other sites More sharing options...
LongRaider Posted September 5, 2015 Author Share Posted September 5, 2015 if (XmarkerRef.Enabled) XmarkerRef.Disable else XmarkerRef.Enable endif That should disable if enabled and enable if disabled. You don't need to link the terminal to the xmarker if you have given the xmarker a unique name, just us the unique name in place of 'XmarkerRef'. I really appreciate the help Gribbles but I actually ended up using a message and instead of one button enabling AND disabling I used two buttons with conditions showing either disable or enable. Again, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts