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
Xbox One Kinect
By ameileos, with 1 reply.
Replied to by danpost, almost 9 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, almost 9 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, almost 9 years ago:
Thank you!
"Illegal character: '\u0000'" error at the end of file
By Arakniode, with 2 replies.
Last reply by Arakniode, almost 9 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, almost 9 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, almost 9 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, almost 9 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, almost 9 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
Explosions of spaceships
By Welli123, with 2 replies.
Last reply by Welli123, almost 9 years ago:
Ok thx :)
A 'Shot' spawns at my mouses position, even though I have not implied it into my code.
By ElAdriano807, with 10 replies.
Last reply by ElAdriano807, almost 9 years ago:
Wow, it seems to work perfectly now. No more shots coming from my mouse. Thank you very much for your help, Danpost :) It really has been that simple. I wouldn't ever have found out myself since we never learned something about the class tree in school. Thanks again, you saved my weekend :)
Make actor disappear
By Dipne0p, with 11 replies.
Last reply by danpost, almost 9 years ago:
Dipne0p wrote...
danpost wrote...
Do you still get the same error?
yep
Since you are getting a run-time error, that means your project compiles. You can therefore upload it onto greenfoot and include the source code so that it can be reviewed and tested. (or you could first show the Shooter class code here to review)
UserInfo
By Troxter, with 11 replies.
Last reply by danpost, almost 9 years ago:
Troxter wrote...
when i want to use the double again do i have to use <Code Omitted>or can i simply use the string as my double?
You cannot use a String as a double -- and there is no 'toDouble' method in the String class. Did you even look at the
String API documentation
to see what methods were available to use?
Displaying Gravity Constant
By bannigrin, with 4 replies.
Last reply by bannigrin, almost 9 years ago:
@danpost Thank you! That fixed it
landing on a platform
By rutger362, with 2 replies.
Last reply by danpost, almost 9 years ago:
The only difference between the two codes other than what is printed to the terminal is the range ('10' and '45'). Checking against 'null' whether a single ground object is in range is equivalent to checking if more than zero is in range (other than the fact that you get a reference to one that is in range, if one is, with the first code set). Nowhere is there any checking of the position of a near platform with respect to the enemy, which is something you will need to do.
how to add background sound?
By kris10wb@gmail.com, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
Create and save a GreenfootSound object in your world. Then you can use "playLoop()" and "pause()" to control the sound.
313
314
315
316
317
318
319
X