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

What is happening right now?


reply to My images are larger than they are supposed to be. Also, using multidimensional arrays and for-loops to put actors into the world.

By danpost - about 11 hours ago
A Bomb object is not a Player object; so, the Bomb class should not extend the Player class. Likewise with the BombExplode class. I have often used 1-D String arrays to build worlds with, assigning a specific character to each type actor. In fact, it more resembles the layout when you look at the array. That makes it easier to build. The powerupChance field is not the problem. It is the randChance field that is problematic. Its value never changes (is not random once set).

reply to User writing and making the character move

By danpost - about 18 hours ago
Remove the first word from line 263, "Player".

reply to Jumping

By danpost - 1 day ago
¿ques♫ wrote...
Hi Danpost, was wondering, how can I edit your Scroller class or the MyWorld class to disable backwards scrolling? I want Mario to still be able to move towards the left edge of the screen, but for backwards scrolling to be disabled (doing this so that any objects that pass the left edge can be removed to reduce lag). << Code Omitted >>
The Scroller class should never need modification. My tutorial shows how to allow scrollActor roaming before scrolling using specific code in the scroll method in your MyWorrld class. It should be a simple matter to prevent backward scrolling (just by removing one line of code; or, by changing what it does).

reply to shooting

By danpost - 2 days ago
liverpoolfc wrote...
you mean the subclass name?
No, I mean the entire listing of all lines of codes in both classes (in rocket and bullet classes).