i have created a simple quiz game.
i need help a little.
suppose i am at level 1 and the question is “what is 2+2?”
i have two options 4 & 5.
if i click on 4, it goes to my linked external event where i create a text object “correct”.
i have successfully done it.
but now i need to put a timer in my external event that after it creates “correct”, it goes to a different scene (let’s say score scene) after 2 seconds after “correct” gets created.
how can i do that?
i have tried making timer in different ways but i am failing since 2 days. PLEASE HELP.
In your external event when you show the correct! text start the timer like Start timer name “Correct”
in the same external eventsheet check if Timer “Correct” is greater than x where x are seconds, then delete timer and do other stuff
add the condition The global variable correct = 1 inside the timer check and Trigger Once too
So the timer check must be
Advanced &&
— The timer time is greater than 2 seconds
— The global variable correct = 1
Triggrer Once
P.S: Also it is my constant second day at this. i am getting frustrated scratching my head for this simple process. PLEASE HELP.
I am attaching my Level event sheet in which i have linked this external event.
I mean you are including the events only if another action is triggered, try to include the eventsheet above all not in a subevent, like in my screenshot
so if for my quiz game, i need a “correct answer” animation for every right answer tapped (which then goes to my middle scene of congratulations, next level, pause etc)…i should make group of external events individually and then link it to each level that i make?
Yes, in the events of each level_XX scene you need to add the external events.
In my game i do this one GameScene to control everything then include all external events in that GameScene. Look the structure of one of my projects
This is GameScene that includes a lot of external events
You follow me in what I’m explaining
In order to include external events just one time because if you includes in various scenes the results may change because GDevelop doesn’t know which events execute first.
try to centralize all external events in a global event sheet, and then for each level just include the global event sheet and add the logic of that level
Thank you so much brothers for guiding me.
i have started making out the entire game again with the more “practical” structure like you guys have guided.
Thanks a lot guys.
It means a lot.
P.S: By the way, is there any way to get current scene name i am in and give its value(or text) to a global text object i have created?