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
Image changing
By Gingervitis, with 1 reply.
Replied to by danpost, over 12 years ago:
Of course it is. You just need a reference to the object of that class whose image you want to change. For example, if an ActorA object intersects an ActorB object and you want to change the image of the ActorB object from the ActorA class: <Code Omitted>
Text Error
By Gingervitis, with 1 reply.
Replied to by danpost, over 12 years ago:
Switch lines 27 and 28. After calling the 'removeObject' method, calling 'getWorld' will return null.
Removing an object at world edge problem
By Gingervitis, with 17 replies.
Last reply by Gingervitis, over 12 years ago:
I actually just figured out my problem. I changed the coding for several classes and I got it to work.
Adding multiple objects to the world via another object.
By Minion1, with 9 replies.
Last reply by Minion1, over 12 years ago:
Well I'll be.. it worked! Thank you danpost. I'll see about making good use of this. Some other thoughts occured to me while waiting for a response, I may be able to work on this through another way. But now that this is working it will help me immensely. Sorry for all the confusion, I'm very new to this.
how to increase speed of lobster
By kingenzo, with 7 replies.
Last reply by danpost, over 12 years ago:
Edit on last post: had wrong scenario listed; it has been corrected. The scenario uses a slowdown rate of one (true slowdown value of 1/100) and an acceleration rate of twenty (true acceleration value of 20/100 ).
How to have a counter?
By bbwf, with 4 replies.
Last reply by davmac, over 12 years ago:
Correct, this is for school, but I am having a hard time trying to do this because I don't know how I would. Which is why I am also asking for an explantation.
You are asking for
everything
. Have you even tried? Where is your code? What part are you stuck on?
Help? getObjectsInRange..
By Draymothisk, with 8 replies.
Last reply by Draymothisk, over 12 years ago:
Thanks both of you! Look forward to my work soon up; working hard.
Looking for a way to pause one method while another finishes
By bjonesre, with 6 replies.
Last reply by bjonesre, over 12 years ago:
I see what you mean, if the Asteroid is class is being removed it would make sense why I was getting a null pointer. Hopefully I'll get a chance to get it working tonight. Thanks.
how to spawn random worms after they have been eaten
By kingenzo, with 2 replies.
Last reply by kingenzo, over 12 years ago:
thanks
Set a new world from a class in Actor
By Solringolt, with 2 replies.
Last reply by Solringolt, over 12 years ago:
Thx a lot it works with this!
Creating a multi-agent system
By Hertel, with 1 reply.
Replied to by davmac, over 12 years ago:
I think you should read the tutorials, especially #6.
How do we create a memory game consisiting with arrays that generate a random number from 1-10?
By leeyong0, with 3 replies.
Last reply by davmac, over 12 years ago:
What part are you having trouble with?
Object count
By Gingervitis, with 16 replies.
Last reply by danpost, over 12 years ago:
Remove the following lines: 12, 15 through 19, 23 & 24, 26 through 28, 48 through 57, 70 and 105. Line 12: not needed because the variable defaults to zero; Line 15 through 19: does not do anything and looks out of place; Line 23 & 24: not needed because the variables default to zero; Lines 26 through 28: variable is not used anywhere in the class Lines 48 through 57:
belongs in the Moon world class code
Line 70: meaningless where placed (not used in method) Line 105: useless if changing worlds.
I need help (java programing)
By Jeremy.F, with 1 reply.
Replied to by danpost, over 12 years ago:
The
Java tutorials
is the best place to start. Begin with the second section on the left, named
Trails Covering the Basics
.
Changing images based off certain actions
By r4indr0ps, with 1 reply.
Replied to by danpost, over 12 years ago:
I am not sure what it really means, either. I am quite sure it would not even compile as written. The methods 'normalMan' and 'manOnFire' are both showing that they are to return a boolean type value, but no values are being returned at all. Change both occurances of 'boolean' to 'void' and it will compile. Then, you will need an 'act' method to check for collision; and when the collision occurs call one of the two methods. You should call the other method in the constructor block to initially set the image of the actor.
883
884
885
886
887
888
889
X