Jump to content

Recommended Posts

Posted

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?

Posted (edited)

Write it like this:

 

Event OnActivate(ObjectReference akActionRef)
   If(ShutterMarker.IsDisabled())
      ShutterMarker.Enable()
   Else
      ShutterMarker.Disable()
   EndIf
EndEvent
Edited by LoneRaptor
  • Recently Browsing   0 members

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