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

Post » Wed Dec 07, 2011 1:20 am

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
Anna Krzyzanowska
 
Posts: 3330
Joined: Thu Aug 03, 2006 3:08 am

Post » Wed Dec 07, 2011 6:39 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
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Wed Dec 07, 2011 6:48 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
Nicholas
 
Posts: 3454
Joined: Wed Jul 04, 2007 12:05 am

Post » Tue Dec 06, 2011 10:37 pm

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
cheryl wright
 
Posts: 3382
Joined: Sat Nov 25, 2006 4:43 am

Post » Wed Dec 07, 2011 3:38 am

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
Ownie Zuliana
 
Posts: 3375
Joined: Thu Jun 15, 2006 4:31 am

Post » Wed Dec 07, 2011 7:01 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
Devils Cheek
 
Posts: 3561
Joined: Sun Aug 13, 2006 10:24 pm

Post » Wed Dec 07, 2011 6: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
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Tue Dec 06, 2011 10:56 pm

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
Elizabeth Davis
 
Posts: 3406
Joined: Sat Aug 18, 2007 10:30 am

Post » Wed Dec 07, 2011 6:15 am

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
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm


Return to Fallout 3