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
Quick concern
By landry, with 2 replies.
Last reply by landry, over 11 years ago:
import javax.swing. JTextArea; JOptionPane.showMessageDialog(null, text, "Copy and paste", JOptionPane.INFORMATION_MESSAGE); I think only those lines are really necessary because i just tried them and it worked but i guess it depends on how your code was designed .
I do i get the background music stop.
By MojoGames, with 1 reply.
Replied to by danpost, over 11 years ago:
You will need a reference to the GreenfootSound object and add a 'public void stopped()' method to the world class with a statement to stop the music in it.
I need some help debugging my scenario
By Entity1037, with no replies.
My scenario is here: www.greenfoot.org/scenarios/8355 The glitches are found in the bottom two comments. They're the ones with the "-" before them. I can't figure them out and they're ticking me off. Its pretty hard ironing out bugs when the scenario plays SOO SLOWLY on the editor, and I could really use some help sense I need to study for my finals this week. Could someone please help me? Thank you.
Flipping a GIF?
By Robert2.0, with 2 replies.
Last reply by Robert2.0, over 11 years ago:
danpost wrote...
I do not believe that the gif class available on Greenfoot supports image flipping (you will have to adjust the class code yourself, if you can). Otherwise, create another gif with mirrored images and switch the gifs out that you are using in that class.
What is the code required to flip the image.
Hi im trying to make the the game without adding a counter yet but i dont understand why Greenfoot can't find the release method of my paddle, help!!!
By landry, with 11 replies.
Last reply by landry, over 11 years ago:
I still have a problem in my world with the addBall method in my world , could you please help ? it says can't find variable Empty . import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Nature here. * * @author (your name) * @version (a version number or a date) */ public class Nature extends World { private Paddle paddle; //private Counter counter; /** * Constructor for objects of class Nature. * */ public Nature() { // Create a new world with 600x400 ce
How do I fade one world into another?
By johnguackmbl, with 3 replies.
Last reply by danpost, over 11 years ago:
johnguackmbl wrote...
Where's the second part of the code supposed to go, danpost?
The five-line snippet should probably go within an 'if' block whose conditions determine that it is time to change worlds. The code was not particularly written for being in a world class code or an actor class code. Line 5 should start with 'getWorld().' if in an actor class and lines 3 and 4 should not have 'getWorld().' if in a world class.
Objects
By Robert2.0, with 4 replies.
Last reply by Nike.Sprite, over 11 years ago:
Oh yes indeed I'm sorry danpost
GAME HELP
By FCG, with 10 replies.
Last reply by danpost, over 11 years ago:
I cannot say without seeing what code you have now. It might be because you placed the code incorrectly within the class; or any one of many other reasons.
Side scrolling
By carhad, with 3 replies.
Last reply by carhad, over 11 years ago:
Thanks!
Scenario speed
By GreenGoo, with 4 replies.
Last reply by GreenGoo, over 11 years ago:
I want to make things happen for a specific number of seconds, instead of a arbitrary number of act cycles. I'll use System.currentTimeMillis().
How To Get Object To Only Detect Intersecting Object Once
By JackStieben, with 3 replies.
Last reply by danpost, over 11 years ago:
You do not want to execute the last three 'if' statements every act; only when the score increases. So move those 'if' statements up inside the previous one right after increasing the score value.
Loop Statement Help
By Robert2.0, with 5 replies.
Last reply by danpost, over 11 years ago:
A good source of information pertaining to programming in java can be found in the
Java tutorials
. The second section on the left titled in red (Trails Covering the Basics) is the place to start (especially the sub-section called 'Learning the Java Language'.
How do you make a sequence of objects appear?
By johnguackmbl, with 7 replies.
Last reply by danpost, over 11 years ago:
It varies; but a general rule for a scenario running at standard speed (speed slider in the middle) is somewhere around 55 to 60 cycles per second.
Movement Help
By Robert2.0, with 5 replies.
Last reply by danpost, over 11 years ago:
Ok, first you need an instance int field to hold the changing limits. Then, you only need to check for that limit and when there, reverse the direction (which should also be held in an instance int field, storing one or negative one (so all you have to do is add that amount to the current y value) and get a new limit.
Find out if one Actor no longer exists in the world
By carhad, with 8 replies.
Last reply by carhad, over 11 years ago:
So I did that and It showed level2 at the start. Oh in the scenario there are more then one of the same actor in the world. And I also have to go now so.........Bye! For now.
827
828
829
830
831
832
833
X