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 call this method in a class from another class.
By Shadowolf, with 2 replies.
Last reply by danpost, about 1 hour ago:
Your
TriangleAnswer
class can be much more simply written as follows: <Code Omitted>
trying to get an int from an actor in a different world to show it in the end
By Alizee, with 2 replies.
Last reply by Alizee, 1 day ago:
tank you
Checking the Solution for a Picross Game
By magentaink, with 1 reply.
Replied to by danpost, 6 days ago:
magentaink wrote...
Hi! I'm pretty new to Greenfoot and Java,, at the moment I'm making a picross game. What would be the best way for me to check the solution to the puzzles against what the user enters? I was thinkin boolean arrays?
Is your program going to be checking that each entry is correct or not, or just checking the end result of the solve? The end result check should be simple enough -- in that all the clues must be satisfied (just check that). If checking along the way, then the solution should be stored in memory to see that each entry in correct (checking entry with corr
boolean in method
By MarkusB, with 1 reply.
Replied to by danpost, 7 days ago:
MarkusB wrote...
<< Code Omitted >> I cannot get this section to work. It says that variable "annahme" is not initialised and that is because it is not. It is supposed to be specified by the player once the previous check "if(gesteinVorhanden())" has been finished. Only then should "public void sammeln(boolean annahme)" be executed and a true or false should be given. : ( And "boolean annahme; sammeln(annahme); are correctly preparing that part, no? : (
As a primitive variable type --
boolean
, it requires initialization within a method or constructor. As an instance field, it w
object/entity passes through barrier
By soap, with 1 reply.
Replied to by danpost, 10 days ago:
You are probably letting the entity pass the barrier to begin with -- which should not be allowed to happen. When a collision is encountered, move the actor back to the original (x, y), which should be inside the barriers.
something not working
By Alizee, with 6 replies.
Last reply by danpost, 10 days ago:
Alizee wrote...
characters. << Code Omitted >>
Change from this: <Code Omitted>to this: <Code Omitted>The
for
loop works pretty much like the
while
loop -- in that it also must complete its execution (complete looping) in one act step. Removing the loop (without removing what is inside it) will have only one P
Stuck in: "The world is being constructed"
By youngdisciple07, with 2 replies.
Last reply by Spock47, 12 days ago:
This seems to be an Apple bug: https://github.com/k-pet-group/BlueJ-Greenfoot/issues/2398
Playing a sound when a key is pressed, then stopping it when the key is released?
By trulydevious, with 5 replies.
Last reply by danpost, 13 days ago:
trulydevious wrote...
I used the SmoothMover because I could not get my character to move slower any other way, and that's the only thing that worked for me
You need to describe exactly what you want. Showing more code might help. In fact, your
MyWorld
code would have information in it that would remove some doubt as to what you want. My first concern is how the world is created.
Return to the previous world, but in the same spot as they were in before they entered the current world?
By trulydevious, with 2 replies.
Last reply by trulydevious, 16 days ago:
Thank you! I ended up figuring it out!
Remove isnt working
By Vince361, with 1 reply.
Replied to by danpost, 21 days ago:
Vince361 wrote...
For some Reason instead of the Feuerball(Fireball) being removed, when hitting something a window opens itself with error codes because the code couldnt be carried out eventhough the return should stop the code from continuing. << Code Omitted >>
A
Feuerball
instance will only act when in the world. So,, it seems pointless for the first action taken to be asking if any of those instances are in the world (of course, the one acting is in the world). It would be much better to have objects it may hit to detect this object instead of the other way around. Tha
Why was greenfoot.export.GreenfootScenarioApplication deprecated?
By Trivaris, with no replies.
And now that it is, is there any other way to program in another IDE?
Could someone tell me where the mistake is?
By Shuotso, with 1 reply.
Replied to by Super_Hippo, 26 days ago:
I guess this code is in an Actor subclass. To add an object to the world, you need to call the addObject method on the world the actor is in. <Code Omitted>
Making an action happen when an actor lands on another actor's specific string?
By trulydevious, with 2 replies.
Last reply by trulydevious, 28 days ago:
Ohhh thank you that makes a lot of sense
Fixing text displaying + Players duplicating when moved
By trulydevious, with 2 replies.
Last reply by trulydevious, about 1 month ago:
Thank you so much!
Microphone Permissions on Macbook
By mtranchida, with 3 replies.
Last reply by nccb, about 1 month ago:
Just to let you know we've now found a solution. I've just swapped out the installers for the new 3.9.0 release on the download page with a version that should correctly request microphone permissions on Mac when you use the Sound Recorder.
1
2
3
4
X