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
Is there a way to disable the greenfoot icon that appears when an object without an image is added?
By BogdanMicu1, with 2 replies.
Last reply by BogdanMicu1, about 5 years ago:
Thanks!
Bar Button World
By ronald, with 6 replies.
Last reply by ronald, about 5 years ago:
cool thanks danpost it works
A score that goes up every 100 ms
By AndreiProRO, with 1 reply.
Replied to by danpost, about 5 years ago:
AndreiProRO wrote...
Hey! I would like to know how to make a score that goes up every 100 ms.
For consistency, use frame counting. At normal scenario speed, every 6 frames would be about 1/10 of a second. So, add to score every 6th frame.
Retry button for pause menu and movement in platformer game
By BogdanMicu1, with 13 replies.
Last reply by danpost, about 5 years ago:
BogdanMicu wrote...
How could I get the object that my actor is touching, using an if statement
<Code Omitted>
Get number of all objects from one class
By Afroist, with 4 replies.
Last reply by Afroist, about 5 years ago:
@danpost thank you very much for helping me out. It is working now as expected <Code Omitted> I learned that I have to use getWorld() as shown bel
how to open a jar file in linux
By Anson_Coder, with no replies.
how to open a .jar(which is looking like a box opened) in linux
Spawning actors from other actors
By JustAnArchosaur, with 3 replies.
Last reply by JustAnArchosaur, about 5 years ago:
I'm doing the latter
help woth pacman ghosts
By madhu99, with 1 reply.
Replied to by Super_Hippo, about 5 years ago:
Are you trying to copy the original behavior?
Retry button for pause menu
By BogdanMicu, with 17 replies.
Last reply by BogdanMicu1, about 5 years ago:
danpost wrote...
BogdanMicu wrote...
The player is placed 10 pixels above the ground actor and it still freezes.
Do you initially see the player fall to the ground? Try at lines 36 and 53: <Code Omitted>
I tried it and still, whether I spawn him right on the ground or make him fall a few pixels, the effect is the same. Let's continue our conversation here, please, if you are still willing to help: https://www.greenfoot.org/topics/64038/0#post_142560
I cannot use Strings
By XApple15, with 3 replies.
Last reply by danpost, about 5 years ago:
Super_Hippo wrote...
You can’t use parts of the variable’s name and combine the parts. You can use an array for that.
Example: <Code Omitted>
does anybody know what this code does?
By Score78, with 1 reply.
Replied to by danpost, about 5 years ago:
Score78 wrote...
does anybody know what this code does?]t4] <Code Omitted>
It is "supposed" to make an actor move more precisely; but fails, as accuracy is lost by the roundings.
Scenario doesn't run online but works fine in Greenfoot
By Ayulin, with 8 replies.
Last reply by Ayulin, about 5 years ago:
Alright, thank you that helps to clean up the mess a bit... As a java beginner I thought that at least one instance of a class had to be active at any moment to use the functions in that class, that's why I defined the music in every world separately.
Two balls disappearing after collision
By BlueHand, with 1 reply.
Replied to by danpost, about 5 years ago:
The
canSee
and
hit
, which is equivalent to
eat
, methods are obsolete. They have been replaced by the Actor class methods,
isTouching
and
removeTouching
: <Code Omitted>
Collision detection
By Vitalka, with 1 reply.
Replied to by danpost, about 5 years ago:
I am not a fan of the approach you have chosen to code the behavior of
FigurEng
objects. The many different collision checks make it quite complicated. On top of that, having them actually touching a stone when "on" one (see line 62) actually complicates things even more. I prefer maintaining separation from all objects and, after moving, using the direction of movement to dictate where contact was made with a colliding object. That is, if
FallSpeed
is negative, then any object would be above it and if it is positive, then below ("on ground" state can be determined here, as
Background Sound
By ronald, with 2 replies.
Last reply by ronald, about 5 years ago:
thank you well seen, I did not watch out
90
91
92
93
94
95
96
X