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 flip image
By armoredarmada, with 25 replies.
Last reply by davmac, almost 13 years ago:
what is difference between wait and delay and which one should I use for an explosion actor?
'wait' is a Java method which you shouldn't use. Use Greenfoot.delay(...).
Struggling
By al_griff, with 11 replies.
Last reply by danpost, almost 13 years ago:
In the world class code: <Code Omitted>
Why doesn't this work?
By TheNightStrider, with 2 replies.
Last reply by TheNightStrider, almost 13 years ago:
kiarocks wrote...
When you create an array, it does not create objects
in
the array. Instead, use<Code Omitted>
Right so, it is initializing the Player as null., and then a null pointer exception right. Can't believe i missed that! Thx for quick reply
addObject within a set Distance, using vectors
By matt.milan, with 1 reply.
Replied to by davmac, almost 13 years ago:
Working on the assumption that you want 'vtr' to represent the distance and direction that you want to place a planet from myShip, then, there are a few lines that look wrong to me: 18. addObject(new Planet() 19. (int)vtr.getX(),(int)vtr.getY()); You're not adding the ship's co-ordinates the vector; it should be more like: addObject(new Planet() (int)vtr.getX() + myShip.getX(),(int)vtr.getY() + myShip.getY()); And with this: 08. vtr = new Vector((double)myShip.getX(),(double)myShip.getY()); ... is setting the vector size an
compiling problems
By danbhome, with 4 replies.
Last reply by danbhome, almost 13 years ago:
btw for first error i based it off tut access p2 and a little of nightmare: emergence
Update on Live Scores...
By Omniscience, with 9 replies.
Last reply by sp33dy, almost 13 years ago:
Hi, No need to thank, I'm just pleased to help. You are trying to call setFont on the String object text. You need to setFont on a GreenfootImage I believe, so image.setFont(font) in your case.
Is it possible to make a high score list? If so, how?
By Sneaky4296, with 2 replies.
Last reply by Sneaky4296, almost 13 years ago:
Is there any way to see what else is coming in that update?
Mouse Movement Error
By matt.milan, with 5 replies.
Last reply by matt.milan, almost 13 years ago:
haha yeah that's pretty redundant...thanks for the optimization tip, i'm gonna switch that now. i guess i should have seen that earlier
Help with abstraction
By Sneaky4296, with 2 replies.
Last reply by Duta, almost 13 years ago:
replace
if(KeyNum = x)
with
if(KeyNum == x)
.
=
is used when you're
setting
something equal to something else (
int score = 7
makes a variable "score" and
sets it equal to 7
.
==
is used when you're
checking if
something is equal to something else (
score == 7
checks
if the variable "score" is equal to 7, and
returns a boolean
, meaning that when score
is
equal to 7,
score == 7
is exactly the same as
true
) Oh and in case you didn't know (I assume you do but just on the off chance) a
Piano shows the piano_complete but no sound to be heard
By PKHG, with 2 replies.
Last reply by PKHG, almost 13 years ago:
Thanks, but problem is solved by reading the book better! Not using the mouse to touch the keys but using the keyboard really ... sorry for (stupid) question ;-) Peter
Shoot delay code?
By MakerOfGames, with 1 reply.
Replied to by matt.milan, almost 13 years ago:
private int shootDelay = 0; private final int SHOOT_DELAY_MAX = some number; // shootDelay++ if (shootDelay >= SHOOT_DELAY_MAX) { do stuff shootDelay = 0; } what do you think about this
Lines
By Razzo, with 3 replies.
Last reply by Morran, almost 13 years ago:
You could make the images wider, or you could drop 3 per act. You could try: <Code Omitted> instead of <Code Omitted> I hope that this helps.
counter
By joemoma, with 15 replies.
Last reply by Morran, almost 13 years ago:
Yeah, it's not affected by the speed slider because it counts off of real milliseconds and not frames. (Although, to be honest, I normally use the "int--, if < 0" anyway).
Something
By ihatenoahbravo, with 3 replies.
Last reply by Duta, almost 13 years ago:
Morran wrote...
<Code Omitted>
Or <Code Omitted>
Greenfoot Start up Help
By mylinnn, with 5 replies.
Last reply by hbdavies, almost 13 years ago:
Thanks so much tut newbies eh
996
997
998
999
1000
1001
1002
X