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
Heap space
By Roshan123, with 8 replies.
Last reply by Roshan123, over 5 years ago:
Yes Boss!!!
Greenfoot.getKey() with Shift
By MrBradley, with 2 replies.
Last reply by MrBradley, over 5 years ago:
This was what I was hoping, but getKey() consumes the key and only scans a single key. It seems to me that getKey() should return a KeyInfo object, like MouseInfo, that also stores key combos like SHIFT+ and CONTROL+ and ALT+. At least it should remove SHIFT and CONTROL from consuming the intended key press. I could try using isKeyDown("") but .... Most importantly, the documentation states that getKey() recognizes Uppercase: "getKey() also returns uppercase characters when appropriate." But even with the CAPS LOCK on, getKey() does not return uppercase letters. I'm left wondering wh
Generating javadoc
By PaulRosca, with 3 replies.
Last reply by danpost, over 5 years ago:
Private fields and methods are not documented in the java documentation. They are considered internal to the class.
Serialization to save objects into a file
By rocket770, with 2 replies.
Last reply by rocket770, over 5 years ago:
Hi, thanks! Based on that idea, I wrote a file Parser that stores only the Walls Array for each cell as a byte. <Code Omitted> This seems to be wo
JNI Error
By Reubenthekiwi, with 2 replies.
Last reply by PaulRosca, over 5 years ago:
Are you running the .jar with the command provided by Greenfoot when exporting the scenario? It wont' work otherwise.
Greenfoot is acting weird on different devices
By Roshan123, with 2 replies.
Last reply by Roshan123, over 5 years ago:
Thanks a lot for it........◉‿◉
How do I make a transition between two worlds
By Just_in, with no replies.
Example: You are a Person and Walk in a wood. The next World is the End of the wood. You cant reach this in World 1 but in World 2. Trees got a hitbox. How to reach World 2 with your People?
Removing label class
By Roshan123, with 2 replies.
Last reply by Roshan123, over 5 years ago:
Ok, thanks for helping me out....
Help with spawning objects at random places (tictactoe)
By Al3xTheKing, with 1 reply.
Replied to by rocket770, over 5 years ago:
I think you're trying to find a spot on the board that has not been already used and since I don't know your code something similar to this might work? Pick a random Spot on the grid While the chosen spot on the grid is marked as a cross pick another spot Place Circle on the chosen spot
Problem with visualising multiple times during one act()
By 00swinter, with 1 reply.
Replied to by nccb, over 5 years ago:
You may want to try calling repaint() on the world after each step. By default Greenfoot only repaints after each act() round.
reference classes
By Patdumas77, with 2 replies.
Last reply by danpost, over 5 years ago:
rocket770 wrote...
If your Play Class is an object in the world you can reference it by this: Play play = getWorld().getObjects(Play.class).get(0); And now you should be able to access its attributes with for example play.PlayPause();
Typecasting is required for that assignment to be effective: <Code Omitted>
How to make an Actor(numbers of Actor) equal X?
By Kulo, with no replies.
So I made a zombie game where the zombies follow the Survivor(see below) but now I added the feature that zombies spawn and because of that the code has stopped working. So the question is how to make the Zombies equal X to make it work. Sorry for the bad desription. Thanks for your suggestions. <Code Omitted>
How do i have multiple levels?
By MrSkyPanda, with 1 reply.
Replied to by rocket770, over 5 years ago:
If you're checking a certain spot you can use it's X and Y Coordinates you can use this in your Character class: If(getX() == xlocation && getY() == ylocation){ Greenfoot.setWorld(new WorldNameHere()); } Where xlocation and ylocation are the coordinates of the spot you want to change the world. Alternatively, you can use an object that will change the world on collision. In your character class you add this line of code: If(isTouching(ObjectCLassName.class)){ Greenfoot.setWorld(new WorldNameHere()); }
Static int won't decrease.
By ItzLukeStorm, with 4 replies.
Last reply by Roshan123, over 5 years ago:
Welcome!!!!
getMicLevel does not work
By Mannu, with no replies.
In the Greenfoot book task 3.32 the method Greenfoot.getMicLevel should be used. While the sound-recorder and so my micrphone work, the method does not give any return value higher than zero. Can anybody help me to make the method work?
98
99
100
101
102
103
104
X