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 find the smallest value from objects created
By Jemy, with 43 replies.
Last reply by Jemy, over 4 years ago:
danpost wrote...
Change line 3 in leader code to: <Code Omitted> OR: maybe the server timers need to be reset (?)
I tried your suggestion, it worked but when i tried to run it again instead of changing to candidate for a new leader to emerge, it changes to the leader. i think server timers need to reset to allow another low server to be candidate and eventually be elected each time the simulation is run
control the camera
By Aaron-aid, with 1 reply.
Replied to by danpost, over 4 years ago:
Aaron-aid wrote...
hey, i was wondering if its possable to move the camera with the player, if so how?
Please refer to my
Scrolling Tutorial
scenario.
How to flip a fuelbar by 180 degrees
By Jeeshan, with 2 replies.
Last reply by Risen, over 4 years ago:
<Code Omitted>
How to use setters and getters
By Jeeshan, with 5 replies.
Last reply by Risen, over 4 years ago:
Jeeshan wrote...
Jeeshan wrote...
<Code Omitted>
This is the code that isnt working. I want fuel to decrease after every amount of time but the fuel remains constant
Show class code please. Can't understand, where you get FuelAmount(FA)
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!
74
75
76
77
78
79
80
X