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
Loop that creates 10 new instances
By edwards_38, with 1 reply.
Replied to by danpost, over 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, over 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, over 10 years ago:
Double post, ignore
java.lang.Object cannot be converted to greenfoot.Actor
By Randy., with 1 reply.
Replied to by danpost, over 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, over 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, over 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, over 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, over 10 years ago:
Ahh very helpful! Thanks a bunch :D
Score in different worlds
By rramos95, with 7 replies.
Last reply by rramos95, over 10 years ago:
Thank you so much. Its 100% working!!
Score in different worlds
By rramos95, with 2 replies.
Last reply by rramos95, over 10 years ago:
Ok, sorry for that.
Background music problem
By Cameronte10, with 1 reply.
Replied to by danpost, over 10 years ago:
If the 'bg' field was made 'static', you could change line 3 to: <Code Omitted>and it should work.
Strange bug with GreenfootImage.clear()
By TinyTertle, with 2 replies.
Last reply by TinyTertle, over 10 years ago:
That makes so much sense! Thank you so much!
Add Objects depending on variable
By Psychpsyo, with 2 replies.
Last reply by Psychpsyo, over 10 years ago:
Thanks! That is exactly what I needed.
How to do something on second click, when that second click is on the World.
By iansprograms, with 2 replies.
Last reply by danpost, over 10 years ago:
I would use an Actor field instead of an int click field (you may want to have more buttons to add different things into the world). This would be done by the following:
Movement with Animation
By Agent40, with 12 replies.
Last reply by danpost, over 10 years ago:
You can put your images in an array (like I did in mine). You can even place these array inside another array (make a double array): <Code Omitted>Then, when a change in keys is detected (or a change in direction facing), you can set the appropri
481
482
483
484
485
486
487
X