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
Offset Movement
By Mrinal, with 7 replies.
Last reply by Mrinal, almost 11 years ago:
Made a little change in code and put it in. Works... Thanks a lot! :)
I'm making Brick Breaker/breakout and my ball is only coliding with the top of the bricks
By TTTT, with 3 replies.
Last reply by Super_Hippo, almost 11 years ago:
You could just add an 'else' before the 'if' or do it like this: <Code Omitted> Or: <Code Omitted>
Help!?
By Greenfooter1212, with 4 replies.
Last reply by Greenfooter1212, almost 11 years ago:
How would I put that in?
getOneObjectAtOffset....
By DemonsWhiteSoul, with 4 replies.
Last reply by DemonsWhiteSoul, almost 11 years ago:
Thanks, you been soooo much help xD
Checks
By Kryptonous, with 43 replies.
Last reply by Kryptonous, almost 11 years ago:
Still figuring out the turns, but I think that'll work out, eventually. Thanks danpost and Super_Hippo, you really helped me out a lot! I still have to learn so much, though!
Many, many thanks!
How to filter out the "Enter" character form a txt read?
By EnderPicture, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
Could you post the relevant code how you read the file? Maybe we can find the reason then. (Use code tags please.)
Setting movement of an object
By ryancumpsty, with 1 reply.
Replied to by danpost, almost 11 years ago:
Please refer to
this page
of the java tutorials.
Movement!
By gamer98, with 4 replies.
Last reply by -nic-, almost 11 years ago:
Yeah I know but I copied it from a test scenario and it threw an error otherwise forgot to get rid off it. Thanks Super_Hippo
Wombat Scenarion help !!!
By KOSIUS, with 1 reply.
Replied to by danpost, almost 11 years ago:
Although the wombat is not an enemy,
this
still might help. It is the same type of movement.
How to check actor compatibility?
By Stoeptegel, with 1 reply.
Replied to by danpost, almost 11 years ago:
Line 5 uses 'getOneObjectAtOffset'. The documentation shows that it returns an object of type Actor (regardless of what class of object you are looking for). To access anything in the Container class with the field 'containerPicked', you need to let it be known that the field holds a Container type object. <Code Omitted>This line takes the actor (containerPicked) and casts it as a Container type object and then sets the new variable 'cp', which is declared to hold a Container object, to that actor.
Constructor booleans do not work properly.
By Stoeptegel, with 2 replies.
Last reply by Stoeptegel, almost 11 years ago:
Ah! I almost forgot about switch cases *shame*. Thanks mate! Much improvement :)
Error: n must be positive
By Pe1per, with 7 replies.
Last reply by davmac, almost 11 years ago:
Super_Hippo wrote...
How is 350-250= -100?
Hmm, you're right. I mis-read that code (as 250 - 350). However, the 'n must be positive' error nearly always comes from mis-use of the Greenfoot.getRandomNumber method, in my experience (and it certainly doesn't come from addObject). Pe1per, perhaps you can point out which line actually causes the error rather than forcing us to guess?
Press a button while Game is over problem?
By AnthonioBanderas, with 1 reply.
Replied to by Super_Hippo, almost 11 years ago:
Are only enemies moving? I think I didn't really get the way the game works right now. You get points for every click on an enemy and you have to place them back until one reaches the right side? Could it be that the seeLocation method (which I don't really understand why it is made like this) is quite useless? It is only called when it was dragged to a different position and if it is on a target position, it shouldn't move. How is this supposed to be? You could do it like that:
I dont want to press 2 buttons at a time
By Moho, with 3 replies.
Last reply by danpost, almost 11 years ago:
For continuous: <Code Omitted>
trail following player
By Moho, with 1 reply.
Replied to by danpost, almost 11 years ago:
<Code Omitted>or <Code Omitted>
606
607
608
609
610
611
612
X