Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Posts: n/a
Default 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...
Attached Files
File Type: a2w Qbert_r4.a2w (2.90 MB, 1 views)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.