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 open multiple scenarios from one scenario
By ArchMageGaming, with 1 reply.
Replied to by danpost, over 10 years ago:
ArchMageGaming wrote...
So, me and a friend are working on two games that are very similar. We have created both games but want them to be in one scenario altogether. Is there a way so if we click a button in one scenario, it would open the other one?
The short answer is ... no. Not without having the classes of both of them in one project
counting total employee of a company
By divinity, with 1 reply.
Replied to by danpost, over 10 years ago:
@divinity, I think you know by know that you need to show some effort and that only specific programming issues are dealt with here. We are not here to do the work for you. As you explained your issues above:
how do you count the total number of hourly paid workers, monthly paid workers and commission workers in a company.
The type of objects that represent the workers and how you access them is needed.
how to compute the total figures for all employees netpay, grosspay and deductions
The computations is basic math. And again, "for all employees" requires t
"You Won!" Screen
By jdelia3, with 2 replies.
Last reply by danpost, over 10 years ago:
I think the key word here is "tile". You could change the "You Win" world size (presuming that you are using a world to display it) to that of the image. The other option is to not use the image as the default image and either draw the image onto the background or use an actor to display it.
2D Array Game (cant figure out why my cards wont flip properly)
By mukul2345, with 1 reply.
Replied to by danpost, over 10 years ago:
I am not sure about the difference between 'isCovered' and 'unCovered' -- but I believe one is for whether the card is showing and the other is whether the card is already matched. You need to determine both of these states on 'p' when checking for the current first flipped card.
Getting the score value from my world called MyWorld to my Game Over World
By shivzzz123, with 1 reply.
Replied to by SPower, over 10 years ago:
Because you want to pass it into a different world, you could put it in the constructor of the game over world: <Code Omitted>
Not sure why I am getting a nullPointerException?
By MNastasi, with 5 replies.
Last reply by nikhil_sundaram, over 10 years ago:
danpost wrote...
MNastasi wrote...
Not sure why I am getting a nullPointerException?
What line is the exception being thrown at? Also, show the error trace printed in the terminal window.
This is the nullPointerException that I keep getting for the code java.lang.NullPointerException at Ball.isTouchingGoal(Ball.java:53) at Ball.act(Ball.java:22) at greenfoot.core.Simulation.actActor(Simulation.java:594) at greenfoot.core.Simulation.runOneLoop(Simulation.java:552) at greenfoot.core.Simulation.runContent(Simulation.java:215) at greenfoot.core.Simulation.run(Simula
need help with my collision
By grizzly1, with 8 replies.
Last reply by grizzly1, over 10 years ago:
that is what i got so far, the problem is that the if I jump to a block from underneath it the charakter gets stuck in the block does anyone why that happens?
Access to a boolean
By carti26, with 5 replies.
Last reply by danpost, over 10 years ago:
Since there are no 'public' members that the car can call to acquire the boolean value, it is impossible at this time. Either change the access modifier of the boolean field to 'public' (from 'private') or add a 'public boolean getRunning()' method that returns the value of the field so the car can call the method to get the boolean value. Once that is done, the value will be accessible; however, accessing it is yet another step in the process. The line I gave above can be followed by either:
Tracking bullets and replenishing bullets
By n15, with 1 reply.
Replied to by danpost, over 10 years ago:
Making enemies turn around once past main character
By n15, with 1 reply.
Replied to by n15, over 10 years ago:
Can anyone help?
My Counter is not working? Please Help
By coder04, with 1 reply.
Replied to by danpost, over 10 years ago:
First, I see no code that tries to change the value of any Counter object (in fact, I do not see any "eating" either). Then, I see that the Counter object held by the 'counter' field is not going to be the same Counter object that you place into the world (remove line 34 -- so that the Counter object already created and saved in the 'counter' field is added into the world on the next line).
Turn in the direction its moving?
By coder04, with 4 replies.
Last reply by danpost, over 10 years ago:
coder04 wrote...
Ah So when you press the up key the actor moves forward but the actor does not turn to face that direction aswell. I tried using the turn(90) but nothing happened
First, it is strange to see the vertical movement speed ( 4 ) being faster than the horizontal movement speed ( 3 ). Next, with the current code, by not using 'else if' structures, you will are allowing diagonal movement as well. Unfortunately, even though diagonal movement are avoided, some directions will supersede others with that. There are other ways to code key controls that avoid diagonal movement an
HELP!!! cannot find symbol- class
By Elexios, with 9 replies.
Last reply by Super_Hippo, over 10 years ago:
You mixed up 'Cactus' and 'Catcus' as you may already noticed.
Need help with AI firing in multiple (fixed) directions at the same time
By kinghunter, with 7 replies.
Last reply by Super_Hippo, over 10 years ago:
Yes and you need to change i<4 to i<8.
Stop moving when hitting objects
By MrPancakes, with 4 replies.
Last reply by MrPancakes, over 10 years ago:
I fixed with your code danpost. Thank you very much
455
456
457
458
459
460
461
X