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
Removing an image
By Matt, with 1 reply.
Replied to by Gevater_Tod4711, almost 13 years ago:
I think Bungalow is your world class right? If so you can use this code to remove all Cat objects from the world: <Code Omitted> If you need to remove a specific cat and ceep the other cats in the world that would be more difficult. Then you need to know which cat you want to remove from the world.
Nonstatic variable cannot be referenced from a static context HELP!!!
By cellostar47, with 6 replies.
Last reply by cellostar47, almost 13 years ago:
Thanks!
Booleans
By joris0127, with 1 reply.
Replied to by Gevater_Tod4711, almost 13 years ago:
If you want to check whether this method returns true you just need to call the method from your if clause like this: <Code Omitted>
How to move an object by another
By BGY12C, with 3 replies.
Last reply by Gevater_Tod4711, almost 13 years ago:
When your main character is called Siggi the code I gave you abouve goes into this class. Not in a special method just somewhere in the class (because the method setLocation(int, int) is already defined in the class Actor so you override this method.) If the Tisch is the object which is moved you can use this class in the getOneIntersectingObject method:
remove only one object not all
By BGY12C, with 1 reply.
Replied to by erdelf, almost 13 years ago:
change line 6 to <Code Omitted>
Switching to the next level
By BGY12C, with 6 replies.
Last reply by BGY12C, almost 13 years ago:
Thank you from my whole team, the first way works great :D
My spawnCars method doesn't work correctly i can 't figure out whyyy can anyone help me
By Gerrit, with 10 replies.
Last reply by Gerrit, almost 13 years ago:
Nice it works I was trying to code something like my cars companied by a motorcycle that brings him to the station. so when the car entered the world it should follow the motorcycle , the motorcycle must bring the car to the station and when it get to the station. the motorcycle must get the other cars as quick as possible . i have no idea how i should code this
Item thrwoing by pressing not holding the button
By BGY12C, with 1 reply.
Replied to by Gevater_Tod4711, almost 13 years ago:
You need to check whether the key was released after pressing it to make only one ball appear. Try it like this: <Code Omitted>
Making the game continue
By GreenAnthony, with 6 replies.
Last reply by GreenAnthony, almost 13 years ago:
Okay I tried it, it doesn't really work!
how to create a mouse game
By Mint_Green, with 6 replies.
Last reply by danpost, almost 13 years ago:
It is really not that tricky. Once you get the location of the mouse with the MouseInfo methods 'gexX' and 'getY', you can use the Actor class 'turnTowards' method on the shot to set its direction of movement.
I'm new to coding!!!
By Bean4221, with 5 replies.
Last reply by csr1010, almost 13 years ago:
Download greenfoot and do some tutorials. This is great to start with. I started on a program called Alice. I do NOT recommend it. It did teach the basics. But keep in mind this is java. A very useful yet not a beginner language.
Need help!!!
By GameCoder11721, with 2 replies.
Last reply by jimboweb, almost 13 years ago:
On my website I have a code example of a score counter with explanation here: http://mrstewartslessons.com/score_counter.html And I have a video lesson about it here: http://youtu.be/VnR6i7BXD-E
Spotting system
By joris0127, with 5 replies.
Last reply by joris0127, almost 13 years ago:
Thank you very much i will use this untill I find something better.
incompatible types
By Rudolf, with 8 replies.
Last reply by davmac, almost 13 years ago:
Sorry, the same error.
Is it possible that you have a 'MouseInfo' class of your own in the scenario? If so, can you remove it? Or otherwise change the line to read: <Code Omitted>
i made a array for my actors but they wont stay in the position i want how can i do this
By Vigelandzoon, with 15 replies.
Last reply by Vigelandzoon, almost 13 years ago:
thanks danpost for your help but i made switch is was much easer if you want i can put the code up her
732
733
734
735
736
737
738
X