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
Can't override superclass variable with new value in subclass
By xchange, with 5 replies.
Last reply by danpost, over 9 years ago:
Sorry that I only gave half of the fix. I should have continued to closely look through the codes even after realizing the first part of the problem. I pretty much just stopped after looking at the first few lines and seeing that the fields were 'private' with no 'getter' and 'setter' methods to go along with them.
Remove an actor after another is added
By Fifilein, with 6 replies.
Last reply by Fifilein, over 9 years ago:
Thank you now it works!
Catching game
By jaehyunnie, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Think about what the game should be like. Write code step by step. If you have trouble with a specific step, we can try to help you.
Song doesn't stop
By ObliviaOng, with 3 replies.
Last reply by Super_Hippo, over 9 years ago:
Your line 1 should be outside any methods and the code danpost provided should be in the act method.
.gif-c200
By Kagz, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Try to remove the -c200 from the file name and from the line of code.
Puzzle
By chickienugbug, with 1 reply.
Replied to by danpost, over 9 years ago:
chickienugbug wrote...
How do you make two actors switch with click on a puzzle game?
I think you need to supply a bit more detail to what you are wanting. The question is too general to ensure a suitable response. As given, I could only presume that the actors are paired in some way -- that a click on one will switch it with its counterpart. But, I have a sneaking suspicion that this is not the case.
FALLING OBJECTS
By rachpaguia@gmail.com, with 1 reply.
Replied to by danpost, over 9 years ago:
The 'setLocation' line, if placed in the act method or a method that the act method calls, alone will cause the object to fall -- fairly quickly. The 'setSpeed' line will drastically slow down the entire scenario and should not be used for a specific class of objects. (I said "drastically slow down" because you are not adding 20 to the running speed of the scenario, but setting the speed to 20 out of 100 where normal speed is at 50). The '7' will be the falling rate and at a world height of 400, each falling object will probably hit the bottom of the world in less than one second.
How do you represent math symbols in Greenfoot?
By ET78759, with 2 replies.
Last reply by ET78759, over 9 years ago:
Thanks, that'll help in my asteroids game...
DISAPPEARING OBJECT
By rachpaguia@gmail.com, with 2 replies.
Last reply by rachpaguia@gmail.com, over 9 years ago:
Thank you so much, it worked!
Variables not taking on the proper boolean (true or false)
By abby410, with 9 replies.
Last reply by danpost, over 9 years ago:
Lines 14 through 16 create the required objects. You need not create more on lines 59, 61 and 63 (removes these lines). Same thing with lines 43, 45 and 47 (remove them).
Ints doubles and setLocation()
By Nosson1459, with 11 replies.
Last reply by Nosson1459, over 9 years ago:
thnx
Need help
By Nooooob, with 40 replies.
Last reply by danpost, over 9 years ago:
Super_Hippo wrote...
Theoretically, it should be done the same way as the blocks falling. So in the world, check for a key press, move all 4 pieces, if it fails (touches block or reached edge), move it back to where it was. "Theoretically" because it doesn't really work as it should I guess.
Yes, all blocks of each tetromino should be moved together at the same time, then collision checking should be performed for all the blocks and upon any collision encounters, they are all moved back together. With a bounded world, two blocks of the same tetromino will be found colliding upon edge e
How to stop a clock?
By Fifilein, with 26 replies.
Last reply by Fifilein, over 9 years ago:
Thank you! Now it works. Thank you very much!
Shared Scenario stage bigger than background image
By lordhershey, with 2 replies.
Last reply by lordhershey, over 9 years ago:
That amount is ok, what I see is something like: <Image Omitted>
Returning Variables Across Worlds
By PJaymz, with 2 replies.
Last reply by davmac, over 9 years ago:
If I understand correctly, what you really want to do is carry one "CorrectAnswer" object between your worlds. So, in fact you don't want a "new CorrectAnswer" at all; what you want is a parameter for your constructor. In that case the constructor for QuMaj becomes: <Code Omitted> (Note, remove the current line 36 from your prepare() method). (If y
382
383
384
385
386
387
388
X