Forum rules - please read before posting.

Equipable items

So we have the inventory and we can click items and then "use" them, but I was wondering how it's envisioned that we should use that or extend it to have things such as guns or swords or what have you where we're able to activate a piece of gear or such where that's then usable beyond a single click. There's a notion of a "selected" item, for example, but that's not really applicable here.

Comments

  • There's a couple of ways you can do it, depending on your needs.  You haven't described your Interaction method, but I'll assume you're relying on Context Sensitive.

    With that mode, left-clicking an item will select it unless you override it with a Use Interaction in its list of properties.  That will run an ActionList instead, which you can populate with a custom Action if necessary to do what you need.

    Alternatively, you can hook into the OnMenuElementClick custom event to control exactly what occurs upon clicking an Inventory slot.  The Inventory element in your Menu can also have its Inventory box type field set to Custom Script, which will prevent regular click behaviour.  If necessary, you can define Categories to assign your "equippable" items so that they can listed in a separate, dedicated menu.
  • That should be more than enough information to enable me to explore my options.  As usual, very helpful, thank you Chris.
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.