Ask here your questions to get help using GDevelop.
By ganker 11
#61534 guys i need help to create a pop up message when a button is clicked which has options . its similar to the image i have attached. Thanks ! :D :D :roll:
Attachments
1.jpg
1.jpg (12.57 KiB) Viewed 1007 times
User avatar
By kalel
#61551
ganker 11 wrote:It's a browser game :D :roll:


Maybe the easiest way would be to use a new scene with the buttons and text necessary, and use "pause scene" and after the user clicks on ok, cancel, etc, return to the previously paused scene.

This may or may not be sufficient, depending on your purpose, but is the simpler way.
By Mats
#61567 A new scene is not a good idea.

Just create a popup object and text on a layer above (or Z-Ordered higher) and have a variable called message_lock, set it =1 when the popup is active. When the popup is dismissed, set message_lock back to 0. Make sure functions you want unable to run when the popup is active have Variable(message_lock) = 0 on their conditions.

I attached an image below to show an example of this method I'm using right now in a game.
Attachments
Screenshot (15).png
Screenshot (15).png (630.85 KiB) Viewed 956 times
User avatar
By TristanBacon
#64218 I've tried to add a popup to my project as a layer, but even though it (and the buttons on the popup) starts off as Hidden in my "At the beginning of the scene" section, I'm still able to click the buttons.
I can't see them, but if I click the location of the button, it carries out the action. Is there a way to limit user input to a specific layer and change it when you need to?
By MattLB
#64220 I can't answer the question of whether a layer can be locked, but what you can do is add a condition that an object is visible to your clicking event.

All Objects>Visibility>Visibility of an object