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
Live Scores... :)
By Omniscience, with 1 reply.
Replied to by DonaldDuck, almost 13 years ago:
Using your code, here it is. int i = 0 int score = i ; int frame = 0; void drawScore { GreenfootImage scoreBoard = new Image (dimensions,dimensions); //dimensions up to you scoreBoard.drawString(Integer.toString(score), 0, 0); //string placement should be have the x coordinate (first one) greater than 0 depending on string length and about half way down the image height so that you can see all letters setImage(scoreBoard); } void incrementScore() { frame = frame + 1; if(frame % 20 == 0) { //increase the % x to make the wait time longer i = i+1; }
the
By johncolmer, with no replies.
lets all help cafod to raise money
Side Scrolling
By Starsonovasa, with 6 replies.
Last reply by K_O_P, almost 13 years ago:
It might be better, if you'd take a look at the documentation of this scenario. There you can see explanations of all the methods.
chapter 5 piano
By wahaj, with 1 reply.
Replied to by sp33dy, almost 13 years ago:
Hi, Although I've not read the book, this is pretty straight forward java. Basically: public Key(String keyName, String soundFile) is the constructor for the Key Actor. Basically, when you create a new Key, you do so by: new Key(<keyName>,<soundFile>); For example: new Key("A","whistle.wav"); Now, that constructing method, put's the string "A" into the class variable key and the sound file name into sound class varilable (lines 6 & 7). If you then look at line 28, the if statement looks to see if key pressed is the value in the key class variable (i.e. you constructed t
Collision
By tallyaka, with 30 replies.
Last reply by tallyaka, almost 13 years ago:
Ok, I will. I'll get back to you tomorrow. For now I have to go to bed though. it's 10:30 and I have school tmrw.
Splitting a String
By Busch2207, with 8 replies.
Last reply by Busch2207, almost 13 years ago:
Omg! Now I understand the page, that Duta postet! xD Sry, but I read the page under stress, bevore school today morning and so I haven't thought so much! xD Now it's clear! I haven't thought about, that this was a String and so you need two backslashes instead of one. xD Thank you guys!
Health
By Dom, with 1 reply.
Replied to by Duta, almost 13 years ago:
If you look in danpost's Bar.class, you'll see that there are the methods: - public void add(int amount) - public void subtract(int amount) You call these methods to add or subtract health. There are other ways to do this but here's one way: (1) Go to your
world
class. Add the following:
moving through objects
By mrlegs, with 1 reply.
Replied to by danpost, almost 13 years ago:
If the river is part of the world's background, you would have to either map the rivers and cross-check using the map, or check the color where the man moves. Move him, then check, If is has a high amount of blue (for the river) then back him up and turn him.
CACC
By Duta, with 3 replies.
Last reply by Duta, almost 13 years ago:
@davmac I was assuming that it was a class, its just a shame that users uploading individual scenarios will be knocked off the front page really quickly. Its not the end of the world, just a little strange logging in to so many versions of one thing.
open editor failed
By Baxtor, with 4 replies.
Last reply by Baxtor, almost 13 years ago:
thx, so i will use greenfoot ;-)
Greenfoot 2.2?
By DonaldDuck, with 3 replies.
Last reply by davmac, almost 13 years ago:
Is turnTowards() like facing a different class?
It can be used to face towards another
object
, which could be of the same or a different class.
documentation
By vbh, with 6 replies.
Last reply by vbh, almost 13 years ago:
sorry im danish try to translate as good as i can. for some very strange reason its working today. thak you for trying to help me.
Image Tracking...
By Omniscience, with 2 replies.
Last reply by Omniscience, almost 13 years ago:
Thanks
davmac
, again incredibly helpful. I do appreciate the corrections in the terminology; it definitely will help me in an exam :) ... On careful thought, I think I will opt for your first possible solution, seeing as the images are very small, so the inefficiency itself, for me, will be near to negligible. EDIT: ah, it didn't work! Well, lets try the
seemingly
long-winded alternative...
Removing requests to add to collection does not appear to work
By danpost, with 4 replies.
Last reply by danpost, almost 13 years ago:
It works now, thank you so much!
book scenarios??
By vbh, with 2 replies.
Last reply by vbh, almost 13 years ago:
i did find it in the end :-) ty for your replay
999
1000
1001
1002
1003
1004
1005
X