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
I am having difficulty making a memory card game. Can anyone help me with this?
By misty11misty, with 4 replies.
Last reply by davmac, over 11 years ago:
You can use the Actor's setImage() method to set the image of a card to make it appear that it has turned over.
Help taking away health from enemy
By DarkGhost, with 2 replies.
Last reply by DarkGhost, over 11 years ago:
Great that worked brilliantly! Thank you! :)
Help Stopping Music
By shooterbooth, with 5 replies.
Last reply by davmac, over 11 years ago:
First, please
use code tags
when you post code: <Image Omitted> Now, in the code you posted you are creating a
new
sound and then immediately checking if it is playing: <Code Omitted> The condition can never be true. You only just created the sound object, so there is no way it can be playing. You need to use the
same
sound object that you initially started playing, and
Error pops up every time my Object is removed.
By GabrahamCAPS, with 5 replies.
Last reply by GabrahamCAPS, over 11 years ago:
danpost wrote...
If you follow the act method step by step, you will get this: Block 1 (lines 18 through 21): removes the actor from the world if off sceeen; Block 2 (lines 23 though 26): removes any center-intersecting player; Block 3 (line 27): moves actor left; If the actor is removed from the world by block 1, then neither block 2 nor block 3 can execute properly. Both 2 and 3 require that the actor be in the world. When you execute 'getWorld().removeObject(this)', the hidden 'world' field from the Actor class for that actor is set to 'null'. No in-world operations can be exec
Posting score on internet
By 60sChallange, with no replies.
Is it possible to make shortcut for posting score on facebook or twitter?
Need help with adding timer to game
By Spider02, with 1 reply.
Replied to by danpost, over 11 years ago:
What have you tried? Show attempted code (use the 'code' link below the reply box to insert code into your post).
Cant call a method from other class
By ds06, with 2 replies.
Last reply by ds06, over 11 years ago:
Thanks davmac, ive got it to work :) For anyone who is interested: <Image Omitted>
How do i make a text input on screen on greenfoot world
By coder04, with 1 reply.
Replied to by davmac, over 11 years ago:
Could you not just use the Greenfoot.ask(...) method?
Getter/Setter methods in Superclass
By getreides, with 9 replies.
Last reply by getreides, over 11 years ago:
Hello both, thank you again for quick and detailed answers! I've chosen to use the super keyword as described by davmac, and it does work!
Help Needed! detecting if object exists and code cleanup
By TheGoldenBucket, with 2 replies.
Last reply by TheGoldenBucket, over 11 years ago:
Thanks, Hippo! Managed to get that working, and I will start using the "&&"s to clean up my code. Best of thanks, -TheGoldenBucket
Cannot get objects to remove from world correctly, HELP!
By RagingAsian, with 6 replies.
Last reply by RagingAsian, over 11 years ago:
Thank you a lot, it is working perfectly.
How to edit a GreenfootImage
By Ben&Sam, with 9 replies.
Last reply by danpost, over 11 years ago:
It looks like you need to create a list of pairings. However, since you already know that both sides of the pairings are one-character strings, you can use a simple String object to store the pairings. Start with: <Code Omitted>as a field within the class (declared outside of any method). Then, as each pairing is entered, add the pair to the String object: <Code Omitted>To apply the pairings to Label, use something like this:
Controls
By 60sChallange, with 6 replies.
Last reply by danpost, over 11 years ago:
The 'if' statement is, in essence, a blocking statement. If the condition is 'false', the code block will not execute. You would say 'if some set of conditions are true, execute the following code'. I would suggest using 'else' in this matter ( that is: 'if (dy == 0) {} else { run space command }' ), and, in fact, that is exactly what you could do. The code within the empty curly brackets ( '{}' ) could be 'run left/right command':
Problem
By 60sChallange, with 11 replies.
Last reply by 60sChallange, over 11 years ago:
ty
Snap to
By KiwiMC1482, with 8 replies.
Last reply by danpost, over 11 years ago:
Ben&Sam wrote...
it was a joke..
Please refrain from creating non-constructive posts. davmac might reply with something like this:
what if Ben&Sam was banned
601
602
603
604
605
606
607
X