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
А как запустить(сохранить) проект гринфута без рамок(без обозначения классов)?
By kirill2202, with no replies.
а?
greenfoot and minecraft
By GoCards52, with 5 replies.
Last reply by Proprogrammer04, over 7 years ago:
Oh ist named
miniminecraft
Actor Rotation
By akosibrennan, with 1 reply.
Replied to by Proprogrammer04, over 7 years ago:
just write in act() <Code Omitted>instead of Five, you can use any number. Play around whith different settigs ;-)
TWO ACTORS DOESN'T SEEM TO TOUCH EACH OTHER BECAUSE HEALTH BAR DOESN'T DECREASE EVEN IF THEY TOUCH :(
By gdrgnxxi, with 5 replies.
Last reply by nccb, over 7 years ago:
You are not resetting touchingTrash back to false when you are no longer touching the trash. So the health would only decrease once in the above code (after danpost's suggestion which clears up another issue). You need to add an else on the if (Trash != null) to set touchingTrash to false.
I think its called "access to another class??" idk
By Khypex, with 3 replies.
Last reply by danpost, over 7 years ago:
Khypex wrote...
so its impossible creating an object from another, while the game is running?
I did not say that. In fact you did create one. You just did not add it into the world.
HEALTH BAR UPATE
By gdrgnxxi, with 6 replies.
Last reply by danpost, over 7 years ago:
In your
atEdge
method, your conjunction is wrong. Using '&&', you are restricting the check to the corner where the two edges meet. Also, you should probably be using '>=" as the actor could pass right over either of the exact given coordinate (although, I do not see why you check along the x-axis at the right edge since the actor only moves straight down).
can't create new subclass etc.
By Limthu, with 2 replies.
Last reply by Limthu, over 7 years ago:
it appears and I can click on "add new subclass", then it loads and.. does nothing, popup menu stays
Game works on local pc but not online
By IT-Wombat, with 10 replies.
Last reply by IT-Wombat, over 7 years ago:
danpost wrote...
To have your pen viewed at all times and on any color, you can give it a double border -- say white and black. In the two images used for blinking, have the two colors reversed (black on outside for one and white on outside for the other). The main color can remain constant, which would avoid any confusion as to which color it will actually paint in. When the pen is down, stick to only one of the images.
I deleted my part with the brighter()/darker() method and solved my issue with a simple inside black circle, that indicates the pen up status. Thanks for your help
Group AI.
By Notted, with 10 replies.
Last reply by Notted, over 7 years ago:
I may want to migrate my project unto your project, as the implementation into mine is getting clunky and awkward.
Very basic question
By CodeTime, with 1 reply.
Replied to by danpost, over 7 years ago:
CodeTime wrote...
So I have some questions about code and how I could change it. (this came from the tutorial. << Code Omitted >> How would I change it if my world class is named "earth" for example?
It does not matter what your
World
subclass name is. All instances of subclasses of
World
are still
World
objects. So, the code need not be changed if you change the name of the
World
subclass. Now, although not necessary, you could be more specific as to what type world it actually is by changing line 2 to the following: <Code Omitted>This de
New Greenfoot Broke My Game (supposedly)
By trianburner, with 9 replies.
Last reply by nccb, over 7 years ago:
Hmmm I can't see a way that setLocation can remove the actor from the world, though. Sorry for all the hassle, but would you be willing to send us the scenario for us to try it out? This looks like a bug in Greenfoot as that exception shouldn't be thrown, but I'm struggling to see exactly how it happens at the moment. If you are happy to email the zipped scenario to support@greenfoot.org then we will take a look, fix anything on our end, and also advise you on a work-around.
Explode the Rocket
By Celesterra, with 10 replies.
Last reply by Celesterra, over 7 years ago:
It works now! All I had to do was change it to equal 4 instead of 5. Thank you all!
Implementation of Gifs
By Karsten, with 1 reply.
Replied to by danpost, over 7 years ago:
You will need to provide more code. The full class of the actor and possibly your World subclass as well.
Greenfoot Jar is not working
By leney, with 1 reply.
Replied to by nccb, over 7 years ago:
This may be an issue with Java version. If you are double-clicking the JAR in Windows, it will use whatever version of Java happens to be the primary version on your machine. If this is not Java 8 (especially if it's Java 9 or later), that won't currently work well with Greenfoot's exported JARs, which currently only work with Java 8 (until we update to Java 9+ in future). Best work-around is to use a batch file as you describe -- you can try changing which Java is associated with .jar files but it's probably more trouble than it's worth, especially if other applications on your system need
focusedProperty not updating
By JohnDoeWasTaken, with 1 reply.
Replied to by nccb, over 7 years ago:
This is a hack that we don't officially support... but having said that, the code looks like it should work. Technically you should add the focus listener on the JavaFX thread but I doubt that is the issue. If you run the exported program from the command line, do you see any exceptions in the console? Maybe add some System.out.println lines to check which parts of the code are reached.
192
193
194
195
196
197
198
X