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
Heelp
By kangmj, with 1 reply.
Replied to by danpost, over 11 years ago:
If you are wanting to find out what type an object is, then use the 'instanceof' keyword. See the bottom of
this page
of the java tutorials.
Help with the "getOneObjectAtOffset()"
By kangmj, with 1 reply.
Replied to by danpost, over 11 years ago:
I do not see how the 'getOneObjectAtOffset' method has anything to do with adding music! Anyway, Greenfoot provides two ways to implement sound into your projects. One is through the static Greenfoot method 'playSound' and the other is by creating GreenfootSound objects and calling instance methods to control them. With the static method, you have no control over the sound; it will play once through and then stop (t will not loop) and you cannot pause or check to see if it is still playing or not.
Create Game
By Boobathi, with 1 reply.
Replied to by davmac, over 11 years ago:
Start by going through the tutorials in the
documentation
section.
Can someone translate this alrgoritm for me?
By Nnacheta56, with 8 replies.
Last reply by danpost, over 11 years ago:
Nnacheta56 wrote...
do you know What is it called when open { and close } braces surround and group together lines of code?
That is called a block, or a block of code. A set is used to enclose the code for a class, others are used to enclose the code for methods and constructors, and still others are used to enclose the code for specific operations (such as 'if', 'while', 'do', 'for', 'switch', etc.).
turn (12); won't work as flawlessly as the tutorial vids
By philycheesesteak.java, with 5 replies.
Last reply by danpost, over 11 years ago:
davmac wrote...
This topic was posted in 2011... maybe the time to answer it has passed :)
You are most certainly correct. I wonder why jogit666 replied to it :0
Need help using World.showText
By ILOVELABRADORS, with 3 replies.
Last reply by danpost, over 11 years ago:
ILOVELABRADORS wrote...
Thanks, but do I have to create a new actor or do I just do it in a certain actor's action codes?
No. All you have to do is call the method on a World instance.
i'm trying to make something move back and forth but its not working
By DragonGirl, with 4 replies.
Last reply by danpost, over 11 years ago:
You really need to give more background to your questions. Also, you should at least try something on your own and then, if you come across problems that seem to overwhelm you, post the code you tried with a brief description of what you were trying to do. Asking "How do I make a character shoot a bullet" leaves way to much to guesswork:
Rube Goldberg Challenge
By Game/maniac, with 7 replies.
Last reply by NikZ, over 11 years ago:
Next Challenge is
here
.
Bouncing - Ball stuck at the edge
By Niles, with 4 replies.
Last reply by danpost, over 11 years ago:
Try using 'move(-5)' before changing the rotation (see line 17 of the code Zamoht supplied). You may be able to remove 'oldEdge' from the code after inserting this line. However, I think it could still be buggy if both edges are encountered simultaneously. Maybe simplifying might help. Try this:
Reset is bugging me
By KenCo, with 13 replies.
Last reply by KenCo, over 11 years ago:
danpost: Thank you. I will investigate using the system clock - good one!
How to use abstract classes to make multiple maps
By Kirito101, with 5 replies.
Last reply by danpost, over 11 years ago:
Kirito101 wrote...
So I need a separate class for the character map.Is this what you mean or? <Image Omitted>
No. That is not what I meant. Use the scenario you got the Level class from as an example of how your 'map' array should be set for each level.
How to make highscores
By User_, with 11 replies.
Last reply by User_, over 11 years ago:
so just follow other highscore tutorials?
Random Dice
By SCollins, with 6 replies.
Last reply by SCollins, over 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, over 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, over 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
645
646
647
648
649
650
651
X