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
turnAtLeftWall() Got a question! I know the answer is probably simple and I'm just not seeing it but I'm just starting and I'm lost. So here is my instructions and here is what I have so far. I can't figure out how to get the "orb" to bounce off the top a
By keiko1dog, with 13 replies.
Last reply by danpost, over 13 years ago:
The format of any method call in OOP (object-oriented progamming) is
object.action
. If there is no object supplied, then it is assumed to be the 'this' keyword, which refers to the object created from that class the method is in. For a sound, a GreenfootSound object is the object and 'play' is the action you wish to have it do. So, create a GreenfootSound object using the GreenfootSound constructor call and save it in a GreenfootSound field. Then when you want to 'make noise', name the sound and action to perform.
How to programm pascal's triangle??
By Mux, with 2 replies.
Last reply by Mux, over 13 years ago:
It's exactly what i was looking for. thx
Getting location of an actor from an actor
By student101, with 38 replies.
Last reply by danpost, over 13 years ago:
danpost wrote...
<Code Omitted>
I had supplied this yesterday. Line 10 was trying to tell you that the world saved in 'gameWorld' needs to be passed along from world to world until you finally return to it by using the code on line 13.
Question
By avocasso, with 3 replies.
Last reply by danpost, over 13 years ago:
I was thinking something along these lines: (1) start the loop (iterate 5+ times) -- 5 (set part) plus a random amount more (random part) (2) create a new Orb -- the orb constructor can assign random velocity -- the orb constructor can also assign a random size (3) use size of orb created to determine the limits of location placement in the world -- the size of the world minus the size of the orb is the range (random part) -- the added offset is half the size of the orb (set part) (do the above for both horizontal and vertical dimensions) (4) add the orb
references and spawning problems
By KierTulp, with 1 reply.
Replied to by danpost, over 13 years ago:
It seems you are trying to make things so much more difficult than they have to be. All the 'spawn' methods and references are probably confusing you to death. You need to keep things simple to start. Stick with the constructors and act methods. You can always refactor the code later (moving lengthy duplicated code into methods; and breaking down the basic steps taken in the act method into sub-methods, only if the 'act' method is excessively long). I want to tell you to just delete all the 'spawn' methods and references; but, then we would be starting almost from scratch again. One th
Menu Problem for android app
By BradH, with 1 reply.
Replied to by BradH, over 13 years ago:
here is my manifest
Still and Moving Objects
By Gingervitis, with 4 replies.
Last reply by Gingervitis, over 13 years ago:
Thank you!
Is there a limit on how much stuff that can be put in a single Greenfoot game?
By Gingervitis, with 13 replies.
Last reply by danpost, over 13 years ago:
Replied to in the 'Still and Moving Objects' discussion.
Jump(for danpost)
By comandodude101, with 6 replies.
Last reply by comandodude101, over 13 years ago:
]Ok well I think I fixed it
Getting text to paragraph?
By -nic-, with 3 replies.
Last reply by -nic-, over 13 years ago:
Thanks Danpost
GreenFoot on Thin Clients
By jason_pitt, with 1 reply.
Replied to by mjrb4, over 13 years ago:
Is there anything in the debug log?
Can Greenfoot work on Windows 8?
By hallc, with 1 reply.
Replied to by mjrb4, over 13 years ago:
Yes, both Greenfoot and BlueJ work with Windows 8 - we should probably update the page.
On making the scenario icon
By MatheMagician, with no replies.
Whenever Greenfoot takes the screenshot of my scenario, it will remove a bunch of the lines on it (take a look at my z-buffering scenario to see what I mean). Is there a way to fix this?
Text field
By moobe, with 3 replies.
Last reply by moobe, over 13 years ago:
Thank you so much for your help! That was quite amazing! :D
spawning at location problems
By KierTulp, with 10 replies.
Last reply by KierTulp, over 13 years ago:
Thanks for all the help, I believe it is really close to working now, but I can't spawn my gravity beam because it doesn't exist in the world yet. "java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed." I thought of spawning a few of them out of sight, and then moving them to the location when asked, but I thought that there should be an easier and better way of doing this. Do you know a better way?
886
887
888
889
890
891
892
X