Forum rules - please read before posting.

Inventory questions

edited March 2016 in Technical Q&A
Hello All!

I have a toggle button for my inventory, that once it's clicked, it shows an expanded box which contain all my inventory items.

Now, if I click the item I wish to use and move it to the Hotspot, it all works well. The issue is, the expanded box sometimes is in the way of what I want to use the selected item on. 

I don't want to have my players move to a specific area to use an item.

Solutions:
1) Move the expanded box of items to the bottom of the screen. 
Issue: Since I have the toggle button on the top, out of the way of where people would click to move around, having the expanded box at the bottom seems odd and not attached to the toggle
2) Once I have selected an item from the expanded box, close the selected box.
Issue: I would like to know if this is possible and how I could do that in AC
3) Once I have selected an item, the expanded box goes transparent a little bit allowing the player to see through expanded box and also interact with the Hotspots behind the expanded box.
Issue: I would like to know if this is possible and how I could do that in AC
4) Once I have selected an item, the expanded box hides itself to the left of the screen, and if I need it again, I can move the mouse to the left of the screen where you can see a part of it and it pops out again.
Issue: I would like to know if this is possible and how I could do that in AC

I think this boils down to "how do I know that an item has been selected and attached to the mouse"

So I am looking for information on how to accomplish #2, #3 and #4 please.

Thanks!

Comments

  • A custom script could do any of these.  Checking for whether or not an item is selected is done by checking if the "selectedItem" variable in the RuntimeInventory script is not null:

    if (AC.KickStarter.runtimeInventory.selectedItem != null)
    {
      // Item is selected
    }

    The Menu class has functions for turning a Menu on and off.  Menus can be accessed by name with the PlayerMenus script GetMenuWithName:

    Menu inventoryMenu = AC.PlayerMenus.GetMenuWithName ("MyInventory");
    inventoryMenu.TurnOff ();

    To achieve 3), you could try creating a second near-identical Menu (only transparent and non-clickable), and swapping it with your original inventory Menu once an item is selected.
  • That solved my issue. Thanks!


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.