Jambo11 Posted December 26, 2019 Share Posted December 26, 2019 I'm working on a mod that employs pullbars to switch between single weapon plaques to the combo, COA plaques that hold two weapons and a shield. I actually figured this out a few years ago, but I can't remember how it was done. I have the plaques and activators linked to an XMarker, with one set being set to "Set Enable State to Opposite of Parent," so I just need to figure out how to enable/disable the XMarker with the pullbar. Link to comment Share on other sites More sharing options...
maxarturo Posted December 27, 2019 Share Posted December 27, 2019 (edited) You need to add to the pullbar a simple script that OnActivate() will Enable and/or Disable the xMarker. You can use this simple script, it will auto detect the xMarker state and it will do each time the opposite, example: if it's disable it will enable it, if it's enable it will disable it. ObjectReference Property xMarker Auto {Link REF the xMArker handeling the enable/disable state} Event OnActivate(ObjectReference akActionRef) If (xMarker.IsEnabled()) xMarker.disable() Else xMarker.enable() EndIf EndEvent Edited December 27, 2019 by maxarturo Link to comment Share on other sites More sharing options...
Jambo11 Posted December 27, 2019 Author Share Posted December 27, 2019 (edited) You need to add to the pullbar a simple script that OnActivate() will Enable and/or Disable the xMarker.You can use this simple script, it will auto detect the xMarker state and it will do each time the opposite, example: if it's disable it will enable it, if it's enable it will disable it. ObjectReference Property xMarker Auto {Link REF the xMArker handeling the enable/disable state} Event OnActivate(ObjectReference akActionRef) If (xMarker.IsEnabled()) xMarker.disable() Else xMarker.enable() EndIf EndEvent Thank you so much! (I remember this being less complicated with Skyrim Standard Edition.) So, I just give the XMarker a unique name, then replace "xMarker" in the script with that name? Edited to add: Okay, the name of one of the XMarkers is "EA_SwitchPlaquesXMarker01_LM," and I named it (the script) "SwitchPlaques01_LM," so the script ended up as Scriptname SwitchPlaques01_LM extends ObjectReference {ObjectReference Property EA_SwitchPlaquesXMarker01_LM Auto Event OnActivate(ObjectReference akActionRef) If (xMarker.IsEnabled()) xMarker.disable() Else xMarker.enable() EndIfEndEvent} So, I don't need to add any properties, or physically link the pullbar and the XMarker? I guess I was expecting there to be a line between the marker and the pullbar. Edited December 28, 2019 by Jambo11 Link to comment Share on other sites More sharing options...
maxarturo Posted December 28, 2019 Share Posted December 28, 2019 (edited) Nothing has changed from SLE to SSE, whatever you did in SLE is the same procedure and execution in SSE. No fundamental changes have been done from SLE to SSE. There is no need to change the Script's Property, if you change the property you also need to change the script, just use it as it is and Link Ref the xMarker from the script's property. The script you posted will never work because: A) You have the whole script in brackets {} so the compiler and game engine will completely ignore everything that is inside it. B) If you remove the brackets then, the script won't compile because you change the property and nothing in the script is pointing to that property. You do need to physically link the pullbar to the XMarker, otherwise nothing will happen. Create new script > give a new name > then right click it and edit source > copy / paste the given script > press save to compile > exit > then press the property button, with your new created and compile script Highlighted > and "Link Ref From Render Window" the xMarker (your renamed xMarker that is handeling the enable/disable states of your plaques). * The script needs to be living in the Pullbar. Edited December 29, 2019 by maxarturo Link to comment Share on other sites More sharing options...
Jambo11 Posted December 29, 2019 Author Share Posted December 29, 2019 Nothing has changed from SLE to SSE, whatever you did in SLE is the same procedure and execution in SSE. No fundamental changes have been done from SLE to SSE. There is no need to change the Script's Property, if you change the property you also need to change the script, just use it as it is and Link Ref the xMarker from the script's property. The script you posted will never work because:A) You have the whole script in brackets {} so the compiler and game engine will completely ignore everything that is inside it.B) If you remove the brackets then, the script won't compile because you change the property and nothing in the script is pointing to that property. You do need to physically link the pullbar to the XMarker, otherwise nothing will happen. Create new script > give a new name > then right click it and edit source > copy / paste the given script > press save to compile > exit > then press the property button, with your new created and compile script Highlighted > and "Link Ref From Render Window" the xMarker (your renamed xMarker that is handeling the enable/disable states of your plaques).* The script needs to be living in the Pullbar. I don't know what's going on with the Creation Kit, but those brackets are automatically being added after I save the script.As if that isn't bad enough, the compilation fails with the brackets removed. I'm guessing that it's doing that because there's something wrong with everything inside the brackets. f*#@, I hate scripting... Link to comment Share on other sites More sharing options...
maxarturo Posted December 29, 2019 Share Posted December 29, 2019 There isn't much more i can do for you, sorry... what needed to be done i have already written and explained, just follow to the letter my previous post and everything will work out just fine. Have a happy modding and Happy New Year !. Link to comment Share on other sites More sharing options...
Jambo11 Posted December 29, 2019 Author Share Posted December 29, 2019 that's alright. thank you for the assist. Link to comment Share on other sites More sharing options...
Jambo11 Posted December 30, 2019 Author Share Posted December 30, 2019 I'm a moron. I didn't replace "xMarker" throughout the entire script. :pinch: Link to comment Share on other sites More sharing options...
Recommended Posts