Jump to content

Is it possible to create linked containers?


Silveressa

Recommended Posts

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

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

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
END

This 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

  • Recently Browsing   0 members

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