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 create a simple wall
By Ticker175, with 2 replies.
Last reply by Ticker175, over 8 years ago:
ok thanks
how to detect a background image
By McMaxi2002, with 3 replies.
Last reply by danpost, over 8 years ago:
McMaxi2002 wrote...
<< Code Omitted >> Here's an example of what I meant
You will probably need to maintain the image itself or an int value that represents which image was chosen in a field so that it (the field) can be checked to determine which was used. The only way you would be able to tell using
getBackground
is if you checked the color of one or more pixels of the image to narrow down which was chosen (which you really would not want to do).
How to make object more according to dice roll?
By pablo0826, with 7 replies.
Last reply by pablo0826, over 8 years ago:
Oh alright, got it, thanks!
Vertically Scrolling Background
By ringline, with 3 replies.
Last reply by ringline, over 8 years ago:
Ah, ok, thank you very much for the fast and good answer!
how to detect if a player is next to a wall/actor
By Ticker175, with 1 reply.
Replied to by Ticker175, over 8 years ago:
lol the commas are just for spaceing xD
Remove transparent parts of the hitbox
By fabipfolix, with 6 replies.
Last reply by fabipfolix, over 8 years ago:
danpost wrote...
Create a class and add
Rim
objects to the left and right of the transparent area where the ball is supposed to pass and use them in conjunction with the backboard for collision detection. Make the image of the
Rim
object transparent squares, close in height to the rim of the backboard image.
I just cutted the Hoop in 4 parts and used that
isTouching not really working
By fabipfolix, with 2 replies.
Last reply by fabipfolix, over 8 years ago:
danpost wrote...
Is the Backboard object considered to be the Hoop? Side note: you should probably use direction conditions along with edge checking (only reverse direction if close to edge and currently moving toward that edge).
The Backboard is one of 4 subclasses of the hoop. But it didn't worked when i tried <Code Omitted>But with
Backboard.class
it didn't worked as well. Edit: Now it's working, although I haven't changed anything.
What effect have this commands sections?
By Lukakku, with 1 reply.
Replied to by danpost, over 8 years ago:
Lukakku wrote...
Just write what simple effect the entered commands have.
What lines (or blocks) are you referring to? List them one by one giving first and last line of each. You mentioned "command blocks", which leads me to believe you are asking about the methods. However, it seems they are all already documented.
Trying to update a timer
By jstadtherr, with 3 replies.
Last reply by danpost, over 8 years ago:
jstadtherr wrote...
Thank you! I initialized it it act and it is working now, but for some reason when it gets into the single digits it puts a parentheses after the number for example it prints 7) instead of just 7, do you know why this is? << Code Omitted >>
You will probably experience some lag as the timer runs longer. By creating a new
Text
object every act cycle, you world will be struggling to smoothly maintain all its objects. Create just one
Text
object outside the method, override the
addedToWorld
method to add the
Text
object into the world and
how can i find specific world detection
By roonie01, with 6 replies.
Last reply by danpost, over 8 years ago:
roonie01 wrote...
is there another way by using a class for my counter
A class for the counter can be used with what I suggested above.
World array issue
By Ticker175, with 13 replies.
Last reply by Ticker175, over 8 years ago:
i managed to fix it by changing the addObject parameters to +15 pixels for both the y and x cords
Listen and choose a music
By cycv5, with 1 reply.
Replied to by danpost, over 8 years ago:
It would be much easier if you just added one more GreenfootSound field for the currently playing song. Then, you can immediately stop it and change it. Even better would be to use an array for the songs to give each one an int value (by way of the index of the array); then, an int field can be used to not only represent which song is playing, but also be used in your text (so you do not have to code everything six times each).
Managing multiple versions of Greenfoot
By MrBradley, with 1 reply.
Replied to by MrBradley, over 8 years ago:
java -Duser.home="D:/dir" works fine.
Greenfoot.delay(); not pausing my sounds
By ogy2014, with 17 replies.
Last reply by ogy2014, over 8 years ago:
i have removed your changes and changed the ufo.play(); to a ufo.playLoop(); and modified the sound file to be short and it has worked flawlessly
Game freezes when holding down keys
By Coop799, with 7 replies.
Last reply by Yehuda, over 8 years ago:
Does the program work any differently if you comment out the parts that have to do with the GifImage?
251
252
253
254
255
256
257
X