Silveressa Posted September 30, 2013 Share Posted September 30, 2013 I'm working on making a small series of player homes scattered throughout the wasteland, (simple one room deals, nothing too fancy) and One thing I wanted to add was containers that were linked together. For example if you access the "ammo bin" container from any of the homes and you are accessing the same container. This would allow the character to store ammo or what not in any of the boxes and be able to access the loot from any of the houses saving a lot of back tracking for reloading bits, grenades, etc.. However I'm unable to get the containers to be one properly and was wondering if anyone else knows how or if this is even possible in FoNV? Any help would be most appreciated, thanks. Link to comment Share on other sites More sharing options...
Ladez Posted September 30, 2013 Share Posted September 30, 2013 That is easily handled with a little script. You need one container to hold the actual contents, and then you need to attach a script to all the other containers, which passes the activation to the main container. This way, all containers except for the main one are just for show, and will open the main container when you activate them. Maybe this will get you started:begin OnActivate if IsActionRef Player MainContainerReference.Activate Player endif end Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted September 30, 2013 Share Posted September 30, 2013 A slightly better script, that doesn't require naming a bajillion refs would be:ref rLinked Begin OnActivate set rLinked to GetLinkedRef rLinked.Activate Player ENDThis way you only need one script and you can reuse it over and over for all containers, instead of writing a unique one for each container. See here for info on linked refs. They require that the main container be set to persistent. And then you just link the remote containers to it and voila, done. Link to comment Share on other sites More sharing options...
Ladez Posted September 30, 2013 Share Posted September 30, 2013 Yeah I should have thought of using linked refs, since I'm using them heavily in my own house mod at the moment. That is slightly better ;) Link to comment Share on other sites More sharing options...
Silveressa Posted September 30, 2013 Author Share Posted September 30, 2013 Thanks a ton, I'm admittedly a novice when it comes to scripting, this has saved me tons of time. :cool: Link to comment Share on other sites More sharing options...
Recommended Posts