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

What is happening right now?


reply to Good afternoon, I have some problem with my code. Stone should disappear when the relocation is equals to 3. But it's triggering an eror. Can you please help me?

By Ondřej - about 1 hour ago
Thanks you for help. Now I understand this.

reply to help having projectiles act how i want

By danpost - 1 day ago
Lonelyf60 wrote...
i want to have them move a certain range before exploading and i want them to shoot in the direction of the mouse while also having a 30 second delay ty in advance for the help heres my code: << Code Omitted >>
Where does the 30-second delay come in? When does it start? What, if anything, happens during the delay? And what happens when the 30 seconds is up? There are two things about the code provided that should be noted. One is your loose use of the getWorld method throughout the class. Once: the line <Code Omitted>is executed, that method will thereafter return a 'null' value. That means you cannot execute any method or access any fields using it or an error (NullPointerException) will ensue. So, in the checkBoundaries' method, the second if should have else before it as well.. As an alternative, you can combine the logic checking to: <Code Omitted>or, <Code Omitted> Another place where this comes into play is the order of calls in the act method. If the second act method executes the removal of the object, then a error will occur during the call to the destroyEnemies method. Switching the two method won't work because this method also may remove this object (which will cause an error in the first method). You will have to check the returned value of getWorld for a null value before moving on to the second method call: <Code Omitted>

reply to Making a Asteroids Game (help needed).

By yesineedhelp - 2 days ago
Thank you, it works. I guess I was thinking wrong.

reply to Change the color of a pixel

By danpost - 2 days ago
Verdreht135 wrote...
When i try to put "GreenfootImage image= getImage () into Myworld it says i have to declar a new method.
In a World subclass, you would use: <Code Omitted>

reply to Parallax Scrolling

By kenNXstar - 3 days ago
currently testing that method out at the moment ill keep you updated... I was going to test setPaintOrder (class) method. I'll keep you posted thanks for the feed back.