F4llfield Posted November 23, 2022 Share Posted November 23, 2022 Hi, I want to have my script run only when the Protectron is activated (the Gunners Plaza Lobby Terminal). What would be tyhe best way. Can I modify the existing terminal to do so? Can't seem to find any info on how to modify an existing terminal. thanks. Link to comment Share on other sites More sharing options...
SKKmods Posted November 24, 2022 Share Posted November 24, 2022 Attach a script like this to a new placed invisible activator in the same 3dLoad cell as the pod: ScriptName myProtectronPodMonitor extends ObjectReference ActorValue Property pProtectronPodStatus Auto Const Mandatory ObjectReference Property myPod Auto { link this property to the Protectron pod to monitor } Event OnLoad()If (myPod != None) && (myPod.Is3dLoaded() == True)ObjectReference myProtectron = myPod.GetLinkedRef() ; some pods may not have this linkIf (myProtectron != None) && (myProtectron.GetValue(pProtectronPodStatus) == 0) ; ProtectronSleepInsidePodPKG conditionSelf.RegisterForAnimationEvent(myPod, "Exit")EndIfEndifEndEvent Event OnUnload()If (myPod != None)Self.UnRegisterForAnimationEvent(myPod, "Exit")EndifEndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName)If(akSource == myPod) && (asEventName == "Exit")Self.UnRegisterForAnimationEvent(myPod, "Exit"); insert the script stuff to run on wakeupmyPod = NoneSelf.GotoState("IdleState")EndifEndEvent State IdleState;blankEndState Link to comment Share on other sites More sharing options...
F4llfield Posted November 24, 2022 Author Share Posted November 24, 2022 (edited) Attach a script like this to a new placed invisible activator in the same 3dLoad cell as the pod: ScriptName myProtectronPodMonitor extends ObjectReference ActorValue Property pProtectronPodStatus Auto Const Mandatory ObjectReference Property myPod Auto { link this property to the Protectron pod to monitor } Event OnLoad()If (myPod != None) && (myPod.Is3dLoaded() == True)ObjectReference myProtectron = myPod.GetLinkedRef() ; some pods may not have this linkIf (myProtectron != None) && (myProtectron.GetValue(pProtectronPodStatus) == 0) ; ProtectronSleepInsidePodPKG conditionSelf.RegisterForAnimationEvent(myPod, "Exit")EndIfEndifEndEvent Event OnUnload()If (myPod != None)Self.UnRegisterForAnimationEvent(myPod, "Exit")EndifEndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName)If(akSource == myPod) && (asEventName == "Exit")Self.UnRegisterForAnimationEvent(myPod, "Exit"); insert the script stuff to run on wakeupmyPod = NoneSelf.GotoState("IdleState")EndifEndEvent State IdleState;blankEndState Thank you for your reply and tip. I'm getting a missing value error on pProtectronPodStatus. I'm not sure what value I should enter. added: Auto-fill under properties doesn't seem to work. p.s. I don't see a reply button that's why I'm using the quote button to reply.. Edited November 24, 2022 by F4ll0uta Link to comment Share on other sites More sharing options...
SKKmods Posted November 24, 2022 Share Posted November 24, 2022 After you attach the compiled script to a form you need to associate or fill in properties using the [ properties ] button. ps no need to requote stuff. Link to comment Share on other sites More sharing options...
Recommended Posts