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
Library
By CooliMC, with no replies.
I have loaded a new Library , that i have downloaded from a website , if i run the project in greenfoot all works, but if i share it to a .jar file it doesn't work anymore and i think when i share the project , it doesn't share the loaded library and so it doesn't work. can someone help me pls ?
Add a delay after pressing a button?
By 7788, with 3 replies.
Last reply by CooliMC, over 12 years ago:
or you did it like danpost said :D
Open a .jar in Green foot?
By Mint_Greenie, with 8 replies.
Last reply by danpost, over 12 years ago:
You do not have to save the image to a file -- it is a GreenfootImage object referenced by a field (I will name the field 'image').. All you need to do is to create a reference to the new world when you create it. If 'GameWorld' was the name of your game world, then: <Code Omitted>creates the reference in 'gw'. From there you can execute method and access fields in the new world using the dot operator on 'gw' (for example 'gw.setBackground(image);' or 'gw.getPlayer().setImage(image);' or 'gw.player.setImage(image);'). After altering the world in the way
Random Number Generator
By CaptainMorgan, with 1 reply.
Replied to by CooliMC, over 12 years ago:
Greenfoot has his own number Generator : use: <Code Omitted>that means you get all numbers from 0 to 99 hope i could help you
Importing Greenfoot classes into Eclipse
By Zamoht, with 20 replies.
Last reply by Zamoht, over 12 years ago:
Will check that out later thanks for the replies both of you.
Program crashes when I try removing an actor.
By semigu, with 3 replies.
Last reply by semigu, over 12 years ago:
THANK YOU SO MUCH DANPOST! The first one worked fine!!
Removing objects in a certain area...
By GP2, with 3 replies.
Last reply by danpost, over 12 years ago:
If you want to remove only objects from specified classes, you can write the line multiple times replacing 'null' with 'ClassName.class' -- one line for each different class type.
how do you make a high score counter?
By GP2, with 3 replies.
Last reply by danpost, over 12 years ago:
GP2 wrote...
ok have looked into the UserInfo class and I'm a little confused on how it works do I have to make a .csv file or something?
No -- the UserInfo class of greenfoot does that for you. You only need to call the 'store' method on a modified (or un-modified) UserInfo object returned from 'UserInfo.getMyInfo()'. As the documentation states, however, you must first make sure that the user is logged in and storage server is available with 'if (UserInfo.isStorageAvailable())'.
Help Constructor not working interchangeably
By vivabenfica4, with 1 reply.
Replied to by vivabenfica4, over 12 years ago:
NVM, got it!
Greenfoot: Image Pass?
By Mint_Greenie, with 4 replies.
Last reply by Mint_Greenie, over 12 years ago:
thanks
Set image depending on variable in another class
By Crystic, with 3 replies.
Last reply by danpost, over 12 years ago:
Have the dummy actor set (or finalize) its image in an 'addedToWorld' method. Please refer to the Actor class API documentation for information on this method.
how do you do a time counter
By MBX5, with 5 replies.
Last reply by Entity1037, over 12 years ago:
@Gevater_Tod4711 Oh... good to know.
Can not longer place my units.
By CalzoneCannon, with 33 replies.
Last reply by danpost, over 12 years ago:
You need to post your error message (copy/paste it) and show the Sun class (if that is indeed where the error is occurring).
Better Layout for my GUI
By JasonZhu, with 1 reply.
Replied to by danpost, over 12 years ago:
You need to make a higher level component that is top-down containing two lower level components -- one with the cards that is left to right and one with the control panel which is left to right.
Have a question with sidescrolling
By n1nikko, with 3 replies.
Last reply by danpost, over 12 years ago:
No. The scrolling is something that should be done in your subclass of world (your ScrollingWorld class) -- even determining if scrolling should be done. The player should be programmed as normal (without respect to scrolling at all). Your code:
675
676
677
678
679
680
681
X