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
Recover deleted class
By mr_alex, with 1 reply.
Replied to by danpost, about 3 years ago:
mr_alex wrote...
I deleted a class without wanting to. How do I get it back?
You cannot, unless you saved your scenario under a different name with the class in it (or posted/saved the class somewhere else).
NullPointerException and I don't know why
By mr_alex, with 2 replies.
Last reply by mr_alex, about 3 years ago:
danpost wrote...
mr_alex wrote...
it throws this exception: <Code Omitted> The error must be in this Part of the code: <Code Omitted>
Correct. The
getWorld
method returns the world the actor is currently in. However, the actor is not in any world while it is being created (initiated). Fields with declared values are assigned during creation and the constructor is executed during creation. During that time
getWorld
will return a
null
value. You could override the
Actor
class instant method
adde
Making non-repearing numbers?
By TrippSci, with 14 replies.
Last reply by TrippSci, about 3 years ago:
Spock47 wrote...
It is "n-tuples" (i.e. list of numbers, ordered, with repetition), so the formula is k^n with k is the number of possibilities per feature and n is the number of features. So, in your case, you have 5^5 = 3125, so you already have the right number. I guess, there was a small typo in one of the lines in the method setPartNumbers: <Code Omitted>(n should start at 1, not at 5)
Thank you so much now its making much more sense!
Weird switch behaviour
By Windeycastle, with 3 replies.
Last reply by Windeycastle, about 3 years ago:
Aha! That's what I forgot! Thank you very much for the clear explanation!
Bilderwechsel nach drehung?
By Maxidino, with 20 replies.
Last reply by Spock47, about 3 years ago:
(english version follows below) getWidth liefert die Breite der Welt zurück. Insgesamt prüft die Bedingung <Code Omitted>ob das Schiff nahe dem Rand der Welt ist. Das tut sie in zwei Teilen: 1. getX() < 30 prüft, ob das Schiff am linken Rand der Welt ist: ob die x-Koordinate des Schiffes kleiner ist als 30. 2. getX() > getWorld().getWidth()-30 prüft, ob das Schiff nahe dem rechten Rand der Welt ist: die Breite (getWidth) ist auch die höchste x-Koordindate. Wenn also die x-Koordinate des Schiffes größer ist als Breite - 30, dann hei
my game wont play(link)
By Aaron-aid, with no replies.
https://www.greenfoot.org/scenarios/28696 when i boot this up on my laptop i get the error Your browser is ignoring the <APPLET> tag. i get it aswell when i run it on other peoples laptop at my school, but the other projects work just fine, the project has open code can anyone plz help!
using a variable from another class in the world class
By xixEmilyxix, with 43 replies.
Last reply by xixEmilyxix, about 3 years ago:
thank you its all fixed now
Failed to load applet only apeirs when i try to play my proj
By Aaron-aid, with no replies.
when i try to load my proj on the web page i get the error Failed to load applet but everyone elses games work, whats up with that?
Pulling items out of lists troubles
By Windeycastle, with 10 replies.
Last reply by Super_Hippo, about 3 years ago:
I think it should be <Code Omitted>
Converting Greenfoot scenario to Intellij
By ItzLukeStorm, with 1 reply.
Replied to by Spock47, about 3 years ago:
Basically, you just need to create a new project with the same source code in IntelliJ add the Greenfoot libraries to run. The process should be pretty much similar to the one described for NetBeans here: https://www.greenfoot.org/doc/running_on_netbeans Obviously, the menus in IntelliJ will look a little bit different than the ones in NetBeans, but apart from that, it should be the same principle. Live long and prosper, Spock47
Object automatisch auf der Y-Achse hin und her fahren lassen ohne Bilderwechsel?
By Maxidino, with 1 reply.
Replied to by Spock47, about 3 years ago:
Greenfoot ruft regelmäßig die act-Methode jedes Actors auf. Dort kannst Du entsprechend die automatische Bewegung und die Prüfung, ob das Schiff den Rand erreicht hat, einbauen. 1. Bewege das Schiff in der act-Methode der Schiff-Klasse, z. B.: <Code Omitted> 2. Nun prüfe, ob das Schiff eine Wende durchführen soll (wiederum in der act-Methode), z. B.:
After Car reaches bottom, how do I get it to the top in a different color? to simulate traffic?
By ethanbf, with 2 replies.
Last reply by ethanbf, about 3 years ago:
i saw you dishing out help and am truly blessed to have your response, thank you so much!
Unsichtbare Barriere einfügen?
By Maxidino, with 5 replies.
Last reply by danpost, about 3 years ago:
Line 3 needs some implementation for hitting water. Like: <Code Omitted>
Objekt auf x-Achse automatisch hin und her bewegen lassen und automatisch schießen lassen?
By Maxidino, with 1 reply.
Replied to by danpost, about 3 years ago:
Need fields: <Code Omitted> Constructor: <Code Omitted> In method:
Objekte vom oberen Rand ins Bild fallen lassen?
By Maxidino, with 4 replies.
Last reply by Bob2Joe, about 3 years ago:
Vergewissern Sie sich, dass Sie die vorherige Funktion act
52
53
54
55
56
57
58
X