mojomojo's Forum Posts

  • Again, I have told you earlier - you need to add "Trigger once" to event 23

    OHHHHHHH I finally get it ahaha. Thank u so muchhhhhh

  • Buttons on invisible layers can also be touched. You need to add another condition "Layer N is visible" to events 20 and 24.

    Also, I told you this already - you need to use "On touched" events for buttons, not "is touching".

    And use layer names, not numbers. If tomorrow you decide to add a new background layer, you will have to update all layer numbers in all events. With layer names it will not be necessary.

    The only problem now is that my "attention pop up" still won't disappear :(

    Thank you for yr advice and help!

  • You need to show the rest of the code then, or post your project file.

    I think something is wrong between my 2 pop up.

    My game over pop up will appear when the player lose all 3 lives and he/she can restart the game by touching the button.

    My attention pop up will appear when the player lose 1 live and he/she can resume/continue with the game by touching the button.

  • Is it because you forgot to delete "Restart layout" action?

    hmmm nope

  • It's your 3rd post about the same pop up window, you should ask all these questions in one post..

    Event 23 is running on every tick, so it makes the layer visible again and again as long as Lives=2. You need to add "Trigger once" condition to this event.

    In 24 you need to use triggered event "On object touched", and not "Is touching", because "Is touching" is executed many times while the finger is touching the screen. "On touched" is executed once. Always use "On touched" or "On tap" for buttons.

    Also, if you want to resume the game, why are you restarting the layout? You probably want to make the pop up layer invisible?

    I've made the pop up layer invisible but the game will restart the layout and the global variable will go back to default.....

  • > yup, I've successfully done it but now the pop up won't disappear. ahaha

    You should make a button or something so that the player can close the pop up. And for that just make the layer invisible.

    okie thank u

  • several of the games on my youtube channel use popup windows.

    May that can help?

    https://www.youtube.com/playlist?list=PLktob3uEmsqF3oqx5mU1d8nlzu6vc1C_W

    cheers!

    yup, I've watched yr videos b4 ahaha. thanks a lot!

  • It's your 3rd post about the same pop up window, you should ask all these questions in one post..

    Event 23 is running on every tick, so it makes the layer visible again and again as long as Lives=2. You need to add "Trigger once" condition to this event.

    In 24 you need to use triggered event "On object touched", and not "Is touching", because "Is touching" is executed many times while the finger is touching the screen. "On touched" is executed once. Always use "On touched" or "On tap" for buttons.

    Also, if you want to resume the game, why are you restarting the layout? You probably want to make the pop up layer invisible?

    ahaha I'm sorry. It's my 1st time using construct 3 and my problems don't all come at once. I have 2 different pop up windows. thank u for yr help!

  • Hi! This "attention" pop up will appear when the player lose 1 lives, they can resume playing the game when they touch the "continue play" button. My pop up manage to appear but I don't understand how to make it disappear and allow the player to resume where he/her stopped..... I've attached my event sheet too. thank u for yr help

  • You should move the action set layer 2 invisible when start layout.

    Because right now the action restart layout be executed and it won't reach next ones.

    yeah it's solved alr. thank u!

  • You have to type layer number or name, in this case 1 or "Pop up" (with quotation marks). I recommend using layer name, because if you add more layers in the future, you won't need to update layer numbers in your code.

    Also, on your screenshot you are adding a condition Is layer visible. I believe you need to add an action Set layer visible.

    yup, I've successfully done it but now the pop up won't disappear. ahaha

  • Hello! My pop up will appear when the player lose 1 life, then when they press the button they can go back to the game. My pop up successfully appear but it doesn't disappear when the game start again. The pic shown is what I've done in the event sheet. So how do I make the pop up disappear? Thank u!

  • Do you mind sending a screenshot of your events?

    Yup, no problem. I add event > system > make layer visible, but my layer (name:pop up) does not appear in the option. I have no idea why...

  • To check if the player has lost all their lives, use a variable and subtract 1 when the player loses a life. Then if that variable ever equals 0, then you can do the pop up.

    As for actually making it pop up, you should use the tween behavior.

    Yup, I've already created an instance variable and the lives can subtract 1 when the player collide with the obstacle. I've tried making the pop up appear when the variable equals 0 but it doesn't seems to work... thanks for yr reply

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi! I would like to do a pop up in my game. When the player lost all his 3 lives, a "game over" pop up will appear (as in the pic). Do I create a new layer and how do I write in my event sheet to make the layer visible when the player lost all his lives? Thank u so much for yr help :)