Jump to content

[LE] Please Help with a little Script


maxarturo

Recommended Posts

I will use default build in scripts the way they are intended ... generically. If I'm doing a custom anything the main script is usually made from scratch.

I need to totally understand what is going on to feel I'm not pushing out mods with errors. Also been programming for 40 years professionally so ...

That code I gave you is rock solid, eliminates possible player error and takes care of the player just clicking on the gate bypassing the valve.

 

When I do things like you are doing I like you use XMarkers and link my room objects to it. It helps when you really start getting complicated.

 

I have a script you may like it is very generic and I use it to death for this type of stuff. It is placed on switches and has the huge advantage in that

it can be used by multiple switches to change the same XMarker no matter the state. Opens up a few options for use in that respect.

It is simplistic, easy to use and has never failed me ... it is a double logic script. XMarker state is read on the fly and the script adjusts.

 

Scriptname _MarkerEnable extends ObjectReference
;* Marker Enable/Disable * By: NexusComa * nexusmods.com
ObjectReference Property Marker Auto
;
Event OnInit()
If(Marker.IsDisabled())
GoToState("Disable")
Else
GoToState("Enable")
EndIf
EndEvent
;-----------------------
State Disable
Event OnBeginState()
Marker.Disable()
EndEvent
Event OnActivate(ObjectReference akActionRef)
If(Marker.IsDisabled())
GoToState("Enable")
Else
GoToState("Disable")
EndIf
EndEvent
EndState
;-----------------------
State Enable
Event OnBeginState()
Marker.Enable()
EndEvent
Event OnActivate(ObjectReference akActionRef)
If(Marker.IsDisabled())
GoToState("Enable")
Else
GoToState("Disable")
EndIf
EndEvent
EndState

;

I also use the default built in Skyrim scripts and i will only make a new from scratch when none of them will actually serves my purpose, and always tested in various ways in a test cell to be sure that is working correctly, before i actually use it in the mod that i'm working. + after implementing it i will again test it before moving on working in a different part of the mod.
Without the XMarkers it would be impossible to do things like the one i'm doing.
I'll for sure check the script you posted !!!!
There are so few people that are willing to share knowlege...
and for that i Thank you again !!.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...