Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
471 B
17 lines
471 B
scriptName defaultToggleSelfOnActivate extends objectReference
|
|
{This script toggles it's own enable state onActivate
|
|
this is mainly used on objects that are enable parents}
|
|
|
|
;State containment used in case other states are needed later
|
|
auto state waiting
|
|
event onActivate(objectReference triggerRef)
|
|
;if this object is enabled, disable it
|
|
if self.isEnabled()
|
|
self.Disable()
|
|
|
|
;if it is disabled, enable it
|
|
else
|
|
self.Enable()
|
|
endif
|
|
endEvent
|
|
endState
|
|
|