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
Help with pacman ghost AI
By beastonion, with 2 replies.
Last reply by beastonion, over 8 years ago:
danpost wrote...
The Pacman is supposed to run into walls .. not you. The 'getOneObjectAtOffset' method uses offset values, not absolute coordinate values in its parameters. Remove all 'getX()' and 'getY()' from between the parenthesis of the method calls. That is, lines 2 through 5 should be: <Code Omitted>You may need to use a larger value than '2' as the o
Make actor disappear upon hitting a Wall.class
By wowi132, with 10 replies.
Last reply by wowi132, over 8 years ago:
Thank you, that solved it for me :)
Actor disappear upon hitting world edge error?
By wowi132, with 2 replies.
Last reply by wowi132, over 8 years ago:
Thank you very much, it is solved now :)
Greenfoot Freezing
By 123kevyd, with 1 reply.
Replied to by davmac, over 8 years ago:
See the information on
getting technical support
. Amongst other questions you'll need to answer are Greenfoot version, operating system and version, contents of debug log.
Image Manipulation New
By danpost, with 13 replies.
Last reply by danpost, over 8 years ago:
ironphoenix20 wrote...
I can do this to create a new world each time I need to use the turn90() method?
Experiment with it.
Can anyone see my Mistake, why doesn't it work?
By Unknown6415, with 19 replies.
Last reply by danpost, over 8 years ago:
Unknown6415 wrote...
And how can other classes acces to the time of the gunner? until now I did it with Gunner.time1 becuase the time was public static int but now it doesn't work that way
The Gunner class is an extension of the Attacker class. Every object from any class that extends the Attacker class will get their own instance of any non-private, non-static field declared in the Attacker class. They even get the private ones; but do not have direct access to those fields.
DefaultListModel
By Yehuda, with 13 replies.
Last reply by Yehuda, over 8 years ago:
This can (also) use some assistance.
Yehuda wrote...
With that coding the image is always on the left side of the element. Is there a way for me to specify where in the element it's placed?
how do i make that if its a certain score it adds an object
By makpatel123, with 1 reply.
Replied to by danpost, over 8 years ago:
makpatel123 wrote...
how do i make that
if its a certain score it adds an object
You practically stated exactly what the code would say. You may need to add another condition so that you do not repeatedly add objects while the score sets at that value.
How do I get a actor to respawn after it disappears
By makpatel123, with 2 replies.
Last reply by makpatel123, over 8 years ago:
thank you
How add button level to world selectlevel
By iban, with 4 replies.
Last reply by danpost, over 8 years ago:
iban wrote...
you can see my project .. pleaseee,, you must download my project and you see the button, i want add the button level to world selectlevel. please mr.danspot
Create an actor for the button. Have the world create and add a button to itself.
How do I delete Parts of a GreenfootImage?
By Benni, with 2 replies.
Last reply by Busch2207, over 8 years ago:
Hey! In this case you have to work with Non-Greenfoot-Classes (AlphaComposite, Graphics2D and Rectangle). You can use this: (I also added a 'reset'-method in case you want to be able to reset the black screen)
Help with sorting an array of objects
By Asiantree, with 17 replies.
Last reply by danpost, over 8 years ago:
Asiantree wrote...
Like this? <Code Omitted>Sorry I am extremely close to finishing this, and your help has definitely been appreciated.
I think your comparisons of the totals is not correct for the order you want (change the 2nd '<' to '>'). FYI, you either switch the order of elements compared or switch the comparison operator, but not both, as that just results in no change in the comparison at all.
The ball needs to bounce in a random direction, except in 90 and this is for a ping pong game
By Beatmaster42, with 11 replies.
Last reply by Beatmaster42, over 8 years ago:
Thanks for the help and the sound started to play after I restarted my computer. thanks again
Array and addObject Help
By UnusualGorilla, with no replies.
So I am trying to make it so that if I press the "L" key a file dialog will pop up, and take three integers (the rgb colors) to create a new ball. However, the only thing that happens is the first ball will be added to the world, but the rest of the balls are not added to the world. Could anyone help me figure out what I am doing wrong? I have included the three classes that are needed for this code. <Code Omitted> <Code Omitted> <Code Omitted> Thanks in advance!
Code to make a number gradually grow
By RustuMan, with 3 replies.
Last reply by danpost, over 8 years ago:
RustuMan wrote...
So how would that look. Its not really working for me.
Insert the following line in the act method: <Code Omitted>
354
355
356
357
358
359
360
X