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
One Random Number
By SunnyD212, with 1 reply.
Replied to by danpost, about 11 years ago:
You probably just need to qualify (add a condition to regulate) showing of a new number by asking if a number is already there or not. In pseudo-code: "If no goalNumber object is in the world, add a new goalNumber object to the world." With this, all you have to do is, when you are done with one, remove that goalNumber object from the world.
a soother setLocation()
By tylers, with 1 reply.
Replied to by Gevater_Tod4711, about 11 years ago:
You could use double value for speed to make it more smooth. You just have to cast it to an integer if you want to use it in the setLocation method.
getObjectsInRange or maths problem
By seelensauger, with 1 reply.
Replied to by seelensauger, about 11 years ago:
hmm the problem is gone... I haven't changed anything... ;) i hope it won't come again ;)
how to remove all objects in the world
By nooby123, with 8 replies.
Last reply by danpost, about 11 years ago:
@mik, thanks michael -- I knew one of the two would work, so I gave both with the 'or'. Though, it makes sense that it would be the one it is. It still would create a List object, even if it is empty. It also makes sense that 'removeObjects(List)' would work on an empty list. Thanks, again.
Help with collission
By FergisonSan, with 4 replies.
Last reply by Gevater_Tod4711, about 11 years ago:
You could try to use getObjectsInRange(); Then the actors might change their direction before they crash. Change line 4 of the code I postet before to this: <Code Omitted>
Placing Random Orbs
By CHERNANDEZ95, with 2 replies.
Last reply by CHERNANDEZ95, about 11 years ago:
Thank you for the information. I will definitely be using it.
Collission
By FergisonSan, with 1 reply.
Replied to by Gevater_Tod4711, about 11 years ago:
Why do you have the same question two times? I just answered it
here
.
Other programming languages
By seabrook, with no replies.
Have you any thoughts of implementing front-ends to Greenfoot for teaching other languages, say Python, Ruby, Lua or functional languages like Haskell or ML? The front-end might eventually generate bytecode for your local JVM. -- Dick S.
Forum feedback
By mik, with 9 replies.
Last reply by allekalle, about 11 years ago:
There is a big need for more and separated categories. Now advanced questions are mixed with newbee questions, for example. It would be easier with different frames/pages for different issues, for example. I had a question relating to an exercise in the book, but I hesitate to ask among these other questions. (Exercise 5.10 on page 67 is confusing. DonĀ“t you need to do the stuff on the next page first?) Exceptionally nice book, otherwise.
Need help with PaintOrder
By Upupzealot, with 4 replies.
Last reply by Upupzealot, about 11 years ago:
Thanks you two above for reply. The problem is that I overrided addObject() and removeObject() method in my world, and it turns out that is the bug. Again, thanks very much for helping.
Java heap space
By Gingervitis, with 4 replies.
Last reply by Gingervitis, about 11 years ago:
That might be hard to do because a lot of my classes do different things. i don't even know how to about combining all those classes. When I reaches the maximum number of classes allowed, I could just make a sequel....
Need help moving Actor
By SonnyFullerton, with 1 reply.
Replied to by danpost, about 11 years ago:
Please show the class code for the actor in question that you have so far (with an attempt at having moving and jumping code implemented).
Image changing
By Gingervitis, with 1 reply.
Replied to by danpost, about 11 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, about 11 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, about 11 years ago:
I actually just figured out my problem. I changed the coding for several classes and I got it to work.
872
873
874
875
876
877
878
X