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

danpost's Comments

Back to danpost's profile

I meant 'sneak-attacking' the lobster.
I think you need to work more on this one before moving on to something else. The seals are going 'under' the water and 'sneak-attacking' the seal for lunch!
@hkrhasleholm, Greenfoot has as command that will start the scenario from the world constructor. And resetting does work, but again starts the scenario and it is very hard (at least in this scenario) to tell that it actually was reset.
I saw that the code was available for download. In the act method of the Bullet class, do the following // before the first 'if', add boolean removeMe = false; // in each Zombie 'if' block, add removeMe = true; // change the last 'if' to if (removeMe || atWorldEdge())
I might have to see what variables you have declared for the class, also.
canSee better not be a void; it must return a boolean; and if it does, the return must be true or false. Either you have your terminology wrong or your code is wrong. That is, either you are not correct in calling the canSee method a void when, in fact, it is a boolean method; OR, you coded your canSee method as a void when it should be a boolean method. If you show the code you have for the act method, I believe I could find what is amiss (that is if your canSee method is coded properly).
'getWorld().removeObject()' will work if you do it before 'getWorld().removeObject(this)'.
All I see are little green feet coming down at me!?!
danpostdanpost

2012/10/24

You should run the scenario a little, then pause it. Then, upload it again, making sure you uncheck 'Keep existing screenshot', drag the picture or resize as you want before you actually upload it.