Blacksage81 Posted June 25, 2016 Share Posted June 25, 2016 For my dungeon I have two light layers, one for Lock down, and one for All clear. My issue is that I no idea on how to reference an entire layer of lights to set as a property to take advantage of the Enable Disable scripting functions. Any help would be appreciated. Link to comment Share on other sites More sharing options...
NorthWolf Posted June 25, 2016 Share Posted June 25, 2016 Not sure if this will help, but the UFOCrashQuest (001870D0) has a case of a scripted layer change. Check stage 10's fragment: Alias_CrashStateEnabler.GetReference().DisableNoWait() Pretty sure that's the point where it toggles the layer state. The alias is for UFOCrashEnableRef (00187000). Link to comment Share on other sites More sharing options...
Blacksage81 Posted June 25, 2016 Author Share Posted June 25, 2016 Thank you. I looked up the quest and I saw a ref alias which points to an Enable marker, that when called via the fragment, it will then enable or disable its child references. I was hoping that there was some sort of automated way for the sake of convenience but hey, moddin aint easy. Thanks again. Link to comment Share on other sites More sharing options...
NorthWolf Posted June 25, 2016 Share Posted June 25, 2016 Thank you. I looked up the quest and I saw a ref alias which points to an Enable marker, that when called via the fragment, it will then enable or disable its child references. I was hoping that there was some sort of automated way for the sake of convenience but hey, moddin aint easy. Thanks again. Yeah, no worries. Thanks for sharing what you found out as well. Link to comment Share on other sites More sharing options...
timtimman Posted June 25, 2016 Share Posted June 25, 2016 I don't know anything about layers or how those would work (don't have the CK). But wouldn't you be able to store your lights in the two layers as two different property arrays, and then just use a function to enable/disable all of them by looping through the property array? Light[] Property LightLayer1 Auto Light[] Property LightLayer2 Auto Function EnableAllLights(Light[] LightArray) int i = 0 While (i < LightArray.length) LightArray[i].EnableNoWait() i += 1 EndWhile EndFunction Function DisableAllLights(Light[] LightArray) int i = 0 While (i < LightArray.length) LightArray[i].DisableNoWait() i += 1 EndWhile EndFunction ; then use EnableAllLights(LightLayer1) DisableAllLights(LighLayer2) Or maybe as a RefCollectionAlias (don't quite understand how this works, but you would probably set it in the CK with references to all your lights) making use of EnableAll and DisableAll, which basically should do what the above script does. RefCollectionAlias Property LightLayer1 Auto RefCollectionAlias Property LightLayer2 Auto ; then use LightLayer1.EnableAll() LightLayer2.DisableAll() Hopefully this helps in some way, unless you haven't already solved it. Link to comment Share on other sites More sharing options...
Blacksage81 Posted June 27, 2016 Author Share Posted June 27, 2016 (edited) @timtimman, Layers in the Ck work pretty much like Photoshop or Gimp, and are attached to the Cell. I have been banging my head pretty hard into this quest thing and some basic scripting to drive stages and so forth. Layers are weird that there seems to be no way for me to set a layer as a property. and with that Array it doesn't seem like there is a way for my to refer to to my lights or the objects, and I've got 199 in my All Clear layer.. The Refcollectionalias seems to be the means to preform various tasks on a group of actors, their interactions, such as faction and relation types. Thank you for the script examples none the less. I figure the more payprus I see in smaller chunks the sooner I may be able to advance my understanding. Edited June 27, 2016 by black sage Link to comment Share on other sites More sharing options...
timtimman Posted June 28, 2016 Share Posted June 28, 2016 Ok. There are, unfortunately, several things which are available only to the CK and can't be set/changed using script. Layers could be one of them. Link to comment Share on other sites More sharing options...
Recommended Posts