Last active
August 29, 2015 14:11
-
-
Save Langerz82/79acce714b77f3b8d481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;/++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
+ This script enables an ObjectReference like a door locked and unlocked | |
+ at specified intervals. | |
+ The Properties for this examples should be set too: | |
+ useLooking = TRUE ; We only want the interval to occur when in view. | |
+ fMinutesInterval = 5.0 ; Every five minutes in game time call OnTimeElapsed. | |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/; | |
ScriptName jlLockInterval extends ObjectReferenceInterval | |
bool isLocked = false; | |
; Overrided Function. | |
Event OnTimeElapsed() | |
Debug.Notification("jlLockInterval(Event:OnObjectElapsed)") | |
if (isLocked) | |
Self.Lock(FALSE, TRUE) | |
else | |
Self.Lock(TRUE, TRUE) | |
endif | |
isLocked = !isLocked | |
EndEvent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment