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
Levels game
By eagcon1, with 1 reply.
Replied to by Gbasire, about 3 years ago:
If you have your worlds named for example World1 and World2 and you want to switch from World1 to World2, just do this : <Code Omitted>
can somebody plz tell what i am missing here
By divinity, with 2 replies.
Last reply by divinity, about 3 years ago:
thank you very much danpost found the error
Hey Need help With Actor Speed
By Monk_08, with 2 replies.
Last reply by Monk_08, about 3 years ago:
Wow thank you danpost for the quick answer every time i asked something thanks <3 Havent even thought about the timer but its a perfect addition :)
Actor::getNeighbours(...) bug?
By MrBradley, with 1 reply.
Replied to by danpost, about 3 years ago:
MrBradley wrote...
Actor::getNeighbours(...) bug?
I believe --- yes, you have found a bug. It seems as the step size diminishes, the more likely the occurrence. I did some testing with a cell size of 60. Both
true
and
false
diagonal settings worked fine until the image size dropped below 40. At a distance of 1,
false
gave 4, then 3 below 40; and,
true
gave 8, then 5 below 40. The 3 in y+1 row seem to be missed. However, at distance 2, at a smaller image size (I think it was 5), the y+1 and y+2 rows dropped, plus (x+2, y-2) and (x+2, y) cells. Very st
Ground problem
By orangepizza27, with 4 replies.
Last reply by orangepizza27, about 3 years ago:
this is currently what I have, and I need some way for the actor to stand on an island
Help getX(), getY() From Different Actor
By Monk_08, with 4 replies.
Last reply by Monk_08, about 3 years ago:
That makes sense Thank You :)
I want to make a never ending game
By eagcon1, with 5 replies.
Last reply by danpost, about 3 years ago:
Correction:
danpost wrote...
Did you try an
act
method in your
MyWorld
class? (see API documentation of
MyWorld
World
class)
(and I am sure you have a
World
instance) @eagcon1, this post was more for others than for you, since your issue has been resolved.
getNeighbours
By Tuffel, with 4 replies.
Last reply by Roshan123, about 3 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 3 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 3 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 3 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 3 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 3 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
:
54
55
56
57
58
59
60
X