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
Greenfoot Movement
By Khofo, with 1 reply.
Replied to by danpost, about 6 years ago:
How is the movement coded for this actor? Supply class codes.
Removing timer
By DaRafster, with 13 replies.
Last reply by danpost, about 6 years ago:
danpost wrote...
Move line 33 to before line 18.
That is not something you want to do every act step. Only when you want to
initiate
adding more asteroids.
Remove line 34 thru 36 and line 41.
Those actions are done in line 37.
Then move lines 30 thru 32 to before line 39.
You only need to do them when you
know
you are going to add an asteroid (after the conditions on line 37 are met).
Calling variable between worlds
By jay4221, with 2 replies.
Last reply by jay4221, about 6 years ago:
oh thank you so much, that makes a lot more sense and fixed my code.
Having trouble adding objects to MyWorld from an actor subclass
By bubbadawg, with 9 replies.
Last reply by danpost, about 6 years ago:
bubbadawg wrote...
Is there a method where I can update the string parameter of a GreenfootImage? What I tried was removing the existing tileValue and putting another one in the same place but with the new string.
You want to use the tileValue that is already there and just change the text and image. You need to factor in an
updateImage
method. Move and modify the imaging code in the constructor to the new method. Call the method from the constructor and from the method that has the text change.
Using an array to create a certain method
By Mattzh, with 3 replies.
Last reply by danpost, about 6 years ago:
Mattzh wrote...
My goal (and what I am not sure of) is to add something
using arrays
to regenerate a new color if it is equal to the old color.
It would be quite similar to the expression I used above on line 3. It would, however, then refer to an index pointer to the array. You do not need to pass the length of the array along with the array. You can simply acquire its length by: <Code Omitted>Just add an
int
index pointer field to hold the element number of the current color.
Hi .. i want to compare tow images of two classes by using the equals method but it doesn't work.could you say where i have the mistake please.
By JojoAr, with 5 replies.
Last reply by danpost, about 6 years ago:
JojoAr wrote...
I'm programing abubble shooter game in which i have a cannon at the bottom and two classes for bubbles one class is for bubbles that are already in the world and one class for the bubbles that come out from the cannon.so i want now to compare the bubble image that was fired from the cannon with the bubbles that are already in the world so that after touching if the bubble image from the cannon is the same as the bubble image that is in the world they will be removed. I hope that the problem is clear now.
How might I be able to find the insets of the greenfoot window?
By Wasupmacuz, with 3 replies.
Last reply by Wasupmacuz, about 6 years ago:
nccb wrote...
In recent versions of Greenfoot, the user code runs in a different process to the main window
I remembered this from a topic last year. Workaround here I come.
Time Limit
By APCSP-6, with 1 reply.
Replied to by danpost, about 6 years ago:
APCSP-6 wrote...
On my game that's like Diner Dash, I need to a time limit but I was wondering hoe you could do that and like display it on the screen... if that was possible.
Please refer to my
Value Display Tutorial
scenario.
No Actors
By Heftygoldfish, with 2 replies.
Last reply by Heftygoldfish, about 6 years ago:
thanks :)
Increasing speed over time
By NewUser1201, with 2 replies.
Last reply by NewUser1201, about 6 years ago:
Thank you for your help @danpost, ngl took me a few tries to read and fully understand what you were saying but I figured it out, again thanks!
Zoom in and out
By ronald, with 17 replies.
Last reply by ronald, about 6 years ago:
thank you all three
Get one Position
By Starlord_20, with 1 reply.
Replied to by danpost, about 6 years ago:
The following should help: <Code Omitted>
Clara world Exercise issue
By Sammie, with 1 reply.
Replied to by Super_Hippo, about 6 years ago:
You can not link to a file on your computer. If this would work, anyone had access to your computer.
hi i am having a problem with my current mute button
By Weeb.exe, with 5 replies.
Last reply by Weeb.exe, about 6 years ago:
oh ok
Cut Block in Stack game
By AdiBak, with 1 reply.
Replied to by danpost, about 6 years ago:
AdiBak wrote...
I was wondering how to cut/resize a block in the famous stack game?
At time of cut, you can either create and add 2 new blocks and remove the current or you can add 1 new block (the cut part) and scale the current one. Either way, you will have to calculate the locations at which both final blocks need to be placed as their centers will not match up with the original block.
131
132
133
134
135
136
137
X