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
Trying to keep the same score when moving to a different world to show what score they get
By I_NEED_HELP, with 2 replies.
Last reply by I_NEED_HELP, over 1 year ago:
Thank you so much Dan Post
collision
By HakimNait, with 4 replies.
Last reply by HakimNait, almost 2 years ago:
thank you very much it works
Points System
By Kookaburra737, with 1 reply.
Replied to by danpost, almost 2 years ago:
Kookaburra737 wrote...
Hey everyone, I was making a game where a lizard collects fire balls to gain heat and has to avoid a car that bounces, but I'm having a lot of trouble displaying the score, would anybody be able to help me out? this is my code for my counter.class: << Code Omitted >> I just cant figure out how to get the variable from another class to be displayed in this actor... Can someone plz help me?
Line 19 should be; <Code Omitted>and line 64 should probably be:
How can i spawn a actor like a bullet spawn on another actor
By Thijn, with 1 reply.
Replied to by danpost, almost 2 years ago:
Thijn wrote...
I tried spawning a bullet in a spaceship everytime you press space but it did not work i dont know how to spawn a bullet on a moving spaceship so maybe you guys can help me out
In the class of the spaceship, use something like the following: <Code Omitted>You may also need the following: <Code Omitted>
Draw Polygons on Image Background
By UmbranDrake, with 4 replies.
Last reply by UmbranDrake, almost 2 years ago:
Thank you!!
Restarting a bg song
By Alberthepirate, with 1 reply.
Replied to by danpost, almost 2 years ago:
Alberthepirate wrote...
So I have so far GreenfootSound song = new GreenfootSound("song1.mp3"); But, is there a way so I can restart the song?
<Code Omitted>as opposed to: <Code Omitted>which just resumes the song.
how to make the playbutton work with a smal script
By gijsee, with 1 reply.
Replied to by gijsee, almost 2 years ago:
i did it
.get counter is not working for my shooter game
By Pls_help, with 3 replies.
Last reply by Pls_help, almost 2 years ago:
Never Mind my problem was solved Thanks
Shooting
By Kookaburra737, with 4 replies.
Last reply by danpost, almost 2 years ago:
Kookaburra737 wrote...
Thank you so much, it works perfectly now, but how would I delete the bullets touching the worlds border?
Use code like the following in the
act
method of the projectile's class: <Code Omitted>You can modify the code to include vertical limits.
Why can't Greenfoot 3.8.2 export jar files?
By sandhsf, with 1 reply.
Replied to by nccb, almost 2 years ago:
Here's the reasoning, but I'd be happy to listen to everyone's intended use for it to see what everyone wants from this feature. Running a Greenfoot scenario requires a working Java installation and all the JavaFX libraries, and the Greenfoot common classes and the scenario bits. We can bundle the latter two into a JAR, which is what we always used to do. The Java installation is not impossible if you ask your intended user to install it, as it will go on your PATH so Greenfoot doesn't need to know where it is. The problem is the JavaFX installation. We cannot easily bundle this in the
publishing in greenfoot
By karthigakumar, with 1 reply.
Replied to by nccb, almost 2 years ago:
What version of Greenfoot are you using?
Damage Enemy (Edit variables in enemy class from hero class)
By Sloppybobby3, with 1 reply.
Replied to by danpost, almost 2 years ago:
Sloppybobby3 wrote...
I'm trying to make my player do damage to an enemy, but I cannot seem to figure out how to edit variables across classes. It compiles with no syntax errors, but does not appear to make any changes to the variable. << Codes Omitted >>
Try something like this in the Player class: <Code Omitted>
Getting white screen and no console errors.
By jlau, with 1 reply.
Replied to by nccb, almost 2 years ago:
From poking it with the Javascript debugger, it seems that the world is actually loading up, but something is going wrong. It seems that the world remains GameWorld after initialisation. I suspect the problem may be that in the constructor of GameWorld, you call Greenfoot.setWorld() to change the world. But Greenfoot's default behaviour after constructing GameWorld is to call setWorld() with the just-constructed GameWorld, which happens after you have called it, so your change of world is ignored. As it happens, the Greenfoot desktop version has some code to guard against exactly this scen
Publishing
By karthigakumar, with 3 replies.
Last reply by danpost, almost 2 years ago:
karthigakumar wrote...
But I was found an error. Unknown host. How to solve it?
It could just be something temporary. Try it again. If the hosting error continues, see if a greenfoot team member can help you.
No suitable Java JDKs were found
By zonks, with 2 replies.
Last reply by zonks, almost 2 years ago:
That solved it! Thanks so much for your help. Navigating to the jdk folder in the Greenfoot directory worked.
11
12
13
14
15
16
17
X