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 use getImage in World class?
By Jeeshan, with 5 replies.
Last reply by Jeeshan, over 4 years ago:
Thank for all the help. I have overcome that code and am now unfortunately stuck in another part
Elevator doors rapidly opening and closing
By KylesGallery, with 6 replies.
Last reply by danpost, over 4 years ago:
KylesGallery wrote...
when I get rid of else
That is not what I suggested you do.
How to animate multiple sprites?
By Samuaelk, with 19 replies.
Last reply by danpost, over 4 years ago:
Samuaelk wrote...
To set the image do I do what I previously had in my code? Like this part? << Code Omitted >>
No. Use: <Code Omitted>
Error with projectile and enemy/actor...
By Genota, with 1 reply.
Replied to by danpost, over 4 years ago:
Put line 62 within curly brackets with a
return
statement. Lines 58 and 59 should also be grouped within curly brackets.
I wanna reduce the hitbox of an actor in order to make it stop from floating. I'm making a game and one of my actors is floating above the ground due to its original size, is there anyway I can fix this from within the code. My code for that actor is:
By TejasKanch, with 5 replies.
Last reply by danpost, over 4 years ago:
TejasKanch wrote...
thank you so much
Please "Like", "Share" and "Subscribe". Thank you in advance. Oh, wait ... that's YouTube (lol)
Tags are automatically deleted
By Roshan123, with 5 replies.
Last reply by nolttr21, over 4 years ago:
@Roshan123 There was a comment that has since been deleted that was between mine and yours. I wasn't referring to you when I said that, sorry for the confusion. As for your problem, my only suggestion is to upload your scenario again, whilst re-adding the tags you wanted to have. It possible that your tags somehow got deselected during the upload process.
(ask) help me fast needed 12hours from now
By billxha, with 2 replies.
Last reply by danpost, over 4 years ago:
billxha wrote...
How to make time timers from 600sec to 0? thank you so much
Please refer to my
Value Display Tutorial
scenario.
Actors associated with other objects.
By oofitsme, with 5 replies.
Last reply by danpost, over 4 years ago:
oofitsme wrote...
Using pizza was just part of the example because I have multiple actors under the class OrderSlip1 and one of them happens to be pizza. I originally used "this" for the Greenfoot mouse-click method but where it gets confusing is I hardcoded each actor from the OrderSlip1 and 2 class to be associated with a specific person from the customer class (if that makes sense). And when I run the game, instead of showing up the way that I hardcoded it to be, the order tickets show up with different customers than intended.
I suggest you use fields for the slips of a customer. T
How to change pictures back to back by clicking?
By lonkness, with 1 reply.
Replied to by danpost, over 4 years ago:
You need to have some way to tell how far along you are with the mouse click actions. A simple
int
counter field should suffice: <Code Omitted>Then, <Code Omitted>
Hey guys how do I add a cool down to my gun, im making a game and this is my code for the arrow/bullet, how do I make it so there's a cool down between each bullet
By TejasKanch, with 1 reply.
Replied to by TejasKanch, over 4 years ago:
Nevermind guys I got it here you go: this goes in the actor that is shooting the bullet <Code Omitted>
Actor not in the World
By Genota, with 2 replies.
Last reply by Genota, over 4 years ago:
Okay nevermind I figured it out by myself... And yes the problem was in the MyWorld class. Thank you anyways!
Actor not in world
By SeafodHalal, with 2 replies.
Last reply by danpost, over 4 years ago:
In
Projectile
class, remove any collision with
Enemy
object code.
How can I make my background scroll left and right?
By Samuaelk, with 3 replies.
Last reply by Samuaelk, over 4 years ago:
Thanks!
How to register when left and right mouse buttons are clicked at the same time?
By RoverKnight, with 1 reply.
Replied to by danpost, over 4 years ago:
Add an
int
field to track buttons down. Increase by (button value plus one) divided by two on mouse presses and decrease by same on mouse clicks. Only perform action for both buttons down when its value is three. One thing to note: although not very likely, it is possible for both buttons to perform an action during the same act cycle, which may throw your count off. Increasing the scenario speed will help in minimizing that possibility. Limiting the value of the field to between zero and three on any change in its value would also help to rectify it when it does go off value.
Sound issue in Greenfoot
By m84ef, with 1 reply.
Replied to by danpost, over 4 years ago:
m84ef wrote...
my code works fine (up to now). I wrote a code, so music plays when I press the level1-button, but the sound starts when I click the back-button and the sound is laging
Please provide
Level1
class codes.
75
76
77
78
79
80
81
X