Jump to content

Need a pro modder's help please


noobax

Recommended Posts

I need a script that makes multiple containers link to a single container. when one of the multiple containers are opened, they open into the single container so that all the multiple containers "have" the same items. Could someone tell me the commands and if you are very kind, could you actually post the who script on here? Take the multiple boxes' references as multboxARef, multboxBRef and multboxCRef and the single box's reference shall be singboxRef. THANKS a lot TO ALL HELPERS KUDOS UP!!!!
Link to comment
Share on other sites

If you go the NPC route, you can use "Ref.OpenTeammateContainer 1" to bypass the "barter" aspect.

 

Although, you might get away with setting the main container as the Activate Parent of the child containers (with the "activate parent only" thingy). Not sure how it will handle locked containers though.

Link to comment
Share on other sites

actually, i have a very big house, and i want to place nuka cola machines in different places of the house. if i put a cola in the machine in my kitchen, i want the machine in myliving room, bbq area and workshop to have the cola in it also. Please help I dont want the npc route
Link to comment
Share on other sites

Drop the other two threads on this same subject please and I will tell you of another possible solution to your puzzle.

 

Think of a shell game, but instead of switching the shell around so that it is alway empty, switch it around so that it is always full. Follow me?

 

Instead of tracking, sorting and updating inventory to different boxes in different locations, move one box with one inventory to different locations.

 

Here is an example:

Generate a footlocker from the Item List and place it at a location in the game world with the GECK. Settle it into its final resting place in your mod. Name it LockerA. Copy it. Go to another location where you want the inventory to be accessible. Paste a copy of LockerA there. Move and settle it but leave its orientation exactly the same as the original, meaning if the first locker was oriented at a certain angle of rotation (the default zero degrees is simplest) then copies should also be at the same x, y, and z rotation as the original.

 

You can place as many copies as you want, but for this example let's say 3 copies and one extra, so four lockers total. LockerA, LockerB, and LockerC are placed in different cells, but all facing the same direction. Now place a fourth locker and name it TRUNK. Increase the Scale of TRUNK 1.05%. TRUNK will hold your inventory.

 

Place object scripts on LockerA, LockerB, and LockerC that Begin OnActivate and work to move TRUNK to their location when they are activated and activate TRUNK instead so that you add and remove items from its inventory only. It would be a good idea to include a timer to the script, so that there is a delay of 2 seconds or so between moving TRUNK to the current location and activating it. That should avoid glitches caused by lag.

 

Get the idea? Each Locker will have basically the same object script, only the MoveTo location will change. Only TRUNK will ever open, and if you close it and then try to open it again immediately, it will activate instead of the dummy target Locker because it is slightly larger and in exactly the same coordinates, so the dummy locker is inside of it and inaccessible at that point. Since all of the lockers look the same and face the same way, and TRUNK is only imperceptibly larger, it will give the illusion that several boxes have the same inventory when TRUNK moves from place to place.

 

I think that this should work, though I may be wrong. I will let you work out the details of the scripts. I'm ill-motivated to do all of the work and test it for you, but the different way of looking at the puzzle should make it easily workable. Besides, tweaking and testing is the fun part of modding and I don't want to deny you that.

 

It should not be too difficult, and far simpler than any OnAdd "polling inventory" script which would likely fail with other mods and their custom inventories anyway. With a "Shell Game" method it should not matter whether items placed into TRUNK are vanilla objects or custom modded ones.

Link to comment
Share on other sites

that should work, however theres one problem. Im not a good scripter and I dont know how to use the MoveTo command. Is it like "MoveTo LockerA"? and begin on activate is it

Begin

 

OnActivate or

 

Begin OnActivate?

i think i might be able to figure out the rest if I know these two thanks. im checking the geck web now

Link to comment
Share on other sites

or create a main container link it to all the container insert this script my

 

 

ref myref

ref self

begin onactivate

set myreft to getlinkedref

set self to getself

 

myref.removeall self

self.activate

end

that moves the stuff

now you just need to work out how to get it back into the trunk

done

Link to comment
Share on other sites

  • Recently Browsing   0 members

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