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
Hello, I have been trying to change the color of the body when it bounces off the edge in Newton's Lab 3. Here is the current code:
By Mack, with 18 replies.
Last reply by DragoMail, about 11 years ago:
Were you able to figure it out? if so, please pst your code
Walking through a wall
By USE1ESS, with 1 reply.
Replied to by USE1ESS, about 11 years ago:
figured it out which numbers i had to change : Line 9: int searchRightWall= (int)(playerWidth/
-2
); Line 27:int newX = rightWall.getX() -(playerWidth + getImage().getWidth())/
-2
; Line 28:setLocation(newX
+5
,getY());
Flappy bird game needing help
By alba1888, with no replies.
Hi there I am making a flappy bird game for college and wondering if anyone could give me a code that will make the bird spin or pick up power ups that will make the bird be indestructible for 5 seconds with a countdown on screen. Probably asking for too much thanks
What is the error if (points <0 &&> 20) in Greenfoot?
By Windows10, with 1 reply.
Replied to by davmac, about 11 years ago:
It's not valid syntax, and it doesn't make logical sense either. You possibly want: <Code Omitted> That is "if points is greater than 0 and points is less than 20".
Unable to add enemies once enemy gets killed
By pintoo, with 6 replies.
Last reply by pintoo, about 11 years ago:
Thanks a lot dan . I got the code working after a little change
I'm new to coding an I was wondering if I can get some coding help.
By Jason21, with 15 replies.
Last reply by danpost, about 11 years ago:
Jason21 wrote...
Okay I got that part now. But if it says "cannot find symbol - method addnewColor (java.awt.Color,int,int) would I just declare the variable like this? <Code Omitted>
'addnewColor' does not appear to be a variable -- but a method. You supplied that part of the code. I presumed that you had a method with that name. If you do not, then -- why would you even be calling it?
How do I make a loop to draw triangles at different (not random) places
By kitkatsxp, with 1 reply.
Replied to by danpost, about 11 years ago:
kitkatsxp wrote...
I know that I have to do something to change the xvalues of the triangle, but i'm lost
It is not the x values of the triangle, but the x values of where the triangles are drawn onto your world background. There are two main values of importance here -- the x value for where the left-most triangle is drawn at (call it 'x0') and the distance between where each triangle is drawn (call it 'xOffset'). If the iterator is 'i' and counts from zero to less than four, then the x values would compute to: <Code Omitted>
I need help with displaying the gravity constant near the bottom center of the screen
By smith_001, with 4 replies.
Last reply by BearCarlson25, about 11 years ago:
stfu nerd
Problem with Greenfoot.getRandomNumber();
By onny_07, with 12 replies.
Last reply by onny_07, about 11 years ago:
Finally, it works. Thank you so much for helping me. I really appreciate it. Keep helping me, if I get stuck next time. :D
I don't know the correct coding to be able to click in the world and add a new object. Can someone help?
By Mack, with 3 replies.
Last reply by Mack, about 11 years ago:
okay never mind I got it. Thank you soooo much danpost you rock!!!!
It keeps saying "illegal start of expression" PLEASE HELP!
By lpiggott, with 2 replies.
Last reply by DogeOverlord, about 11 years ago:
Should be:
Bouncing actor off wall without reversing image
By bkatrina, with 2 replies.
Last reply by bkatrina, about 11 years ago:
How do I do that? huhu so sorry
Greenfoot 2.4.2 with Java 8?
By pasta, with no replies.
Hi, I am using Ubuntu 15.10 and at school we need to use Greenfoot 2.4.2 Now I want to use some specific Java 8 things. Is it possible to compile Greenfoot with Java 8? My question would be how I can do that. At the moment I installed openjdk-8-jdk and I downloaded
Greenfoot-source-2.4.2.zip
. I changed in ./bluej/build.properties the following line: build_java_home=/usr/lib/jvm/java-8-openjdk-amd64 Now after doing "ant jar-core" I receive errors about the package "com.apple.eawt" missing. What can I do? I googled the problem. But I am not on a mac!
Help how can i get an actor to spawn another actor
By Tocho, with 1 reply.
Replied to by danpost, about 11 years ago:
Tocho wrote...
I originally was trying to make an actor shoot but i couldnt so now im trying this so if you could show me the script for making an actor shoot that would help more
Create the actor; get the world; add actor to world.
Using an Image/Actor to draw a String
By EgoInfinite, with 4 replies.
Last reply by danpost, about 11 years ago:
EgoInfinite wrote...
P.S.S.S. I don't know how to change the font color.
There is a 'setColor' method of the GreenfootImage class which sets the color for future drawing commands (like 'drawString').
528
529
530
531
532
533
534
X