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
Background Music
By Camyh15, with 9 replies.
Last reply by Camyh15, over 10 years ago:
Thank you soooooo much!!!!!
How can i count objects in a radius ?
By Rabe123, with 2 replies.
Last reply by Rabe123, over 10 years ago:
ok thanks danpost :)
Turning Towards Object Help
By CuddlySpartan, with 4 replies.
Last reply by CuddlySpartan, over 10 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 10 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 10 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 10 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 10 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 10 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 10 years ago:
thanks it works !
Get Timer To Stop At 30 Seconds
By ssenese19, with 14 replies.
Last reply by danpost, over 10 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.
Help with Lists
By sengst, with 2 replies.
Last reply by sengst, over 10 years ago:
Thank you very much for your help!
Putting a actor in another world (text)
By KrystalLo, with 23 replies.
Last reply by danpost, over 10 years ago:
No. More like this: <Code Omitted>
Turning Towards the Mouse
By sengst, with 4 replies.
Last reply by sengst, over 10 years ago:
Thank you for all of your help! It seems that i have found my own way of solving the problem, though probably a round-about way of doing so. Once again thank you for you continuous help.
Help With Danpost's Infinite Scrolling Background
By tuckalow, with 3 replies.
Last reply by danpost, over 10 years ago:
You could create an unbounded world by adding a 'false' parameter in the super call to the World class: public World(int width, int height, int cellsize, boolean bounded) The above line is the signature of an alternate constructor for the World class which allows you to state whether the world is bounded (prevents actors from leaving the world window) or unbounded (allowing actors to go beyond the limits of the window). So, for example: <Code Omitted>
Subclass of subclass of World not constructed?
By vtn2@calvin.edu, with 2 replies.
Last reply by vtn2@calvin.edu, over 10 years ago:
Thanks. Running new VicWorld() did help. The Inspect said it did know that it was a VicWorld object.
457
458
459
460
461
462
463
X