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
How to switch images slowly?
By UAT123, with 3 replies.
Last reply by danpost, about 2 years ago:
UAT123 wrote...
Thanks for replying but the image doesn't switch when the food is eaten. I wonder if it has anything to do with this bit of the code: << Code Omitted >>
No. That code should be fine. Please present your current class codes in full.
Can sombody tell me why the game does not work in the second space world?
By stijn.b, with 5 replies.
Last reply by danpost, about 2 years ago:
One way to "fix" it is as follows (in
Shot
class): <Code Omitted>Although there is probably an easier way -- like having an intermediate class between
World
and the two space worlds (maybe
Can sombody tell me why the game does not work in the second space world?
By stijn.b, with 14 replies.
Last reply by danpost, about 2 years ago:
stijn.b wrote...
<< Codes Omitted >>
What about the
Space2
class code?
How to make a loot dropping system with chance attached to it
By Deepfist, with 2 replies.
Last reply by Deepfist, about 2 years ago:
Ok thx, didn't know that getRandomNumber also worked like that so that's my bad
How can i invert this code
By Hhe, with 2 replies.
Last reply by Hhe, about 2 years ago:
OMG youre right
Greenfoot uploading old version of my game
By BigCakeTwo, with 1 reply.
Replied to by danpost, about 2 years ago:
BigCakeTwo wrote...
I have tried to upload a scenario to this website however when I launch the scenario on its page it plays an older version, which loads into a test scene I used while developing the game. I have tried deleting the test scene from the scenario project files before uploading it and uploading it under a new name but the scenario still loads into the deleted test scene instead of the actual game. Is there some way to fix this problem or is my project just broken?
If deleting the files by way of file directory actions, you need to delete ALL 3 files related to the test sc
I wanna play an explosion animation using 14 images i have of the explosion
By KCee, with 7 replies.
Last reply by danpost, about 2 years ago:
KCee wrote...
How do i make the animations play out faster? I tried manipulating the numbers in setImage but its giving me errors like << Error Trace Omitted >> << Code Omitted >>
The number that needs changed appears several times in the
setImage
method. Also, it should probably be a constant for the
Explosion
class: <Code Omitted>Your
setImage
method can then be modified to this:
How to make a damage and kill system with one bullet and multiple different health values for actors
By Deepfist, with 8 replies.
Last reply by Deepfist, about 2 years ago:
Well that was easier than expected, thx
Make image only flip once
By TanishStIves, with 10 replies.
Last reply by TheGoatFighter, over 2 years ago:
Naaaa Yototrth
How to remove Bullet from world
By RandomGuy, with 81 replies.
Last reply by TheGoatFighter, over 2 years ago:
The goat wrote...
if(isAtEdge()) { getWorld().removeObject(this); }
There you go, ask help from me, not danpost, i the goat
How do i stop music from playing in when i switch to a certain world?
By LuukTheGamer, with 3 replies.
Last reply by TheGoatFighter, over 2 years ago:
Danpost 1v1 on me fortnite, luuk the game get of greenfoot and add me on fortnite. Danpost in not a life save he hasnt answered my worries.
terminal window because isatedge
By gijsdevries, with 2 replies.
Last reply by TheGoatFighter, over 2 years ago:
This code is so easy, danpost 1v1 me on greenfoot on the 21st September 2029
need help with transferring the score counter to a new level
By Merten, with 3 replies.
Last reply by danpost, over 2 years ago:
Merten wrote...
i have done that but now at the end of level 2 the game crashes when i hit an enemy. error: java.lang.NullPointerException. this is at class Kogel, line 80
Along with the
addObject
line you inserted above, also add the following line: <Code Omitted>(and similiarly with other level changes)
I get a terminal window for whatever reason
By gijsdevries, with 1 reply.
Replied to by danpost, over 2 years ago:
gijsdevries wrote...
i get a terminal window because of the line of code at rule 16. does anyone know how to fix this? when i remove rule 18 it works fine but i need that rule in my code << Code Omitted >>
The problem is that when you remove this actor from the world in the
vermoordMonster
method, then go back to the
act
method, it then calls the
vermoordNachtbaas
method, which require the actor still be in the world. Easy fix is to either change line 11 (in
act
) to: <Code Omitted> OR, insert the following line
How do can i make a class follow another class around the world?
By Rainescap, with 7 replies.
Last reply by danpost, over 2 years ago:
Rainescap wrote...
how would i start the code for the collision?
What type of actors is the
Shield
instance protecting the spaceship from?
22
23
24
25
26
27
28
X