Forum rules - please read before posting.

Make inventory item unselectable

icyicy
edited December 2018 in Technical Q&A

Hello everyone, good to meet you :)

As the title suggests I'm curious how to make an inventory item unselectable.

Of note, I'm using a script provided by Chris in another thread that modifies a default AC behavior -- when you try selecting an inventory item, when another item is selected/active, it instantly selects the new item (it auto selects the new item); as opposed with the standard behavior of: tap/click to deselect active item, tap/click again to select new item.

Here is the script: http://pasteall.org/1002767/csharp

I tried jury rigging it myself but I have no knowledge of C# (what i tried to do is add an exception based on item Name, I failed). I also diligently searched the forum but I was unable to find anything of use.

Any suggestion or idea would be great, thank you.

Comments

  • Welcome to the community, @icy.

    Could you explain in more depth what it is exactly you wish to achieve? i.e. what are the circumstances that you explicitly want to change? The reason behind this need may also help come up with a workaround.

    One way to achieve this is to hook into the OnInventoryDeselect custom event, which triggers whenever an item is de-selected. You can then check if the de-selected item has the ID number of the item in question, and re-select it if so:

    http://pasteall.org/1438111/csharp

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.