Jump to content

scripting help needed please [two state devices]


pepperman35

Recommended Posts

Greetings Fellow Creation Kit Warriors,

 

Background: I am using the CK to build a settlement mod at Nuka World based on my Nuka-World Red Rocket - Settlement Blueprint. Learning CK as I go.

 

Concept of Operations: My vision for this settlement goes something along these lines:

  1. After player completes requisite story lines, he/she claims/activates the Nuka-World Red Rocket workshop.
  2. Player then turns on power via a terminal [conditional]. Workshop must be claimed before power can be activated.
  3. Player turns on recruitment beacon via terminal [conditional]. Power must be turned on before the recruitment beacon can be activated.
  4. Player turns on water purifiers via a terminal [conditional]. Power must be turned on before the water purifiers can be activated.
  5. Player turns on automated defense systems at each of the four watchtowers via a terminal [conditional]. Power must be turned on before the automated defense systems can be activated.

Notes: Items 3-5 can be activated in any order provided the requisite condition has been met (i.e., power has been activated).

 

Questions:

  1. What would the Papyrus script look like to check the operation state of the power generator? I’ll be using the Vault-Tec super-reactor.
  2. What would the Papyrus script look like to remotely activate the Vault-Tec super-reactor via a terminal? As the rest of the objects are two state devices this should arm me with info to replicate the process.
  3. What would the Papyrus script look like to test whether or not the Nuka-World Red Rocket workshop has been claimed by the player?

Thanks for reading and offering advice/help.

 

Link to comment
Share on other sites

Take a look at one of the base game quests and scripts that need stuff built and powered.

 

WorkshopParentScript CustomEvent WorkshopObjectBuilt

WorkshopParentScript CustomEvent WorkshopObjectPowerStageChanged

 

would be the triggers to subscribe to. Mercer Safehouse RRR04 is one, there are some Min radiants as well.

Link to comment
Share on other sites

Take a look at one of the base game quests and scripts that need stuff built and powered.

 

WorkshopParentScript CustomEvent WorkshopObjectBuilt

WorkshopParentScript CustomEvent WorkshopObjectPowerStageChanged

 

would be the triggers to subscribe to. Mercer Safehouse RRR04 is one, there are some Min radiants as well.

 

Thanks for the prompt response. I'll look closely at those and see what I can figure out.

Link to comment
Share on other sites

Okay, here is what I tried.

 

A setup a link from the wall terminal to the Vault-Tec Super Reactor with the keyword LinkTerminalTripwire.

 

Used this code fragment to try and turn on the reactor

 

ObjectReference[] linkedRefArray = akTerminalRef.getLinkedRefArray(LinkTerminalTripwire)
int i = 0
while i < linkedRefArray.length
ObjectReference theSwitch = linkedRefArray
debug.trace(self + " " + i + ": " + theSwitch + " TURNING ON")
if theSwitch
theSwitch.SetOpen(false)
endif
i += 1
endWhile
The reactor is the only switch in the chain.
Compiler output...
Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright © ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "Fragments:Terminals:TERM_nativeWorkshopSwitchTer_1325EE8D"...
C:\Users\Omega1\AppData\Local\Temp\PapyrusTemp\Fragments\Terminals\TERM_nativeWorkshopSwitchTer_1325EE8D.psc(7,67): variable LinkTerminalTripwire is undefined
No output generated for Fragments:Terminals:TERM_nativeWorkshopSwitchTer_1325EE8D, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Fragments:Terminals:TERM_nativeWorkshopSwitchTer_1325EE8D
I had taken this code fragment from the nativeWorkshopSwitchTerminalSubMenu so logically it should have worked. Obviously it is operator error, but what am I doing wrong?
Link to comment
Share on other sites

>"variable LinkTerminalTripwire is undefined"

 

You have not told the script what LinkTerminalTripwire actually is (a keyword object in the database).

 

On the script fragment display drop down the [Properties] button, [Create Using Form] paste in LinkTerminalTripwire and it will associate.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...