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
Problem with keyboard input
By Thieves, with 1 reply.
Replied to by danpost, about 11 years ago:
The best thing to do is to keep them off the walls: (1) move (2) if intersects wall, move back
Floating Danpost "Progress Bars" (Health Bars)?
By Cam9731, with 6 replies.
Last reply by danpost, about 11 years ago:
One more thing needs to be dealt with. We need to remove the healthBar of the zombie before removing the zombie. So the 'act' method should be more like this: <Code Omitted>
Boolean true false statements
By zyxelementxyz, with 3 replies.
Last reply by danpost, about 11 years ago:
Another thing -- with the code as it is written (referring to the last 'if-else' segment), you have no movement to the pinball after contact with the bumper. It will just rotate in place (it will still be on the bumper on following act cycles).
How do i make my program detect when 2 objects have collided?
By LiquidFang, with 2 replies.
Last reply by LiquidFang, about 11 years ago:
OK, thank-you. Completely forgot about the tutorials!
Function call?
By Dalvengyr, with 4 replies.
Last reply by davmac, about 11 years ago:
How about calling getWorld() over and over again? Is that an excessive process?
No, as I've said, it's unlikely that you'll see a measurable cost to function calls.
How to make an int go up once
By BrownBoii333, with 7 replies.
Last reply by danpost, about 11 years ago:
Add an instance boolean field to the class for tracking the state of the button -- call it 'buttonDown' (or you can be more specific and give the button name in the field name; like 'spaceDown' or 'xDown'). The two conditions for incrementing on a button down action would be (1) the 'buttonDown' field is currently 'false' and (2) the 'isKeyDown' method returns 'true'. The two conditions for the button up action would be (1) the 'buttonDown' field is currently 'true' and (2) the 'isKeyDown' method returns 'false'. In both 'if' blocks, you will change the value of the 'buttonDown' field and i
Passing variables to other classes
By gamer121, with 3 replies.
Last reply by danpost, about 11 years ago:
The value of the constant CELL_SIZE in your Ground class is declared with an assigned value of 20. My last post shows ways you can use to have that value accessible to other classes.
Help with image
By emilpro01, with 7 replies.
Last reply by danpost, about 11 years ago:
Maybe you do not understand the reason behind my last comment. If you do not set anything to the image fields ('image1' and 'image2') then what do you think would happen if you tried to set one of them as the image for your actor?
invalid method declaration return type required
By greenfoot1, with 3 replies.
Last reply by danpost, about 11 years ago:
This message, 'invalid method declaration return type required', is trying to tell you that you need to include type declarations to the elements within the round brackets. When the compiler reads this line (line 22 above), it recognizes that you are declaring a method or constructor. It will then need to know certain things about it so it can direct the calling statement(s) to it. Mainly, it needs to know the name of the code-block and the
order
and type
of the arguments passed to it. I have never seen literal values as arguments -- only have I seen variable names (with thei
Let an object face another object not working
By UNDEAD_DC, with 5 replies.
Last reply by UNDEAD_DC, about 11 years ago:
Yes your code worked. Made it so that when the Humvee hits the side now it gets "teleported" to the other side of the screen. Thank you so much for helping
Defining an instance constant?
By CKnox, with 12 replies.
Last reply by danpost, about 11 years ago:
You need to draw the lines on the world background to produce the edges of the cells (horizontal and vertical lines gapped by the value of CELL_SIZE pixels). The default background image of the world has a default drawing color of WHITE, so it will need to be changed before drawing the lines.
Memory leak
By Dalvengyr, with 6 replies.
Last reply by Dalvengyr, about 11 years ago:
Right. Thanks for the information :)
Linux installation fails...
By zuppeline, with no replies.
The installation under Ubuntu 14.04 fails... Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-6/openjdk-6-jdk_6b32-1.13.4-4ubuntu0.14.04.1_i386.deb 404 Not Found Does anyone have a clue? My mistake or Server Error?
Hey i need some help! :)
By Erdrag, with 4 replies.
Last reply by Erdrag, about 11 years ago:
<Image Omitted>
Turn Based Game?
By Lifeslayer, with 10 replies.
Last reply by Lifeslayer, about 11 years ago:
danpost wrote...
Have you any experience with object-oriented languages? if not (and, even if so), start
here
for everything java related.
I have knowledge in HTML, VBScript, .NET
629
630
631
632
633
634
635
X