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
By Nosson1459, with 4 replies.
Last reply by Nosson1459, about 9 years ago:
thnx
Memory issues
By AuroraGamer, with 10 replies.
Last reply by danpost, about 9 years ago:
AuroraGamer wrote...
I hate being that person asking a million question, but what do you mean by do not scroll the background image?
I am saying that in a side-scroller with a background image like this: <Image Omitted> there is really no change in the image. So, why scroll it at all. You still need to scroll the actors; but, the background will then only appear to scroll.
How Do You Make 2 Actors Rotate And Position Together?
By Sellion, with 1 reply.
Replied to by danpost, about 9 years ago:
The main actor should have a reference to its gun and control its location. That is, set location to (getX(), getY()), set rotation to 'getRotation()', move some distance out from center of main actor, turn(90), move some distance sideways, and turn(-90). Doing this at the end of every act cycle (after the main character has moved and turned) will keep the gun in place. The gun object should create the bullet objects and add them into the world, initializing their rotations and placement in a similar fashion (except not continuously).
Support for Kinect on Windows 10
By peartree, with no replies.
Looking for updates on connecting the Kinect on a Windows 10 system. Will this be made functional at any point?
How do I put a basic timer into my game
By mmoodle, with 2 replies.
Last reply by danpost, about 9 years ago:
The steps involved are explained and illustrated in my
Value Display Tutorial
. Maybe it can help you out.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0” with
By Harshitha, with 2 replies.
Last reply by danpost, about 9 years ago:
After the 'int count ...' line (line 11 above), try adding the following line: <Code Omitted>This will prevent any zero-sized arrays from being created. Maybe you should investigate further as to why a zero was being returned by the 'getRowCount' method from DBConn -- or maybe not (I am not sure if this is something that is okay with you or not).
Character shooting
By Jillis, with 1 reply.
Replied to by danpost, about 9 years ago:
You can only use 'getKey' once per act cycle. You are using it four times here, at lines 23, 28, 33 and 38. Any key return by line 23 will not be returned again on the subsequent lines. If no more keys are waiting in the keyboard buffer, 'null' will be returned. Hence, the subsequent codes for firing never execute. Get the key once, before any checks and hold it in a String variable; then, compare the contents of the variable for the matching values: <Code Omitted>
nullPointerException
By Nosson1459, with 8 replies.
Last reply by Nosson1459, about 9 years ago:
thnx
hi score
By Nosson1459, with 3 replies.
Last reply by danpost, about 9 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, about 9 years ago:
never thought about it like dat
Random letter generator
By JarJarBanks7, with 9 replies.
Last reply by danpost, about 9 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, about 9 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, about 9 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, about 9 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, about 9 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.
435
436
437
438
439
440
441
X