Hi guys still a beginner need help please.
I have 2 questions.(i have more questions but i prefer going step by step )
1. i would like to use the score value to open the next layout but it's not really working.
The goal is to open the next layout with respect to the score.You can see my actual script in the image but seems not working
it always go to the ''retry'' layout (score<6 layout even if i get 12 points.
2.the second question is how do i make the game automatically detect if an object/enemies or sprite are all gone out of the screen to launch the''end of layout'' .For now i'm forcing the game to end the layout after 60s which is no good for the gameplay authenticity.
Checking it every 30 seconds is causing the problem. Remove that from the events and it should work.
The way you have it set it will always go to Retry level because it will send you there before you ever reach 12 points. Use a different trigger to check your score like on player dead.
Set a global variable and call it EnemyCreated and one called EnemyKilled
Each time an enemy is created add 1 to EnemyCreated and when an enemy is killed add 1 to EnemyKilled.
Every tick check to see if they are equal and if so then all enemies have been killed.
If you are spawning enemies continually you will need to stop spawning while you check if all enemies are dead.
Thank you for your reply. I've tried some triggers but it always seems to go to the ''retry'' layout. Please can you give an example of score checking trigger to solve this problem. As a beginner i'm pretty limited and my project seems to be a little specific. No much data related to it in the web.
The problem is you are using <6 and checking every 30 seconds and you will always go to Retry layout because your score will always be below 6 in 30 second and will go to that layout without getting past that event.
The way to solve that is with a trigger variable.
Global Variable TRIGGER =0
SCORING >0 and SCORING <6 Set TRIGGER =1
SCORING >6 and SCORING <=8 Set TRIGGER =2
SCORING >8 and SCORING <12 Set TRIGGER =3
SCORING =12 Set TRIGGER =4
Every 30 Seconds
TRIGGER =1 Go To Layout Retry
TRIGGER =2 Go to Layout Average
TRIGGER =3 Go To Layout WINNERS
TRIGGER =4 Go To Layout Excellent
With that it only checks once at 30 seconds for you SCORING and the TRIGGER will send it to the correct layout
Remember to reset TRIGGER =0 when you go back to play or it will just keep sending you to that layout.
Thanks a lot. Following your suggestion here is the new script my main problem is that i don't know where to put the ''30sec'' event and condition and how it should be, i've tried many thing but doesn't work
Develop games in your browser. Powerful, performant & highly capable.
Every 30 second is the Event and checking the triggers are subevents under that event
Right click on your event and add subevents.
Thank you for you support and time, don't hate me please It's hard to be a beginner...i've tried the sub event but nothing happen , the first picture is the script with the subevent using TRIGGERS.
The second picture is not using triggers but using directly the scores and i'm wondering why the 2nd script model wouldn't work if we use subevent too? The second method is more straightforward not using triggers. But for the moment none of the 2 methods is working
Should work. Check your layout names.
WINNERS quotes and excellent score
You have to reset TRIGGER =0 after you go to your score layout or it will just repeat.
If the second one isn't working then check that SCORING is actually being changed when you kill an enemy.
If you want to upload your capx I will look at it.
THANK YOU Lamar the second script without trigger worked it was a NOOB mistake,i've been too busy to add value to the ''score'' text and i forgot to add value to the ''scoring'' Global variable . So i endend up with a perpetual zero value of the ''SCORING'' variable etc etc