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
Making an actor eat
By Greenfootnoob, with 5 replies.
Last reply by handfive, about 10 years ago:
Thank you very much!
fade issue
By davemib123, with 3 replies.
Last reply by davemib123, about 10 years ago:
yea that worked! Thank you.
Movement bug
By eddyfairf, with 1 reply.
Replied to by danpost, about 10 years ago:
You probably cleared the background image of the world, or have some transparent areas within the image used. You might try, instead of setting the background image, drawing the background image on the initial one: <Code Omitted>
i keep on getting class interface,or enum expected
By sharktank, with 1 reply.
Replied to by danpost, about 10 years ago:
The second line in your code is misplaced. It should be in the incorrectly named 'actFireOnCommand' method, inside the 'if' block as the first or second line there. The compiler does not expect to find that line where you had it and throws the error as a result (the only thing allowed outside the class code are import statements).
Color Detection
By Wolfpack9, with 4 replies.
Last reply by danpost, about 10 years ago:
You do not, and should not, declare the types of parameters when calling a method (your variables are already declared; you do not want to create new, uninitialized, ones). Also, the return type of the 'getColorAt' method is not an 'int' value, but an object of type Color. The line should be: <Code Omitted>This declares a variable (object reference) of type 'Color' named 'color' and assigns it a Color object representing the color at (fds, zxc) in the current image of 'this' object (an object of the class the code is located in). Now, I get th
limit actor spawning
By davemib123, with 16 replies.
Last reply by davemib123, about 10 years ago:
Super_Hippo thanks for the code idea, it sort of does what I want. I'll get back if I need further assistance :)
Problems with the methods of 'eating' objects
By AlazaeInNeedOfHelp, with 1 reply.
Replied to by Super_Hippo, about 10 years ago:
'canSee' and 'eat' are methods of the Animal class. You can only use them in the Animal class or in a subclass of Animal (or if you manually create the methods). Just rename the methods to 'isTouching' and 'removeTouching' which are the right methods from the Actor class.
Stride tutorials and documentation
By goldweber@avier.edu, with no replies.
I recall that the original Greenfoot V3 release statement indicated that there would be additional Stride-based tutorials. Is there a target date for the completion of this key component needed for beginner classroom adoption?
Enemys that shoots back
By igthife, with 7 replies.
Last reply by igthife, about 10 years ago:
Oh I didn't see the part about any whole number. And also yes I am using a smooth turner superclass that works like Your Q actor class and this portion of the project seems to be running smoothly now. Thank you for pointing this out and not letting my continue with my misunderstanding. -igthife
Save World greyed out -
By Laurence, with 4 replies.
Last reply by danpost, about 10 years ago:
Laurence wrote...
from what danpost pointed out maybe the issue which was '(b) one or more act cycles had been executed'. Could you explain in further detail what this exactly is because I am confused and it could be the problem at hand.
If any act cycles are run after recompiling or resetting (either you press the 'Act' or 'Run' button or you allow a 'Greenfoot.start();' command to execute, which automatically starts executing act cycles), then you will not be able to save the world. In other word, reset the project and do not allow any act cycles to execute; proceed to manually make
getting the scenarios directory
By Psychpsyo, with 11 replies.
Last reply by danpost, about 10 years ago:
Psychpsyo wrote...
How would I have to change the code so it runs a .jar file too?
I guess you would have to check both local paths (the one with "../" and the one without). Something like this: <Code Omitted>Of course, you can have: <Code Omitted>and then have <Code Omitted>
Checking if an array contains a string
By Psychpsyo, with 3 replies.
Last reply by danpost, about 10 years ago:
I tested it out, and it works properly. I can think of only two reasons why it may not be working for you. The first is if you are using 'Greenfoot.getKey()' multiple times within the same act cycle. The other is if you never added any code between the squiggly brackets at the end of this line: <Code Omitted> Oh, and since the 'arrayContains' method only returns a true/false value, the actual keystroke is not retainable as coded. You could try:
I'm having trouble with color sensing
By GoodFatsoGamez, with 2 replies.
Last reply by GoodFatsoGamez, about 10 years ago:
Thank you so much. I was searching online how to do it but couldn't find anything. I knew I needed to import something but I just didn't know what to type. I was searching for about two days so I decided to ask here. Thanks so much.
Using a non-standard character set
By davemib123, with 3 replies.
Last reply by danpost, about 10 years ago:
davemib123 wrote...
Something like this? < Code Omitted >
No -- that would be akin to creating all 1000 images (except you would be coding for each 1000 values). More like this: <Code Omitted>where you put all ten digit images in an array: <Code Omitted>
height of world from world class
By davemib123, with 1 reply.
Replied to by davemib123, about 10 years ago:
nevermind no longer needed.
448
449
450
451
452
453
454
X