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
add object arount circle
By Starlord_20, with 7 replies.
Last reply by danpost, about 6 years ago:
Starlord_20 wrote...
so what could I do instead?
danpost wrote...
Anything done after appropriately placing the
Activator
objects in the world will be done in the
Activator
class.
the
Target
object be removed after line 6
Error in GifImage class
By 108089, with 10 replies.
Last reply by 108089, about 6 years ago:
Thanks for helping, i have worked around the problem by chosing a different background. Sorry for not replying for so long but i just forgot about it.
No world is created
By Libraoct7, with 1 reply.
Replied to by danpost, about 6 years ago:
Please supply image to an image hosting site -- like imgur. I, for one, like to see what type of file it is before downloading to my computer. Can you right click on the class (in the
Classes
area) and select
new MyRaceWorld()
? If not, open its editor, go to the end of the top line and press "enter" and then press "backspace". Then see what happens.
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>
131
132
133
134
135
136
137
X