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
help boss crashes game
By Sakuya, with 19 replies.
Last reply by Sakuya, over 5 years ago:
Thanks it worked !
i get stuck by my invisible walls lmao
By Sakuya, with 6 replies.
Last reply by Sakuya, over 5 years ago:
Thanks that worked, I still get stuck in the bottem but I guess that isnt that fatal. But anyways you helped a lot I cant thank you enough !
mouseClicked(null) doesn't work at all but mouseMoved(null) does
By M1S0, with 1 reply.
Replied to by danpost, over 5 years ago:
M1S0 wrote...
so what i'm trying to acomplish is to find out where the mouse is clicking, to do that i'm defining the mouse everytime it moves and i'm trying to find in which x,y it clicked, for some reason mouseClicked(null) does not trigger at all, i've tried spam clicking everywhere and i've even used an autoclicker to spam it a 100 cps this is the strip of code << Code Omitted >>
Your code requires that the mouse must be moving when the click occurs. Moving is not a necessary thing for a mouse click. Clicking is the only requirement here:
need help with random numbers and switch statements
By Zurah, with 2 replies.
Last reply by Zurah, over 5 years ago:
thanks, i used a slightly different method of achieving the same goal but i have it working now ^^
Jar File not working
By JustAnotherCoder, with no replies.
So I finished a simple game with Greenfoot and wanted to convert it to a Jar, I clicked the Share button and did that but when I tried to open it with JRE (Java Runtime Environment) Latest Version it said an error occured and nothing happened. Could someone please tell me why the Jar file I exported doesn't work? <Image Omitted>
Placing an actor by using another actor
By Bambus, with 6 replies.
Last reply by Bambus, over 5 years ago:
nevermind.. I just got it. But thanks to you two :D
Enemy movement
By Sakuya, with 2 replies.
Last reply by Sakuya, over 5 years ago:
Thanks!
How can I add invisible Walls?
By Sakuya, with 7 replies.
Last reply by Sakuya, over 5 years ago:
Thanks, it worked. Cant thank you both enough
Passing the score from one world onto the next world
By wslade, with 6 replies.
Last reply by wslade, over 5 years ago:
That worked! Thanks so much for your help!
Collecting all variables of a type in an array
By FirewolfTheBrave, with 4 replies.
Last reply by danpost, over 5 years ago:
FirewolfTheBrave wrote...
That seems to work, however, it's not exactly what I was looking for. I know how to write the loop iterating through the array, I was just looking for a method that can automate the creation of the array itself. I already have all images saved in a variable, but there's this one method for which I need them in an array, and since it's gonna be quite long, it would be nice to be able to automatically collect all variables of the type GreenfootImage into an array. Does such a method exist?
If your image file names are sequential (that is, like "image0.png", "imag
Get weather the act loop is running
By RcCookie, with 5 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
this thread will in fact keep running even if the scenario gets paused.
Use the
World
class
stopped
method to stop any running threads. There is a
started
method, also (if needed).
Little Crab Scenario
By SportingLife7, with 5 replies.
Last reply by SportingLife7, over 5 years ago:
Thank you so much, I really appreciate it (it worked!).
Smooth Movement upwards
By GLOBALHUNT, with 8 replies.
Last reply by Roshan123, over 5 years ago:
GLOBALHUNT wrote...
Can u rewrite the code and send
<Code Omitted> But i would like u to recommend to use Danpost's code(its better) and not mine.
Font from ttf or awt.Font
By Commentator, with 1 reply.
Replied to by danpost, over 5 years ago:
Commentator wrote...
How can one create a greenfoot Font from either a ttf file or from an java.awt.Font in the latest version of greenfoot (3.6.0)
I created a
TextImage
class which extends
GreenfootImage
that should work locally, but not when uploaded. You can find it
here
.
getWorld and getObject
By Patdumas77, with 2 replies.
Last reply by danpost, over 5 years ago:
19598 wrote...
getWorld().stop()
stop
is not a method in the
World
class and cannot be called on a
World
object.
The getObjects return an Actor object
It returns a
java.util.List
object (as you noted in your next sentence).
so you could do something like getWorld().getObjects() to get a List of Actor objects, and then do get() on the object you want from that list. It would look something like this: getWorld().getObjects().get(0).
The
List
object must not be empty when using
get
on it; and the
int
index o
96
97
98
99
100
101
102
X