Making Static Items into a Storage Box?

Post » Tue Nov 20, 2012 12:41 pm

Hi all :)

Can anyone help me out on this. I want to make a static item, such as a crate of tomatoes into a storage utility. So the player can access the static item as if its a storage box / chest.
User avatar
KIng James
 
Posts: 3499
Joined: Wed Sep 26, 2007 2:54 pm

Post » Tue Nov 20, 2012 3:18 pm

i actually have that in one of my mods. A static pot with potatoes in it. The way i do it is by getting all the static pieces together, place them where I want. then create a trigger-box activator over the static. Make sure the triggerbox is set to player activation under the primitives tab when you edit it. Then attach a script to the trigger that activates a hidden container of your choice (which you'd have to create beforehand so you can point the script property to the correct container.)

Spoiler
pseudo-code that goes on the trigger-box:Scriptname MyActivatorScript extends ObjectReference  ObjectReference Property MyHiddenContainer  AutoEvent OnActivate(ObjectReference akActionRef)	 If (akActionRef == game.GetPlayer())		  MyHiddenContainer.Activate(game.getplayer())	 EndIfEndEvent
User avatar
Multi Multi
 
Posts: 3382
Joined: Mon Sep 18, 2006 4:07 pm

Post » Tue Nov 20, 2012 1:02 pm

You could extract the static item mesh from the BSA archive, and create a new 'container' object and point to the extracted mesh.
As long as it has collision and a 'name' on the container, you can use any mesh as a container doing this.
User avatar
Danial Zachery
 
Posts: 3451
Joined: Fri Aug 24, 2007 5:41 am

Post » Tue Nov 20, 2012 12:29 pm

Thank you both for your quick replies. I will do what you told me to, sounds easy enough :) Enjoy your day!
User avatar
Chantelle Walker
 
Posts: 3385
Joined: Mon Oct 16, 2006 5:56 am

Post » Tue Nov 20, 2012 3:41 pm

Thank you both for your quick replies. I will do what you told me to, sounds easy enough :smile: Enjoy your day!

NP, WillieSea's way is actually the much easier way. The reason I go with the activator route is because sometimes the static you want just doesn't have a collision of sorts. Had issues with somethings during the oblivion days with that. But yeah, it wouldn't hurt :) And a little tip, if you don't want to extract the static, just make a dummy file. (eg. empty Nameoforigitalstatic.nif) in the same place as the original would be, then have your container point to it. just remember right after you point to the container nif. delete it. or the game will look for that nif in the loose files first and find it 'empty.' Sounds a lot more complicated than it really is but once you get the hang of doing it that way, you can turn any static really fast into objects or the opposite. turn misc items into static pieces without ever having to open up the BSA files. :)

Good luck,

-Mush-
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Tue Nov 20, 2012 2:02 pm

WS is easier however thanks for letting me know about your way because I will need to make a collision for a few items that I am going to place together. Thank you so much!
User avatar
Kate Schofield
 
Posts: 3556
Joined: Mon Sep 18, 2006 11:58 am

Post » Tue Nov 20, 2012 10:44 am

Sorry for being such a noob at this.

So I could not do WillieSea's way because if i did I had to move my cursor to a specific place on the static to open the container so I decided to use your way Mush32.

So what I did was, create a new trigger box around the static item (It is on a wall), then create a new container with a custom mesh.
I then enabled player activation on the trigger box in the primitive tab.
And then I created a new script with the following lines of code...


Scriptname Nirn_StorageActivator extends ObjectReference
{Nirn Falls Estate Storage Activator Script!}
ObjectReference Property Nirn_KeysStorage_Hid Auto
Event OnActivate (ObjectReference akActionRef)
If (akActionRef == game.GetPlayer())
Nirn_KeysStorage_Hid.Activate (game.getplayer())
EndIf
EndEvent

When I tried to test it in game, nothing happens. Is there something I am doing wrong? Please help :(
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am

Post » Tue Nov 20, 2012 3:11 pm

Did you remember to fill in the ObjectReference property (point it at the actual container)?
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Tue Nov 20, 2012 11:59 am

what MrJack said. Also, try rotating the triggerbox 180 degrees. sometimes they have to be facing a certain way. I've had that happen to me and by rotating it, it worked. Also, if it's against a wall, make sure it sticks out far enough. there may be collision on the wall that you can't see, but covers your box preventing you from activating it.


edit: also be sure to give your trigger a name. they don't become click-able unless the box under the name tag is filled in.

if you're not sure how, to fill in the object property and have it point to your actual container, double-click the script while in the trigger panel.
a list of properties comes up. Edit the field and select your container from the drop-down list or choose the option to click the object in the render window. click anywhere and hit okay to save that.

These are just a run-down of things as to why it may not be working. Again though, once you do it a few times and get the hang of it. it's really simple and making trigger containers becomes a snap. :) Good luck.
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Tue Nov 20, 2012 5:20 am

Ok so I didn't actually know how to point it to the container but thank you mr.jack and mush32 for helping me out. So I did everything that was required and it still didn't work, so I tried your 180 degrees fix mush32 and it worked, abit slow when it opens the storage but it works! I am happy now :) thank you all for helping me especially Mush32! :)
User avatar
Eliza Potter
 
Posts: 3481
Joined: Mon Mar 05, 2007 3:20 am

Post » Tue Nov 20, 2012 1:39 am

Hey no problem, glad you got it to work. :) Yes, there is a minor delay when clicking the trigger to the time it actually opens. If I could figure out how to speed that up I would. My guess would be because the container is being activated via script (and that needs processing to run) unlike just activating a true container that happens instantly with no script getting in the way.
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm


Return to V - Skyrim