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
Subclass Turtle does not inherit the methods from class Animal
By MSacramento, with 5 replies.
Last reply by MSacramento, about 11 years ago:
Thank you danpost for letting me know about Greenfoot 2.4 and its additional methods, which version I have now installed. As davmac does rightly remind me, indeed my Turtle inherits from Animal, which inherits from Actor, but these two classes do come with empty Act methods, which startled me somewhat. So I proceeded as instructed in the video tutorials, namely, empty the contents on the Animal class first, then paste the Animal class version 1.0 by Michael Kolling, and it worked. I guess I should try invoke isTouching, removeTouching, and isAtEdge methods in the Turtle class, which inherits
Chalanges
By JetLennit, with 116 replies.
Last reply by NikZ, about 11 years ago:
JetLennit wrote...
whatever you want with them, as long as they are challenges.
Okay, I'll figure it out.
Greenfoot talking with an Arduino
By cstallworth, with 10 replies.
Last reply by LuigiChi, about 11 years ago:
We need to uncomment the correct line in the NativePathSetter class. With s+= "native/Windows64;"; its all ok, when the ball touch the house the LED on Pin 13 ligths Thank You very much!!!
how to download online scenario I created
By User_, with 13 replies.
Last reply by User_, about 11 years ago:
Thank you so much I really appreciate it!
I need help with my scoreboard.
By plushyducky, with 12 replies.
Last reply by Super_Hippo, about 11 years ago:
No :D I mean where is the code with which you want to add the scoreboard to the world.
Creating multiple condition if-then statements.
By Dahoneybadger11, with 1 reply.
Replied to by danpost, about 11 years ago:
The part 'F = 1' does not produce a true/false (boolean) value. It only sets 'F' to the value of '1'. For comparing two values for equality, you must use the '==' operator ( 'F == 1' ).
Overlaying a String onto an image
By xChaoswar, with 7 replies.
Last reply by xChaoswar, about 11 years ago:
It works now! Thank you!
No suitable constructor found
By fluttershy, with no replies.
problem is solved
How do I make it so when my bullet hits the sides of my world it is removed and that i can fire more than on at once
By DarkSoulDemon, with 13 replies.
Last reply by danpost, about 11 years ago:
You can still use 'isAtEdge', but you will have to create the code for the method and add it to the class yourself. Obviously, it should have a return type of boolean and you will need to put a check in it for each of the four edges of the world. HINT: check for the 'x' or 'y' values that represent the edges of the world.
Image Rendering not Right on Device
By NikZ, with 9 replies.
Last reply by NikZ, about 11 years ago:
Yeah, I only get this sometimes.
That's why I only posted the image now, and couldn't when I started this discussion.
Trying to Use Boolean to Recognize Occupied Cells
By blairtch, with 18 replies.
Last reply by blairtch, about 11 years ago:
It's working perfectly now. Thank you all for the help and advice. Much appreciated, would not have figured it out without you guys. Thanks again!
Code Cleanup
By Sn3aKyGuY, with 12 replies.
Last reply by danpost, about 11 years ago:
Sn3aKyGuY wrote...
but Greenfoot doesn't play it that way.
I am not sure what you mean by this. Greenfoot does not 'play' gif images in itself. The correct Java code, such as that which the 'GIFActor' class contains can be used to run gif image animation. If you have downloaded this class and are using it, there are 'pause' and 'resume' methods in the class, as well as a 'setImage(String)' method you can use to change the gif file used. All you then need is an int field to count the frames as one of the animations runs.
HI, I am currently working on a scrolling game. Im already done with creating the world and main actor is now moving with the scroll effect. I am now on the part where i need to add some random enemies on my map but when i do so, they move along with the
By angelomoloboco, with 12 replies.
Last reply by danpost, over 11 years ago:
danpost wrote...
There are three types of actors in a scrolling environment -- the main actor which is always within the window (and usually in or near the center), the static actors that always remain in the same place within the window (usually info-text like score, lives, level number, etc.)
and those actors that interact with the main actor that may or may not have some movement code of their own AND are moved (scrolled) with the background image
. This last thing is what you appear to be having problems with or have not included within your project at all. < cont'd >
When I
Simulation Needed
By Cosme, with 1 reply.
Replied to by yedefei, over 11 years ago:
You can search in the "scenerio“ part
My score is going up too Fast
By coder04, with 6 replies.
Last reply by Super_Hippo, over 11 years ago:
You are already have the conditions to check if there is an enemy (line 37 and line 46). In this if-blocks, you need to call the 'addScore' method on the Counter object. (the part you commented out has to go there)
646
647
648
649
650
651
652
X