0 Favourites

How do I fix this issue?

  • So I've had construct 2 for a while but I was never committed to making a game for over a couple of days. But recently I've started to work on a project and I ran into an issue. I was trying to make a menu pop-up when you hit a specific sprite but for some reason it won't work and I don't know why... heres an image.

    imgur.com/a/2QYQE

    If I delete Sprite>Menu Button 0/1 it will work, but it won't work with the condition.

    I'm stumped on this so I hope someone knows what I'm doing wrong .

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi Cha0tiXGamer !

    In fact, this is what happens when you click on your sprite :

    -> All the triggers "On Sprite Clicked" fire from up to down.

    -> So first, the one with MenuButton = 0. It makes everything nice and visible, and set MenuButton to 1.

    -> And then, the one with MenuButton = 1 WHICH IS ALSO ACTIVATED because MenuButton is now to 1.

    It lacks an "Else" condition, basically. Try something like this.

    On left Button Clicked on Sprite >
                             -> MenuButton = 0 : Do all your actions
                             -> Else AND MenuButton = 1 : Do all your actions[/code:xdt87xt5]
  • Hi Cha0tiXGamer !

    In fact, this is what happens when you click on your sprite :

    -> All the triggers "On Sprite Clicked" fire from up to down.

    -> So first, the one with MenuButton = 0. It makes everything nice and visible, and set MenuButton to 1.

    -> And then, the one with MenuButton = 1 WHICH IS ALSO ACTIVATED because MenuButton is now to 1.

    It lacks an "Else" condition, basically. Try something like this.

    On left Button Clicked on Sprite >
                             -> MenuButton = 0 : Do all your actions
                             -> Else AND MenuButton = 1 : Do all your actions[/code:3eve2rif]
    

    Thank you so much! Took me a while to realize that I needed to use a sub-event.

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