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
Trying to make Rockets fall out of the sky randomly
By DuckGod, with 38 replies.
Last reply by danpost, almost 9 years ago:
DuckGod wrote...
I just figured out that i had it backwards i was suppose to have it like this < Code Omitted >
I mentioned my concern over that code previously in this discussion:
I am actually puzzled about the code starting from there. If a Ground object is found intersecting, it does not seem correct to give it 'shootingSpeed'; and to remove 'shootingSpeed' if no ground is detected.
White Blood Cell
By LimeLava, with 17 replies.
Last reply by LimeLava, almost 9 years ago:
Yes it is. Thank you
ball
By Nosson1459, with 10 replies.
Last reply by danpost, almost 9 years ago:
Nosson1459 wrote...
wats isEmpty()
Same as 'size() == 0'. The list exists, but there is nothing in it (no intersecting objects, in this case).
compile
By Nosson1459, with 4 replies.
Last reply by Nosson1459, almost 9 years ago:
thnx
Memory issues
By AuroraGamer, with 10 replies.
Last reply by danpost, almost 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, almost 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, almost 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, almost 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, almost 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, almost 9 years ago:
thnx
hi score
By Nosson1459, with 3 replies.
Last reply by danpost, almost 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, almost 9 years ago:
never thought about it like dat
Random letter generator
By JarJarBanks7, with 9 replies.
Last reply by danpost, almost 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, almost 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?
434
435
436
437
438
439
440
X