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
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, almost 5 years ago:
I'm doing the latter
help woth pacman ghosts
By madhu99, with 1 reply.
Replied to by Super_Hippo, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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, almost 5 years ago:
thank you well seen, I did not watch out
How to make a door
By TheGalaxysWolf, with 3 replies.
Last reply by RcCookie, almost 5 years ago:
So then you just need two images, one showing the closed door and the other one the opened one. Then to open the door you just have to set the other image.
How do I make an Actor follow?
By XApple15, with 1 reply.
Replied to by danpost, almost 5 years ago:
XApple15 wrote...
Hello ! How do I make an Actor follow a Player controlled by a keyboard?
Once it gets a reference to the player (either by passing it to the follower or by a getObject... type method), just turn toward the player's location coordinates.
Saving the world moves my objects randomly
By theoo0308, with 5 replies.
Last reply by danpost, almost 5 years ago:
theoo0308 wrote...
Thanks for your suggestion. The version that does not have this problem is greenfoot 3.1.0 ,for everyone interested in this topic.
That is the exact one I am using (USB version). Have not tried newer.
One specific actor will make game lag if added in the world
By Gbasire, with 2 replies.
Last reply by Gbasire, almost 5 years ago:
Oh you're right I forgot about this, it works now ! Thanks !
why i cant make new levels with super()
By Vitalka, with 3 replies.
Last reply by danpost, almost 5 years ago:
Vitalka wrote...
it worked but if I play my game and die, I get an error.
What (exactly) was the error? What is the coding around which the error occurred.
I seared on the internet for solutions and found this code , which worked for me even if I died: << Code Omitted >> unfortunately I don't understand what the code does xD. Could someone explain this please because I need to explain my code in school.
This class is intended to be a parent class of your game worlds. It contains 3 constructors (beginning on lines 3, 8 and 13) and a method (to be overridden in som
90
91
92
93
94
95
96
X