Not sure if the counter has any function right now, but other than that it looks good to me. (Or if you want to reset the counter there, then it make sense).
Hi Alberto, I found my solution.
I put var counter = 0;
at the top so I can declare it
while I put the counter += 1;
at the down of the script so it shows that var is the counter
here is the pic
Is it working for you or not? I don’t see my suggestions in your code?
It’s working but I have another concern.
Example if this score number reaches like 10. I want it to switch to this scene
how do I do that.
This is the code and is there one that can help me switch to this scene
The scene name is: “WINSCREEN”
It works I sent u a concern
if (counter >= 10) {
this.app.scenes.changeScene('WINSCREEN');
}
Thank you, man.