Forum rules - please read before posting.

Hide/Show inventory

Hello, I'm trying to set my Inventory to be called with button, but when Inventory appear in the middle of screen i would like that when i click on item and drag him onto scene that Inventory then disappear. I saw there is option MouseOver but it will only appear if cursor is on that spot, but i want my calling button to be on upper right and my inventory is centered.

Can you provide me with logic how to show Inventory that will be visible when i click button but hide when i drag item onto scene? Do i need to use some ActionLists for that?


Thank you

Comments

  • This would be quite tricky, because you effectively want the Inventory menu to have two "Appear types".

    Try this:
    1. Change the Inventory menu's Appear type to Manual, so that you have complete control over when it is displayed
    2. Create a separate Menu with a Button that runs an ActionList when clicked.  This Action has a Menu: Change state Action that turns on the Inventory menu.
    3. Create an invisible menu that covers the same boundary as your Inventory menu.  Check Ignore mouse clicks? so that it does not conflict with anything, and set it's Appear type to Mouse Over.
    4. Create a new ActionList and assign it to this invisible menu's ActionList when turn off field.  Inside this ActionList, create another Menu: Change state Action that turns the Inventory menu off.  You could optionally use the Inventory: Check selected Action before it, so that the Inventory menu is only turned off if you have an inventory item selected.
  • Thank you Chris, i will try this as soon as possible, that might work! :)


  • That's a clever solution to a problem I've had for a while.

    Is there a way to do it when the inventory menu is set to Pause game when enable? Right now it seems the invisible menu isn't updated when the game is paused. I suppose could have it not paused when displaying the inventory...
  • The Appear type of Mouse Over only works during gameplay, so no - you won't be able to use it when the game is paused.  You could try using the Engine: Change timescale Action to slow things down, but you won't be able to freeze the game because setting to zero won't work.
  • Again, very clever, that seems to do exactly what I need it to do. Thanks!

    I've set the timescale to 0.0001 and that pretty much pauses the gameplay while the menu is open. Are there any apparent issues that might arise from doing this?
  • I haven't tested it myself.
  • I'll report back if I run into any issues. So far so good.

    Something of interest: before when I paused the game, using the menu manager option, while sound was playing, there was often this loud popping sound. Using the timescale I don't have this issue.
  • What's popping?  Could it be a sound that's normally set to be quiet, momentarily playing at full volume?
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.