This site requires JavaScript, please enable it in your browser!
Greenfoot back
Hundmat
Hundmat wrote ...

2019/4/26

Score

Hundmat Hundmat

2019/4/26

#
I created a game that will need a score, the problem is that my game works by creating the world layout with two prepares (prepare1() and prepare2()). If my character jump in the right hole the world will reset and one of the prepares, prepare1() or prepare2() will be created. The code pick which one of the two prepares, it will pick by using a random number and an if-statement. So my question is if I can keep the score even if the world reset?
danpost danpost

2019/4/26

#
Create the new world and before setting it active, set the score in it to that of the current world.
Hundmat Hundmat

2019/4/26

#
Okey, thank you!
You need to login to post a reply.