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 I move my work to another desktop?
By Faizcon, with no replies.
I am a beginner using greenfoot in high school and I am trying to put the work I did at home, on a different compute but I am not sure what to do, I tried using google drive, dropbox but was not sure exactly what to do since the best I could do was put the folder on google drive and open it from the other computer but the work is not saved.
How do I get the actors to spawn?
By Aden, with 1 reply.
Replied to by Aden, about 7 years ago:
i fixed it by myself nvm.
Please help with my assignments
By muller25, with 1 reply.
Replied to by danpost, about 7 years ago:
muller25 wrote...
i would like to ask how type the codes for mastermind game in greenfoot?
This is too general of an ask. Are you wanting someone to do your assignment for you? Try anything. Show what you tried and ask for help when you get stuck on something specific. I will say this much: in turn-based games (which mastermind basically is -- guess, followed by hints), your world will "control" the game.
Need help with simulation.
By addiehackney, with 1 reply.
Replied to by danpost, about 7 years ago:
addiehackney wrote...
I am making a simulation where planes fly from one city to another. How do I make the actors move from one city to the other?
Basically, your plane would need to retain a destination, or coordinates, to turn and move toward.
Problem with Limiting the use of a function
By PatrikBurris, with 7 replies.
Last reply by PatrikBurris, about 7 years ago:
Thank you very much for all the help
I need help with my code
By jjc289, with 3 replies.
Last reply by jjc289, about 7 years ago:
nevermind. It is figured out.
Stop player from moving after intersecting actor
By comfortablyNumb, with 1 reply.
Replied to by danpost, about 7 years ago:
Never use thread ops in greenfoot -- and only use Greenfoot.delay when you want the entire scenario to pause for a specified amount of time. It would be better to have the player detect this actor and the
canMove
field should not be a
static
one. How can one tell whether a field should be
static
or not? Ask what happens if you have more than one instance of the class (two or more players, in your case). If the state (field value) is at all times the same for all instances, then you can make the field
static
. In your case, I doubt you would want all to not mov
Contact with transparent images
By PowerDj, with 7 replies.
Last reply by danpost, about 7 years ago:
PowerDj wrote...
Ah, I see what you mean here. I think it would be better to describe my problem with an image: << Image Link Omitted >> Basically, the red block has already been placed while the blue block is being controlled. I want to use color methods to check when the red block is underneath the blue block, which will prevent the blue block from being placed (obviously I could just use isTouching(), but I'm using the squares to get the hang of the color detection for other images). Getting colors from the background of the image only returns grey, so I need something that checks the color
get random value from array based on level
By comfortablyNumb, with 4 replies.
Last reply by Super_Hippo, about 7 years ago:
The equals method compares the characters/content in the string (true if they are the same), == is only true if they are both the same string (the same object). As a simple rule: Always use equals instead of == for strings. (Unless you actually want to check if it is the same object of course.)
Greenfoot Bug again? - NullpointerException
By ITStudent, with 1 reply.
Replied to by danpost, about 7 years ago:
You cannot call a method (
showText
-- on last line) on a non-existent object. The reference to a
World
object returned by
getWorld
will be
null
if
this
actor is removed from the world (previous line). Change last line to: <Code Omitted>
I need help with my code
By kahn, with 2 replies.
Last reply by kahn, about 7 years ago:
thx dadpost
Illegal State Exception: actor trying to get location of player when it has been removed from the world
By comfortablyNumb, with 6 replies.
Last reply by comfortablyNumb, about 7 years ago:
epico its working now :)
Greenfoot - Movement BUG?
By ITStudent, with 2 replies.
Last reply by ITStudent, about 7 years ago:
So i am using shift instead of q and now everything is working fine. Thank You.
Need help with Program Greenfoot #2. I have a question please assist.
By Waterfall100, with 1 reply.
Replied to by danpost, about 7 years ago:
Please provide code, error and location of error.
How do I remove another actor.
By AVH, with 1 reply.
Replied to by danpost, about 7 years ago:
AVH wrote...
I'm trying to kill an orc, by using key is down "space" to remove an orc and use an image when space is clicked. But it is not working.<< ,<< Code Omitted >>
If the orc is an intersecting object, then line 7 removes the wrong actor.
164
165
166
167
168
169
170
X