How do I get my top menu to auto hide?

0 favourites
  • 7 posts
From the Asset Store
ready made menu you can download this one or just follow my tutorial to make it yourself
  • Hey guys,

    So I'm working on a traditional point n' click adventure game. I have set up a inventory bar that the user can slide down to reveal the inventory items and I would like it to autohide when it's not being touched after a some seconds.

    For some reason, the way I have it set up now, it only waits the first time I pull it down. Every time after the first one, it just automatically hides as soon as I reveal it. This is what the event looks like right now:

    Any ideas on what I'm doing wrong?

    Thanks!

  • I'm not sure why your method is not working but I would suggest not using the Wait action for this kind of event. As it is, your method simple says, as soon as the player stops touching the menu, wait 5 seconds then move up. Not if the player has not touched the menu for the past 5 seconds, move up.

    Instead, use a last touched variable to store a time value and update it every time the menu is touched. Then, your event would just look to see if current time is > lastTouchedTime + 5 seconds.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here is a simple capx example for you to look at.

  • Sorry Frag! I posted another message before because I was misunderstanding your explanation. But gave it a go and it's working perfectly now Thanks!

  • No worries. I saw your post so I came on to respond but, by the time I hit submit, your post was already removed. Glad you got it working though.

  • Hey guys,

    So I'm working on a traditional point n' click adventure game. I have set up a inventory bar that the user can slide down to reveal the inventory items and I would like it to autohide when it's not being touched after a some seconds.

    For some reason, the way I have it set up now, it only waits the first time I pull it down. Every time after the first one, it just automatically hides as soon as I reveal it. This is what the event looks like right now:

    Any ideas on what I'm doing wrong?

    Thanks!

    How can I use that lerp expression to make an object go from point A to B smooth?

  • Zathan I have made a menu that slides in smoothly (read into 'lerp' and 'dt' functions) BUT it only slides in when the game starts.

    Can anyone help with a On / off button that slides the menu In and Out?

    (the attached example also includes a card match game with snapping)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)