Thicketford Posted December 3, 2016 Posted December 3, 2016 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 ObjectReferenceObjectReference Property ShutterMarker AutoEvent OnActivate(ObjectReference akActionRef) if (ShutterMarker.IsDisabled()) ShutterMarker.Enable() elseif ShutterMarker.Disable() endifEndEvent 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?
LoneRaptor Posted December 3, 2016 Posted December 3, 2016 (edited) Write it like this: Event OnActivate(ObjectReference akActionRef) If(ShutterMarker.IsDisabled()) ShutterMarker.Enable() Else ShutterMarker.Disable() EndIf EndEvent Edited December 3, 2016 by LoneRaptor
Recommended Posts