mrbic Posted August 22, 2011 Share Posted August 22, 2011 I was making a mod that is supposed to disable one object and enable another, so I was wondering if any of you could tell me how to use a script to disable the one object and then enable the other. Link to comment Share on other sites More sharing options...
stealthtank91 Posted August 22, 2011 Share Posted August 22, 2011 (edited) I was making a mod that is supposed to disable one object and enable another, so I was wondering if any of you could tell me how to use a script to disable the one object and then enable the other. well, you make a block , and all you need to do is give both objects reference id's and do somthing like lets say on object is referenced "object1ref" and the other is "object2ref" This is an example i would do if i wanted to have this happen when clicking a switch for instance Begin OnActivate player object1ref.disable object2ref.enable end In what reference would you want this to happen exactly?when you click a switch?after a certain amount of time?or when you complete a quest? there are different ways of going about it depending on what you are making. Begin OnActivate player object1ref.disable object2ref.enable end ^ thats just a simple example of how you format the simplest scriptif you are making a switch that when a player clicks on it this happens, then you want to add this script to the "switch object" in the script box under the objects properties in G.E.C.K. Edited August 22, 2011 by stealthtank91 Link to comment Share on other sites More sharing options...
mrbic Posted August 22, 2011 Author Share Posted August 22, 2011 (edited) I was making a mod that is supposed to disable one object and enable another, so I was wondering if any of you could tell me how to use a script to disable the one object and then enable the other. well, you make a block , and all you need to do is give both objects reference id's and do somthing like lets say on object is referenced "object1ref" and the other is "object2ref" This is an example i would do if i wanted to have this happen when clicking a switch for instance Begin OnActivate player object1ref.disable object2ref.enable end In what reference would you want this to happen exactly?when you click a switch?after a certain amount of time?or when you complete a quest? there are different ways of going about it depending on what you are making. Begin OnActivate player object1ref.disable object2ref.enable end ^ thats just a simple example of how you format the simplest scriptif you are making a switch that when a player clicks on it this happens, then you want to add this script to the "switch object" in the script box under the objects properties in G.E.C.K. I wanted the objects to be enabled/disabled from a menu selection script. Its actually a side-effect of what my main script is going to be, but a nice addition none-the-less. You helped me out a lot, so thanks. If you want to, you could tell me how to do it on a timer, like if I activated an object and wanted to wait a certain amount of game hours before it disappeared again. Edited August 22, 2011 by mrbic Link to comment Share on other sites More sharing options...
Recommended Posts