Forum rules - please read before posting.

Hotspot Inventory Interactions via Direct Control

Hi,
 Until now, I've been able to solve most of my issues just by checking the forums - but i'm stuck. I've begun converting my game from point-and-click to a fully keyboard/controller (direct control) setup. So far, movement and basic hotspot interaction (via hotspot vicinity + hotspot detector method) is working.  But I also need to be able to apply items in my inventory to hotspots without dragging and that's my issue. Despite many attempts, I can't seem to get the make the associations work.

For illustration, here is what I'm trying to do:

Have player enter hotspot vicinity, see a single interaction graphic, and trigger hotspot interaction (working): https://www.dropbox.com/s/ih1ptvzhvhwisl3/Artboard%201%20copy%202.png?dl=0 
&
Navigate a full pop up inventory menu like this, if interaction is to use/give an item (not working): https://www.dropbox.com/s/ih1ptvzhvhwisl3/Artboard%201%20copy%202.png?dl=0
and trigger an inventory interaction on the hotspot, just as if I had dragged the item to it.

Today I trigger the hotspot's 'USE' interaction when in vicinity and in it's ActionList use:
  • Menu: Change State to Turn On a special inventory picking menu I've created with Source: AC & 
  • Engine: Manage system' to enable 'Control in-game Menus' and disable 'Movement'
Unfortunately I can't seem to gain focus in this menu to select an item, nor able to have that apply to the current hotspot in vicinity and trigger the appropriate hotspot 'Inventory Interaction' I've set up. Beyond that I'm unsure how, after selecting an item, this menu would close again. My best guess would be that I'd start my inventory interaction actionlist with another Menu: Change State to turn it off (?)

I'm definitely open to suggestions as to a better way of implementing this drag-less method of using an inventory menu, but don't want an inventory appearing alongside other options all the time (Hotspot then Interaction Method). Below are some details on my setup.  Thanks!

------------

I'm currently using Unity 2018.1.5f1 and AC v1.63.2

Settings:
Interaction Method: Context Sensitive

Menu Manager:
* Direct-navigate Menus when paused?  - Checked
* Direct-navigate Menus during Conversations?  - Checked 
* Direct-navigate mouse when directly-controlling Unity UI Menus? - Checked

INTERACTION MENU: (for graphic hover when in vicinity)
Appear type: On Hotspot
Position: On Hotspot

(Interaction element)
Display Type: Icon Only  (displays chosen cursor/icon on the 'USE' interaction on Hotspot)


INVENTORY MENU:
Appear Type: Manual  (as I only want a menu to appear on using or giving items, but not in more common default 'examine' use case)
Pause Game when enabled - Checked

(InventoryBox element) 
Inventory Box Type: Default  (but get graphic bubbles over each item in menu, same as from my interaction menu, not desired)

Comments

  • edited August 2018
    Welcome to the community, @Snas.

    If you're pausing the game when your Inventory menu turns on, there's no need to use the Engine: Manage systems Action because it's not an "in-game" Menu, and Movement will be disabled anyway.

    In order to prevent your Interaction menu from showing when Inventory is open, you can lock it via Menu: Change state Actions that run when the Inventory menu turns on and off.

    However, the wider issue is that you're looking to create a "mix" of two interaction methods.  Context Sensitive allows for a one-button "use" interface, while Choose Hotspot Then Interaction allows for inventory items to be selected for a given Hotspot after said Hotspot has been selected.

    You have a couple of options going forward:

    1) Set your Interaction method to Custom Script, allowing you full control over your game's interface.  This'd be heavy on the scripting - see the Manual's "Custom interaction systems" chapter - but may be preferable if you're familiar with scripting.

    2) Set your Interaction method to Choose Hotspot Then Interaction (which is required for the inventory behaviour unless it's all custom-scripted), and your See Interactions with value to Via Script Only.  You can then rely on a simple script to allow the player to run the Hotspot's Use interaction with one input, and open up your Inventory menu with another.  Something like the following:

    ChooseInteractionType.cs
        http://pasteall.org/1050571/csharp

    Be sure to set your Inventory menu's Appear type to On Interaction so that it turns on when requested, and you can modify "InteractionA" and "InteractionB" to inputs of your choosing.

    It may take some further tweaking to perfect (lock off unwanted menus etc), but that should give you the basic desired behaviour.
  • Thanks Chris, since I was also going to need a combine menu that would add additional complexity, I hired a developer friend to write some custom scripts (Option 1) and it all came together nicely. Thanks for the insight & pointers!

    (Love AC, btw, without it I'd have no game).
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.