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
Controlling the movement of 2 objects with 1 class
By patrick26, with 7 replies.
Last reply by danpost, over 11 years ago:
Remove this from your PongWorld class: <Code Omitted>Your two 'addObject' lines for adding the paddles in the PongWorld constructor should look like this: <Code Omitted>In your Paddle class: <Code Omitted>Also, in the Paddle class, change your act method to this:
Limiting how many enemies spawn
By Ghost_Nixon, with 3 replies.
Last reply by danpost, over 11 years ago:
This is what I meant: Change line 37 to: <Code Omitted>
Variables in a Try / Catch statement
By CHAPMAF, with 7 replies.
Last reply by danpost, over 11 years ago:
CHAPMAF wrote...
How do i make an instance field?
This should have been a hint.
danpost wrote...
Variables declared within a method will only last until that execution of the method is completed.
Declare the field outside the method. Usually, they are placed at the top of the class code. Please refer to
Overview: Subclassing in Greenfoot
.
Shooting Left and other things
By Al7amed, with 5 replies.
Last reply by Al7amed, over 11 years ago:
Thank you man .. its work now
static / non-static confusion
By SandDealer, with 7 replies.
Last reply by danpost, over 11 years ago:
SandDealer wrote...
Allright so your sugestion is to make more wold classes (4 in this case) and therefore "Set" method should choose what world is active at the moment, am I right?
I do not see where anyone suggested that. davmac suggested that you pass a reference of the world through the to the 'set' method. This would mean your controler object needs to be in the world or a reference to the world will need to be passed either to the conroler object itself when you create it or to the 'createAmap' method when you call it. I suggest you make the 'izbor' string 'static' so that
Space game hit detection
By zworrub, with 8 replies.
Last reply by zworrub, over 11 years ago:
Thank you
Transfering information between parent and child actors
By Excelsior, with 12 replies.
Last reply by Excelsior, over 11 years ago:
I'm finally done with the project, here is the link : http://www.greenfoot.org/scenarios/11170 Sorry for bumping an old thread, couldn't figure out a way to PM you. Thanks for the help making this game! :D
Greenfoot Final Project
By Mkheo, with 3 replies.
Last reply by Mkheo, over 11 years ago:
Thank you guys and yes I should have explained. Rectangular selection- to mark a rectangle like in paint and work only on that area. Under RGB average I mean three separate values of pixels of colors R G and B divided by total number of pixels in a selected area.
Health on spaceship
By zworrub, with no replies.
dw
Wall issue
By Gaming_Cherries, with 1 reply.
Replied to by Gaming_Cherries, over 11 years ago:
I fixed the issue
Search returning 0
By JasonZhu, with no replies.
<Code Omitted> I have coded a binary search and I keep getting a result of 0. Can anyone pinpoint my problem? Thank you!
Difference between Desktop&Menue
By Rudolf, with 1 reply.
Replied to by Rudolf, over 11 years ago:
Here my World with the Desktop and the Menu below.
<Image Omitted>
changing loop
By Kabaka, with 1 reply.
Replied to by danpost, over 11 years ago:
Please refer to
The While Loop
and the
The For Loop
pages of the Java tutorials.
Scrolling glitch that I can't seem to figure out.
By Entity1037, with 3 replies.
Last reply by Entity1037, over 11 years ago:
Actually the glitch seems to still be present, however it only happens when the scroll stopper is a good ways onto the screen.
Explosion images
By chavi.malhotra@gmail.com, with 4 replies.
Last reply by danpost, over 11 years ago:
(1) create a GreenfootImage object from the file (2) create an array to hold the individual images (3) iterate across the image create GreenfootImage objects of frame size and draw the file image onto them using negative frame sized offsets and add them to the array (4) add a timer and a frame number field to your actor class to control which image will be displayed when
710
711
712
713
714
715
716
X