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
Moving Actor with arrow keys
By Pizza020, with 2 replies.
Last reply by Alwin_Gerrits, almost 12 years ago:
Shouldn't the actor allso be able to go down?
Please help me with this error
By coder04, with 4 replies.
Last reply by danpost, almost 12 years ago:
Give yourself a health value of 3 to start: <Code Omitted>Create a method, called from the act method, called checkLaser to detect and remove Laser objects and, when detected, decrease health and check for death (health == 0).
Stop the Time
By NiKu, with 2 replies.
Last reply by danpost, almost 12 years ago:
You could use a static array to hold the times for each level. If you have a superclass for you levels between them and the World class, that would be the best place for it. In the constructor of each level, have the negative value of the current time set to its element in the array; and, add the new current time when the level ends,
centering JOptionPane message
By Alwin_Gerrits, with 4 replies.
Last reply by Alwin_Gerrits, almost 12 years ago:
True, I think just leaving JOptionPane might be better, but seen I'm using it allthroughout my game I don't think it will look well if I start using a differend looking panel all of the sudden. Thanks though danpost, I'll defiëntly keep it in mind for future projects.
A complicated problem with scores
By GreenCompiler, with 9 replies.
Last reply by GreenCompiler, almost 12 years ago:
Thanks for all the advice you've given me. ^^ I've been able to solve the problems I had now. It's still a bit rough around the edges but my game is doing what its supposed to do now.
Using the built in ScoreBoard + UserInfo to track top scores
By Gish, with 2 replies.
Last reply by Gish, almost 12 years ago:
I'm not sure how you do it, danpost, but you always seem to be able to help. I don't know why I overlooked that conditional statement for adding the scoreboard only once. I also tried this with a new user name, and it all seems to be working perfectly. Just a few more tweeks and Ill be ready to submit. Thanks again.
Changing font inside of a score counter
By RawbyTheSheeth, with 1 reply.
Replied to by danpost, almost 12 years ago:
I do not know how easy it would be to change the default font of a new GreenfootImage object (if it is at all possible). However, I have a subclass for the GreenfootImage class that makes text images that use a given font. It is located in my
TextImage Support Class
scenario.
Need help with a scrolling world
By Sranang, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
<Code Omitted> You could do it like this.
Having difficulties with randomly moving objects
By cha0204, with 8 replies.
Last reply by Super_Hippo, almost 12 years ago:
The 'resetBoolean' method is needed as you do it. (In my scenario I just set them to 'true' or 'false' every time, but you can also do it like this. The 'changeDirections' method... well, I was thinking of something like this:
jump
By amit_27980, with 1 reply.
Replied to by danpost, almost 12 years ago:
What code have you tried?
New JFrame
By JetLennit, with 4 replies.
Last reply by NikZ, almost 12 years ago:
Super_Hippo wrote...
I don't know what a JFrame is. I think I saw it once when testing out Eclipse, but I didn't understand anything there, so I moved back to Greenfoot where I don't need such things... Did you update to Java 8? Maybe this causes the problem like it blocks the storage. But it could be completely different, just an idea. ;)
It is a pop up box/frame. Add JComponent to it for content.
Create an exception to some classes
By MySelfLuls, with 6 replies.
Last reply by danpost, almost 12 years ago:
Line 1: * the 'enhanced for' (or 'for each') loop -- see lower half of
this page
* the 'getObjectsAtOffset' method-- see
Actor class documentation
* the 'removeAll' method -- see
List class documentation
Line 3 assigns the object from the resultant list to an Actor field. This is so the object will be looked upon as an Actor object, not just an Object object (necessary b
Character goes through the platform (from below)
By sunjay001, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
If the onGround works, you can probably write similar code to check for above the player. There is probably something like 'getOneObjectAtOffset(0,/*something positive*/, Ground.class)'. If you change the positive value to a negative one, it will check above the player.
Is there a method or command to open up the java documentation?
By BryanGSMST, with 1 reply.
Replied to by danpost, almost 12 years ago:
If you mean something like what
this scenario
does, then, well, yes; but it is not a command or method, it is a button actor (in one world) and a world subclass that displays a text file (in another world). You will need to add a '.txt' file to your scenario folder by opening up the '.java' class file and saving it in the same folder as a '.txt' file if you want an uploaded version to work properly (the '.java' files are not placed into the scenario folder on the site, but any extra '.txt' files will be placed there).
'(' expected?
By Fuzzion, with 2 replies.
Last reply by danpost, almost 12 years ago:
The following line is incomplete: <Code Omitted>It should be: <Code Omitted>with a set of open and close parenthesis after the name of the method.
640
641
642
643
644
645
646
X