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
Help with accessing functions between actors
By Sammi, with 4 replies.
Last reply by danpost, over 9 years ago:
I just noticed your subsequent post above (the one immediately following your initial post). The scoreboard does not need to see the horcrux. Remove lines 4 and 5 from the 'act' method of the ScoreBoard class (as shown above). Then change the name from 'act' to 'updateImage'. Finally, change the 'addScore' method to this: <Code Omitted>Also, you should have a constructor for the class (to set the initial image): <Code Omitted>Now, let me understand what you are trying to do in the
What is the most efficient way to transition background screens?
By ssenese19, with 2 replies.
Last reply by ssenese19, over 9 years ago:
Thanks! Very helpful @danpost
Health
By Walker, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
The class name should start with an uppercase letter. So change 'health' to 'Health' although 'Healthbar' would be better. <Code Omitted> In the loseHealth-method, you could add the following line (before the call to the update-method) to decrease the health: <Code Omitted>
Reset a game
By Dora, with 2 replies.
Last reply by Dora, over 9 years ago:
thanks a lot
Help with Educational Project
By chickenugget, with 1 reply.
Replied to by danpost, over 9 years ago:
Buttons should remain fairly dumb in that they should only react to mouse actions, if anything -- altering their image depending on what the mouse is doing (mouse hovering state or mouse button pressed state). The world is what should control the main actions of the simulation -- checking for clicks on buttons currently in the world and responding to them. The world should also hold a reference to the correct button that answers the current question. Let us say you have a Text class whose objects can display the questions as they are posed and a Button class whose objects can display the
How do I get the width of a particular world
By jeffcia, with 4 replies.
Last reply by jeffcia, over 9 years ago:
Thanks, Dan!
Scenarios not running on the website
By asal, with 1 reply.
Replied to by danpost, over 9 years ago:
Your java control panel needs to first allow java content to be shown; as well as needing security level at 'High' (not 'Very High') and 'http://www.greenfoot.org/' needs to be added to the 'Exception Sites' list. All these setting are in the 'Security' tab of the java control panel.
Actor is modifying variable of all actors belonging to the same class, when it should just be 1. Fix?
By moretinshop, with 1 reply.
Replied to by moretinshop, over 9 years ago:
NEVERMIND, found a rogue statement that was setting finishedDialogue to true when it shouldn't be. All fixed.
I have another issue with the bullets I have in my code.
By Cragster25, with 3 replies.
Last reply by danpost, over 9 years ago:
Cragster25 wrote...
where can I find the SmoothMover class, I have looked for it but can't seem to find it. It might be being stupid but could you post a link.
Open up the greenfoot application and load your project. Then, use the menubar and select "Edit/Import class...". Finally, select the SmoothMover class and click on the 'Import' button. As an alternative to using that class, you could just save the original location of the bullet and add a step counter as follows:
How do get variable from another class
By FutureCoder, with 13 replies.
Last reply by FutureCoder, over 9 years ago:
Thanks it works now
Help with running games
By Rugbug_Redfern, with 1 reply.
Replied to by danpost, over 9 years ago:
You need the java security status on 'High' -- not 'Very High'. You also, on the same panel, need to have the checkbox that enables Java content in the browser checked and 'http://www.greenfoot.org/' in the Exception Site List.
Scoreboard on greenfoot website
By UCLLdemi, with 1 reply.
Replied to by danpost, over 9 years ago:
UCLLdemi wrote...
I tried to ad a scoreboard in my game by importing the class greenfoot provides. On the stand-alone it did show the scoreboard but it was empty since it wasn't connected with a server. I thought that, when put on the website it would be solved but now the scoreboard doesn't show at all. Does someone know how to solve this or where the problem might be?
If you are talking about the scoreboard that uses the UserInfo class, then the problem is that the latest updates on java have tighter security and the UserInfo storage server is not accessible to the scenarios on the si
Help with tutorial
By Rugbug_Redfern, with 2 replies.
Last reply by Rugbug_Redfern, over 9 years ago:
Thank you!
Generating falling objects randomly on the X axis
By KrystalLo, with 9 replies.
Last reply by KrystalLo, over 9 years ago:
Oh, I got it working! Thank you so much Dan! I'll probably ask more questions a bit later after I do a few more things with the game. Thank you!
Class removed after creating duplicate
By jeffcia, with 1 reply.
Replied to by danpost, over 9 years ago:
The only way the Crab class would show up in the "Other classes" area is if you removed what class it extended or changed it to something other than Actor or World. Just make sure you have the class extending the Actor class. If you have issues with bringing it back, post the code for the class so we might be able to tell what is happening and why it is not showing up where you want it to.
458
459
460
461
462
463
464
X