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
Player movement based on player type
By senor_ribs, with 4 replies.
Last reply by danpost, over 11 years ago:
Maybe you should go over the
Greenfoot tutorials
(for basic info on using the application and getting started). You can also view some short videos (linked on the same page) for how-to on various topics. As far as the code itself, which is pure java, you can check out the
Java tutorials
. The second section,
Trails Covering the Basics
, would be the place to start.
Why won't this thing spawn!?
By DoctorMitch, with 2 replies.
Last reply by DoctorMitch, over 11 years ago:
Thank you for your concern, but I made it work so that instead of the cube class deleting itself and replacing itself in a spawn point, it would just stay where it was, and things would spawn around it. When I upload the game, feel free to see for yourself.
NullPointerException at 2DArray
By ds06, with 10 replies.
Last reply by ds06, over 11 years ago:
Thanks danpost, worked well :) I tried some differrent stuff and changed the way the Board is drawed entirely :D First it will create objects of Free for the blocks i want to be able to place. (line 27-85)
Dreieck
Viereck
Doppel
EinzelBlock
After that, the other fields of the board will be filled with blocked blocks.(line 87-95) At the end it would add the rigth amount of my placeable blocks to the field.(line 99-122)
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:
601
602
603
604
605
606
607
X