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
Need help, whenever frog eats fly, score goes up 1
By joeyjin_, with 7 replies.
Last reply by danpost, over 7 years ago:
Nosson1459 wrote...
did you put any code for the fly after it was removed? because the remove must be the last thing you use the fly for
The removal was probably from something executed just prior to this code.
Quick question concerning a for loop
By n1ght5t41xX, with 1 reply.
Replied to by n1ght5t41xX, over 7 years ago:
Solved it myself - I forgot to put a delay into it. Still leaving this here for education purposes haha
I need help making a Boss player automatically fire a laser in a greenfoot game I created called SuperBros
By ak02, with 2 replies.
Last reply by ak02, over 7 years ago:
Thank you.
how do i get the color to be imported to greenfoot color
By Antoine, with 4 replies.
Last reply by Super_Hippo, over 7 years ago:
The Greenfoot package has a Color class (Greenfoot.Color) which you import when importing greenfoot.*. If you import java.awt.Color, you use this Color class instead. The GreenfootImage constructor requires the Greenfoot.Color class. This was changed to make conversions to HTML5 possible for exported scenarios.
Random starting rotation?
By n1ght5t41xX, with 2 replies.
Last reply by n1ght5t41xX, over 7 years ago:
Super_Hippo wrote...
Either use a constructor which is executed once when the object is created: <Code Omitted>Or call the method on the object you created: <Code Omitted>
Thanks a lot!
java.lang.StackOverflowError: what can I do?
By Proprogrammer04, with 1 reply.
Replied to by danpost, over 7 years ago:
Sounds like you have a recursion issue. Cannot help you without seeing what codes you are using. Start with class of 100+ objects; then, class where those objects are being created from (whether from world or from another actor).
pls help with error.
By Night, with 2 replies.
Last reply by Night, over 7 years ago:
thank you :D.
why does this not work
By Philipplol, with 2 replies.
Last reply by Proprogrammer04, over 7 years ago:
It would make things easier if you also use english words for your variables instead of german words
HOW TO CONTINUE MY TIMER IN TO ANOTHER WORLD
By joycepestin, with 6 replies.
Last reply by Nosson1459, over 7 years ago:
also you reference other world classes and other things here please post all the classes and the entirety of them. I did my best based on the info you gave but the code I gave you very likely wont work because there are parts of your code that I cant see
Thanks to Danpost!
By CROCKETTROCKETT4, with 1 reply.
Replied to by MrEaton-CodingGuru, over 7 years ago:
Agreed! Danpost has helped me countless times. This community does not deserve all he does for us and all he teaches. I certainly agree that Danpost is epic. Happy Easter everyone.
Movement Pattern
By Trebushey, with 2 replies.
Last reply by Trebushey, over 7 years ago:
Super_Hippo wrote...
Move line 3 outside of the method. You probably want line 10 in line 15, too.
ohhh I see now, thanks it works now.
Selecting a card that is on the slot
By dkalfpqpfjq, with 35 replies.
Last reply by dkalfpqpfjq, over 7 years ago:
Okay. Thank you for your reply!
java.lang.IllegalStateException
By Proprogrammer04, with 8 replies.
Last reply by Proprogrammer04, over 7 years ago:
danpost wrote...
Add (insert) the following at line 66: <Code Omitted>See if that helps.
That helped, the program doesn't stops itself anymore. It don't want to do what I want it does, but I think I can manage it myself ;-) (p.s. Nccb your idea shouldn't matter in my case beacause situationRemove() shouldn't be executed…)
Memory game help with spawning please
By N0way, with 2 replies.
Last reply by nccb, over 7 years ago:
When you remove the apple from the world, you reset appleflip. Similarly, when you remove the letter, you reset letterAflip. So whichever one gets removed first will prevent the other seeing the state where both are flipped. You should probably make one class responsible for removing both the items rather than making them only remove themselves. (Greenfoot.delay delays the whole simulation not just that actor, so it won't make a difference to the behaviour.)
If else statement problem
By NoobFected, with 1 reply.
Replied to by danpost, over 7 years ago:
I think you are using
turn
in places where you should be using
setRotation
(line 57 and 81). You are turning -90 degrees (making a left face) when hitting a side edge along the bottom. That will make the actor face in opposite directions (one up and one down) depending on the side hit.
195
196
197
198
199
200
201
X