05-03-2010, 09:36 AM
Thanks for the help all. Don't quite have it yet but I know I'm close.
I added a world function that has a boolean variable that says areCubesBlue = false. Then I have a For all with an If/Else statement. It's supposed to return a true value if all cubes in my list are blue.
Then I call that function in my Qbert.universalJump method. After Qbert jumps, there's another If/Else statement that says if world.isBlue is true then call endGameWin method.
Only problem is that the endGameWin method is called after Qbert jumps to one or two cubes. I know it has to do with the ordering and I've tried several different ways but I'm stumped.
Also, on a completely different issue, I'm trying to make the Enemy randomly chase Qbert around the cubes. The enemy appears 2 seconds after the game starts. I have world variables that say FromCube1 = 2, 17 so that if the Enemy is on cube 1, he'll jump randomly to cube 2 or 17. But I can't figure out how to actually implement it in a method.
Here's my latest file...
|