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
GridWorld and setImage()
By jpolacco, with 1 reply.
Replied to by danpost, about 13 years ago:
The setImage() command takes an
image
as the parameter. A filename ("myImage.jpg") is a String object; use it with a GreenfootImage constructor to create the image; then use that new image in the setImage() command.
read only
By shan12, with 2 replies.
Last reply by davmac, about 13 years ago:
You have to choose a location to save it where you have write access - your Documents folder is usually a good bet - and then give the scenario a name (which can be the same name, as long as you haven't saved it there already!). Don't try to save it over another scenario.
Where are the videos?
By Reader0405, with 1 reply.
Replied to by davmac, about 13 years ago:
All
the videos (Joy of Code and beforehand) are part of the same youtube collection. Follow the link from the documentation page.
For loop
By UKPowerMax, with 3 replies.
Last reply by danpost, about 13 years ago:
Sorry for the multiple partial postings (I accidentally tried to use the tab key in the posting and that selects the 'Post' button, where I must have hit 'Enter' a couple of times). I forgot to mention that the code above should be in an act() method or in a method that an act() method calls.
Deactivating the reset button.
By kiarocks, with 5 replies.
Last reply by kiarocks, about 13 years ago:
<Code Omitted>Also, this might work:
Image variable
By gazza162, with 1 reply.
Replied to by mjrb4, about 13 years ago:
Technically speaking an image comprises part of the state of an actor, so the answer would be yes! You can use the getImage() method to grab the current image on the actor, and then take an action based on what image it is. However, using the current image of the actor to determine what state it's in isn't necessarily the best idea because it couples each image to a certain state, without the possibility of changing it later (without refactoring the code.) You may be better to store the "state" that you want separately, such as in an integer - and then use an if statement over that integer
What? Scenario not loading when uploaded?
By TheNightStrider, with 46 replies.
Last reply by davmac, about 13 years ago:
I just woke up... glad to hear it's sorted.
is it possible to get rid of the run and pause and reset buttons?
By marzukr, with no replies.
I want to get rid of these because I have a menu to my game and when other people play it they always say to get rid of it because they don't want to click twice. If there is then how?
Problems with export to .jar
By lux, with 4 replies.
Last reply by lux, about 13 years ago:
ok, finally the
scenario
works.. thanks for the help davmac!
Looking for invaders source code scenario circa 2008
By ray_parsons@gwinnett.k12.ga.us, with 1 reply.
Replied to by davmac, about 13 years ago:
Do you mean as in a Space Invaders type of game? I'm not aware of any "official" Greenfoot version but there are a few on the gallery - type "invaders" into the search box (top of this page) and you'll see them.
Read Only
By akinyemi, with 3 replies.
Last reply by Tobbe, about 13 years ago:
Thanks davmac, I just realized that I could Save as a copy in other location and start editing it there. As you say, RTFM :)
how to make game
By Imp, with 3 replies.
Last reply by matt.milan, about 13 years ago:
what kind of game do you want to make
Log In problem
By dlanni, with 2 replies.
Last reply by dlanni, about 13 years ago:
Thanks, my mistake
Score System
By Sciyaps, with 1 reply.
Replied to by danpost, about 13 years ago:
You will find what you need
here
.
How can I make a object "solid"?
By Sciyaps, with 1 reply.
Replied to by dlanni, about 13 years ago:
There is a method in Class Actor called getOneIntersectingObject and several others that might fit your situation. You can use these methods to sense when one object intersects another. Maybe make a method based on the ever popular crab scenario's canSee method, whose code is downloadable (although they usually use the less useful getOneObjectAtOffset). My game, PyroTyro, uses the first method. The code is available; just open the House class. After one car "canSee" another (they collide), you can remove both of their images and replace them with a crunched up car image, just as I have rep
995
996
997
998
999
1000
1001
X