Jump to content

Placing items in container & having them appear on wall


Fallen_Angel2142

Recommended Posts

depends...

 

Actually... I thought of a decent idea :P

 

Use POS and get the positions needed. So you can use getitemcount on weapons. or possibly turn objects into ref's then use the ref to spawn a new weapon on the wall and delete whatever you placed in the container (since they are equivalent)

 

hard to explain.

Link to comment
Share on other sites

Well some people would say look at the geck wiki. But I really didn't find that helpful for scripting (in the learning aspect). You can always check there, but I would say wait for someone else's input.
Link to comment
Share on other sites

The Sortomatic Modders Resource includes that feature.

 

I used that when making the ammo display for the AWOP-Sortomatic patch.

See the picture shown there with the stacks of ammo, mines etc. They are enabled when the items exist in one of the containers.

The display is active too - so you can grab the items from the shelf directly.

Link to comment
Share on other sites

The Sortomatic Modders Resource includes that feature.

 

I used that when making the ammo display for the AWOP-Sortomatic patch.

See the picture shown there with the stacks of ammo, mines etc. They are enabled when the items exist in one of the containers.

The display is active too - so you can grab the items from the shelf directly.

 

out of curiosity...

 

how do you spawn a new object on the wall?

 

I think you:

Used a pos to place an object with an activate script that would remove X amount of items from the container if you took the item from the wall. An item would spawn on the wall if there is any (more) count of said object in the container.

 

It's a semi-difficult thought process on how you did it XD

Link to comment
Share on other sites

@Skibbles

There are several ways to do it.

 

In Sortomatic...

The display items are unscripted static's. You just place them while building your mod, and using the supplied palette files makes this process about as easy as it can get. So they are not dynamically spawned - but enabled/disabled as required.

Using static's means that the items won't fly all over the house if bumped into. Most of the ingame weapons already have statics defined that you can use. More static models are included in the sortomatic.esm. They could have been activators too as you say, it's less laggy to use static's and a single invisible Perk to make them selectable from the shelves/walls.

 

You need to be careful when handling Weapon objects with scripts. It's easy to overlook things like the weapon condition and attached weapon mods.

 

The rough way that the display perk works is as follows...

User selects a display Item.

Disable (hide) all display items of the same type.

Retrieve all inventory items that the display object represents into the main sorting container.

Count them.

If there is only 1 item (eg. Maria), then move it to the player. END

Open main container so the player can take however many of each of the items wanted. (eg. The 9mm ammo box represents all types of 9mm ammo)

When the player closes the box.

Count them again. If none, END

Enable (show) the correct number of display items (From the bottom up, so stacks don't end up floating).

Place all the items back to the containers where they came from.

 

@Fallen_Angel

There are many house mods that have weapon walls. So there are scripts already written that you could learn from (like danthegeek's Underground Hideout Bunker).

Do you have experience with other programming languages? If not, you're not actually going to learn much of anything if you just change a few values in someone else's script.

There are a few scripting tutorials for beginners. You'd have to put in some effort before you'd be ready to take on the task you've set yourself though. Shall I dig out some links?

Edited by tunaisafish
Link to comment
Share on other sites

Yes please im a quick learner and id like to learn how to do some scripting all also ask my step dad was the head of the IT department at hilton and now teramark and he know allot about computers. Hes been wanting me to learn scripting instead of the Marine Corp anyways but ill learn scripting just for fun :)
Link to comment
Share on other sites

  • Recently Browsing   0 members

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