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

danpost's Comments

Back to danpost's profile

You need to put the sound file in the 'sounds' folder within the scenarios folder. Make sure, when you add Orb objects into the world, that you use 'addObject(new Orb(int, int), int, int);', supplying both the x and y speeds and the x and y locations. For top and left bounce, you need to compare <= 0, not >= getWorld().getHeight() or >= getWorld().getWidth(). You will also need an offset value for the checks as the image of the object is smaller than the image itself (I thought 15 was about right). So the checks would be left: <= -15 right: >= getWorld().getWidth() + 15 top: <= -15 bottom: >= getWorld().getHeight() + 15 The only other thing I saw, was the need for an 'addedToWorld(World world)' method in the Orb class to initialize the exactX and exactY values to getX() and getY().
Is there a time limit on this game? If so, you should probably mention it in the description or instructions. If not, what causes the player to die after like 20 seconds?
danpostdanpost

2012/5/8

@chiefnoah, I love that ever increasing inaccurately named trilogy.
Sorry, that was supposed to be: if (getWorld() != null) eatAsteroid();
I fixed by just changing 'eatAsteroid();' to 'if (getWorld != null) eatAsteroid();'.
@Psychman, you're forgiven, this time. This question should have been in a new discussion thread, not in the comment section for a given scenario. In response, however, either your picture is over the 1MB limit in size or you are not clicking on the 'Save' button near the bottom of the page.
danpostdanpost

2012/4/29

No. Without changing the starting conditions. Hit the 'Run' button, and press the 'z' key immediately while holding down the left arrow key. You get across the screen before any rocks can block you. Then squeeze between the two rocks in the middle of the left side of the screen to get to the stargate. No explosions and 'Enterprise: 1300+' every time.
danpostdanpost

2012/4/29

I found a cheat to win every time. See if you can find it.
Now, make it so a RIGHT click adds a new rock.