Hi there, a few questions for advanced GECK users:
I'm nowhere near being an "advanced GECK user", but I have done similar things in a couple mods I made for FO3.
Bear in mind, I'm typing this in on the fly. This hasn't been game tested, so will probably need some debugging.
1) I am trying to link a protectron to a protectron pod. I would like the protectron to leave the pod when activated by a console. I have added the protectron and the pod to the world, as well as a generic protectron terminal. Is there a script I need to add? I have tried to link the terminal and the robot, but to no avail.
Make a custom protectron and pod.
You will need to attach a script to the protectron that will store and modify it's various states, then give it some AI Packages to run depending on what state it is in.
Example script for the protectron:
scn ExampleProtectronSCPTint iInitint iState1;iState1 = 0 (off/unconscious);iState1 = 1 (on:run AI Package 1);iState1 = 2 (on:run AI Package 2);iState1 = 3 (on:run AI Package 3);etc...Begin OnLoadIf iState1 == 0 SetUnconscious 1EndIfEndBegin GameModeIf iInit != 0 If iState1 == 0 Set iState to 1 SetUnconscious 0 evp EndIf;Use the GameMode block to modify iState1 periodically.;You'll need to do a "evp" whenever you update iState1 so that the protectron will ;change what AI Package it is currently running to reflect it's new state.EndIfEnd;Also, you can use the OnPackageStart, OnPackageEnd, and OnPackageChange blocks;to update iState1 if you want to.
Attach a script like this to the pod so that activating it does not open or close the door...:
scn ExamplePodSCPTBegin OnActivateReturnEnd
Place both of them in your cell. Make them Persistent Refs, and give them RefID names (MyPodRef, and MyProtectronRef, for example).
Now you can set up your console.
Make a custom console. On the screen for the menu item that will open the pod and activate the protectron, use a Result Script to first open the pod door, then activate the protectron. Also, you'll want to give your menu entries Conditions, so that once MyProtectronRef has been activated, the menu item to activate it is removed from the terminal's display, and replaced with a menu item that either does nothing, or returns a message that the protectron is already operational.
Here is a Result Script for the terminal's menu item to open the pod and activate the protectron:
MyPodRef.SetOpenState 1Set MyProtectronRef.iInit to 1
Use the GetScriptVariable Condition check to determine what menu items to display or hide in the terminal (when one is displayed, the other is hidden).
GetScriptVariable MyProtectronRef iInit = 0
to display the menu item that will open the pod and activate the protectron.
GetScriptVariable MyProtectronRef iInit = 1
to display the menu item that will return a message that the protectron is already active.
This
should work... if not, I'll help you figure it out.
2) On a similar note, I have jets of water coming from the ground as irrigation onto crops. What is the script that I should attach to a button so that this "irrigation" can be turned on and off?
If you have several water jets, you'll want to use an Activate Parent.
Place the water jets where you want them. Also, place an "X" marker somewhere near them.
Make the "X" Marker a Persistent Ref, and give it a RefID name (WaterJetXRef...).
Make a custom switch, and attach a script to it:
scn ExampleSwitchSCPTBegin OnActivateIf IsActionRef Player == 1 If WaterJetXRef.GetDisabled == 1 WaterJetXRef.Enable Else WaterJetXRef.Disable EndIfEndIfEnd
Make WaterJetXRef the Activate Parent for all the water jets. Now when WaterJetXRef is Activated, all the linked water jets will be Activated, and visa versa.
There is a cool little trick you could use to make the water jets come on in a sort of "cascade"... the first water jet will activate, then a second later the second one, then a second later the third one... just like real irrigation sprinklers coming to life as the water pressure reaches them one after the other. I'll have to look for the tutorial that explains in detail how to do it, just ask if you're interested.