NyxDagoneart Posted July 27, 2016 Author Share Posted July 27, 2016 I got it to work by doing this: http://i.imgur.com/dvemDH9.png Both work now and thank you so much for your help! Would you perhaps mind helping me with another script I want to use with this mod? I Want to set a door on a timer so that when the player unlocks and opens it, the door, after a certain amount of time will close and re lock itself Link to comment Share on other sites More sharing options...
NexusComa Posted July 27, 2016 Share Posted July 27, 2016 (edited) Ya, that's not the way I'm doing it ... You must not have script property [maker] set to the XMarker ... pic #2 http://i.imgur.com/TIqQK3F.png This is not the Valve pic but it's showing you where the Properties button is.Now Look back at pic #2 and make it look like that ... Edited July 27, 2016 by NexusComa Link to comment Share on other sites More sharing options...
NyxDagoneart Posted July 27, 2016 Author Share Posted July 27, 2016 Like this? http://i.imgur.com/Ut8geKJ.png Link to comment Share on other sites More sharing options...
NexusComa Posted July 27, 2016 Share Posted July 27, 2016 (edited) Yes, now remove that Active Parent setting. From your last pic.All that is being handled in the script ... Make sure the XMarker is set to Initially Disabled. If you google this stuff they will show you the other way.Which would be fine if the script was different ...However that way fails sometimes and we don't want that. Edited July 27, 2016 by NexusComa Link to comment Share on other sites More sharing options...
NyxDagoneart Posted July 27, 2016 Author Share Posted July 27, 2016 Weird it works, lol. It didnt work before I added the activate parent but now it works after Ive done it, with or with out it haha! Link to comment Share on other sites More sharing options...
NexusComa Posted July 27, 2016 Share Posted July 27, 2016 (edited) Hmmm ... :tongue: Glad you have it working. You will find this little script and set up to be very powerful. The real trick here is we are letting the XMarker itself be the saved variable (or Keyword)since the XMarker can only be enabled or disabled and the script will self correct no mater what it is the switch will never fail. Nothing hurts more then downloading a modand the switches don't work at all. The way you had it with Active Parent and no Keyword set to remember where it was last save it would start to fail on reloads.Also when players get click happy it can throw everything off. Depending on how the script was wrote this can break the switch ... you see that over and over in other mods. This setup will work with anything too ... lights, fires, mist anything you want. With the reverse setup I talk about in the 1st post you can do amazing things with it. Also, one really cool thing about this setup is you could go ahead and add a 2nd switch or valve in this case with the same script aimed at the same XMarkerand they both will work fine with each other. Never messing up the on and off ... The other way of doing this will never be able to do that and not fail over time. One last thing ... sometimes you can see a small flash when objects switch so, try to put the switch or valve in a spot they can't see the change so easy(like face them the other way to turn the valve). Anyways bla bla bla ... have fun! Edited July 27, 2016 by NexusComa Link to comment Share on other sites More sharing options...
NexBeth Posted July 27, 2016 Share Posted July 27, 2016 NexusComa, does that script work for player activation or NPCs? Link to comment Share on other sites More sharing options...
NexusComa Posted July 27, 2016 Share Posted July 27, 2016 It has no check for who is activating it in that script.Need to add a few lines for a player only activate version. Like this ... Scriptname _zzz_EnableMarker extends ObjectReference;* Marker Enable/Disable * By: NexusComa * ; nexusmods.comObjectReference Property Marker Auto;Event OnInit() If(Marker.IsDisabled()) GoToState("Disable") Else GoToState("Enable") EndIfEndEvent;-----------------------State Disable Event OnBeginState() Marker.Disable() EndEvent Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() If(Marker.IsDisabled()) GoToState("Enable") Else GoToState("Disable") EndIf EndIf EndEventEndState;-----------------------State Enable Event OnBeginState() Marker.Enable() EndEvent Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() If(Marker.IsDisabled()) GoToState("Enable") Else GoToState("Disable") EndIf EndIf EndEventEndState; Link to comment Share on other sites More sharing options...
NexusComa Posted July 27, 2016 Share Posted July 27, 2016 A few other versions of the same script. Timed Toggle version ...Enables XMarker for a stated time then Disables it. Scriptname _zzz_EnableMarkerTimeToggle extends ObjectReference;* Marker Enable/Timed Disable * By: NexusComa * ; nexusmods.comObjectReference Property Marker autoFloat property Time auto;Event OnInit() GoToState("Disable")EndEventState Disable Event OnBeginState() Marker.Disable() EndEvent Event OnActivate(ObjectReference akActionRef) GoToState("Enable") EndEventEndState;-----------------------State Enable Event OnBeginState() Marker.Enable() Utility.Wait(Time) GoToState("Disable") EndEventEndState; Three Way Toggle Version ...Toggle other 2 Disabled when one is Enabled.(this one has 3 buttons/switches and 3 XMarkers) Scriptname _zzz_EnableMarker3wayToggle extends ObjectReference;* Marker Enable/Disable three way toggle * By: NexusComa * ; nexusmods.comObjectReference Property Marker AutoObjectReference Property MarkerA AutoObjectReference Property MarkerB Auto;Event OnInit() If(Marker.IsDisabled()) GoToState("Disable") Else GoToState("Enable") EndIfEndEvent;-----------------------State Disable Event OnBeginState() Marker.Disable() EndEvent Event OnActivate(ObjectReference akActionRef) If(Marker.IsDisabled()) GoToState("Enable") Else GoToState("Disable") EndIf EndEventEndState;-----------------------State Enable Event OnBeginState() Marker.Enable() MarkerA.Disable() MarkerB.Disable() EndEvent Event OnActivate(ObjectReference akActionRef) If(Marker.IsDisabled()) GoToState("Enable") EndIf EndEventEndState; Link to comment Share on other sites More sharing options...
NexBeth Posted July 27, 2016 Share Posted July 27, 2016 If an npc activates, what triggers them to turn the valve (animation)? How is it triggered for npc? Link to comment Share on other sites More sharing options...
Recommended Posts