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 do I stop music initialized in the super class of a world in one of the worlds subclasses
By christopherweiland, with 2 replies.
Last reply by danpost, over 11 years ago:
You may want to check out the java tutorials starting with the page on
Classes
. Of particular interest, might the the page called
Understanding Class Members
.
How do you use flags??
By vampire-wannabe, with 5 replies.
Last reply by vampire-wannabe, over 11 years ago:
@davmac the problem is I'm stupid and I need to set a flag at the tomato so one greep stays there while he helps the rest load the tomato onto their backs. I don't know how to do this..
Help Me Understand Arrays
By plant, with 3 replies.
Last reply by danpost, over 11 years ago:
Before trying to explain what an array of Tile objects (see line 4 of the Tiles class) is, let us start with something a little more basic (since you know what int and boolean are). An array is used to essentially store in memory more than one value (usually) using the same field name. The values stored are indexed (starting at zero) so that any value (or element) within the array can be directly accessed. These elements can be of one of the primitive types (int, double, boolean, char, etc.) or of a reference type (String, Font, Color, Tile, etc). Once an array is created, its size is im
Adding same Objects that act seperatly
By xWanna, with 15 replies.
Last reply by danpost, over 11 years ago:
xWanna wrote...
How to do it? << get number of intersectors minus line of sight objects (count) >> I think with a list, but can you tell me?
You will be getting a List object from the return of 'getIntersectingObjects', at any rate. However, you could determine the count this way: <Code Omitted>where the final count will be two plus the number of objects that actually interfere with the line of sight. If you have other objects that should not be considered as ones that interfere wi
Trouble Calculating Reflection Angles of Ball and Tilted Paddle
By polar568, with 4 replies.
Last reply by polar568, over 11 years ago:
Thank you for the help! That solves my problem!
Need help creating shooting command
By emadrid3, with 2 replies.
Last reply by emadrid3, over 11 years ago:
Hey I got it down. I used a firing method similar to that of Greenfoot Space Invaders. From there I used the animal class to make the shell eat the bomb then a destroy command.
How do you make an another object come out of a player?
By _E_X_B_R_Arjay, with 5 replies.
Last reply by _E_X_B_R_Arjay, over 11 years ago:
Thx so much danpost! you really help a lot. i finished my game now thx to you.
Problem with implementation of scrolling world and fullscreen
By lighoa, with 14 replies.
Last reply by danpost, over 11 years ago:
lighoa wrote...
1. What changes did you make to the ModWorld and ModActor classes?
Like I said, I had to totally re-write those classes; I ended up with this for the super world class ('ModWorld' is now named 'FullScreen'):
returning strings and setting them as strings in other classes?
By h123n, with 1 reply.
Replied to by h123n, over 11 years ago:
Never mind, I had some help and it's done now, thanks to anyone reading this.
Identifier expected error - No idea why
By nandr31, with 1 reply.
Replied to by danpost, over 11 years ago:
Compare lines 3 and 4 of both code posts. The second set of lines has access modifiers and either a type or a name (I cannot be sure which); but the lines are missing one of them.
Greenfoot Scenario too Big to Upload
By Seriamus, with 2 replies.
Last reply by Seriamus, over 11 years ago:
Oh, wow, you were right. The music was unnecessary anyways, so I just removed it -- cleared an amazing amount of room, and was able to be published. Thank you!
Describe a situtation where the canMove() method would result in a false?
By spazonred1998, with 3 replies.
Last reply by danpost, over 11 years ago:
Where did you get the 'canMove' method? what is its code? The Actor class provided by greenfoot does not contain a 'canMove' method. Without seeing it code, it is impossible to say what it does or what it will do in any situation. The only other thing we could do is maybe suggest that you just test it out yourself to see what it does.
How to make an object go up or down?
By leonard.ross@waldenu.edu, with 6 replies.
Last reply by AGABloggers, over 11 years ago:
Thanks so much!
Trying to instal Greenfoot.
By petrinet, with 1 reply.
Replied to by lighoa, over 11 years ago:
http://www.greenfoot.org/support Try this page- it usually fixes all the problems you might have. If you're using an .msi file, make sure your operating system is windows (preferably 7 or later). Redownloading Greenfoot also fixes most situations. If the problem still incures, post your OS, JDK version, Greenfoot version, and all other error messages.
Help with following
By Bert389, with 1 reply.
Replied to by danpost, over 11 years ago:
When you say that the image of the hero is the image of the background when camouflaged, do you mean that the hero is essentially invisible? Line 11 checks to see if the 'camoHero' image is set as the image of the villain. Is that really what you want to check? And, in either case, the images will not be the same unless 'camoHero', specifically, is set as the image (creating a new image from the file "space.jpg" file will never be "the same image" as one already created and set (they are two distinct object and one is not the other and comparing them with '==' will always return a false v
559
560
561
562
563
564
565
X