Hey guys, I’m developing my second game and I thought using GDevelop would be a good idea. Well… let me describe what I’m trying to accomplish:
-You get a text and you get a button to click and go to the next text.
-This will happen so the story of the game can progress
Sometimes you have to take a decission and based on that the game can progress.
Problem is: when you click on one button, it takes you right to the last text, as if all the clicks were registered together, sorry I can’t describe this better… I’ll attach an image
The problem is that the “mouse button released” condition is true for the entire frame (all the event sheet). GD will read the events in the specified order:
Event 4: If you press the “button 1”, you delete it and create a “button 2” at the same position.
Event 7: Just after that, the condition “mouse button released” is still true, and the mouse is now over “button 2”, so it is deleted and a “button 3” is created at the same position.
So finally you delete the first button, create the second and delete it in one frame, to fix it you can:
Move the events 5, 6 and 7 over event 2 (events related to “button 2” over events related to “button 1”). This way, when you click the “button 1”, GD will read events related to “button 2” firstly, nothing will happen because there are no “button2” on the scene, and then will read events related to “button 1”, delete it and create a “button 2”. The next time you make a click “button 2” will be deleted as you would expect.
Add an “else” variable:
The last option is elegant and you can keep the natural order of events. The first button event doesn’t need the condition “else = 1”, but you can put it if you want and it will work, the last button event doesn’t need the action “else = 0”, but you can put it if you want and it will work
Would you mind to change the language to english and make that screenshot again?
I didn’t and I won’t take the time to figure out what language would that be and what events you actually been using, but now you made me curious…
Great What I really ment the guy seem too lazy to even try what you suggesting and don’t even bothered to change the language after all this is the english community.