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 to place a object down in order as it reads a text file
By Ilovemarcus, with 2 replies.
Last reply by Spock47, about 3 years ago:
After danpost already did all the hard work and presented a good solution, I just want to add one small detail: Since JDK7, you can use a String value directly with switch, e.g. <Code Omitted>
How to reference non-static getRotation() in static Context.
By Riovanni, with 2 replies.
Last reply by Riovanni, about 3 years ago:
oh okay. thanks
How can an actor stop his own act()?
By leuveg, with 1 reply.
Replied to by danpost, about 3 years ago:
leuveg wrote...
I tryed
Greenfoot.stop()
in fahre() but not work. And now?
The code in the
else
part starting at line 13 will only execute if BOTH the
bodenVorhanden
AND the
Ziel
objects are touching this
Auto
object. That means that the
bodenVorhanden
and
Ziel
objects must overlap (intersect each other). Is that the way you have it?
Converting Greenfoot software to Steam
By Jestry, with no replies.
Is it possible to emulate Greenfoot games on steam? Or, because the purpose of this Engine is mainly an educational one, there still wasn't attempted to do so?
Do space games using addforce add too much when combining thrusters?
By robertjulia, with 2 replies.
Last reply by Crickblack124, about 3 years ago:
robertjulia wrote...
I'm playing a few space games that I do actually have the unity project for, since they were either publicly available or given to me. I have looked in the scripts for acceleration and the games just use unity's mechanism to add force to rigid-bodies. basically, they both feature 6axis manual thrust, so that all inputs are certainly from me. First, correct me if I'm wrong, but if you use two thrusters that are 90 degrees out in angle, then the resulting vector should be the result of the Pythagorean theorem yes? So, you add force from one thruster, a , then from another t
Why my game is not working
By Greenfoot2022, with no replies.
Why my game is not working when I upload it in website. It is giving me error
How do I set the enemyHealth counter to not go below zero?
By Prannn, with 1 reply.
Replied to by danpost, about 3 years ago:
Prannn wrote...
How do I set the enemyHealth counter to not go below zero?
Putting the following line after line 39 in
EnemyPlane
class might help: <Code Omitted>
Greenfoot cannot find png file
By BigTrae, with 1 reply.
Replied to by Prannn, about 3 years ago:
may I see the code?
project.greenfoot not longer working
By TLHS_GAME_ACADEMY, with 1 reply.
Replied to by TLHS_GAME_ACADEMY, about 3 years ago:
Found a solution. project.greenfoot still does not work, but I can load an existing project from Scenario/Open by clicking on the folder instead of project.greenfoot inside the folder.
How can I remove a specific actor, depending on the location of it and another actor (shooting with penetration)?
By Tidali, with 18 replies.
Last reply by Tidali, about 3 years ago:
Tidali wrote...
Okay it works not perfectly
Okay never mind I fixed it by replacing <Code Omitted>with <Code Omitted>
How to detect whether an object exists?
By Logic_Greenfoot, with 2 replies.
Last reply by Logic_Greenfoot, about 3 years ago:
danpost wrote...
Logic_Greenfoot wrote...
I made a small game. I hope it can refresh another wave of enemies after one wave of enemies is eliminated, but I don't know how to detect whether the first wave of enemies is eliminated. I hope some kind people can help me.
Have act method of your world check for their non-existence: <Code Omitted>
omg, it works.My teacher doesn't know this at all. Thank you for your help
New at programing in Greenfoot and need a help with a timer
By Enigma321, with 1 reply.
Replied to by danpost, about 3 years ago:
Enigma321 wrote...
i need to change images after 10 seconds on a actor. Itiried delay but it works partialy becoue it stops the entire game not just the process of changing images, i need a timer to work in background so the actors and the game dont stop moving. << Code Omitted >> This is my solution to the problem but it doesnt work. if you can fix it or tell me how it would save my grade at school thanks.
You cannot run the timer in the block of code that initiates the timer. Maybe this will work:
How can I modify the data of another class in one class? How to write this code.
By Logic_Greenfoot, with 3 replies.
Last reply by danpost, about 3 years ago:
Logic_Greenfoot wrote...
In order to run this code, do I need to reference the Java library?
No.
Create border where object bounds off
By N8TH1N6, with 13 replies.
Last reply by danpost, about 3 years ago:
N8TH1N6 wrote...
I got some entities I added but when I spawn them with this code << Code Omitted >> They dont spawn in the gray area I tried to move them diagonily in the middle but dont really know how
If you know the size of the gray area, call it
gas
(for gray area size), then use: <Code Omitted>If the size of the gray area is immutable, then you can just use the value itself (instead of a variable name, which would need to be declared and set to the appro
How can I show final Score in another world?
By Bob_Rafael, with 2 replies.
Last reply by Bob_Rafael, about 3 years ago:
Nice, it works thank you
31
32
33
34
35
36
37
X