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
Hyperlink?
By Lethal_Vitamin, with 5 replies.
Last reply by Lethal_Vitamin, almost 13 years ago:
ty
second level lock
By glesferns, with 1 reply.
Replied to by danpost, almost 13 years ago:
You need a method to update the shown image of the levels with a conditional image drawing of the lock image/symbol onto the image of the shown level. This may not necessarily be true, as you provided no information on how you are working this into your scenario and how to do what you want would depend on several things.
How would I make a character jump?
By Mint_Green, with 2 replies.
Last reply by Mint_Green, almost 13 years ago:
Thank you for your help danpost!
Read User Input
By basil60, with 5 replies.
Last reply by danpost, almost 13 years ago:
I think that Greenfoot 'steals' the keystrokes for the 'getKey' and 'isKeyDown' functions and the Scanner class loses out on receiving them (I could be wrong). The way you can '+1' me is by looking at some of my scenarios. Click on my icon (the fractal design image) and then on 'show all' for the scenarios.
Make a Car Coast to a Stop
By Osidy, with 3 replies.
Last reply by danpost, almost 13 years ago:
To change the rate of acceleration/deceleration, you can do something like this: <Code Omitted>The change can be looked at as being coded like this: <Code Omitted>
Counter help!
By alicija, with 1 reply.
Replied to by danpost, almost 13 years ago:
I have not heard of "flappy bird". I will presume that it is a one-directional (right to left) side-scroller (the character appears to go from left to right). There are different ways to make the score go up one each time the character passes a pipe. Using intersection with the pipes by itself will not work unless you incorporate a boolean to track the last state of intersection and compare it with the current state. Using the change in the differences in the x values of both the character and the pipe is another way (save the original x of character minus the x of the pipe; then after mov
Place Crate Relative to Rotation
By Osidy, with 2 replies.
Last reply by Osidy, almost 13 years ago:
Thanks a ton! That was
exactly
what I wanted to do!
Bug in my "new Level" code (Player Class)
By askgriff, with 3 replies.
Last reply by askgriff, almost 13 years ago:
Thanks danpost -- that is the problem I'm having since making it static.
My lives code doesn't wants to work i don 't know what is wrong can anyone Help mee
By Gerrit, with 13 replies.
Last reply by Gerrit, almost 13 years ago:
it stilll doesn't work shall i show you all my classes at the moment because i really don't know how i should fix this
Detect which world an actor is in?
By Entity1037, with 9 replies.
Last reply by Entity1037, almost 13 years ago:
Aw....... *facepalm* OK, thank you!
Placing objects in world in a specific region
By Otaku_Programmer, with 4 replies.
Last reply by Otaku_Programmer, almost 13 years ago:
Works perfectly thanks so much.
How to acces a private value from another class
By Baenefin, with 2 replies.
Last reply by Gevater_Tod4711, almost 13 years ago:
There are serval ways for doing this. It depends on what kind of variable waarde is. E.g. if it has the same value for every instance of the class you could declare it static and use a getter method to access the value from your subclass. Or if you don't want the variable to be visible from other classes but be inherited (so it exists in the subclasses) you can delcare it protected instead of private.
How to press & repress a lever
By BGY12C, with 1 reply.
Replied to by davmac, almost 13 years ago:
Apart from that how does the methode "delay" work?
It delays execution for the specified time.
How do I use this methode without freezing the whole game for a moment.
You can't. What you should do instead is introduce a counter to keep track of how many ticks to delay for. Then when you act you check if status is equal to 2, and if so, you decrement the counter, and only if it has reached zero do you then do the next action:
Help with getObjectsInRange
By magnadian, with 5 replies.
Last reply by danpost, almost 13 years ago:
This is essentially the same without declaring the local boolean field and is a mite bit easier to follow. The first 'if' condition checks to see if the state of worms in range has changed. Therefore, the image is only changed when the state changes. <Code Omitted>Line 8 could be changed from 'if (!wormInRange)' to simply
Spawing
By tomw, with 3 replies.
Last reply by tomw, almost 13 years ago:
Ok thanks works now :)
731
732
733
734
735
736
737
X