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
How to only detect a single key?
By Conmore, with 3 replies.
Last reply by davmac, over 12 years ago:
Also, line 13 is wrong: if(inUse = false) Should be: if(inUse == false) Use '==' for comparison, not '='. As you have it now, it always sets inUse to false.
Download problems
By CPG, with 1 reply.
Replied to by davmac, over 12 years ago:
Please read the download page, which links to
this discussion
.
I need help with for loops
By ImASuckerAtThis, with no replies.
ok hey guys, im just a student in computer science class in tenth grade, and one of our projects is to make blocks in the world by using for loops... which i have no idea how to do i mean i know how to do it ITS THE WHOLE: for ( int i = #; i< #; i++) { addObject ( new iceBlock(), 25*i, 580); thingy the image of the block is technically 25x25... but if i put it in a world (80,60,10), how would that work? how do i make a game with 28 boxes by 28 boxes on both the length and width of the world. I want it to fit properly, as in no half blocks at the edges of the world, please help mw with the four loops: give me an example question and please solve it so i can see how its done.. make it really simple......... please reply ASAP..project due in 3 days :0 }
Making an actor not world delay?
By bbwf, with 1 reply.
Replied to by danpost, over 12 years ago:
To delay an actor, you will need a counter to count down the time that the actor is to be delayed. While the counter is not zero, the delay is in effect; if the counter is zero, the actor can act as normal. Just set the value of the timer to the appropriate value to create the delay required (usually about sixty times the number of seconds delay time). Start your 'act' method for the actor as follows:
Where is my mistake?
By Enes, with 3 replies.
Last reply by Dytanoth, over 12 years ago:
public
boolean
fliegeKlatschen() The boolean tells the system to return a
boolean
, but you don't have a return statement in your code. If you use: public
void
fliegeKlatschen(), the system will know there won't be a return statement.
Greep !!
By H&M, with no replies.
hello I would like to know how can I prevent the Greep from stucking in water when they have a tomato. it is working, the greeps move toward the tomatoes but when they get it they get stuck in the water !! do please reply soon please !! THANK FOR YOUR WHOLE ATTENTION..
How to stop the game
By Bestgirl, with 2 replies.
Last reply by bbwf, over 12 years ago:
What gevater said. When the chicken equals a null and gets removed put Greenfoot.stop();
checking whether a method gets called
By bonana, with 2 replies.
Last reply by bonana, over 12 years ago:
Thank you!
Pokemon style turn based battle system
By student101, with 3 replies.
Last reply by davmac, over 12 years ago:
For starters, create an actor class called eg "TurnBasedActor" and have your other actors extend it. Have a method called 'doTurn()' in it (which does nothing). Your other actors can re-implement this method to do whatever they want. Then, have a variable called 'currentActor' of type 'TurnBasedActor' in your world. In the act method of your world, call currentActor.doTurn(). If you need more help, please ask specific questions rather than just a general 'write all the code for me'.
Timers
By camsterb, with 4 replies.
Last reply by camsterb, over 12 years ago:
Yeah, that's what I did! I just wonder if there is a real way to do it.
The problem for moving
By Bestgirl, with no replies.
I did a game for FSE,but i hava some question about movement. I create a platform and it can move,i want to know how to make the player move with that? Can someone tell me or show some example please
friends how are u all?
By jabirfatah91, with no replies.
Any new updated news about greenfoot?
Counter in many levels
By moobe, with 6 replies.
Last reply by moobe, over 12 years ago:
Hi, thanks for your answer, I've solved this problem before your post^^ I have an actor collecting items and have given him direct reference of the counter object now, because he's the one who creates the counter. I've made an integer which knows the current value of the counter. So every time I change the world I create a new counter with my actor. Then I type in counter.setValue(collected); and then is everything fine again - so I have no code in the world ;) Your second solution sounds great! Can I do that with all objects I want? Cause I have three counters in my game an
plz how can i stop one greep at the tomato
By hossam, with no replies.
i can stop more than one put my problem is i need only one greep to stop at the tomato to load it to other greep this problem is killing me????!
"Non-static method cannot be referenced from a static context" - help?
By Athanasia, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
The problem is that the method removeObjects is a non-static one. You should try to use it as a non-static mehtod: <Code Omitted>
891
892
893
894
895
896
897
X