Multiple Containers with the Same Contents?

Post » Fri Dec 17, 2010 7:57 am

I want to make a simple mod where several containers all use the same items. So if you put a particular gun in 1 container you can take it out of another. I'm planning on putting 1 of these containers at the front of each town so I can drop stuff up and pick it up anywhere. I've seen a mod like this for Oblivion but I can't find it.

I've physically put 2 of these containers down in GECK but I'm not sure how to link them. It is possible, right? (I'm still learning so talk slowly.)
User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm

Post » Fri Dec 17, 2010 7:25 am

You put an 'http://cs.elderscrolls.com/constwiki/index.php/OnActivate' block of code on each chest, that when the player http://geck.gamesas.com/index.php/Activates the chest, you force activation of the one chest with all the stuff in it instead.

I will say its a 'very' tricky command to get working and may take a while to get the scripts and objects correct.

I personally have a gun that removes everything from the target and places that stuff in a chest back home. They can then only attack in their skivies with their fists. :lol:
User avatar
xemmybx
 
Posts: 3372
Joined: Thu Jun 22, 2006 2:01 pm

Post » Fri Dec 17, 2010 11:31 am

Yes, it's tricky.
It works better if you don't use a real container in the world but a static object with the model of a container. Then on activate you activate the real container placed in a remote cell. I made such a container for Oblivion, never tried in Fallout but it should work too. The script placed on a real container crashed the game until I tried the static object trick.

WillieSea : does your gun turn the target hostile to the user ?
I tried to get an effect not making the target hostile but even with the hostile flag unchecked it didn't work. I tried and the script works but the use of any weapon on a megaton settler (eg) turns all the town hostile to the player. How do you make a totally non hostil weapon ( eg a weapon able to heal a NPC on hit instead of hurting it)

Sorry for the off-topic question.
User avatar
leigh stewart
 
Posts: 3415
Joined: Mon Oct 23, 2006 8:59 am

Post » Fri Dec 17, 2010 2:57 am

Even with 0 damage, the weapon turns them hostile.
But, I have some ideas that might fix that. The script is applied to the targets via an 'explosion' from my gun, so you can get several targets at once. I might try some things this weekend since the weapon will be in my next update of the http://www.fallout3nexus.com/downloads/file.php?id=13632 mod.
User avatar
Hairul Hafis
 
Posts: 3516
Joined: Mon Oct 29, 2007 12:22 am

Post » Fri Dec 17, 2010 6:28 am

I've tried several times but I can't seem to get it working right; do you see what I'm doing wrong?

-Duplicate a container for the Main Chest. PlayerChestBuried1
-Create a blank Interior Cell. PlayerChestsCell
-Put the Main Chest in the Interior Cell with unique reference. PlayerChestBuried1Ref
-Make the Main Chest Player-owned, Persistant Reference, Non-Respawnable, Empty contents.
-Duplicate another container to be placed in towns. PlayerChest1
-The new container has this script on it:

scn PlayerChestBuried1SCRIPT
BEGIN onActivate
if (IsActionRef player == 1)
PlayerChestBuried1ref.Activate player, 1
else
PlayerChestBuried1ref.Activate player, 1
endif
END

Am I on the right track?
User avatar
Kerri Lee
 
Posts: 3404
Joined: Sun Feb 25, 2007 9:37 pm

Post » Fri Dec 17, 2010 4:46 am

It looks right.
It might not matter, but the syntax does not show the use of a 'comma' so remove that from the Activate command.
User avatar
Kelsey Hall
 
Posts: 3355
Joined: Sat Dec 16, 2006 8:10 pm

Post » Fri Dec 17, 2010 5:29 am

In my opinion, you should create an activator with the chest mesh and add a script like this:

scn ActivatorChestSCRIPTBegin onActivateis (IsActionRef Player == 1)ChestID.Activate Player 1elseChestID.Activate Payer 1End 


EDIT: Oh, I just saw your other post with that script in it.
User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am


Return to Fallout 3