Confusing Pop-Menu Interaction Bug

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Relax and relieve stress by popping bubbles in Fidget Anti- Stress Releaser!
  • Hey all! I've been working on my first solo project in Construct3 and am running into an issue. Below is a screenshot of my code that doesn't seem to responding.

    I want my player to be able to press 'C' when overlapping the counter and pop up and interaction menu. When that menu is up, the player should be locked, and pressing 'C' again should close it and resume control, but it doesn't.

    Attached below is a Google Drive link to the source code for my game, if anyone needs to take a look at it. There's a fair few other bugs as well. This one is on Event Sheet "Health_Shop" and its corresponding layer.

    https://drive.google.com/drive/folders/1g0Q-QlsSwqnViiWFDstA_0FtSSSZbk9B?usp=sharing

    Thanks so much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First, you posted in the wrong sub-forum. Secondly, seems like you shared the wrong project :)

    Anyway, there are multiple issues with your events. Event #4 on your screenshot will run on every tick, creating lots and lots of objects. Also, I believe when you press C, both events 1 and 10 will be triggered one after another. The first will set InDialog to true, and that's why the second will trigger also, cancelling the popup.

    You need to change your code like this:

    On C pressed 
    Player is overlapping Counter
    
    	(Sub-events)
    	Is InDialog : Set InDialog to false, destroy popup etc.
    	
    	Else : Set InDialog to true, create popup menu etc.
    
  • Moved to the Construct 3 How do I forum

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