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 do you show a Game Over?
By Potato-sama, with 3 replies.
Last reply by danpost, almost 9 years ago:
일리아스 wrote...
his code is a mess. Please work on your style.
It really is not bad. Just needs to press Ctrl-I to fix indentation. There may be one or two squiggly brackets that are not consistent with the rest of the code, but otherwise it is quite good.
cannot find symbol - variable hit
By PlanetUlme03, with 2 replies.
Last reply by xbLank, almost 9 years ago:
Please use the code tags.. you guys make me cry.
Set object location on run
By gilbert1992, with 9 replies.
Last reply by xbLank, almost 9 years ago:
Exactly. Thats why you send your teacher the Project File and a compiled jar file. You dont have to mess with your code just so you cant move objects in the IDE. Thats just stupid.
Quick question with random numbers
By ThatOneGuy125, with 10 replies.
Last reply by xbLank, almost 9 years ago:
I agree.
Greenfoot and Java 9
By MrBradley, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
No, I am pretty sure Greenfoot itself needs to be updated to work with a new version. (If it is planned to support it in the future.)
Pew Sound Problems
By SuperNinja, with 5 replies.
Last reply by danpost, almost 9 years ago:
SuperNinja wrote...
Wait, can you still change volume if you do it this way?
Not when using 'playSound'. For multiple sounds where volume is controlled, do not use a field as in the first way above. Instead, create the GreenfootSound object in the code itself when firing the dart: <Code Omitted>
How to create a score counter in greenfoot?
By brianfu, with 3 replies.
Last reply by danpost, almost 9 years ago:
mert2727 wrote...
look at this :D https://www.youtube.com/watch?v=VnR6i7BXD-E
That link shows how to make a score counter; but, that is not the issue here (thanks for trying to help, anyway). The issue here was coming up with a condition that will satisfy the particular needs of this game for scoring:
brianfu wrote...
I want to add 1 to the score counter when my character jumps over an obstacle. But
I don't know what the condition will be
. please help me!!!
I made a scenario public and I would like help to solve a problem in it
By protocolUnknown, with 13 replies.
Last reply by danpost, almost 9 years ago:
protocolUnknown wrote...
Wait a minute for your first patch of code that you posted above: < Code Omitted > ^Is that to maximise randomisation?
That segment so that each and every item, including duplicates, listed has an equal chance of being selected. As each item is selected, it is removed from the selectable items before the next choice. Added more documentation below:
Easy counter code
By MisterJ, with 2 replies.
Last reply by xbLank, almost 9 years ago:
I agree. I don't even bother reading through a mess of plain text when using code tags is so simple.
Need help with enemy self-stunning (like getting tired)
By iminblue, with 21 replies.
Last reply by iminblue, almost 9 years ago:
iminblue wrote...
Actually is does work but the level starts with the Minotaur being stunned . Can I initialize the stunTimer with the GreenfootRandomNumber-thing before public void act?
Oh nevermind I made it work. Thank you very much guys for helping me with this one I appreciate it . Have a good day !
How to swich lenght values in greenfoot? (dx and dy)
By omnix, with 3 replies.
Last reply by danpost, almost 9 years ago:
Doing what Yehuda suggests will have the discs reversing directions. This will not be visually appealing as discs bounce off one another. Having the discs exchange their direction values might be a little better, but still will not appear to be a normal bounce. To create a real looking bounce, the size of the discs, as well as direction and speed, and their world locations at the time the bounce occurs must all be taken into account. It gets quite complicated. From what you wrote above:
omnix wrote...
my teacher has explained me that I should swich the dx and dy values which stands for the
Fullscreen Removal
By Cirion, with 2 replies.
Last reply by Yehuda, almost 9 years ago:
Also, change line 26 to: <Code Omitted>Unless MyWorld is the name of a MouseInfo subclass.
Help me pls
By cornivus, with 1 reply.
Replied to by danpost, almost 9 years ago:
Remove the following import lines: <Code Omitted>
setLocation
By MrBradley, with no replies.
I am trying to implement a snap to grid only when actors are being dragged within the world via the GF UI. Is there a flag that indicates this? Otherwise all movements get snapped to grid... Thanks.
Help me pls
By cornivus, with 1 reply.
Replied to by danpost, almost 9 years ago:
Please use image name on site -- not just site name. That is, the link need to end with the image file format extension (usually ".png", ".jpg" -- aka ".jpeg" -- or ".gif").
300
301
302
303
304
305
306
X