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 add background music?
By nigavart, with 6 replies.
Last reply by danpost, over 5 years ago:
nigavart wrote...
but how to insert the name of the song?
How is it named in your
sounds
folder (of your project folder in your file directory)?
Game over sound effect not playing
By void.null, with 1 reply.
Replied to by danpost, over 5 years ago:
(1) Do you call this
GameOver
method from the
act
method? (2) Did you place the
gameover.wav
sound file into the
sounds
folder of your project folder?
Does Greenfoot require a fileSeperator, when working on different OS?
By Dev_grey97, with 1 reply.
Replied to by Super_Hippo, over 5 years ago:
As long as you stick to relative paths, you shouldn’t need it. Well, I guess... I never used anything other than Windows, but I also didn’t come across problems like that here in the discussions at all.
Removing walls at separate times, using levers
By koil, with 3 replies.
Last reply by koil, over 5 years ago:
Your previous reply actually made me realise what was wrong thank you for the concern anyways
Stop Actors from being dragged
By cxcpio, with 3 replies.
Last reply by danpost, over 5 years ago:
cxcpio wrote...
Yes makes sense thank you. I want it to snap back to initial position when dragged. Can you explain how? Thank you
Place the following in classes of actor types you want to "snap" back: <Code Omitted>This will also prevent those types of actors from moving while the scenario is running as well, however.
World or actors not showing on screen
By Stemtree, with 5 replies.
Last reply by danpost, over 5 years ago:
Background should be full white. No actors are coded to be added to the world.
Stemtree wrote...
actor not showing up on screen when I create them
What classes do you currently have other than
World
and
Actor
? How are you attempting to create an actor?
Move multiple Objects simultaneously
By Mousekip, with 3 replies.
Last reply by Mousekip, over 5 years ago:
Ok thank you. Seems to work perfectly
Paint Order for instance
By SwaggyXiao, with 2 replies.
Last reply by danpost, over 5 years ago:
There is an undocumented behavior that actors are painted in the order they are added into the world. This would put the most recently actor on top of everything else. So, you can remove and add the one you want on top at any time.
Trouble with double jump mechanic
By thatkidwhoneedshelp, with 6 replies.
Last reply by thatkidwhoneedshelp, over 5 years ago:
danpost wrote...
You will need to track the state of the "space" key: <Code Omitted>tracking its state with the following: <Code Omitted>To do (or potentially do) something when the key is pressed down (going from up to down), you would want the following at line (a): <Code Omitted>Now, you can test the on ground and single jump states and apply the jumping code at (b). The falling code will be separate from any of this.
Could yo
Csv file
By Roshan123, with 10 replies.
Last reply by Roshan123, over 5 years ago:
now its fixed
HELP list size() not working properly?
By Gonçalo, with 5 replies.
Last reply by Gonçalo, over 5 years ago:
It worked @danpost! I do needed to create an act method in Game1 world. Thank you so much, your the best! Best regards.
Make an object follow the cursor
By Mousekip, with 8 replies.
Last reply by Mousekip, over 5 years ago:
danpost wrote...
Mousekip wrote...
At the time, when I wrote the comment, I already changed it to mouse and it still didnt work. As requested here´s the code of the entire class
Remove lines 123 and 141.
It now works perfectly! I should have noticed that when you wrote about what mousePressed means in detail. Thank you very much!
Where can I find images to animate Actors?
By Dev_grey97, with 1 reply.
Replied to by Mousekip, over 5 years ago:
If you dont plan to post it online, you could just google it and use any image you find. It would have to be a png though.
Removing an object once it has met the criteria
By potsmoka, with 23 replies.
Last reply by potsmoka, over 5 years ago:
Thank you it finaly works!!
Avoiding overlapping objects
By cxcpio, with 2 replies.
Last reply by danpost, over 5 years ago:
cxcpio wrote...
<Code Omitted>
This makes it appear your objects can span more than one grid square; yet, you only set exactly one square as not empty when you place an object. You need to set all squares an object covers as not empty for your code to work. Also, you need check all square an actor will cover to place that actor -- not just the one where it starts at.
104
105
106
107
108
109
110
X