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
How to extend map?
By comandodude101, with 1 reply.
Replied to by comandodude101, over 13 years ago:
Never mind I figured it out I just went into the world class and edited the size so never mind.
How do you grab an object?
By mike123, with 3 replies.
Last reply by mike123, over 13 years ago:
thanks guys :)
chance method
By Beginningatdawn, with 1 reply.
Replied to by paul10y, over 13 years ago:
maybe if(Greenfoot.getRandomNumber(100)<10){ } or what do you mean?
How to you rotate an object to face another object?
By mike123, with 10 replies.
Last reply by danpost, over 13 years ago:
Do you have a reference to an Actor named 'lorry' declared in the class? What is the code to the 'BinBump()' method?
inertia
By behappy2, with 10 replies.
Last reply by behappy2, over 13 years ago:
thx
Code
By joseph.stafford2@waldenu.edu, with 11 replies.
Last reply by behappy2, over 13 years ago:
ok, so put all the lookforsmting() stuff into eat thx
Maze Collisions Help PLEASE!!!
By gamrman, with 12 replies.
Last reply by ManiacalPenguin, over 13 years ago:
make a variable to store the x and y values of the object that you don't want to go through the maze private int x; private int y; the method to make it stop at walls is simple public void stopAtWalls() { if (getOneIntersectingObject(Wall.class) != null) { setLocation(x,y); } else { x = getX(); y = getY(); } }
Collision Detection Problem
By MrBunni, with 3 replies.
Last reply by MrBunni, over 13 years ago:
Thanks for all the suggestions, I'll go with splitting height in images since I can implement that fairly easy but is still quite good.
Pausing scenario
By Brina, with 1 reply.
Replied to by danpost, over 13 years ago:
The easiest way is to instantiate a different world that shows the title page and waits for the enter key to be pressed, when the crab world would then be instantiated.
Help for a new guy
By TheStop, with 1 reply.
Replied to by danpost, over 13 years ago:
The Java tutorials
- this page has all the links neccessary to get you on you way in learning the language. The second section on the left 'Trails Covering the Basics' is the place to start. There is also a link to the API documentation a little bit down on the right side in 'Other Resources'.
Greenfoot Documentation
- this page has links to instruction on using Greenfoot; plus links to videos and the Greenfoot API.
Real quick question
By BradH, with 1 reply.
Replied to by danpost, over 13 years ago:
Line 7 compares a class with a number. Obviously, that cannot be done; hence the error. You need to compare the number with the size of the list of items of that class that are in the world. <Code Omitted>Lines 2 and 3 are not needed at all.
Urgent help
By lonely.girl, with 26 replies.
Last reply by lonely.girl, over 13 years ago:
Thank you so much for your help :)
Actor Lives
By ctgreenfoot, with 5 replies.
Last reply by danpost, over 13 years ago:
@Peach, it might be good for you to review the Java Trail;
Learning the Java Language
. The section on 'Classes and Objects' explains how to write methods. The section 'Language Basics' has most of what you will need to get started in programming.
Little Crab 5 scenario- red worms
By Peach, with 7 replies.
Last reply by Gevater_Tod4711, over 13 years ago:
If the compiler cant find the variable wormsEaten you haven't declared it or you have declared it but somwhere (probably in an othere class) where you cant find it from your worm class. Have you got a variable wormsEaten somewhere? If yes show us the code then we can help you.
non-static methods
By Peach, with 1 reply.
Replied to by danpost, over 13 years ago:
The name of your lobster object is 'lobster2'. The class name that the object was created from is 'Lobster'. You cannot set the location of a 'class'; only an object. Try the following <Code Omitted>The line 'Lobster.setLocation(390,200);' tries to set the location of a class. The line'Lobster2.setLocation(28,546);' tries to set the location of an undefined object (Lobster2 is not lobster2 -- Java is case sensitive).
903
904
905
906
907
908
909
X