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
Posting score on internet
By 60sChallange, with no replies.
Is it possible to make shortcut for posting score on facebook or twitter?
Need help with adding timer to game
By Spider02, with 1 reply.
Replied to by danpost, almost 11 years ago:
What have you tried? Show attempted code (use the 'code' link below the reply box to insert code into your post).
Cant call a method from other class
By ds06, with 2 replies.
Last reply by ds06, almost 11 years ago:
Thanks davmac, ive got it to work :) For anyone who is interested: <Image Omitted>
How do i make a text input on screen on greenfoot world
By coder04, with 1 reply.
Replied to by davmac, almost 11 years ago:
Could you not just use the Greenfoot.ask(...) method?
Getter/Setter methods in Superclass
By getreides, with 9 replies.
Last reply by getreides, almost 11 years ago:
Hello both, thank you again for quick and detailed answers! I've chosen to use the super keyword as described by davmac, and it does work!
Help Needed! detecting if object exists and code cleanup
By TheGoldenBucket, with 2 replies.
Last reply by TheGoldenBucket, almost 11 years ago:
Thanks, Hippo! Managed to get that working, and I will start using the "&&"s to clean up my code. Best of thanks, -TheGoldenBucket
Cannot get objects to remove from world correctly, HELP!
By RagingAsian, with 6 replies.
Last reply by RagingAsian, almost 11 years ago:
Thank you a lot, it is working perfectly.
How to edit a GreenfootImage
By Ben&Sam, with 9 replies.
Last reply by danpost, almost 11 years ago:
It looks like you need to create a list of pairings. However, since you already know that both sides of the pairings are one-character strings, you can use a simple String object to store the pairings. Start with: <Code Omitted>as a field within the class (declared outside of any method). Then, as each pairing is entered, add the pair to the String object: <Code Omitted>To apply the pairings to Label, use something like this:
Controls
By 60sChallange, with 6 replies.
Last reply by danpost, almost 11 years ago:
The 'if' statement is, in essence, a blocking statement. If the condition is 'false', the code block will not execute. You would say 'if some set of conditions are true, execute the following code'. I would suggest using 'else' in this matter ( that is: 'if (dy == 0) {} else { run space command }' ), and, in fact, that is exactly what you could do. The code within the empty curly brackets ( '{}' ) could be 'run left/right command':
Problem
By 60sChallange, with 11 replies.
Last reply by 60sChallange, almost 11 years ago:
ty
Snap to
By KiwiMC1482, with 8 replies.
Last reply by danpost, almost 11 years ago:
Ben&Sam wrote...
it was a joke..
Please refrain from creating non-constructive posts. davmac might reply with something like this:
what if Ben&Sam was banned
How to move up and down with just one button.
By Jellyfish, with 12 replies.
Last reply by Jellyfish, almost 11 years ago:
nvm
Animations
By Jellyfish, with no replies.
Hi how do I create moving animations for my character(s)?
game levels
By javaisanart, with 13 replies.
Last reply by danpost, almost 11 years ago:
The code I gave was supposed to be in your world subclass -- not in your new Hud actor subclass. In fact, the code as given will work in your world subclass without any changes. If you create a basic Actor subclass for HUD objects, make it a very basic class, like this: <Code Omitted>and change my line 5 to: <Code Omitted>Yes. That first line of code in this post is the entire class code.
Shooting problem
By Hawx_, with 10 replies.
Last reply by danpost, almost 11 years ago:
AmericanaStorm wrote...
This might be weird but would be the coding for the bullet to shoot in the actual bullet class and not the shooter class. Thanks
It sure does sound weird. It is not the behavior of a bullet to shoot a bullet. That behavior belongs to that of the shooter. The usual behavior of the bullet is to fly through the air until a target is reached or until it goes 'beyond' the end of the world (rather, reaches the edge of the world). Sometimes, instead of the bullet having the behavior to 'reach a target', the target will consume the bullet and lose health or die. Th
600
601
602
603
604
605
606
X