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
Could someone explain to me how this code works?
By Kingslayer, with 1 reply.
Replied to by danpost, over 4 years ago:
The middle line should be: <Code Omitted>
How to adress one kind of actor
By Znarf, with 3 replies.
Last reply by danpost, over 4 years ago:
Did you try using the
setActOrder
method?
Need Help, pls
By PetrusderEchte, with 1 reply.
Replied to by Just_in, over 4 years ago:
Look at my Profile, choose a game and if you want one of these I will give it you for free, even write me which game
How to move without human control
By TheGalaxysWolf, with 4 replies.
Last reply by danpost, over 4 years ago:
You will need a center point, a radius, an initial angle and a direction (5 int values).
how to remove the object after 3 second
By mariq_rasyid29, with 2 replies.
Last reply by mariq_rasyid29, over 4 years ago:
thx again sir
climbing a ladder
By Genota, with 3 replies.
Last reply by danpost, over 4 years ago:
At line 118, insert the following: <Code Omitted>
how only in the world can play the backsound?
By mariq_rasyid29, with 9 replies.
Last reply by mariq_rasyid29, over 4 years ago:
wow, thx sir
Is there a way to count times the "isTouching" function is repeated?
By ThiagoPorto, with 4 replies.
Last reply by danpost, over 4 years ago:
ThiagoPorto wrote...
Where I add this
int
?
Anywhere in the class
not
in a sub-block (method or constructor).
How to use Lists
By Znarf, with 1 reply.
Replied to by danpost, over 4 years ago:
You could: <Code Omitted>or begin line 2 with: <Code Omitted>or, more simply: <Code Omitted>
How to refer to a variable in the World from an Actor
By Znarf, with 5 replies.
Last reply by Gbasire, over 4 years ago:
danpost wrote...
Gbasire wrote...
write this in your Actor class : <Code Omitted>
SnakeX
and
SnakeY
will not be found. Those variables were local to the constructor.
or alternatively if you have only one snake in the World write this in your Actor class : <Code Omitted>
Unless
snakeX
and
snakeY
were declared variables in the cla
How to start method as soon as Key is clicked
By Znarf, with 3 replies.
Last reply by danpost, over 4 years ago:
Oh, you are saying that your scenario is running at a very slow frame rate. Run at normal speed, use a int timer to regulate moving and track direction input with another int field.
How to check if there's an object at a specific location
By Znarf, with 5 replies.
Last reply by danpost, over 4 years ago:
danpost wrote...
The
World
class has a
getObjectsAt(int, int, java.lang.Class)
method.
The 2nd word here says it all. Use:
getWorld().getObjectsAt( ... )
Button Sound Array
By ronald, with 55 replies.
Last reply by ronald, over 4 years ago:
I put it in the Greenfoot scenario the progress bars stop before the end while on the IDE they go to the end
Is there a way to convert void to boolean?
By xsolvite, with 4 replies.
Last reply by RcCookie, over 4 years ago:
turnTowards(int, int) cannot return something, because what should it? There are multiple things imaginable here. For example, which is what I think you thought of, return weather the object was looking at that location before anyways. But it could also return the angle in degrees it has rotated to face that object, or the new rotation after turned towards that location, or weather the locaiton given was actually valid to look at and not the objects location itself, or... You see, it really did not make any sence if you could convert void methods so that they return a value. If you want that
Moving platform up and down
By Genota, with 7 replies.
Last reply by danpost, over 4 years ago:
Genota wrote...
Like an elevator. So if the platform is going up, the player should be go up too (pushed). In my world, it will never happen, that the player get pushed into another object/ground or anything else, because of the design of the map.
Okay:
84
85
86
87
88
89
90
X