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
getNeighbours
By Tuffel, with 4 replies.
Last reply by Roshan123, about 4 years ago:
if(!getNeighbours(50, true, Tankstelle.class).isEmpty() ) //trigger Or import java.util.List; List<Tanksettle> ts= getNeighbours (50, true, Tanksettle.class) ; if(ts.size()! = 0 ) Get out from the class else get in
Need help
By eagcon1, with no replies.
So I'm new here can you guys tell me how & what to do on this site (I mean I know you can upload greenfoot projects but how) pls help
Greenfoot.stop() not stoping the execution
By MRCampbell, with 1 reply.
Replied to by MRCampbell, about 4 years ago:
As I wrote the description up above, I came up with a much simpler solution. I also included the isItPrime() method.
Bug in website (i think so..)
By Roshan123, with 5 replies.
Last reply by Roshan123, about 4 years ago:
danpost wrote...
<Code Omitted>and removing the
try-catch
.
Thanks, 2nd one worked perfectly
I can't found ArrayList ,how to solve it?
By zwhpphzyh, with 1 reply.
Replied to by danpost, about 4 years ago:
zwhpphzyh wrote...
I can't found ArrayList ,how to solve it?
Show entire class codes and point out line on which it occurs.
Dam
By EdwardGaming, with no replies.
Lot's of help needed with stuff.
help
By Nep, with 2 replies.
Last reply by danpost, about 4 years ago:
Nep wrote...
How to set an object to 20 pixels from the right and 100 from the top of the World.
20 pixels from right would be width of world minus 20 (the
World
instance method
getWidth()
would be used). 100 from the top is just
100
(nothing more is needed).
Make y increase by 40 pixels in a vertical line?
Using While Loop
Are those instructions given??? A
while
loop would execute in entirety within one act cycle. The actor would teleport directly to its intended ending location unless you make use of the
Greenfoot
I need help with pausing an actor
By Tuffel, with 4 replies.
Last reply by danpost, about 4 years ago:
Tuffel wrote...
so everytime i want to pause the act, i have write this thing: if (pauseTimer > 0 && --pauseTimer > 0) return; ; and if i want to pause him another time with a different amnout of time, can i just change th int (here pauseTimer) to like PauseTimer? Tysm for the help, appreciated:)
To be clear, <Code Omitted>as the first line in the
act
method only sets up the pausing (allows the behavior). Pausing is initiated by assigning a positive value to
pauseTimer
:
PLS HELP ME ;( work fine in greenfoot but unable to run with browser
By imshuenn, with 4 replies.
Last reply by imshuenn, about 4 years ago:
danpost wrote...
imshuenn wrote...
how can I assign them in world constructor rather than in their declaration lines? I have no idea about it :(
<Code Omitted>declares an
Object
reference field (w/o modifiers -- like
public
,
static
, etc). <Code Omitted>assigns a new
Object
instance of declared type to the field.
Thank you so much! I'll try it out :)
Need Help with Changing the Color of an Actor's Picture using RGB Color codes
By DatHeroAndy, with 3 replies.
Last reply by DatHeroAndy, about 4 years ago:
Nevermind, fixed that! And also thanks for the "this.getImage().fill();" line.
Hey Need help With My First Programm
By Monk_08, with 2 replies.
Last reply by Monk_08, about 4 years ago:
Thank you very much i did it :DD
Really Need Help!
By Sabszii, with 3 replies.
Last reply by danpost, over 4 years ago:
Sabszii wrote...
okay thanks, so how can i answer these two questions?
What do you think the code would look like? What have you tried?
Help in need!
By Roshan123, with 11 replies.
Last reply by Roshan123, over 4 years ago:
Thanks for cooperation! Finally it's fixed
I NEED HELP
By Tuffel, with 3 replies.
Last reply by danpost, over 4 years ago:
Tuffel wrote...
So how do i now slow it down?
Add
int
field for slow down amount (higher value, longer pause): <Code Omitted>Somewhere in codes should be control of
slowDown
value (pseudo-code): <Code Omitted>
Changing colour of text
By xixEmilyxix, with 1 reply.
Replied to by danpost, over 4 years ago:
xixEmilyxix wrote...
I was just wondering how to change the colour of the text from white to black, is there a way to do this? This is the code I have: << Code Omitted >>
You cannot change how showText displays its text. However, it does use a font (an outlined text) that will show with any background color. There is another way to accomplish what you want -- by creating the text image and either directly drawing it onto the background of the world or applying it to an actor that is added into the world. Please refer to my
Value Disp
60
61
62
63
64
65
66
X