Jump to content

Enable/disable items using a button (Script Help)


Thicketford

Recommended Posts

I've added shutters to the windows at Star Light drive in. The shutters are tied to an initially disabled x marker ("shuttermarker") and I'm trying to add a script to a button that will toggle them on/off. Here's the script...

 

Scriptname StarlightShutters extends ObjectReference

ObjectReference Property ShutterMarker Auto

Event OnActivate(ObjectReference akActionRef)
if (ShutterMarker.IsDisabled())
ShutterMarker.Enable()
elseif ShutterMarker.Disable()
endif
EndEvent

 

I keep getting the error "cannot cast a void to a bool to perform a condition check" when I try to save it. Can anyone help?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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