How do I set up a container that can hold the players items

Post » Sun Nov 07, 2010 12:30 pm

I am trying to set up a container to hold the players items. It occurs at a special scripted time when the players entire inventory is taken away from them for a scripted part in the mod. (Pretty much like Operation Anchorage) At a later date once they complete a thing or two, it is to be returned to them. I tried this about a month ago but could not get it working and gave up. It happens twice in the mod. The first time they just travel through a worldspace (to a place about 10 cells away from where they 'lost' their items) and the second time they travel through like 6 interior cells. I tried making a container in my worldspace and placing their items in it via 'player.RemoveAllItems MyContainerRef' but when I would do the inverse (MyContainerRef.RemoveAllItems Player) it would not work. Can anyone tell me exactly how to set this up to get it working? Am I using the right script commands/parameters, and does it matter whether I place the container inside or outside? Thanks.

Gunmaster95
User avatar
D IV
 
Posts: 3406
Joined: Fri Nov 24, 2006 1:32 am

Post » Sun Nov 07, 2010 9:27 am

It works fine. I did this several times back and forth in my Nightmare Realm mod. And its also done in the Pitt DLC.
Are you doing a 'player.MoveTo' before the 'removeAllItems'?
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Sun Nov 07, 2010 10:52 am

Are you doing a 'player.MoveTo' before the 'removeAllItems'?


When I move the player? I thought the player.moveto was always supposed to go at the end of whatever commands your running in that frame. Also one of the times the player isnt even moved when their items are removed. An npc pretty much says I'll hold onto your stuff" and its removed and all placed into the chest. (Well, it should be.) So I dont use a moveto one of the times.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Sun Nov 07, 2010 11:48 am

It sounds like the container is not being referenced properly. Make sure the 'Persistent Reference' box is checked in the container's reference window.
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Sat Nov 06, 2010 11:47 pm

I'm with Vyper on this one. I hadn't really used the function yet myself, but went ahead and loaded up the GECK and tried it. Didn't pay attention to making it pretty, but I threw a container in the world, two NPC 'bankers', and a quest that started at game start (for dialogue).

Did a simple "hold my stuff" topic, which did player.RemoveAllItems MyContainerRef 1; (the GECK page stated any non-zero value retained the ownership properties), then a "I need my stuff" topic, which did MyContainerRef.RemoveAllItems player 1;.

I put one NPC in the same room as the container, another out in the wasteland just to test. Gave both items and got them back fine, as well as gave them some, gathered more items, and gave them the newly acquired stuff, and when I asked for it back, I got it all returned. Also put the container in view to check its contents and it worked as it was meant to.

I would worry about the player.moveto, but if you said neither work (the NPC on screen as well), then it is likely just a typo/mistake where you might have put the items in one, but tried to get them from another, or didn't use a correct reference, etc.
User avatar
Isabel Ruiz
 
Posts: 3447
Joined: Sat Nov 04, 2006 4:39 am

Post » Sun Nov 07, 2010 2:55 am

All of the remote containers in my mod have a persistent ref. And they can be used regardless of where the player is at. In fact, my containers are in a dummy cell.
User avatar
I love YOu
 
Posts: 3505
Joined: Wed Aug 09, 2006 12:05 pm

Post » Sun Nov 07, 2010 8:21 am

I asked about the 'player.MoveTo' because if you have that BEFORE your RemoveAllItems, it causes the script to STOP right where its at and the 'removeAllItems' will not be executed.

I would suggest, as others have, to ensure you have the correct reference ID name on the chest as the ones in your script. Dont trust 'typeing' in the name, use the 'copy/paste' feature to get the correct name.
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Sun Nov 07, 2010 11:24 am

Ok when I do it this time I'll make absolutely sure I make the reference persistant, and have the right names everywhere. I just wanted to gather info on this and make sure it worked first. I'll return and let you guys know if it goes smoothly. Thanks so far for the tips/help.
User avatar
Alan Whiston
 
Posts: 3358
Joined: Sun May 06, 2007 4:07 pm

Post » Sat Nov 06, 2010 11:04 pm

well I'm not sure if this will help any but . i was messing around with the console one day and input the code:
placeatreticle e . And found something that might help you out. i was playing FNV at the time so I'm not sure if it will work or not playing FO3. It surprised me though in what i got. I will check and see if it will work in FO3 and be back to let you know .
EDIT OK never mind i said anything it does not work in FO3 . And now that i think about it i believe the command :placeatreticle. is one of the new commands that are in FNV only. :facepalm:
User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am


Return to Fallout 3