In file attached I set up both of my trys to get to go through all of the stages in my game. Both ways I tried setting it up in the compose frame function built but when I ran them they skipped stages.
I commented them out in the compose frame function for you to take a look. I need help.
I need help
Re: I need help
Right now your tree of booleans is messing your code. On the one at the bottom you have a good idea of it, but the order and way you present them is illogical.
I would recommend to use a single int "Level" to tell what level you are going on and then just put "if (Level == 1) {Stage1();}"
But to go back to the compose of the levels at the bottom, The logical order would be to present them backwards and then use the "else if" statement, which will skip the rest if one is true.
You have also written "if( Stage2IsDone == true ) {Stage2();}" So basically your saying "if I have already completed this stage, present it to me anyways" When you should be asking "If the last level is complete, present the next one" eg. "if( Stage1IsDone == true ) {Stage2();}"
I would recommend to use a single int "Level" to tell what level you are going on and then just put "if (Level == 1) {Stage1();}"
But to go back to the compose of the levels at the bottom, The logical order would be to present them backwards and then use the "else if" statement, which will skip the rest if one is true.
You have also written "if( Stage2IsDone == true ) {Stage2();}" So basically your saying "if I have already completed this stage, present it to me anyways" When you should be asking "If the last level is complete, present the next one" eg. "if( Stage1IsDone == true ) {Stage2();}"
ʕ •ᴥ•ʔ
Re: I need help
Thanks for the help. I do not know what I was thinking.
Sometimes it skips levels but the game works.
Sometimes it skips levels but the game works.
- Attachments
-
- MyGame.zip
- (691.69 KiB) Downloaded 132 times
CraigSpaz