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
Void Act Wombat
By Thor_21, with 1 reply.
Replied to by danpost, almost 7 years ago:
What happens when the wombat gets to the edge of the world (which way does it turn)? which way does it then move? what about when it reaches the next edge?
Wombats & Leaves circling
By 20summer, with 1 reply.
Replied to by danpost, almost 7 years ago:
Just how the code currently works. Change it if you want.
Turning Wombat
By Spiderman01, with 1 reply.
Replied to by danpost, almost 7 years ago:
Gotta' leave something for you to build your programming skills on.
Help with Wombat Movement
By Kanye4Prez, with 1 reply.
Replied to by danpost, almost 7 years ago:
Increase the value of the argument in the
move
command.
Wombats and Leaves Edge of World
By FreeBobby2020, with 1 reply.
Replied to by danpost, almost 7 years ago:
The wombat is not coded to move away from the edge of the world once it is arrived at. So, any leaves remaining in the interior of the world will not then be found.
Wombats and Leaves Question
By Biscuits1, with 3 replies.
Last reply by danpost, almost 7 years ago:
First, the
act
method will have the wombat do one of 3 things. In order, it will either (1) eat; (2) move or (3) turn (see lines 24 through 32). In order to move, the returned value of
canMove
must be
true
(lines 27 through 29, specifically). The
canMove
method returns
true
only if the wombat is not facing a wall. As previously mentioned, if the wombat does not move, it will turn (left, specifically). Therefore, once the wombat finds an edge, it will turn to move counter-clockwise along the edges of the world.
Greenfoot Rectangle
By utsabdahal, with 1 reply.
Replied to by danpost, almost 7 years ago:
utsabdahal wrote...
code for making a wall of rectangle please.
First create a subclass of
Actor
and give it an image or have it create one. In you run into problems with your code, then post what you ended up with for help.
GIF frames overlap
By AndreiTheMagic, with 2 replies.
Last reply by nccb, almost 7 years ago:
We did have a bug in the GifImage class which meant that certain GIFs did not clear their image properly between frames. This is fixed in Greenfoot 3.5.3 -- you'll need to install the new version, delete the GifImage class in your scenario, and re-add it via the Import Class functionality. That should hopefully fix the issue.
Wombats and Leaves
By blue_murph47, with 1 reply.
Replied to by danpost, almost 7 years ago:
blue_murph47 wrote...
In the Wombats and Leaves game, I had placed 13 Wombats and 3 leaves, after I let it run, it appears there are only 8 Wombats running in the circle after they are done eating. Why did this happen?
Try stopping the scenario and mouse drag each wombat.around.
wombats
By eagles5218, with 1 reply.
Replied to by danpost, almost 7 years ago:
eagles5218 wrote...
why do the wombats not eat all the leaves and just go in a circle
You will need to show the Wombat class code that goes with this question.
Can somebody tell me if this is good?
By Claw76, with 1 reply.
Replied to by danpost, almost 7 years ago:
Claw76 wrote...
This is my idea for a Button class and I wanted to know if it is a good idea. I saw some ideas how to create Buttons, but nobody never really came up with a solution like this (as far as I know). However, I also wanted to know if there are improvements that could be made and if there is a way that the Button class doesn't need to inherit from the Actor class. Please reply. This is the code from the Button class: << Code Omitted >>
As far as inheriting Actor, you will need an
Actor
object to display the button in greenfoot unless you modify the background image o
Help with this code.
By WhiteSorcerer03, with 12 replies.
Last reply by danpost, almost 7 years ago:
When I said:
Right click on the boy and select '
Inspect
'. Do the values appear to be okay, or is something off?
you responded with
No it seems to be fine.
Did you not see a bunch of
null
values (for the images)? Would that not seem off?
Score is not increasing when I pickup a coin
By denizkb, with 1 reply.
Replied to by Claw76, almost 7 years ago:
<Code Omitted>This is the code I came up with, when seeing your project and your problem. You need to put it into the sprite class I hope it will help you. (I didn't test it)
Turn towards mouse help
By 343qwm29, with 1 reply.
Replied to by Claw76, almost 7 years ago:
<Code Omitted>Hey 343qwm29, I hope this line of code will help you... A little hint: When you don't know how to do something, but you have an idea what your code has to do, go to your Greenfoot Scenario and click on "Help" and then on "Greenfoot Class Documentation" where you can find almost every method that Greenfoot has, and how to use it.
Object should know which objects another object touches
By Kilian, with no replies.
I want that my object trefferpunkte changes the value of a private int variable when the ball which is touching trefferpunkte is touching a patrone.
215
216
217
218
219
220
221
X