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
Random Dice
By SCollins, with 6 replies.
Last reply by SCollins, almost 11 years ago:
Thanks danpost and super hippo for the suggestions, dan yours is like what i was trying, but right! I will test the code in a bit and tell you.
Image file issue
By ajmetal, with 2 replies.
Last reply by ajmetal, almost 11 years ago:
Thanks I figured it out. Whenever I try to set an image by right clicking the class it will only accept images from outside the images folder of my scenario. When calling a method (like for animation) you can use images you've saved in the image folder.
How to make a message box?
By kangmj, with 3 replies.
Last reply by danpost, almost 11 years ago:
There is a way to create an Actor object that displays a message without creating a new subclass of Actor. However, which ever way you go, you will have to deal with how to remove the actor after it is displayed (unless this will end that simulation). When using a class for it, you can check for the existence of an instance of that class in the world with 'getObjects(ClassName.class).isEmpty()'. This will work provided you have only one instance of the class present at a time. Any other situation (more than one instance or not using a separate subclass of Actor) will require a field be set
Assistance needed with an animation bug
By nickthequik, with 2 replies.
Last reply by danpost, almost 11 years ago:
What Super_Hippo means by you making the arrays the same is that when you create the reference 'reverse', you are telling the compiler to have it point to the same memory location that 'images' points. That is why when you mirror an element in one array, you are actually mirroring the element in the other as well, because they are not two distinct images, but one in the same. Rather than copy, or create, the entire array, it would be better just to get the one image needed at that time and mirror it, replacing lines 8 through 10 with this:
Subclass Turtle does not inherit the methods from class Animal
By MSacramento, with 5 replies.
Last reply by MSacramento, almost 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, almost 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, almost 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_, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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, almost 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!
645
646
647
648
649
650
651
X