Forum rules - please read before posting.

Show Inventory Menu on start, then revert to normal "Mouse Over" mode

I'm using the mode of showing the inventory menu bar when you mouse over the top of the screen. But for newbies, they have no idea the inventory menu is available there since that's not an area you usually click. I could do a tutorial, but even easier would be to display the inventory menu when we enter the first scene, and then after you've clicked on an item there, or maybe after a certain amount of time, revert to the normal "mouse over" mode from then on.

In other words, force "mouse over" to be enabled to show the inventory, then revert to normal gameplay.

I don't see a way to do this with Actions. Has anyone done this, or written a script to do this?

Comments

  • Welcome to the community, @DavidBFox.

    There's a couple of ways you can do this.

    1. Duplicate the Menu in the Menu Manager (and relink a duplicated Canvas prefab if you're using Unity UI as its Source) and change its Appear type to Manual or During Gameplay (depending on your preferece), and then lock the original one by default. You can then use the Menu: Change state Action to lock the duplicate / unlock the original as and when you need to swap them out.
    2. Any Manager property can be modified at runtime - though as there are so many available this is done through script. To do so, right-click the property's label and choose "Copy script variable" from the menu that then appears. In the case of the default Inventory menu's Appear type field, this is:

      AC.PlayerMenus.GetMenuWithName ("Inventory").appearType

    This is an enum value type, and you can find its entry in the Scripting Guide here. To change this value using Actions, you can either place the code to change this value in a script function that is invoked by either the Engine: Call event or Object: Send message Actions, or by inserting it into the Run() function of a custom Action. This latter method would also allow you to expose the new "appearType" value in the Action's UI, so that you can use the same Action for changing it to whatever value you currently need to set it to.

    As I thought this might generally useful to users, I've posted such an Action to the AC wiki.

  • edited August 2019

    Thanks Chris! I'll have to dig in to see if I can get this to work. Will let you know if I get stuck...

    Edit: Got it to work using your new custom Action. I have it set to appear at the opening cutscene, then switch to mouse over mode afterwards. Perfect!

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.