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
Issue with object going backwards
By CuddlySpartan, with 5 replies.
Last reply by danpost, over 9 years ago:
CuddlySpartan wrote...
Okay so I tried that but it didn't quite work. When the bullet hit the camooctopus, the octopus would spawn not on the line so it wouldn't be able to move. It spawned below where the original camooctopus was.
Sorry -- I wrote that out a bit quickly. Line 4 above should be: <Code Omitted>
NullPointerException That I Really Need Help With
By mreed7231, with 4 replies.
Last reply by mreed7231, over 9 years ago:
danpost wrote...
(3) the block of code starting at line 22 of the mBullet class is missing its identifying code; should probably start with 'public void act()'.
THANKS FOR THE HELP that was the main issue causing my error and I'll go in and fix up that other stuff too.
Avoider game-help me fix problems
By donatela201, with 3 replies.
Last reply by danpost, over 9 years ago:
Please show the code for the class this 'addedToWorld' method is location within. Also, show what code you are using to add the Skull actor into the world.
This throws up an error help please
By SiWeller, with 3 replies.
Last reply by SiWeller, over 9 years ago:
its ok now thanks anyways
constructor cannot be applied to given types
By chrl98, with 7 replies.
Last reply by danpost, over 9 years ago:
Link99 wrote...
I need help with something similar, in my pokemon game I want to have an enemy appear every few steps I take, but the constructor for enemy required an int and a class from playerheroes.
You should start a new discussion thread on your issue -- not revive one that is over two years old. Also, you need to supply the codes you are currently using (the class of the enemy and the class of the playerheroes).
Background Music
By Camyh15, with 9 replies.
Last reply by Camyh15, over 9 years ago:
Thank you soooooo much!!!!!
How can i count objects in a radius ?
By Rabe123, with 2 replies.
Last reply by Rabe123, over 9 years ago:
ok thanks danpost :)
Turning Towards Object Help
By CuddlySpartan, with 4 replies.
Last reply by CuddlySpartan, over 9 years ago:
It's okay I was just joking with you :D I love you SPower <3
Stickman - Exercise 3.37
By david_h, with 1 reply.
Replied to by danpost, over 9 years ago:
If you do not have very many sound files and they are all fairly short, then I would suggest keeping a reference to all of them in a class array, like (let us say the code is in a 'MyWorld' class): <Code Omitted>Then: <Code Omitted>and: <Code Omitted>
How to stop background music when moving to a different World.
By KrystalLo, with 3 replies.
Last reply by danpost, over 9 years ago:
KrystalLo wrote...
And how would I do that? backgroundMusic.stop(); ??? Since when the pirate loses all his lives it immediately goes to the gameover world. And when the myWorld starts the background music starts and begins to loop whenever the song finishes.
<Code Omitted>
Shooting with different bullets
By MNastasi, with 1 reply.
Replied to by danpost, over 9 years ago:
It may be that you are using the 'getKey' method instead of using the 'isKeyDown' method with boolean fields to track the state of the keys.
switching worlds
By benbec1, with 1 reply.
Replied to by danpost, over 9 years ago:
You will not visually be able to tell whether the world changed or not because you are re-creating a copy of the same world. You could right click on the world after compiling and select 'Inspect' from the options; then run the scenario, press the "e" key and then pause the scenario; finally, right click on the world and select 'Inspect' again. At that point, if you have two "Inspect" windows open then they were different worlds. You should probably combine line 32 with line 34 so that you are not unnecessarily creating a new 'world' world every act cycle:
Random Number generator
By richyho[, with 5 replies.
Last reply by Communazi, over 9 years ago:
MrObnoxious wrote...
(This user was disabled for obnoxious behaviour.)
Wot ,9
shooting a bullet every 15 iterations
By Orko, with 2 replies.
Last reply by Orko, over 9 years ago:
thanks it works !
Get Timer To Stop At 30 Seconds
By ssenese19, with 14 replies.
Last reply by danpost, over 9 years ago:
Please remove line 31 from the TimerActor class. The stack overflow is something that just happened to occur during the getting of the TimerActor image. It is not the actual cause of overflowing the stack. It is probably due to the addition of the 400 objects into your world (see lines 29 through 40 of your World1 class). If any of these are not needed (which I believe might be the case, since you are placing them overtop of each other) to not add them.
455
456
457
458
459
460
461
X