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
Sound Not working!
By CLink08, with 4 replies.
Last reply by danpost, about 11 years ago:
Wherever you have this line: <Code Omitted>Then you can remove everything related to the sound from the Gameover class.
Help with creating counters for different levels+eating objects for different levels
By n_p_13, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
You can post your relevant code and maybe we can help.
Switch on/off collision problem...
By AshenPhoenix, with 12 replies.
Last reply by Super_Hippo, about 11 years ago:
Yes, I only asked because this would be a mistake. ^^ No problem!
Issue with removing object.
By gdwd4, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
There is a difference between 'class' and 'object'. An object is an instance of a class. In the code at the bottom, you create an object of class 'Back' and so on. If you click an (or the) object of the class 'RedTile', you try to remove the 'objects' which you created below. You can not say "remove this class". To delete an object, you need a reference to it or you can delete every instance of the class. This probably solves the problem, too, if you don't need to separate between different e.g. BlueTiles in your world. So either use this
i want to create fish aquarium
By talekarsachin, with 2 replies.
Last reply by talekarsachin, about 11 years ago:
I m doing a small simulation of aquarium this is my 1st program in green foot I hav not return soo much big code .I hav given only 2 function for fish move(), turn() ..kk Now u can tel me the code to create aquarium . In that I want to create different fish which can move and they should not clash with each other . And when the fish reaches at the worlds end the fish should turn at any angle this is the thing I want from u.....
Start Menu and Changing Level
By VideoGame, with 30 replies.
Last reply by VideoGame, about 11 years ago:
Thank you for your help !
How to add text
By sengst, with 1 reply.
Replied to by danpost, about 11 years ago:
There are several ways: (1) use 'getBackground().drawString("xxxxxx", 20, 30);'; you may have to change the drawing color of the background image before drawing the string; also, you may want to alter the drawing Font (2) create a text GreenfootImage using the constructor that requires a string and then use 'getBackground().drawImage(textImage, 20, 10);' to add it to the background image (3) create a text GreenfootImage as in (2) above and set it to be the image of an actor and add the actor into the world The easiest to remove and the simplest to use is (3). If you have a flat backgrou
Piano - almost there
By akirashindo39, with 1 reply.
Replied to by sengst, about 11 years ago:
in the constructor for key, pass in a String that is either "black" or "white". have the keys set their images using this String. if you do this the rest should sort of fall in place a bit easier. here's something that you could use: public key( string label, (...anything else you/they have) ) { if ( label == "black" ) setImage( the black image); if ( label == "white" ) setImage( the white image ); // anything else. } if it is the key the key is linked to is pressed, it will use the same type of thing: if ( Greenfoot.isKeyDown( key ) { if ( l
getDirection of vector movement doesn't work
By getreides, with 3 replies.
Last reply by getreides, about 11 years ago:
It does work, thanks again!
A way to let player choose a world?
By Phiesel, with 2 replies.
Last reply by Phiesel, about 11 years ago:
...... Now I feel stupid. Must be the warmth outside. Thanks a lot.
getObjectsAt using ||
By davemib123, with 6 replies.
Last reply by davemib123, about 11 years ago:
great. thanks for showing a solution and explaining why my attempt wasnt working.
Need Some Help With Variables and Actors
By bluefoot135, with 1 reply.
Replied to by danpost, about 11 years ago:
For you first problem, refer to the java tutorial page on
Objects
(the second section is on declaring a variable to refer to an object. For you second problem, the page on
'this' keyword
is what you need to refer to. It would be best to remove the 'other' object before removing 'this' object from the world.
Converting BufferedImage to ByteArray
By CooliMC, with 5 replies.
Last reply by CooliMC, about 11 years ago:
ok i tested it it is faster with your methode thanks alot
Using ImageJ in Greenfoot
By CooliMC, with 2 replies.
Last reply by CooliMC, about 11 years ago:
ok thx you know a fast methode or algorythm to analies a picture and find special rgbs ??
setTransparency of a third object
By Nubbit, with 12 replies.
Last reply by Nubbit, about 11 years ago:
haha yepp, thats the one, thanks!
659
660
661
662
663
664
665
X