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
What am I missing? moving one at a time...
By alittle_bit, with 1 reply.
Replied to by danpost, over 9 years ago:
One problem is the improper use of 'isKeyDown' which requires a String key value in its parameter. Using 'null' for the parameter makes no sense. If you change that and add a key string to the parameter, then the next thing is the 'while' loop, which will stop everything except the player (if the player can move and the "w" key is down (conditions in the 'movePlayer' method -- otherwise everything will be on hold) until the key is released. I think you are just overcomplicating things by trying to tell the player not to move. It will not move unless you tell it to move -- you do not have t
An actor checking whether another actor exists
By timothytitus, with 4 replies.
Last reply by timothytitus, over 9 years ago:
Okay thanks I'll try
UIManager in NetBeans
By Nosson1459, with 5 replies.
Last reply by Nosson1459, over 9 years ago:
Super_Hippo wrote...
getting a not useful one is probably not helping you either
I agree. I didn't ask for a not useful answer (I'm NOT saying that that's exactly what you gave me).
Maybe you have to contact the NetBeans support, but I don't know.
Maybe, but I was asking here in case there was something I was doing wrong (the code is in a class which extends World, so it does have a little bit to do with Greenfoot but that method doesn't have anything to do with Greenfoot alone).
Background Processes
By Nosson1459, with 3 replies.
Last reply by Nosson1459, over 9 years ago:
It seems to me that there hasn't been anyone on the Greenfoot site in the past 12 days that knows how to create a background process in Windows from Greenfoot (or anywhere just the point is in Java). I shouldn't really expect any replies because I don't think it makes sense for someone to reply saying that they don't know, and no one replied so that must mean that simply no one knows.
Little Shooter - the weapon not like a ball
By wueschn, with 7 replies.
Last reply by Nosson1459, over 9 years ago:
danpost wrote...
It was you -- and you asked about the release of a key
here.
i need help cant find working code for background music
By ninjaFI, with 1 reply.
Replied to by Nosson1459, over 9 years ago:
The following code will do the same thing as your (CopyOf)World1 code just it will also play a sound file called "maskoff.mp3" (I changed all the class names to start with a capital letter which is the proper way for them to be):
Can't override superclass variable with new value in subclass
By xchange, with 5 replies.
Last reply by danpost, over 9 years ago:
Sorry that I only gave half of the fix. I should have continued to closely look through the codes even after realizing the first part of the problem. I pretty much just stopped after looking at the first few lines and seeing that the fields were 'private' with no 'getter' and 'setter' methods to go along with them.
Remove an actor after another is added
By Fifilein, with 6 replies.
Last reply by Fifilein, over 9 years ago:
Thank you now it works!
Catching game
By jaehyunnie, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Think about what the game should be like. Write code step by step. If you have trouble with a specific step, we can try to help you.
Song doesn't stop
By ObliviaOng, with 3 replies.
Last reply by Super_Hippo, over 9 years ago:
Your line 1 should be outside any methods and the code danpost provided should be in the act method.
.gif-c200
By Kagz, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Try to remove the -c200 from the file name and from the line of code.
Puzzle
By chickienugbug, with 1 reply.
Replied to by danpost, over 9 years ago:
chickienugbug wrote...
How do you make two actors switch with click on a puzzle game?
I think you need to supply a bit more detail to what you are wanting. The question is too general to ensure a suitable response. As given, I could only presume that the actors are paired in some way -- that a click on one will switch it with its counterpart. But, I have a sneaking suspicion that this is not the case.
FALLING OBJECTS
By rachpaguia@gmail.com, with 1 reply.
Replied to by danpost, over 9 years ago:
The 'setLocation' line, if placed in the act method or a method that the act method calls, alone will cause the object to fall -- fairly quickly. The 'setSpeed' line will drastically slow down the entire scenario and should not be used for a specific class of objects. (I said "drastically slow down" because you are not adding 20 to the running speed of the scenario, but setting the speed to 20 out of 100 where normal speed is at 50). The '7' will be the falling rate and at a world height of 400, each falling object will probably hit the bottom of the world in less than one second.
How do you represent math symbols in Greenfoot?
By ET78759, with 2 replies.
Last reply by ET78759, over 9 years ago:
Thanks, that'll help in my asteroids game...
DISAPPEARING OBJECT
By rachpaguia@gmail.com, with 2 replies.
Last reply by rachpaguia@gmail.com, over 9 years ago:
Thank you so much, it worked!
382
383
384
385
386
387
388
X