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 Between Worlds.
By Dingram, with 3 replies.
Last reply by danpost, about 13 years ago:
It would need to be directed to the parent class. It would be (with 'MyWorld' as a sub-class of World ): <Code Omitted>The variable VARIABLE cannot be 'private' or access to it will be denied, and you will have to either make it public or write the aforementioned methods and use them for access.
On added to world.
By Razzo, with 2 replies.
Last reply by Razzo, about 13 years ago:
That will do perfectly :D Thankyou :D
What is the code that objects in the game can let fall different items
By martijn13039, with 9 replies.
Last reply by martijn13039, about 13 years ago:
oow Thank you so much now I understand, it´s so easy thx!!!
delay script
By -nic-, with 4 replies.
Last reply by -nic-, about 13 years ago:
clever a bit like a life meter nice :)
is mouse down
By -nic-, with 4 replies.
Last reply by -nic-, about 13 years ago:
hmm i see what you mean but i think ill keep mouse pressed thx
java.langNullPointerException
By Redskins201054, with 10 replies.
Last reply by ttamasu, about 13 years ago:
I'm probably stating the obvious but let me get it straight: you have a instance of the class called _recorder and you initialized it like so : _ recoder = new Recorder(); // or something like this before you made the call: _recorder.keyPressed("S2"); right?
Level Saving - String to Object
By Razzo, with 4 replies.
Last reply by danpost, about 13 years ago:
Or, if you want to be more explicit: <Code Omitted>to avoid 'Tree' from producing 'Treefrog'.
How can I remove an object from the world?
By IsVarious, with 33 replies.
Last reply by IsVarious, about 13 years ago:
danpost wrote...
If you are calling a method that is not in the same class code as where you are calling from, then you must tell it (the compiler) where that method is located. In your case, the method was in the Board class (not just the World class). The methods inhereted from the world you can just say 'getWorld().methodName()'; but for methods you write in your Board class, you have to tell it '((Board) getWorld().methodName();', or it will not find it. The '(Board) getWorld()' part is what 'casts' the world returned to you Board class.
Wow, I kinda thought it was something
World Subclasses
By Dingram, with 2 replies.
Last reply by Dingram, about 13 years ago:
Excellent, thank you very much!
Changing the picture of the mouse icon.
By MarkooP, with no replies.
Hi. I am currently attempting to change the icon of the mouse pointer into a transparent GIF. However, I'm not sure exactly how this can be done. I did do some research before asking you guys, but none of it made sense. If somebody could be explain how, it would be greatly appreciated.
Greenfoot 2.2 beta bug?
By Duta, with 7 replies.
Last reply by Duta, about 13 years ago:
That's a shame. I guess I'll just downgrade to the previous version until the fix is released
Writing a file
By Busch2207, with 9 replies.
Last reply by K_O_P, about 13 years ago:
@ Busch Maybe you can store more ints, when u use Symbols instead of numbers if you take 100 different symbols, you can write the numers 0 to 99 in just one space! you just need a method that converts a number in this code and backwards.
Bring Image To Front
By RedPhoneBooth, with 4 replies.
Last reply by danpost, about 13 years ago:
RedPhoneBooth wrote...
but actors cant add objects to the world right?
That is not quite true. As long as the actor is in the world, you can use the 'getWorld()' method to access the 'removeObject' and 'addObject' methods. <Code Omitted>
Assignment to make the classic "Frogger" game.
By decobro, with 7 replies.
Last reply by decobro, about 13 years ago:
Okay I have added some squiggly brackets around my code and I have managed to get it working again! Thanks for your help everyone, much appreciated.
List.toString() then String.toList()
By Razzo, with 3 replies.
Last reply by tkiesel, about 13 years ago:
I should mention that while the work to write something like this can be finicky and tough, once you have it, writing new levels for your game becomes so much easier, and for really complex levels, your world file can shrink from an enormous monstrosity to something far more manageable! :) Two high school students of mine (with some help on file IO from me) used this basic system to write a Galaga-type space shooter, and their level Strings even included timing data. Cool stuff.
989
990
991
992
993
994
995
X