Hi Chris,
I am wondering if there is a way I can choose one item in an inventory at a time when I click on it. For example, if a 'trader' has 15 apples, 12 bananas and 3 oranges in a container, how can I make it so when I click on the container slot that has 15 apples, only one is selected to then drag and drop into my inventory? Currently, I can only select all 15 apples, unless I select 'place in separate slots' in the inventory menu, but then all the apples clog up my inventory.
If it needs to be scripted, could you please point me in the right direction?
Kind Regards,
Tim
Comments
Without feedback, I went ahead with the feature as I saw it best implemented. It's in the latest release via a new option for each inventory item.
Any way to get the update without having to update whole project?
I imported it into my project after I saved a backup and then reassigned my managers. I'm now getting compiler errors with some custom scripts I had a programmer write for getting in/out of RCC vehicles, and trading pop-up messages, but aside from that I can't find the new option. Is it under the settings manager under inventory settings or inventory manager?
Check the "Upgrade notes" for all versions since the last you were using - they will tell you of any changes you need to be aware of that may affect your game / custom scripts.
Are you able to tell me which scripts you modified for this so I can just replace those? When I updated AC it wiped all my tags/layers so I ditched that copy and reimported my backup.
Btw when I release my game in about 3 months I'm happy to credit you as you've been very helpful.
AC should not update your tags and layers, however. Try importing just the latest version's Scripts subfolder instead.
Thanks for the tip.
I wasn't joking about credit btw. 'Special thanks: Chris Burton - Adventure Creator' okay? My project is an educational video game called Rocket Island.
So my programmer and I have been working on this for a few weeks now, but we haven't been able to solve this issue without causing more problems. When I update AC or just the scripts folder, I am able to choose one item at a time from the inventory, but then I have lots of problems with player controls, actionlist settings and others. Would you pretty please be able to send me a package to update this feature to my game? I am happy to pay you for your time until we get it working.
Does the feature work if you try it out in a fresh AC project, separate from your main? The current update is itself a package that should add the feature - any "package" that includes it would just be the latest release. If there's a bug with it's behaviour, however, I'll need to know more details.
My project is quite complex so recreating everything in a new project is very difficult. I think the simplest solution would be to import the bare minimum scripts needed to implement the CanSelectSingle feature and then worek on integrating them into my project.
I've scoured through every script in the latest AC update searching for instances of CanSelectSingle. I found the following scripts include it: RuntimeInventory, MenuInventoryBox, InvItem, and PlayerCursor. My programmer has definitely adapted MenuInventoryBox and RuntimeInventory so I can have a canvas pop up when I buy/sell/can't afford, and so I can set different cost and sell prices for the same inventory item in different containers (shops).
If we can merge the CanSelectSingle feature in these four updated scripts, with the programmers changes, should the new CanSelectSingle feature work, or are there other scripts that need importing too?
InvItem.cs:
CanSelectSingle() method
selectSingle variable
RuntimeInventory.cs:
TransferLocalToCrafting method
TransferCraftingToLocal method
InventoryManager.cs
ItemsGUI method
Then also transfer any mention of "CanSelectSingle".