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
Greenfoot Create Scenario Issue
By AgentGinger149, with 15 replies.
Last reply by davmac, over 12 years ago:
You must supply a name for the scenario before you click create/save in the dialog. The "new scenario" function works perfectly well if you do supply a name.
Help
By Stephon231, with 1 reply.
Replied to by danpost, over 12 years ago:
You cannot execute a non-static method without an object of that type (or, you cannot execute a non-static method with a class name). You need to get a reference of an object of that class and execute the method on that object. I am hoping you only have one Ship object in the world for the following code: <Code Omitted>Again, you must have one, and only one, ship in the world for this code. Otherwise, you need the following check: if (getWorld().getObjects(Ship.class).isEmpty()) Do not use the previous code
Why wont this work?
By hamchi, with 3 replies.
Last reply by hamchi, over 12 years ago:
thanks mate, i figured i would add that because it whas a bit of hassle to press run to execute the program then press another button to start the game. thanks anyways, i just added the start() method in the world's constructor like you sed.
problem with unexpected return
By erdelf, with 32 replies.
Last reply by danpost, over 12 years ago:
Glad you found it!
I cannot Figure this stupid runtime error out i need help plaease
By Southpaw1357, with 3 replies.
Last reply by Southpaw1357, over 12 years ago:
OMG thank you so much i was just looking to in depth and not right in front of me!!!!!!!!
Error when I shoot a man
By Anthony_97, with 4 replies.
Last reply by danpost, over 12 years ago:
We need to see any (and all) code related to adding and removing the actor to and from the world. That would include your world constructor (or 'prepare' method; or whatever code initially adds the actors to the world) and probably the Arrow class code, as I did not see anything to remove actors in the classes given above, First and foremost, copy/paste the exact error message you were getting (clear the terminal before running the scenario and copy the whole message).
Can any body fix this?
By Game/maniac, with 4 replies.
Last reply by Game/maniac, over 12 years ago:
Thanks
Problem
By Mirza, with 9 replies.
Last reply by limefortheworld, over 12 years ago:
@Danpost: No, you didn't hurt my feelings at all. But rather I was attempting to express awe at your superior method in a humorous way, which didn't work out so well. :P
Notifications mark in head title
By erdelf, with no replies.
Would it be possible to make a mark for notifications in the head title? e.g. <Image Omitted> instead of <Image Omitted>
Saving game state in greenfoot?
By jahama, with 5 replies.
Last reply by davmac, over 12 years ago:
jahama, the
UserInfo
class can be used to store player-specific data which persists between sessions (page refresh etc). Take a look at the documentation for it.
Changing health meter
By Kevin_Bacon, with 5 replies.
Last reply by Kevin_Bacon, over 12 years ago:
Too late, the assignment was due @ 11:55. But this will probably be on the quiz tomorrow. Thanks
Losing tokens when hitting an enemy
By Kevin_Bacon, with 6 replies.
Last reply by Kevin_Bacon, over 12 years ago:
Thanks, it works. I made lastEnemyHit an int variable that increases as Hero makes contact with an enemy. When it hits a certain value, it plays the code. The whole thing is an if-statement.
run world method
By HayleyG, with 2 replies.
Last reply by danpost, over 12 years ago:
'getWorld().score();' will not work, either. The score() method is not located in the 'World' class, but in the sub-class of World that HayleyG created. I will use 'WorldName' to refer to that sub-class of World. <Code Omitted>will access the score() method.
Isometric Sprite Positioning
By Spilli, with 1 reply.
Replied to by MatheMagician, over 12 years ago:
You could use the GreenfootImage methods getWidth() and getHeight() and then perform your calculations with them.
Help on 'Chess' by Razzo
By danpost, with 13 replies.
Last reply by Razzo, over 12 years ago:
Nope, I haven't had time to work on it, I will finish it eventually!
927
928
929
930
931
932
933
X