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
What is wrong with my code?
By Bassusour, with 16 replies.
Last reply by Super_Hippo, almost 10 years ago:
With the code he gave you, add a 'setImage' call in lines 10 and 15.
How to display line that I drew.
By RedPanda98, with no replies.
I have followed Greenfoot's API and trying to create Wall class which will be used in the world to separate the controls and the particles of the world. How do I display the line and can this be used for collision detection? <Code Omitted>
Help me, my counter "n" wont increase...
By Nathan2000, with 2 replies.
Last reply by Super_Hippo, almost 10 years ago:
Each 'rocket' has its own 'n' variable. So whenever you create a new 'rocket', 'n' will be set to zero (line 3) and the new rocket prints its own 'n' into the world. One way to make it work is to track the hits in the Player's class code. And whenever the rocket hits an enemy, it increases the variable of the Player object.
Help me for my table football game
By fearDnine, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Call the 'move' method at the end of the 'bounce' method. Maybe that helps. Why do you have a different class for each player?
Create a new object from a different class
By Bassusour, with 2 replies.
Last reply by Bassusour, almost 10 years ago:
thank you :)
How do you create sliders to increase or decrease values?
By RedPanda98, with 1 reply.
Replied to by danpost, almost 10 years ago:
I have a Bar class (subclass of Actor) that can be used as a slider when subclassed by my MseActBar class. If you downloaded my GQActor Superclass Demo as discussed in your gravity issue discussion thread, you should find both those classes in it.
How to access .ini Files?
By Crydsch, with no replies.
Hello Greenfoot Community While trying use an .ini File to store and load Data from, i ran into some problems. Maybe some can help me out with this... I know that a cant access Files the "normal" way and used the method explained here
here
. I wanted to use the
ini4j api
to access said file and did a first try with the example dwarfs.ini. This is what i tried: <Code Omitted> Thanks in advance Crydsch
What is wrong with my code?
By LordGaben, with 1 reply.
Replied to by danpost, almost 10 years ago:
The only line, that when executed, that will change the value of the counter is line 59; however, it is located in a method , 'try2Eat', that is not being called to execute.
Creating gravity with different strengths.
By RedPanda98, with 1 reply.
Replied to by danpost, almost 10 years ago:
I have a set of support classes that may help here. The first is my QActor class which gives instances of its subclasses precision movement and turning. The second one is a subclass of QActor, called 'GQActor', which additionally provides instances of its subclasses variable gravity. They are located in my
GQActor Superclass Demo
scenario. You can download and open the scenario within greenfoot to check out the two classes.
System runtime code acting strange
By bobbyjones2000, with 4 replies.
Last reply by Super_Hippo, almost 10 years ago:
Change line 12 to 'setTimer();' OR change the 'setTimer' method to the following: <Code Omitted>
I need help with string variables + addObject
By Boogabacon, with 3 replies.
Last reply by danpost, almost 10 years ago:
Boogabacon wrote...
Thanks for the help, This code is much easier to use than huge If statements!
Usually, if you find yourself using "huge If statements", there will be a much easier, more simple way.
How can one actor do something, wait a second and then do something else?
By TheTimon, with 6 replies.
Last reply by danpost, almost 10 years ago:
TheTimon wrote...
Alright it works, thank you very much. Now I want to do a different level, where instead of rocket lasers are fired and in a way, that in an instant a whole row is filled up and if the person is in that row then the person dies. Is this possible and if it is possible, how?
Of course, it is possible. Just create a subclass of Actor called Laser and add the implementation to it (put code in the class to have it do what you want).
Stories on how you managed to learn programming.
By bilibull, with 5 replies.
Last reply by bilibull, almost 10 years ago:
Thank you all that have answered for your recommendations
how to push another object
By 103200, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
It will look a bit like this: <Code Omitted> And in the Ball class (useful to import the SmoothMover class and let the Ball be a subclass of it)
background music in my project is playing before i run it
By fearDnine, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Instead of placing the 'playLoop' code into the constructor of your world (I guess you do so, you didn't provide any code), use these methods in your world class: <Code Omitted>
490
491
492
493
494
495
496
X