I am trying to activate a ON xmarker and disable a OFF marker. It is to enable / disable different statics and lights. The scripts I have tried work but I have to press the activator (button) twice the first time before it starts working.
I tried this first........
ObjectReference Property LightOnREF Auto
ObjectReference Property LightOffREF Auto
ObjectReference Property LightBulbFullREF Auto
ObjectReference Property LightBulbDimREF Auto
Sound Property QSTAstrolabeButtonPressX Auto
int myState
Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
QSTAstrolabeButtonPressX.Play(Self)
Utility.Wait(0.2)
if myState == 1
myState = 0
LightOnREF.enable()
LightBulbFullREF.enable()
LightBulbDimREF.disable()
LightOffREF.disable()
else
myState = 1
LightOnREF.disable()
LightBulbFullREF.disable()
LightBulbDimREF.enable()
LightOffREF.enable()
endif
EndIf
endEvent
And then............
ObjectReference Property XmarkerLightsON Auto
ObjectReference Property XmarkerLightsOff Auto
int myState
Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
if myState == 1
myState = 0
XmarkerLightsON.enable()
XmarkerLightsOff.disable()
else
myState = 1
XmarkerLightsON.disable()
XmarkerLightsOff.enable()
endif
Endevent
but same result, the button must be activated twice before it begins working the first time.