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
Win screen for minesweeper
By Tronkex, with 1 reply.
Replied to by danpost, over 5 years ago:
Tronkex wrote...
So I dont really know how I should check if the game is won. My idea was that I have a function that returns true if all objects (tile.class) in the game have either the string "flaggedBomb" or "open". But I dont know how to realize it.
The flagged bomb count should equal flag count AND the sum of that and open count should be total cell count (width times height).
Scenario Breaks when Published
By LashWT, with 4 replies.
Last reply by Gbasire, over 5 years ago:
yep that's what I was thinking, glad I could help :)
Get variable from specific object an actor is touching
By Gbasire, with 18 replies.
Last reply by Gbasire, over 5 years ago:
it might be better yes, thanks i will do this
Minimum JRE Version
By Sathya_srikanth, with no replies.
what is the Minimum JRE Version required to run a greenfoot file?
not able to share my game
By Sathya_srikanth, with 2 replies.
Last reply by Sathya_srikanth, over 5 years ago:
thank you :D
Happy new Year!
By rocket770, with 1 reply.
Replied to by Dialglex, over 5 years ago:
Thank you rocket770, very cool!
reversed movement
By Sathya_srikanth, with 1 reply.
Replied to by danpost, over 5 years ago:
Sathya_srikanth wrote...
so i wanted the actor jerry to get mirrored vertically when "a" is pressed ( while it's moving) basically I want jerry to face to the side it is moving...but when I tried this code when ever I pressed "a" its started glitching << Code Omitted >>
You will need to add a field to track which direction was last moved; then, change the image when the field does not match the current state. Either that or keep both images in an array (or in two separate fields); then when the required image is not active, set it active.
error
By Sathya_srikanth, with 10 replies.
Last reply by Sathya_srikanth, over 5 years ago:
thanks so much :D it worked!
multiple objects appear from top to bottom
By Sathya_srikanth, with 7 replies.
Last reply by danpost, over 5 years ago:
Sathya_srikanth wrote...
also when the object(monster) jerry touches any of these monsters a counter should count these scores up to 50 when the world changes to another screen
Class for
jerry
should check for touching.
Counter
object should probably be in world. Place
public
method in world to adjust
counter
value and check for changing worlds.
Can I get clicked actor's index?
By Honza, with 3 replies.
Last reply by Honza, over 5 years ago:
Its alright now I got it, thank you.
Is max window's size defined
By Honza, with 2 replies.
Last reply by Honza, over 5 years ago:
Okay, thank youu
help in need
By Roshan123, with 3 replies.
Last reply by Roshan123, over 5 years ago:
Ohhh yes I tried this and now its working!!!! <Code Omitted>
Animate a png
By Roshan123, with 4 replies.
Last reply by danpost, over 5 years ago:
Roshan123 wrote...
Does it take time for you to think about the syntax or its only about the concept....wether its clear or not
"syntax" is strictly writing what you want in such a way as the compiler accepts it. It is the algorithm that creates the concept. It took me a minute to realize that an imgNum field would be used here, realizing that the count would need to vary in its max value (meaning it could not be dual-purposed in controlling which image was to show).
Heap space
By Roshan123, with 8 replies.
Last reply by Roshan123, over 5 years ago:
Yes Boss!!!
Greenfoot.getKey() with Shift
By MrBradley, with 2 replies.
Last reply by MrBradley, over 5 years ago:
This was what I was hoping, but getKey() consumes the key and only scans a single key. It seems to me that getKey() should return a KeyInfo object, like MouseInfo, that also stores key combos like SHIFT+ and CONTROL+ and ALT+. At least it should remove SHIFT and CONTROL from consuming the intended key press. I could try using isKeyDown("") but .... Most importantly, the documentation states that getKey() recognizes Uppercase: "getKey() also returns uppercase characters when appropriate." But even with the CAPS LOCK on, getKey() does not return uppercase letters. I'm left wondering wh
98
99
100
101
102
103
104
X