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
Compile error - help
By geekykid2013, with 21 replies.
Last reply by danpost, about 13 years ago:
That would be ok. You were probably getting the error on line 29; where you call it 'countDownTimer', instead of 'countdownTimer'.
stoping the music
By MBX5, with 7 replies.
Last reply by danpost, about 13 years ago:
Move the 'if' condition/block to the act method of that class (if you do not yet have one, create one)
Count down timer
By geekykid2013, with no replies.
I need some help in creating a 90 second countdown timer to fit into each of my worlds how can I do this?
Blocks Intersection
By Solringolt, with 1 reply.
Replied to by Solringolt, about 13 years ago:
Sorry I made a big mistake inverting y+ and y- in the detection so the new hit detection is this:
Remove Object in world class
By Nike.Sprite, with 13 replies.
Last reply by Nike.Sprite, about 13 years ago:
there is no code in Food Class, just public Food() but there is nothing in it ;) But all my problems are solved & I already handed in my game, thanks for your time. Good night grtzzz Nike Sprite
Enemys disappearing with no reason bug
By Maddin, with 2 replies.
Last reply by Maddin, about 13 years ago:
Thank you i'll try it later :)
Reading textfiles
By Zamoht, with 3 replies.
Last reply by Zamoht, about 13 years ago:
Thanks danpost thats exactly what i needed. Haven't tried the code yet but it looks promising.
Accessing variable from world
By welleid, with 1 reply.
Replied to by MrCohen, about 13 years ago:
In your Actor: public boolean getMyBoolean () { return theBoolean; } In your World: boolean b = myActor.getMyBoolean();
How to walk on platforms & make new levels
By programmingnewb, with 1 reply.
Replied to by uanimal, about 13 years ago:
you vspeed needs to increase when falling and decrease when jumping so put in fall vSpeed += vSpeed and jump vSpeed -= vSpeed
how do you access variables from other actors
By mattjonescalday, with 2 replies.
Last reply by davmac, about 13 years ago:
Tutorial #6
level select
By kexsas321, with 1 reply.
Replied to by uanimal, about 13 years ago:
{ Greenfoot.setWorld(new Level2()); } set new world in player code
JOptionPane Help
By Phytrix, with no replies.
I'm trying to create a game where a player clicks a sign and can get one of x possible questions. From this, he/she must type in the correct answer to this question. If the wrong answer is selected, points will be taken away, not a "try again" kind of thing. I can't seem to find any appropriate way to create these random answers and assign the correct answers to them. I have the basics of JOptionPane under control though (displaying dialogue and whatnot). Any help on this issue would be much appreciated. :)
Passing score between world
By uanimal, with 1 reply.
Replied to by Zamoht, about 13 years ago:
Pass the score as an argument for the new world. I don't know much about your code but i guess it would have to look something like this. Greenfoot.setWorld(new Level2(score)); Then in the Level2 class you have to write something like: public Level2(int score) { //setup your level and do whatever you need to with the score }
Can someone help me?
By Chocomint1213, with 1 reply.
Replied to by uanimal, about 13 years ago:
import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot) import java.awt.Color; import java.awt.Font; import java.util.Calendar; /** * The ScoreBoard is used to display results on the screen. It can display some * text and several numbers. * * @author M Kolling * @version 1.0 */ public class GameOver extends Actor { public static final float FONT_SIZE = 48.0f; public static final int WIDTH = 600; public static final int HEIGHT = 300; /** * Create a score board with dummy result for testing. */ public GameOver() {
Use string to define a class name?
By Entity1037, with 2 replies.
Last reply by Entity1037, about 13 years ago:
Oh, I didn't know those existed. Ok, that makes a lot of sense! Thank you!
825
826
827
828
829
830
831
X