Forum rules - please read before posting.

Inventory boxes won't work in Pause Mode?

Hi, just following up from my previous post. 

My issue: inventory boxes only seem to work when Not Paused... the contents simply don't update in pause mode... I imagine that's intended to allow dragging and other stuff but...

Same question as before:

I'm not going to be dragging any items out of the inventory, is there a way to get the inventory box to work in Pause mode? like in unscaled time? 

I don't mind using scripting as long as it works. So any ideas would be greatly appreciated!

Comments

  • Inventory boxes should still work whether they pause the game or not.  When you say "don't update", what specifically isn't happening?  Try switching your Menu's Source back to Adventure Creator temporarily - it's always best to get the behaviour of a Menu working in AC before moving it over to Unity UI.
  • edited May 2016
    Strange, I mean, whenever I pause the menu all the cells show up in their default state (a button with a text box with the word Text), as if they were not being used at all. but they work just fine when not paused (the text gets over written and they start displaying the names of the items). I'll try getting you some screenshots or some gif images.
  • edited May 2016
    By the way here is a screenshot of what happens (I set the menu to appear on start, then I show how it works first in normal mode, then in pause. Also, ignore the weather HUD, it appears in play mode - only when the character is in the idle state - so it doesn't have anything to do with the inventory):


    image

    EDIT: here is a gif screenshot with my settings in the inventory menu (all inventory boxes have almost the same settings, except for the category they show):

    image

    Anyway, why would it work on play but not in pause? any ideas?
  • It could be to do with AC not being able to load fully if you pause the game immediately after starting.  Try disabling Enabled on start? and instead turning it on a short time after using an Engine: Wait Action followed by Menu: Change state in an OnStart Cutscene.  Do things then work as expected?
  • Cool, I'll try checking that out in a bit. (Although I'm kinda beat right now... it's 10am and I haven't slept since yesterday, so I may come back to you in a few hours instead.)
  • edited May 2016
    Alright, I tested it, and we're now halfway there! 

    You were right! If I have the game wait at least 0.1 seconds before calling the menu, then the fields do indeed get filled all right even in pause mode. But, while in that state I still have that weird selection issue show in the screen shot above.

    When I move up and down between the cells (either with the keyboard or hovering the mouse over the inventory, only the 4th cell gets highlighted... any ideas on that one?

    EDIT: By the way, do you think I could I reduce the time scale to 0 instead of ticking Pause game when enabled? 

    EDIT: Strange Engine: Change Timescale set to 0 doesn't seem to stop the player? or am I using it wrong?
  • Could you repost an updated gif to show the selection issue, now that they're being filled in correctly?  It could be more of a Unity UI issue now, though I've assumed you've checked the hover animation settings.

    Pausing AC is done with its own functions, rather than by manipulating the timescale.  If you want to prevent the player from moving when the game is not paused, you can use the Player: Constrain or Engine: Manage systems Actions.  The latter also allows you to disable e.g. Hotspot interactions, which may be appropriate for your needs as well.
  • Very late answer, but yes, the animations are properly setup and use unscaled time. Really, it does look exactly like in my first gif screen shot, during the time the game is in pause mode. If you see it well, only the 4th button gets highlighted when I move the cursor over the inventory box. The only difference now is that the inventory reflects the actual content of the category, but still only the 4th button keeps getting highlighted (during pause mode).
  • Down to the complexity of what you're trying to accomplish, it may be that it just won't want to play ball if the game is paused.  Have you tried my alternative solution regarding disabling player control while the menu is on instead?
  • edited June 2016
    Yes, thanks, that's how I've left it, I just disable interactions and character movement and it works. 

    Also, it's strange, but one of the issues I had with the Fake Clicks method I was using (and still hadn't had the chance to remove) got fixed in a really lame way. :-?

    I mentioned before that the very first slot, in the first inventory box was never getting auto clicked by my script, right? Well, at the time I was also desperately trying to fix the loading of items in Pause mode and I added an Engine:Wait 0.1s to the Start Action list of the inventory menu, to see if that would help. Turns out, I forgot about it and left it there. Then, the moment I removed the action, boom, the first item started getting auto clicked as it should... 8-| Maybe, before, it didn't have the time to perform the click or something?

    Anyways, there's still something preventing my system from working perfectly, but it's an issue I see happening in all my Unity UI menus. I'll probably make another thread for that to see what everyone has to say about it (because it's probably related to unity), but to avoid leaving you in suspense: 

    Basically, after you close a menu, and reopen it, any buttons previously highlighted stay that way, they don't go back to their normal state (which totally breaks my auto clicking system, and looks bad in my other menus). This happens, I think, because the menus are just getting disabled, and somehow they manage to retain the state the menu was in before getting disabled... I had heard about this issue in the unity forums, and had not given it much thought, but now it's become critical to tackle it somehow... (especially because, if I remember well, the answer people gave in the unity forums totally kills keyboard/controller setups, as it had to do with UI navigation - or basically, downright disabling it :-q- ).
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.