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
Downloading your own scenarios.
By JMiller, with 12 replies.
Last reply by erdelf, over 13 years ago:
it will download the jar file. you can just use a decompiler on this file and you have your source
coins
By Avik, with 10 replies.
Last reply by danpost, over 13 years ago:
Remove what code you have already tried for moving the coins with the background and add the following in with the code that does scroll the background. <Code Omitted>
whats wrong?
By Avik, with 1 reply.
Replied to by Avik, over 13 years ago:
please correct and send me the code
coins
By Avik, with 5 replies.
Last reply by Avik, over 13 years ago:
could you post me the code for this
save the world
By Avik, with no replies.
I need to save the world. I have a scrolling background so?
Good bounce and direction
By welleid, with 1 reply.
Replied to by danpost, over 13 years ago:
If the 'wheel' of blocks has no breaks between them (there is no space between them), then the wheel on a whole can be treated as a large ball that the pong ball will bounce off of. The rotation of the block contacted should give the actual angle between the two centers (within reason). The calculation for the bounce should be fairly straight-forward.
"Modificationscreen cannot be cast to terrainone"
By mattjonescalday, with 28 replies.
Last reply by davmac, over 13 years ago:
You either need to have a tracksbutton instance in the world, so that getObjects(...) returns a list with an item in it, or you need to maintain a separate reference to the tracksbutton object (in a variable), set that at some point, and use it instead of getObjects(...).
Timer
By vbh, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
The problem is that your countdown is in the constructor of the world. So it is only executed when the world is built. You have to write the code for the timer (everything after super(...);) into the act method.
mouseClicked on object
By vbh, with 1 reply.
Replied to by vbh, over 13 years ago:
probleme solve :-) i wrote this, that did the trick :-)
Scaling an Image
By K_O_P, with 8 replies.
Last reply by K_O_P, over 13 years ago:
Great! That was, what I was searching for! Thank you, Busch2207!
Help with timers
By Yongjoon, with 1 reply.
Replied to by danpost, over 13 years ago:
Timers are useful only to regulate the rate of speed at which something happens and are not necessary in creating automatic movement to begin with. The running of the scenario, with it executing all act methods on all active objects repeatedly will create the 'loop' required to continuously have your actors do something. For example, just by creating an 'act' method with a simple 'move' statement will cause your actor to move toward the right until it hits the edge of the world just by starting the simulation. <Code Omitted>This repe
Help with rotations
By Neon147, with 3 replies.
Last reply by Neon147, over 13 years ago:
It works, thank you!
Setting my world
By welleid, with 16 replies.
Last reply by danpost, over 13 years ago:
You really do not need a return method, in this instance. It could have been coded as follows: <Code Omitted>
help it says non -static method setSpeed(int) cannot be reference from a static context
By sergiodeleon702, with 5 replies.
Last reply by davmac, over 13 years ago:
Gevater_Tod4711 wrote...
Just change Puck.setSpeed(7); to puck.setSpeed(7); (no capital letter).
This is partially true. You'll also need to do a cast to the correct type. Change this: <Code Omitted> to this: <Code Omitted>
Life code
By GhostSniper, with 2 replies.
Last reply by GhostSniper, over 13 years ago:
So who do I decease the number of lives when my actor gets hit
843
844
845
846
847
848
849
X