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
Am I able to download my scenarios I've uploaded?
By BubbaB, with 4 replies.
Last reply by BubbaB, over 11 years ago:
I got it running! Thank you so much!
Sound loops
By Gingervitis, with 11 replies.
Last reply by Gingervitis, over 11 years ago:
I think that did it! Thank you!
way to make world recognize how many objects are in it?
By joeschmoe, with 19 replies.
Last reply by joeschmoe, over 11 years ago:
Thank you thats what I did :P
The prefix static
By Solringolt, with 11 replies.
Last reply by Solringolt, over 11 years ago:
Thx for all these instructive precisions!
How can I make a winning code for the end of the level?
By derp2000, with 4 replies.
Last reply by MrCohen, over 11 years ago:
First you need to set up the condition, as I did in my code above. Then you need something to do when the game ends. I suggest the easiest way is to draw a picture in Paint that you want to display. Create an Actor with no code in it set to your painted image. Finally, when you detect that the player has achieved your goal, display that new Actor on the Screen and call Greenfoot.stop(). That's the easiest way. There are many better and more interesting ways to end a game but try this as a starting point.
How do I control an actor with the mouse?
By bernhard, with 2 replies.
Last reply by bernhard, over 11 years ago:
That worked, thanks :)
Force position at a special location
By Solringolt, with 2 replies.
Last reply by Solringolt, over 11 years ago:
Thx! I was trying something like that but I was using the setExactLocation where x and y are doubles and that didn't worked.
HELP
By aheadinstead, with 2 replies.
Last reply by aheadinstead, over 11 years ago:
your greatly appreciated,ill consult yet for future endeavors if you allow, thanks , jai
Issues with variable
By Phytrix, with 2 replies.
Last reply by Gevater_Tod4711, over 11 years ago:
If I understod you right your problem is that when you change the variable question in an instance of ClassA the value is not changed in ClassB. This is because every instance of the classes (A or B) has it's own variable question and you have to change every value on your own. If you change the value in one instance of ClassA in another instance of this class the value will not be changed too. If you want the value of question to be the same for every instance of ClassA, ClassB and all other subclasses you need to declare it static: public static int question;
Static fields
By Gingervitis, with 4 replies.
Last reply by danpost, over 11 years ago:
bourne did not place it in the act method; he put it in the world constructor.
Null pointer error
By Gingervitis, with 12 replies.
Last reply by danpost, over 11 years ago:
You should include the entire error message (it has pertinent information as to exactly where the error occurred).
Smooth move while cellsize superior
By welleid, with 6 replies.
Last reply by danpost, over 11 years ago:
The following should 'snap' the object placed by the user into its proper location (using a imaginary cellsize of 80x80). the (n/80)*80 part gets the multiple of 80 for where it was placed; the +40 centers the object into that 80x80 imaginary cell. <Code Omitted>
calling a method of a particular instance
By dat2357, with 2 replies.
Last reply by dat2357, over 11 years ago:
thanks
java.lang.NullPointerException NEED HELP!
By tommy95, with 6 replies.
Last reply by tommy95, over 11 years ago:
It all works now. thanks
Vector
By yohanoc, with 1 reply.
Replied to by danpost, over 11 years ago:
First, you must add (by 'import'ing or creating) a 'Vector' class into your project. Then, you can create and use vector objects in your scenario.
819
820
821
822
823
824
825
X