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
I am making a game where you have to click an actor then click another actor. The first actor needs to dissapear and a timer needs to start for the other actor which is clicked. How would i code that clicking function?
By MagicMaxi, with 5 replies.
Last reply by Super_Hippo, over 7 years ago:
Check the source code of this scenario. Maybe it can help you.
https://www.greenfoot.org/scenarios/23898
Regarding GIF
By Joyfu1, with 2 replies.
Last reply by Joyfu1, over 7 years ago:
Super_Hippo wrote...
"setImage" is a method of Actor, the World's equivalent is "setBackground".
Thank you so much!
Unable to add object to MyWorld
By Joyfu1, with 3 replies.
Last reply by Joyfu1, over 7 years ago:
danpost wrote...
What does any of the code in the class have to do with a scoreboard? and why would you not place the codes to add objects into your world in your
MyWorld
class?
If the scoreboard hits a certain number, we would like to add the object. We tried from MyWorld as well but it doesn't add the SmallAlienobject after the scoreboard hits a certain number. However, the AddStar works perfectly fine. Thank you!
Unable to execute project after code change in portable version
By LaurentB, with 2 replies.
Last reply by LaurentB, over 7 years ago:
Recompiling after code change does work: that's not the problem. The problem is that after all classes have been compiled after editing code, it is not possible to run the application from the main Greenfoot window: "Execute", "Pause" and "Reset" buttons are grayed (disabled) I've found a workaround: apprently Greenfoot configuration files that Greenfoot creates at first execution and modifies after configuration changes were corrupted. I had a 'greenfoot' folder into my personal folder, with files regularly updated by Greenfoot. I've deleted it and apprently everything works fine again no
Shooting an Object
By rb6333, with 2 replies.
Last reply by rb6333, over 7 years ago:
That would be great
Key calling method once on multiple objects
By MRCampbell, with 7 replies.
Last reply by danpost, over 7 years ago:
MRCampbell wrote...
Can you explain "return"? I though this was used to return something, an int or boolean.
The
return
command is used to cause an immediate break out of the method and "return" back to the method that called it. Once executed, no proceeding lines of code in that method are processed. In a
void
method, nothing will (or can) be returned. In a non-
void
method, only a value matching the return type will (or can) be returned. It is a control-flow type command similar to the
break
command (when void of a return type), which causes an immedi
How can I have a value across every last world and actor?
By DJSpicyDeluxe, with 2 replies.
Last reply by DJSpicyDeluxe, over 7 years ago:
Thank you very much danpost, this is what I will do!
removeObject() method won't work
By woody22, with 2 replies.
Last reply by woody22, over 7 years ago:
Alright that worked, thank you!
Publishing a project through Greenfoot: Share
By Swangbee, with 7 replies.
Last reply by danpost, over 7 years ago:
Swangbee wrote...
Hey. I have another issue. When i embed the final code it will only run like 1/10 times. I can see the enter screen but it won't run. I read the other forum you had and it said that it should run automatically, but it's not. Any tips?
Show enter screen codes.
Game starts instantly when I hit enter before I press the "Run" button
By EMRX, with 1 reply.
Replied to by danpost, over 7 years ago:
In this case, you can use: <Code Omitted>
I want to add an object when an actor is in certain position but the world doesn't add it
By Tasya16, with 16 replies.
Last reply by danpost, over 7 years ago:
Tasya16 wrote...
<< Code Omitted >> but dialog1 doesn't disappear from the world
That is because
dialog1
was never in the world. Again, you have "new Dialog1()" in your code more than once.
My Actor does not rebound on the corner
By EMRX, with 2 replies.
Last reply by EMRX, over 7 years ago:
Thank you, I solved it by creating transparent pixels there and when intersecting, it moves back off it.
Would like some assistance on my counter class
By Bossman1827, with 5 replies.
Last reply by danpost, over 7 years ago:
It is probably having each tube, both top and bottom, adding to the score. It would be okay to just allow it, internally. You can display half that value in the score display actor.
Sound Files
By dunzzz, with 1 reply.
Replied to by Super_Hippo, over 7 years ago:
You have to place the sound file in the "sounds" folder of your project. If the file is called "a.wav", then you use "a.wav" and not the full path or anything complicated.
ERROR: Can not find symbol
By zeltwood, with 6 replies.
Last reply by zeltwood, over 7 years ago:
Thanks! it worked, you saved my grade.
187
188
189
190
191
192
193
X