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
Sudoku generation (speed and bugs)
By fejfo, with 3 replies.
Last reply by danpost, almost 11 years ago:
fejfo wrote...
Are you saying that I should first fill each cell with a random content and keep retrying until it works ? or should I take every row and put all the 9 different numbers in there and to that for all the rows ?
I am saying to work across each row from top to bottom and randomly place one of the untried possibilities in each cell. If you run out of possibilities in any cell, try another possibility of a previous cell. I did mine something like this:
How I can do it my object to the other Teleports? (Sorry for my bad English)
By Heliox00, with 2 replies.
Last reply by Heliox00, almost 11 years ago:
Thanks :D
Mein Actor code geht auf einmal nicht mehr
By Pascal3577, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
In der Zeile darüber fehlt das Semikolon. Ich kann dir übrigens sagen, dass das, was du da machst, ziemlich aufwändig ist. Wäre es nicht sinnvoller, in den Klassencode dieser Klassen zu schreiben, was passieren soll, wenn darauf geklickt wird? Du kannst ihn auch in die Welt schreiben, aber es erscheint mir sehr unnötig, dafür diese Klasse zu haben.
how do i make gravity
By spy9144, with 1 reply.
Replied to by danpost, almost 11 years ago:
Gravity causes a constant downward acceleration on free objects. This means constantly increasing the speed of the object in the downward direction (increasing of the y-coordinate value of the location of the object). This will require the vertical speed be stored in an int field so that you can increase it each act cycle and use it in moving vertically.
Looping Leaves Falling from a tree
By Altyrn_The_Dreamer, with 3 replies.
Last reply by danpost, almost 11 years ago:
Altyrn_The_Dreamer wrote...
I have my character side scrolling by holding down either the right or left arrow and I have a footstep .wav file. When I hold the key down it makes this god awful sound like its overlapping the sound over and over. I just want the sound to loop when walking not sound scary.
Do not use the 'playSound' method of the Greenfoot class. There is no way to control or check the status of a sound created with that method. Create a GreenfootSound object and use the methods of the GreenfootSound class to control the sound.
Objects Overlapping
By Freekywill, with 1 reply.
Replied to by danpost, almost 11 years ago:
Freekywill wrote...
I am writing a code with multiple pages of objects on them. When I click on a page number I set the transparency of objects from other pages to 0. Sometimes when I try to click on the objects in the code it does not do anything. I think this has to do with invisible objects on top of each other. How do I set objects to be in front of each other, without removing the objects (because they need to store information)?
You should show the class codes used for your pages and the objects on them so that we know what there is to work with.
How do I make my crab move left and right? This is what I have so far:
By tn13673, with 2 replies.
Last reply by tn13673, almost 11 years ago:
Thanks!
Resetting the entire game
By Blight, with 6 replies.
Last reply by davmac, almost 11 years ago:
Please:
Don't revive years-old discussions. Create a new discussion and link to the old one if you need to.
Read the
guidelines for posting code
, in particular, you should correct your indentation and use 'code' tags
Be more specific. "won't work" doesn't explain what the issue is.
Do not post a follow-up here. Create a new discussion.
Count Points
By STRANGERPEOPLE, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
The question is: How do you want to save the points? If it is just in a variable, then this is enough: <Code Omitted>Instead of line 6, you can also use this: <Code Omitted>
New to coding
By kinder1, with 1 reply.
Replied to by David-FireTech, almost 11 years ago:
You could try using getOneIntersectingObject(inamimate.class) assuming your inamimate object was an actor named inanimate. e.g. this code would go on your animal <Code Omitted>
could anyone help me with my driving game
By KieranFurey, with 1 reply.
Replied to by David-FireTech, almost 11 years ago:
Try using the turn function. E.g. assign turn(3) and turn (-3) to left and right arrow keys
How do you make something visible forever after being clicked?
By bobbyjones2000, with 3 replies.
Last reply by danpost, almost 11 years ago:
bobbyjones2000 wrote...
How would I set the transparency when the House is created?
Just place the code to set the initial transparency in the
constructor
of the class.
Need some ideas
By benimen16, with 2 replies.
Last reply by benimen16, almost 11 years ago:
Super_Hippo wrote...
Well, I don't really see any reason for walking around and collect the health packs. So you actually just move the shortest way and finish it. What you could do: - Easy thing to add: Collect a key first before being able the finish the level. → User has to move more, but the game doesn't get more challenging with this... so it won't change a lot - Bit more difficult thing to do: Don't let us see the whole maze, only an area around the Blob. So that he holds a torch or so. ;) This would make the game more interesting.
Okay cool, I really like both of them. My origi
Jar File
By Vellyxenya, with 4 replies.
Last reply by Vellyxenya, almost 11 years ago:
Ok thank you very much for the explanation :)
"Next Error" grayed out but not running. Console output?
By keizerbob, with 2 replies.
Last reply by keizerbob, almost 11 years ago:
danpost: Thanks again for the info. I hadn't tried .println() 'cause I didn't know about the Greenfoot Terminal Window pop-up. Very nice and critical to me fixing the display problem that showed up next.
498
499
500
501
502
503
504
X