jwoltz Posted June 15, 2016 Share Posted June 15, 2016 I'm not a modder. I'm a graphic designer. Mostly my modding experience has been limited to textures. Still, I've had this idea for a long time to make placable Barrels for vendors to sell so that I and other players can place them in-game like those items sold by AMajor7's Imperial Furniture Store. I've tried and tried and I just can't get them to work. I have my meshes and textures and even icons. I can make them fine (as items) and even get them into the seller's inventories. Problem is, once purchased, and placed in-game, they don't work as containers. When I hit the spacebar to activate, all they do is return to my inventory. I don't know how to script like AMajor7 did for their chests and drawers. I've tried on-line tutorials, but nothing seems to address my particular need. Is there anyone out there who can and/or is willing to share their knowledge as to how to do this? HELP! Thank you! Link to comment Share on other sites More sharing options...
cfh85 Posted June 15, 2016 Share Posted June 15, 2016 switch the item for a container when its dropped from your inventory maybe. you could also add a script to make it open a container someplace else when you activate it, that however wont work with NPCs Link to comment Share on other sites More sharing options...
forli Posted June 18, 2016 Share Posted June 18, 2016 (edited) First: keep your item as "inventory item" and don't alter its meshes. Now create a new container base object (call it JwoltzContainer, and use any meshes, it doesn't matter, as this container won't be visible to player), and place one reference in the cell TestingHall (or any other dummy/secret cell you want). Assign an EditorID to this reference (JwoltzContainerRef), so you can use it in scripts. Next step: create a new script with this code:scn JwoltzContainerScript Begin OnActivate If IsActionRef Player ;if player interact with this object If IsControlPressed 28 ;if Grab key is pressed (default: Z) Activate Player ;take the item Else JwoltzContainerRef.Activate Player ;open the container EndIf EndIf End Begin OnEquip Player JwoltzContainerRef.Activate Player End Assign the script to your item. Done. Now, when you interact with your item (or click it in your inventory), the script will open the container placed in the dummy/secret cell (remote activation). Your item won't be a real container, but it will act as a link to the real container.You can still take your item if you hold the Grab key (default: Z) while activating it, so you can bring it with you and place it somewhere else (or even use it as a portable, unlimited bag for your loot) You need OBSE for this. If you don't want OBSE, you can replace "If IsControlPressed 28" with "Player.IsSneaking" (without quotes). Edited June 18, 2016 by forli Link to comment Share on other sites More sharing options...
Recommended Posts