I need help

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

I need help

Post by Craigspaz » June 27th, 2012, 8:13 pm

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. :?
Attachments
MyGame.zip
(695.32 KiB) Downloaded 139 times
CraigSpaz

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: I need help

Post by LuX » June 27th, 2012, 10:26 pm

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();}"
ʕ •ᴥ•ʔ

Craigspaz
Posts: 33
Joined: June 9th, 2012, 12:23 am

Re: I need help

Post by Craigspaz » June 27th, 2012, 11:54 pm

Thanks for the help. I do not know what I was thinking. :oops:

Sometimes it skips levels but the game works.
Attachments
MyGame.zip
(691.69 KiB) Downloaded 132 times
CraigSpaz

Post Reply