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
Conditions for new level
By DoctorProfessorYoshi, with 31 replies.
Last reply by DoctorProfessorYoshi, over 10 years ago:
I think, and this is just pure speculation here, but try putting the score widget in the code that tells the computer what to put in each level.
Writing and Reading from file help
By Hoshiwara, with no replies.
I am creating a electricity simulator (not to be uploaded) and I made it so it can write and read to file (so it can save the current circuit for when you next load up the program). Once I got this working I exported it to a .jar file for testing, and in that form it will not read/write to the files. I can see the files in the jar file when I open it with an archive program, however, they do not seem to be changing. I'm not sure if the code is necessary, if you need it just ask.
character walking help
By chrissy098, with 6 replies.
Last reply by chrissy098, over 10 years ago:
changed it to 40 and it looks pretty good..... what code would i use to make it work when he walks and stop when he does....
Shooting in the direction the direction
By pr2alede, with 1 reply.
Replied to by danpost, over 10 years ago:
Use the 'addedToWorld' method to set the rotation of the ant to that of the crab when the ant is added to the world. Then, change the movement code (lines 26 through 29) to using the 'move' method to move.
breaking objects
By Olaf144, with 2 replies.
Last reply by Olaf144, over 10 years ago:
Together with this one: private void checkblok() { blok = (blok)getOneIntersectingObject(blok1.class); if(blok != null){ if((getY() > blok.getY()) || (getY() < blok.getY())){ deltaY = -deltaY; } else{ deltaX = -deltaX; } if(blok instanceof blok1){ blok1 blok1 = (blok1)blok; if(blok1.isZero()){ ((Background) getWorld()).breakblok(); } } blok.collide();
Starting and stopping the sound
By Foppen, with 4 replies.
Last reply by Foppen, over 10 years ago:
Alright thanks.
Score System
By alagon, with no replies.
I know this is being posted a lot...but... Im trying to increase a variable in another class without creating a new class every time. My class that im trying to increase the variable class is the bomb and the score system...Score i guess. Currently what im using is: <Code Omitted> (I use a method that takes the score and adds it to the already existing score.)
java.lang.NullPointerExpection
By joe.colo1, with 4 replies.
Last reply by bourne, over 10 years ago:
Depends on context. But make sure it is initialized before trying to invoke it (calling methods on it). private Swag swag = new Swag(); // Or whatever constructors you have for that class
Creating an instance variable of an Object with parameter.
By JasonZhu, with 10 replies.
Last reply by JasonZhu, over 10 years ago:
Thanks dan, makes sense.
Mouse click over certain area?
By Yedya, with 26 replies.
Last reply by Yedya, over 10 years ago:
OOOhh ok,that make sense now.Thanks so much for your help man,I understand it alot more now!
Count code?
By jennifer56, with 2 replies.
Last reply by jennifer56, over 10 years ago:
Thank you. Today You are my HERO xxx
RGB is to less
By Kartoffelbrot, with 7 replies.
Last reply by Kartoffelbrot, over 10 years ago:
Oh ok, thank you all.
Player losing all control when World starts acting
By kiarocks, with no replies.
I was having everything going pretty well, when I ran across an odd bug where my Player would stop responding to movement from the user, and would smash through any blocks while scrolling, which it shouldn't due to the fact that it is automatically cancelled if it can't move there. The src is too much to post here, so I've uploaded it @
http://www.greenfoot.org/scenarios/10270
. Thank you.
unsigned jar?
By davemib123, with 6 replies.
Last reply by davmac, over 10 years ago:
Ah, ok. Running an unsigned jar locally without any server isn't possible; davmac?
Running an unsigned
applet
jar isn't possible - yes, I think that's the gist of it. You can still run regular application jar files however.
Shooting parabola
By sgt12, with 3 replies.
Last reply by danpost, over 10 years ago:
My
Flight Trajectories Demo
demonstrates two ways to accomplish the parabolic motion of flight trajectories. I am sure one of them will suit your needs.
752
753
754
755
756
757
758
X