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
nullPointerException
By Nosson1459, with 8 replies.
Last reply by Nosson1459, almost 10 years ago:
thnx
hi score
By Nosson1459, with 3 replies.
Last reply by danpost, almost 10 years ago:
Nosson1459 wrote...
that was my Q. can it b saved even after closing the program and restarting
It can be done; but, only locally. It cannot run that way on the greenfoot site or in a webpage.
Random line of code effects
By Nosson1459, with 11 replies.
Last reply by Nosson1459, almost 10 years ago:
never thought about it like dat
Random letter generator
By JarJarBanks7, with 9 replies.
Last reply by danpost, almost 10 years ago:
JarJarBanks7 wrote...
how would i put this in my code?
Replace line 18 through 23 of your Letters class, as given above, with it.
Enemy moving side to side
By TechNoob, with 1 reply.
Replied to by danpost, almost 10 years ago:
Will you be turning your actor (changing its rotation) when an edge of the world is arrived at? or, will it face the same direction and just move in the opposite direction? and, what have you tried, code-wise?
Actor not in World
By georgette, with 4 replies.
Last reply by georgette, almost 10 years ago:
@danpost, I added code to the act method, placed the appropriate code in the appropriate methods and calmed down with my use of the brackets. Finally, after 3 days of getting no where my world is constructed! Thank you for all your help, I really appreciate it!
"walking" animation working for an actor, but how can I slow it down?
By JWK3986, with 2 replies.
Last reply by JWK3986, almost 10 years ago:
That works perfectly with the value set to 10 instead of 2, thank you very much for the reply and help!
Incrementing counter - going crazy!
By jcw, with 7 replies.
Last reply by jcw, almost 10 years ago:
Solved it.... There
were
two occurrences of the counter being defined! The first (which I had in the MyWorld) is shown at the top of my original post. I added this myself. The second occurrence I think has appeared when I saved the world. It was in the prepare method... <Code Omitted> The moment I removed it my code worked as intended. Thanks for your help guys, I know this is a stupid and basic issue, but I am just learning this from scratch.
boolean
By Nosson1459, with 2 replies.
Last reply by Nosson1459, almost 10 years ago:
got it stupid mistake forgot 2 call da checkHit method in da act
return
By Nosson1459, with 6 replies.
Last reply by danpost, almost 10 years ago:
Nosson1459 wrote...
its fine i did trial and error and da 1st one worked thnx
If you are using: <Code Omitted>then the method will only return a true value (because you are assigning 'true' to the 'hit' variable instead of comparing the two -- which '==' would do).
Spawning Random Actors Problem
By abo123, with 4 replies.
Last reply by abo123, almost 10 years ago:
Ok thanks for your time!
Piano Bugs
By abby410, with 1 reply.
Replied to by danpost, almost 10 years ago:
abby410 wrote...
Could this problem be due to the updating of my computer?
We cannot say whether it is your code or not because you are not showing any of it. Please all codes related to the sounds (creating, assigning to keys, conditions for playing, etc.)
How can i put counter lives of my character?
By GeomDshai, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Remove the 'lives = 3' line and place the following at the beginning of the class: <Code Omitted>You also need an act method to call the lives method.
adding time limit to my game
By NAMYA1403, with 4 replies.
Last reply by NAMYA1403, almost 10 years ago:
counter was not for this timer thing, it was for the score counter thing and is not releated to it
My car doesn't behave like it should.
By josjuuNL, with 7 replies.
Last reply by danpost, almost 10 years ago:
I forgot to include code to place the actor appropriately for the direction it will be moving. In the above suggested Car class, add the following: <Code Omitted>The 'addedToWorld' method is part of the Actor class -- and like the 'act' method, it is called by greenfoot. It is called when an actor is added into any world (when using the 'addObject' method of the World class).
437
438
439
440
441
442
443
X