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

2018/2/10

Life counter

ORSODO ORSODO

2018/2/10

#
Hi, how do I make a life counter if some of the levels have a different world? (I tried with NextLevel(int life) but it didn't work).
Vercility Vercility

2018/2/10

#
add your old Counter to the new world?
ORSODO ORSODO

2018/2/10

#
How do you mean it?
danpost danpost

2018/2/10

#
ORSODO wrote...
I tried with NextLevel(int life) but it didn't work).
Show relevant codes.
ORSODO ORSODO

2018/2/10

#
Should I upload a scenario for you to see it? ..
danpost danpost

2018/2/10

#
ORSODO wrote...
Should I upload a scenario for you to see it? ..
That would work.
ORSODO ORSODO

2018/2/11

#
Here is the code. The problem is that all levels have a different subclass, so I have no idea how can I loop them. If you have any suggestions how my code can be more effective please let me know! And another question, as the levels come with random generator, how could we note, which of the levels were before, in order to not have the same one twice?
danpost danpost

2018/2/11

#
ORSODO wrote...
as the levels come with random generator, how could we note, which of the levels were before, in order to not have the same one twice?
Better would be to keep track of which levels have yet to be had (using their int identifications) -- removing them as they are given. You will need some static content to do this.
The problem is that all levels have a different subclass, so I have no idea how can I loop them. If you have any suggestions how my code can be more effective please let me know!
Once the list is depleted, you can rebuild it to loop.
ORSODO ORSODO

2018/2/12

#
Thx
You need to login to post a reply.