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
Moving Screen
By Maus2525, with 2 replies.
Last reply by Maus2525, almost 8 years ago:
Thank you for the answer!!!
Randomly place objects
By Heet_Patel, with 11 replies.
Last reply by Heet_Patel, almost 8 years ago:
i got it to work kind o like the way i wanted it to.
i need helpwith my gamediscription
By 1nicerDude, with 1 reply.
Replied to by Yehuda, almost 8 years ago:
Press "edit scenario" on the right side of the scenario page, then change the content in the Description text box, and then save it.
Is there any way to display text outside of the world in Greenfoot?
By Xolkiyr, with 3 replies.
Last reply by danpost, almost 8 years ago:
You could also force the user to respond to any text output by using the Greenfoot.ask(String prompt) method: <Code Omitted>
Calling an object from another object
By Xolkiyr, with 20 replies.
Last reply by Xolkiyr, almost 8 years ago:
danpost wrote...
Xolkiyr wrote...
danpost wrote...
Did you adjust both of the Ore constructors to assign values to the fields while not creating local varaibles?
Yup, here's the code up to and including the constructor: << Code Omitted >>
Sorry, you did not. No line between lines 20 and 55 should begin with 'Color'. Those lines should begin with 'color1', 'color2' or 'color3' so that you assign values to the fields declared on lines 3 through 5. 'Color' is a declaration of type for a new variable on those lines; but, you do not want new variables -- you want to use the already
Can you play multiple sound files at once?
By ann241, with 1 reply.
Replied to by danpost, almost 8 years ago:
My Player Piano was just updated to run in HTML5. It shows that multiple keys can be played at one time.
Return to a specific world
By Maus2525, with 4 replies.
Last reply by Maus2525, almost 8 years ago:
Okay, thanks!
Memorize Variables
By Hermoduro, with 1 reply.
Replied to by danpost, almost 8 years ago:
1) create new world; 2) set values in new world to those in current world; 3) set new world active
Bejeweled Board
By JosephTheVA, with 2 replies.
Last reply by danpost, almost 8 years ago:
JosephTheVA wrote...
If I was to try to generate a board with the code, where would I need to start?
As with any scenario, you start in your World subclass constructor. Your world can be either with pixel-sized cells or use a grid of large-sized cells. You would then add code to build the world and add Actor subclasses as needed. Only one subclass of Actor is needed for all gems -- or, rather, the main playing tiles. A field of int or String value, or just its image (which can be given randomly), can be used to identify which type piece the tile is.
Why does my Greenfoot Terminal throw these errors given the following code(s)?
By t_k_990, with 1 reply.
Replied to by Super_Hippo, almost 8 years ago:
You are creating black keys even when there shouldn't be one. Then the string is "" and you can't use "" as a parameter of the isKeyDown method. When creating the black keys, prevent them from creating when the string in the array is "". <Code Omitted>
Question int and subclasses
By Dr.Dre, with 1 reply.
Replied to by Super_Hippo, almost 8 years ago:
Each object (from this class and its subclasses) will have its own variable, but all classes can access it.
Random Numbers
By Dr.Dre, with 2 replies.
Last reply by Dr.Dre, almost 8 years ago:
thanks
Helper Classes
By okwuvic, with 6 replies.
Last reply by okwuvic, almost 8 years ago:
Thanks so much @danpost. I understand now. God bless you.
Snake game
By messthegamer61, with 1 reply.
Replied to by danpost, almost 8 years ago:
messthegamer61 wrote...
can one of you guys send me the code for the snake game please.
You need to do what you can first and in while doing so, if you run into issues, we help resolve the issues. Do not ask to have others do all your work for you..
How to make object disappear
By Diactaeon, with 2 replies.
Last reply by Diactaeon, almost 8 years ago:
I tried moving 'collision' to the end of the act method and it worked Thanks!
286
287
288
289
290
291
292
X