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
not a statment error?
By Spooks, with 5 replies.
Last reply by Spooks, over 11 years ago:
danpost wrote...
Spooks wrote...
I figured it out, you cant do the exclamation point when calling a method
Actually, you can. But it would not make any sense to do it alone; and the method would have to have a boolean return type. For example, it would make sense to use it in the following ways:: <Code Omitted> Using any one of the following is meaningless:
[Help] Make object Follow Another Object Movement
By fayde, with 6 replies.
Last reply by danpost, over 11 years ago:
darkdaser wrote...
What do you meen with "dx" and "dy"?
The refer to the positional offsets (the amount of movement) along the horizontal and vertical axes -- the change in value of the location coordinates for the given movement.
interaction with object/ object dropping garbage
By dionyman, with 2 replies.
Last reply by danpost, over 11 years ago:
Work on one thing at a time. What have you tried as far as the children dropping garbage?
Help needed with code
By YellowThundy, with 4 replies.
Last reply by danpost, over 11 years ago:
You need to explain what behavior you want for the forcefield -- how it should react with other objects (like the enemies). As is, the behavior is that the forcefield will move diagonally up and to the left quickly with each enemy in range. It could end up moving as much as two-thirds across the screen in under half a second (with just one enemy).
Creating chess game--how do I check when two objects overlap?
By needcodehelp, with 1 reply.
Replied to by davmac, over 11 years ago:
Please read
>this<.
(Hint: you can use getOneIntersectingObject or one of several other methods for this.)
HELLLLLLLLLP!!! (pretty please) For loop question!
By GreenfootNewbie, with 1 reply.
Replied to by danpost, over 11 years ago:
As far as deleting all the images manually placed -- no. Just re-compiling the project will remove them. As far as the code -- there was no mention in the instructions of any randomness; also, if they are to be placed horizontally across the top and across the bottom, there would be no change in the y coordinate for either the Me or the Face objects and dividing vertically by 8 has no bearing on the placement unless you want to use that value to place the rows of objects at that distance from the top and bottom edge. The 'for' loop parameters you are using will only produce 7 objects; t
why did I get this answer wrong?
By SOUPNAZI, with 7 replies.
Last reply by lordhershey, over 11 years ago:
Even with the fix the test question is still wrong. :/
Question confusion?
By SOUPNAZI, with 5 replies.
Last reply by danpost, over 11 years ago:
The problem is that the 'move' method provided by the Actor class has the signature 'move(
int
)' while the one in the Animal class has the signature 'move()'. You can use 'move(int)' from any Actor subclass (including the Animal class) because that method is defined in the Actor class; for the same reason, you can only use 'move()' from any subclass of Animal (or from the Animal class itself, since it is an editable class).
Actor not in world. An attempt was made to use the actor's location while it is not in the world.
By IronMagus, with 3 replies.
Last reply by danpost, over 11 years ago:
IronMagus wrote...
code: <Code Omitted>
Line 3 creates a new Hero object and line 4 tries to get its x coordinate in a world; however, it has not been added into any world (you may have a Hero object in the world, but it is not the same Hero object referenced here).
how do i make an actor class into an arraylist.
By 5mark7, with 10 replies.
Last reply by danpost, over 11 years ago:
You might be interested in the java tutorial trails. The second section on the left titled
Trails Covering the Basics
would be a good place to start.
Searching for someone to draw a png
By DerAstronaut, with 2 replies.
Last reply by DerAstronaut, over 11 years ago:
Thank you :)
how do I change rotation by 5 degrees?
By ipeefreely, with 1 reply.
Replied to by azazeel, over 11 years ago:
setRotation(getRotation()+5); or just turn(5);
whats the value of x after thie statement has been executed?
By SOUPNAZI, with 1 reply.
Replied to by azazeel, over 11 years ago:
x=0; y=4; x=y+3; // x = 4+3 = 7 x=x+2; // x = 7+2 = 9
Looping sound?
By NewToJavaPlt, with 2 replies.
Last reply by NewToJavaPlt, over 11 years ago:
thank you i got it
Urgent Help! "java.lang.StackOverflowError"
By Ariadia, with 6 replies.
Last reply by Ariadia, over 11 years ago:
Okay, thank you! :)
564
565
566
567
568
569
570
X