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 can i limit the ammount of actors are created when act =30 cycles
By roonie01, with 11 replies.
Last reply by roonie01, almost 9 years ago:
thank you so much it works great
The scenario stops when switching worlds?
By Arakniode, with 3 replies.
Last reply by roonie01, almost 9 years ago:
do you possibly have a Greenfoot.stop(); some where in your code for the start button
how to fix this code for class moves very choppy need help quick
By roonie01, with 2 replies.
Last reply by roonie01, almost 9 years ago:
oh thanks so much man your a life saver that's exactly what I was trying to do
Bubbles with a for loop
By dbutts1@stumail.com, with 2 replies.
Last reply by dbutts1@stumail.com, almost 9 years ago:
Thank You
How to check if the game is stopped?
By Firelion, with 6 replies.
Last reply by Firelion, almost 9 years ago:
This works, thanks!
How to optimise my code?
By Arkin, with 1 reply.
Replied to by davmac, almost 9 years ago:
There are possibly a lot of things you could do, though I only scanned your code quickly. One thing that stands out: the technique you use to find a single object: <Code Omitted> ... is pretty inefficient; it needs to scan through all objects and filter out those except for the one of the specified type. If it's just a singleton, you could store a reference to it in a static variable instead (eg have a static variable "instance" in the Jambe_p2_1 class and set it in the constructor).
get a variable from object at offset from another actor
By Arkin, with 4 replies.
Last reply by Arkin, almost 9 years ago:
I found how to do this! <Code Omitted>
Passing a variable and Output
By dbutts1@stumail.com, with 2 replies.
Last reply by dbutts1@stumail.com, almost 9 years ago:
Thanks for pointing that out. Should be .12,.15,.20. I'll look into it in the morning. Too many hours make simple mistakes get more plentiful.
Dice rolling at the same time?
By WardedBowl403, with 1 reply.
Replied to by danpost, almost 9 years ago:
If your die objects are supposed to roll (that is, it is a behavior of a 'dice' object to roll), then you should have a 'roll' method in the 'dice' class. Also, if your die objects are to have values (that is, it is a state of a 'dice' object to have an integer value -- which, in turn, determines its image), then you should have an integer field in the 'dice' class for that value. Methods implement behavior and fields track states of an object. Lines 6 through 8 of the 'clicked' method are pointless as the 'dice' object created is immediately lost once the 'if' clause has finished executi
How to make a new object type appear to replace another
By protocolUnknown, with 3 replies.
Last reply by protocolUnknown, almost 9 years ago:
danpost, that worked! I did not realise that that might be the problem. Thanks a lot.
Decimal.Format
By dbutts1@stumail.com, with 2 replies.
Last reply by dbutts1@stumail.com, almost 9 years ago:
Thank you. I've been looking at this so long I see that my main issue was I never put in import java.text.DecimalFormat;
Button not working :(
By PeloviaOliver, with 4 replies.
Last reply by danpost, almost 9 years ago:
Maybe you did not understand what I was trying to say above. You need to change the offsets at which you check on the color. If you really want to check that it moves at all, change 'canMove()' to 'true' on line 11.
I dont know what to do
By Bandito, with 14 replies.
Last reply by Bandito, almost 9 years ago:
alright sorry, that I answered it so late but my comment was reported for being potential spam, i figured everything out thanks though
Why does this not work?
By Simon1122111, with 16 replies.
Last reply by Simon1122111, almost 9 years ago:
ok thank you very much!
Problem with showing the images
By qazxsw21, with 8 replies.
Last reply by danpost, almost 9 years ago:
Change line 51 in the Enemy class to 'else if ...'.
304
305
306
307
308
309
310
X