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
Squares, colors, and loops
By IDaivdJr, with 26 replies.
Last reply by danpost, over 8 years ago:
IDaivdJr wrote...
Do you think its more efficient for all squares to flash at the same time or one after another.
Well, there are advantages and drawbacks either way. If all at one, you save time; but, allow pattern recognition to aid the user in clicking the appropriate squares. If seperately, it would be time consuming to flash the squares (especially when flashing each for 5 seconds, which seems like an exagerated amount of time to begin with); but, hides the pattern, making it more difficult to solve (however, limiting to 5 squares favors the user as well). With Simon Sez, each g
how to get around an instantiate object
By divinity, with 2 replies.
Last reply by danpost, over 8 years ago:
I will try to explain a little more clearly. Suppose you have an abstract class, AbstractClass. You cannot do this: <Code Omitted>This is what Hippo was trying to say. However, if you have a subclass of that class: <Code Omitted>then, you can create an object of type AbstractClass by instantiating the NonAbstractClass class: <Code Omitted>In fact, the World and Actor classes of greenfoot are abstract classes; yet, you can create worlds and actors no
Game Over/Reset Screen struggles
By tMsuperhero, with 2 replies.
Last reply by tMsuperhero, over 8 years ago:
oh.. obviously... thanks!
How to add collision to a top down greenfoot game?
By lava1234567890, with 5 replies.
Last reply by danpost, over 8 years ago:
You may want to check out my
scrolling tutorial
to see how it all is accomplished.
[Help] Asteroids scenario won't compile
By TheEnigma, with 2 replies.
Last reply by Venbha, over 8 years ago:
Super_Hippo wrote...
Remove line 2.
Even I will try it.
Terminal Window - Need Help!
By tMsuperhero, with 2 replies.
Last reply by tMsuperhero, over 8 years ago:
Much thanks! :)
Add an object once run key is pressed
By LobsterL, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
I think the easiest way would be to add the image when creating the world (so it is there before the run key is pressed). It starts with an invisible image, so you can't see it. Then it will itself give an image when it is running and will remove itself after 30 seconds: <Code Omitted>
Help??? please
By Venbha, with 2 replies.
Last reply by Venbha, over 8 years ago:
It works!! see link of it... --->
FIRE AND ICE
<----
HELP!
By SystemZero, with 9 replies.
Last reply by Super_Hippo, over 8 years ago:
Make sure that this code is in the act method and you do not remove the object from the world before executing this code (or prevent this code from executing if it was removed).
Removing an object (this) after being hit and losing health.
By nizate, with 1 reply.
Replied to by nizate, over 8 years ago:
I found out the issue, it was referencing from multiple spots, so I created an if HP<0 then dead =1 and created if dead== statements to counter this issue.
bg music with multiple levels
By AAA355, with 3 replies.
Last reply by danpost, over 8 years ago:
As an alternative, you can utilize by BGMusic class to control the background music of your scenario. You can find it in my
BGMusic Actor Class Demo
scenario.
addobject problem
By SwarmDark, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
The constructor of an object is only executed once when the object is created. In your case, the 'Space()' method is executed once when your world is created. To check for key presses while the scenario is running, you need create the act method in your world class. This method will be called for the active world and all objects in that world, again and again. <Code Omitted>Using the 'getKey' method in a different context than writing text can create other issues though.
Line Of Sight
By LobsterL, with 16 replies.
Last reply by LobsterL, over 8 years ago:
i have un commented it and it is still not working
Shield Method
By LobsterL, with 20 replies.
Last reply by Super_Hippo, over 8 years ago:
Those two lines handle that: <Code Omitted> You changed the 2's to 30's in the first line, you have to use the same numbers in the second line.
Class UserInfo
By nizate, with no replies.
Is this customizaable to use a server outside of Greenfoot with different credentials? I am thinking of making a multiplayer game on Greenfoot (Just to play around with) but I think this would waste resources on the server if it stored location information of many users at once. The API shows how to use it, just wondering if there is more I can fiddle with or if it is limited to just the GF server.
329
330
331
332
333
334
335
X