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
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.
how do you change a spawn location of an actor based on world its in
By jsherry21, with 1 reply.
Replied to by danpost, over 7 years ago:
Have the world respawn the object (only remove it when hitting a border).
Hi, I need help creating a score counter for my game and I don't know what to do
By Josh3560, with 14 replies.
Last reply by danpost, over 7 years ago:
Josh3560 wrote...
Hello, sorry, this is the only time I'm able to access my project.
I wrote:
You have shown a
score
class which does not appear to have anything to do with your game. Now, explain that.
Actor Traveling to Predetermined Coordinates
By __anna__, with 1 reply.
Replied to by danpost, over 7 years ago:
Save the starting coordinates and move from there as you move farther each iteration of the loop. Use
Greenfoot.delay(1);
within the loop to show the animation: <Code Omitted>I think I did that right so you can adjust the speed easily. This would replace lines 16 thru 18.
187
188
189
190
191
192
193
X