HMTKSteve Posted January 31, 2020 Share Posted January 31, 2020 (edited) I am trying to link six bubble turrets to a terminal so the player can deactivate them rather than destroy them. Right now I have the following links setup: Turret6 -> (LinkTerminalTurret) Turret5 -> (LinkTerminalTurret) Turret4 -> (LinkTerminalTurret) Turret3 -> (LinkTerminalTurret) Turret2 -> (LinkTerminalTurret) Turret1. Turret1 has a second link (LinkTerminalTurret) back to the DeskTerminal. When I test this out in game the terminal says four turrets are linked but only Turret1 is disabled via the terminal. I went into Fort Hagen to see how turrets and terminals link up and tried to emulate the same system. The DeskTerminal can only link out to one turret (adding new just replaces the previous entry) so I am pretty sure I am doing this right but I must be missing something obvious. Any help would be appreciated. EDIT: If I link Turret6 back to the terminal I can deactivate all of the turrets but the terminal says nine are linked and it shows stats for seven turrets. The first and last turrets on the list show identical data entries. Edited January 31, 2020 by HMTKSteve Link to comment Share on other sites More sharing options...
niston Posted January 31, 2020 Share Posted January 31, 2020 I looked at fort hagen, and the turrets seem all to be reflinked in a straight chain, using the LinkTerminalTurret keyword and starting at the terminal: Terminal --(LinkTerminalTurret)--> Turret1 --(LinkTerminalTurret)--> Turret2 --(LinkTerminalTurret)--> Turret3 --(LinkTerminalTurret)--> Turret4 --(LinkTerminalTurret)--> Turret5 --(LinkTerminalTurret)--> Turret6 In essence, this is sort of backwards to what you have now - which does matter. And which is why only your first turret gets disabled with your setup (that's the only forward going link you have). I also do not see any of the turrets linking back to the terminal in fort hagen; The 6th turret specifically has no reflink at all. The Terminal has a second reflink to SecurityGateSmLatch01, using the LinkTerminalDoor keyword. But that's it. Some background information: You can have only one outgoing reflink with a particular keyword. As you found out, if you try to create another one, it'll overwrite the first one you made. But it's very well possible to make a number of reflinks from one reference to a number of others, using different keywords for each of these reflinks. That's how the terminal can reflink to both the turret (using LinkTerminalTurret) *and* the door (using LinkTerminalDoor) at the same time. Note that the keyword can be none (null/empty), but again, only once. However, any single reference may have any number of incoming reflinks, no matter what keywords are used on them. So for example, 100 references may all link to a single target reference, all using the same keyword. In other words, the reflink thing is a per-keyword n:1 mapping. Link to comment Share on other sites More sharing options...
pepperman35 Posted January 31, 2020 Share Posted January 31, 2020 In my last settlement build, I used Terminal==>Turret1(with Link Terminal Turret)==>Turret2(with Link Terminal Turret)==>TurretN(with Link Terminal Turret). I terminated the link chain at TurretN, which was the last turret in the chain. In my case, I linked each turret to the settlement workshop with workshopitemkeyword. This is similar to yours only the directionality of the links are different. Link to comment Share on other sites More sharing options...
SKKmods Posted February 1, 2020 Share Posted February 1, 2020 I wonder at the use of GetLinkedRefChain(), which seems cumbersome and fragile compared to linking endpoints direct to a hub and calling GetRefsLinkedToMe() on a keyword. If you search the base game scripts chains are only used in the Terminal>Turret management and hacker scripts, so they have to be maintained for hacker to work on your objects. Having tried to work with both for static and spawned objects, direct linking is 100% more effective. Somewhat like the over complicated and fragile TokenRing network topology that was rapidly replaced by simple hub & spoke stars. /old Link to comment Share on other sites More sharing options...
Recommended Posts