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 make Health Point for my Main Actor ?
By donysamdhila, with 1 reply.
Replied to by danpost, about 8 years ago:
Line 15 in the Nyawa class will only set the value of 'nyawa' to '1' when the project is compiled (because you have made it a ''static' (or class) field. As such, you need to set its value either during the construction of the world or during the construction of the Nyawa object..
Can't get access to counter in World subclass
By Coolhand812, with 4 replies.
Last reply by Coolhand812, about 8 years ago:
Thanks, Danpost! Your're a life saver! Thanks!! I really appreciate your help!!
Two Identical Objects. One doesn't work
By Daniel_, with 6 replies.
Last reply by Daniel_, about 8 years ago:
Oh, I see. This makes things a lot easier and more flexible, I understand where I went wrong. Thanks Dan,
Making a double-(or mutli-)jump
By maxdekruijf, with 3 replies.
Last reply by maxdekruijf, about 8 years ago:
Thanks but we got it sort of fixed already. Appreciate the feedback!
Double Jump
By DionWezz, with 6 replies.
Last reply by DionWezz, about 8 years ago:
danpost wrote...
DionWezz wrote...
i tried that already, it works except for 1 thing, the player falls through all platforms after that
Oh -- I did not see the 'else' blocks starting at lines 55 and 59. The same condition will probably have to be applied to them also. Try replacing lines 46 through 62 with this:
My Program gives me a nullpointerexception
By TheShyGuy, with 1 reply.
Replied to by danpost, about 8 years ago:
I cannot see how you are getting that error on that line, especially considering the condition before it (line 4) and that no action is taken between that and the next previous line (line 3) where you assign 'x' its value. However, an improvement that will probably solve the issue is that you really do not need that particular condition on line 4. You can just use this: <Code Omitted>
Part view of a large picture
By Yogibaer, with 2 replies.
Last reply by danpost, about 8 years ago:
Yogibaer wrote...
Are there any commands to move the bars from the program code?
No. But you can make your world smaller to fit the monitor size and scroll the background image using program code.
when I reach the end of the shown part of the world with my car I have to move the window selection bars to move the visible part to a new position.
Xbox One Kinect
By ameileos, with 1 reply.
Replied to by danpost, about 8 years ago:
ameileos wrote...
Is the XBox One Kinect compatible with Greenfoot and PC? Also, what version of Windows do we need in order to utilize the Kinect in Greenfoot programming?
Did you review
this page
?
Targetting bullets
By NielsV5B, with 1 reply.
Replied to by danpost, about 8 years ago:
There are a couple of ways (at least) to improve the direction of movement. Probably the best one is to track the location and rotation of the actor using finer units of measure (rather than units of whole pixels and whole degrees). The SmoothMover class provided with greenfoot provides a finer coordinate system, but does not provide finer rotation. My QActor support class, however, provides both. It can be found in my
Asteroids w/Improved QActor class
scenario.
variable won`t get transfered to other class
By BananaJoe, with 19 replies.
Last reply by BananaJoe, about 8 years ago:
Thank you!
"Illegal character: '\u0000'" error at the end of file
By Arakniode, with 2 replies.
Last reply by Arakniode, about 8 years ago:
Problem fixed! As I thought, the problem was with working on distant sessions at school. We tried other ways, and it appears that the problem is fixed by working on a local session, or even on an USB key. Thanks for your answer!
How do I make 2 Actors, not run into each other, horizontaly and verticaly?
By TheShyGuy, with 2 replies.
Last reply by TheShyGuy, about 8 years ago:
danpost wrote...
In line 14, 'i' needs to be less than 'size' (not greater than).
XD Thank you^^, i didn't see that.
matthijs124 wrote...
You can set up some kind of boolean like "isOccupied" and only move to the certain tile if the tile is NOT isOccupied --> but then you have to determine this BEFORE you move.
Thank you too^^, that gave me a good idea on something :3
How do I get my scoreboard to function?
By scorch, with 1 reply.
Replied to by danpost, about 8 years ago:
The ScoreBoard class is for when the game has ended and the Bullet class only shows that 'hit' is called on a hit asteroid. Nowhere is a running score shown or changed. What code do you have in the Asteroid class and World subclass (called MyWorld, possibly)?
Can I use a penDown() method in Greenfoot?
By madelinezuckerman, with 1 reply.
Replied to by danpost, about 8 years ago:
madelinezuckerman wrote...
I want to use the penDown method in my game. Can I?
Not unless you program one to use. Neither java nor greenfoot come with a 'penDown' method in any of their classes.
Adding sound when object is collected
By MattTheGooner, with 3 replies.
Last reply by danpost, about 8 years ago:
You should note that all other sounds are triggered by objects that are immediately being removed from the world. With the last one, the Bts object is not being removed -- nor is a different world being set active. This means that the act method of this object is repeatedly finding itself intersecting the Bts object and repeatedly creating new GreenfootSound objects to play, one on top of another. Hence, the impression of all your sounds playing at the same time. One way to "fix" the issue would be to remove the intersecting Bts object from the world. However, if you are to keep it in th
311
312
313
314
315
316
317
X