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
How can you add a new actor to the world with specific variables?
By IsaacIIV, with 5 replies.
Last reply by IsaacIIV, about 13 years ago:
ohh i see i was still putting temp().get.. Tower temp = new Tower(); getWorld().addObject(temp,50,50); temp.get("TW-CRT.png","AM-CRT.png",5,30,1,1,200); working great :) thank you
mouseClicked reset?
By TheNightStrider, with 9 replies.
Last reply by davmac, about 13 years ago:
that would work, but your original code wouldn't. You see, if betweenClicks was true, it would make it false and then also do the second click action. It HAS to be replaced with an else if
The original code has a 'return' statement inside the conditional block, so it couldn't also do the second click action.
Can't declare a new actor from another actor
By IsaacIIV, with 1 reply.
Replied to by IsaacIIV, about 13 years ago:
SORRY, me being really stupid - its working now
Counter
By Greenfoot15, with no replies.
i want my game to count down from 30 seconds when the game is started my code i have private int startTime =0; public void Counter() { startTime=System.currentTimeMillis(); } public void act() { { if (startTime != 0 && startTime + 30000 >= System.currentTimeMillis()) //30000 means 30 seconds { startTime = 0; doSomething(); } } } public void doSomething() { Greenfoot.stop(); } but it still wont count..
Count labels
By joemoma, with 10 replies.
Last reply by ihatenoahbravo, about 13 years ago:
Love you to Joe
Sound Help
By Sneaky4296, with 18 replies.
Last reply by Sneaky4296, about 13 years ago:
danpost, thank you for all your help. I got it working.
How to set GreenfootSound sound to a variable
By Sneaky4296, with 1 reply.
Replied to by davmac, about 13 years ago:
You store a reference to a GreenfootSound in a variable using the exact same technique as for any other type: GreenfootSound mySound = new GreenfootSound("mySound.mp3");
Bullet problems
By armoredarmada, with 10 replies.
Last reply by armoredarmada, about 13 years ago:
a "key to execute order" was the same as what you said, i just couldnt find the words. heres the ppl1 shooter code: if(";".equals(Greenfoot.getKey())) { bullet ball = new bullet(); getWorld().addObject(ball, getX(), getY()); ball.setRotation(getRotation()); And it is IMPOSSIBLE to use one bullet class because that bullet is programmed to remove any actor from the game on contact (ppl1 and ppl2). If theres another way to make it use only one bullet class then PLEASE tell me. I want to get this game done ASAP so I can show my friend at school. And after I gradua
First game
By magelord4100, with no replies.
Im making a game for a assesment and i was wondering how do I make the world scrool around with the player in the center. This could help my assingment alot.
setRotation(getRotation) error
By armoredarmada, with 2 replies.
Last reply by armoredarmada, about 13 years ago:
thank you! I had getRotation))); wondering why the heck isnt it working! Thank you alot!
hello
By johncolmer, with 10 replies.
Last reply by Morran, about 13 years ago:
When you load Greenfoot for the first time, it should load up the Wombats scenario. If not, try clicking on the "Scenario" tab on the top left corner of the screen, and roll over "open recent". It should give you several options, and if you haven't made a bunch of scenarios since you downloaded Greenfoot, the Wombat scenario should be there. I hope that helps.
High Scores!
By nccb, with 23 replies.
Last reply by Duta, about 13 years ago:
If you look at an alternative method of storing an image (storing the RGB values of each pixel) it begins to be obvious why so much space is required: Imagine an 1000x1000 image -> For each pixel in that you need to store the RGB values -> that's 1,000,000 RGB values. This is obviously pretty similar to how a bitmap (.bmp) file stores an image (and also the reason why .bmp's take up so much more space than the same image in a .jpg form for instance), but still you get the idea :p
user made variables
By tylers, with 1 reply.
Replied to by DonaldDuck, about 13 years ago:
This would be the simplest thing.
Here
Why don't work my simulation in the exported mode???
By Busch2207, with 14 replies.
Last reply by Busch2207, about 13 years ago:
@ nccb That surprise me, now. My comp shows me, that Java 7 is installed, but it's not working... But thank you for your help, I'll remove the BinaryTree package.
PyroTyro4.1 difficulties
By dlanni, with 4 replies.
Last reply by danpost, about 13 years ago:
I found the tutorial with the bicycle class examples. It is not in Greenfoot, so you probably did not review it. It is actually in the Java site. The home page of the tutorials is
here
There is an abundant supply of information linked to this page; however, the second sub-title on the left in red is 'Trails Covering the Basics', and the second item listed under that is 'Learning the Java Language'. Click on that and you will be on your way.
998
999
1000
1001
1002
1003
1004
X