This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
How To Create Mute Button
By Yuki, with 5 replies.
Last reply by Super_Hippo, almost 10 years ago:
Use the first line outside methods. Then you can use 'backgroundMusic.pause();' to pause it. <Code Omitted>
Shooting Help
By Robert2.0, with 11 replies.
Last reply by Super_Hippo, almost 10 years ago:
There is a closing brace ')' missing.
Please, help
By Makhil, with 2 replies.
Last reply by Makhil, almost 10 years ago:
Thank you very much
my counter aint increasing
By Nischaya, with 1 reply.
Replied to by danpost, almost 10 years ago:
You have 'int pizzas = 0;' inside the act method as a variable whose scope (existence) is maintained while the method is executing. Each time the method executes, a new 'pizzas' variable is created and when the method is done executing, the variable is gone for good. To maintain the variable for a longer period of time (for the life of the Nischaya object), that line needs to be placed outside of the method.
How can I modify an "int" from another Class?
By madeirense, with 3 replies.
Last reply by danpost, almost 10 years ago:
madeirense wrote...
Still crashing, java.lang.NullPointerException at PowerUP.act(PowerUP.java:44)
Switch lines 6 and adjusted line 7 above (remove the powerup from the world after adjusting the value of PUP).
Loop that creates 10 new instances
By edwards_38, with 1 reply.
Replied to by danpost, almost 10 years ago:
Sounds like two issues here. Please stick to one issue at a time and show what code you have tried (try something).
Actor not in world error?
By khoalabear, with 1 reply.
Replied to by danpost, almost 10 years ago:
You are calling 'checkRight' after calling 'checkLeft'. Both of these methods could cause the actor to be removed from the world. If the first one called does, then the code in the second one cannot properly execute because you cannot get an offset from a place that is not in the world. Make sure the actor is in the world before calling the second one of the two methods: <Code Omitted>or <Code Omitted>which is even better (so if you add more code, it will not
Calling private variables from a class to another one
By MrSandwich, with 11 replies.
Last reply by MrSandwich, almost 10 years ago:
Double post, ignore
java.lang.Object cannot be converted to greenfoot.Actor
By Randy., with 1 reply.
Replied to by danpost, almost 10 years ago:
If you want any object at offset, use: <Code Omitted>
Problems with controller support
By robot_fury, with 1 reply.
Replied to by robot_fury, almost 10 years ago:
In case you are leery of my image link, the message is An error occured in a file for which the source cannot be found. class: source line number. >local relative reference on my dive<\GamePadTester\GamePadLoader.java:4 package.net.java.games.input does not exist.
How do I make a hearts (lives) system?
By Randy., with 5 replies.
Last reply by danpost, almost 10 years ago:
There may be some settings that you need to adjust -- like security to medium-high (browser option) or adding 'greenfoot.org' to the list of trusted sites (java security option -- site exceptions list) (something like that) as well as 'enable java content in browser' (checkbox in java security option).
Why isn't this code working? 2
By IanWasHere, with 6 replies.
Last reply by danpost, almost 10 years ago:
You should avoid using individual methods for one-line commands unless they are being called from several different places within your code. So, methods like 'moveDown', 'setTransparency' and 'fillBlock' just complicate matters (makes more code instead of less and causes program flow to jump around more than necessary. You should use code tags when posting code to give the code line numbering. It helps when discussing the code. You can use the 'code' link below the reply box or just key the world 'code' between square brackets before an after the code. The closing tag needs a slash afte
Mouse clicked registering twice
By TinyTertle, with 2 replies.
Last reply by TinyTertle, almost 10 years ago:
Ahh very helpful! Thanks a bunch :D
Score in different worlds
By rramos95, with 7 replies.
Last reply by rramos95, almost 10 years ago:
Thank you so much. Its 100% working!!
Score in different worlds
By rramos95, with 2 replies.
Last reply by rramos95, almost 10 years ago:
Ok, sorry for that.
479
480
481
482
483
484
485
X