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
Saving a json file online
By RcCookie, with 8 replies.
Last reply by danpost, over 5 years ago:
RcCookie wrote...
I'm just taking the first million (based on the url of my account, there shouldn't be more than 100000 users).
Ah, but noone has a block when a scenario that uses it is first uploaded. Only when the scenario first does a "store" on a user does that user get a block; and that user must be signed in even for that to happen. So you might, over time, accumulate 100+ UserInfo blocks on a scenario.
Add obj
By Roshan123, with 40 replies.
Last reply by Roshan123, over 5 years ago:
danpost wrote...
Roshan123 wrote...
You have written 43 and 83 Do u wanted to write 42 and 82 or u have written correct
Strange, looks now like 36 thru 51 and 76 thru 91. I think you may have edited the post. Also adding crates should probably be included within the
initialize
method.
Sorry for that I edited it 3 timea and posted it
Scenario becomes unstable when creating setWorld Variable
By DatHeroAndy, with 10 replies.
Last reply by danpost, over 5 years ago:
danpost wrote...
You probably have two classes that unconditionally initiate one another (or multiple classes creating a loop of initiations).
I still think this is the issue.
Greenfoot set more images
By off.nika, with 10 replies.
Last reply by off.nika, over 5 years ago:
THank you so so so so much. I finally understood and it works. Thank you
Multi-thread bugs
By RcCookie, with 1 reply.
Replied to by RcCookie, over 5 years ago:
?
how can I add score to both characters?
By sxgdfhcjvk, with 2 replies.
Last reply by danpost, over 5 years ago:
sxgdfhcjvk wrote...
so im making my own game now and I have to count score for both of the characters, does anyone know hot to do that?
This is vague, without any attempted codes. Also, are the scores to be displayed or not?
While loop
By Sauravbasyalking12, with 3 replies.
Last reply by danpost, over 5 years ago:
Sauravbasyalking12 wrote...
Could you please name one thing that can go wrong with a while loop
One thing that can go wrong is that the condition to loop remains true indefinitely -- so, execution is "stuck" in the loop. It will make it seem the scenario is "frozen" as the process never completes.
Check if object exists at specific coordinate
By Suavessence, with 2 replies.
Last reply by Suavessence, over 5 years ago:
That helps, thank you!
Help with Greenfoot.getKey()
By DatHeroAndy, with 5 replies.
Last reply by RcCookie, over 5 years ago:
Sorry mate, didn’t test run it. Good that you figured out how to fix it
How can i spawn more and faster?
By ShortScream, with 1 reply.
Replied to by RcCookie, over 5 years ago:
You can adjust the propability of objects spawning in line 10 by increasing 20, and you can decrease the maximum time between spawns in line 37 (what cache is set to)
How to Increase Speed Over Time
By CuzImMicah, with 13 replies.
Last reply by danpost, over 5 years ago:
Remove line 48, as it will delay everything -- not just the Igl
o
o actor. You only need one control value for spawning strawberries -- not two ( "
i
" and "
whileOff
" ) -- keep '
i
': <Code Omitted>(the above to replace from line 27 to 48). Raise "
75
" in line 25 to something in the mid to high 90s.
How to add wait
By ShauryaThapan, with 3 replies.
Last reply by ShauryaThapan, over 5 years ago:
Got it
Two players from the same keyboard
By WannaBeADeveloper, with 2 replies.
Last reply by danpost, over 5 years ago:
WannaBeADeveloper wrote...
I tried to copy the same class and change the inputs from the pressKey but it didn't nothing..
It would be better to have just one class where the input key values are variable, using a constructor with input key parameters.
How can I access Methods from a subclass of World in an Actor class?
By Dev_grey97, with 3 replies.
Last reply by danpost, over 5 years ago:
Dev_grey97 wrote...
could you please elaborate how I can add the actor to the world and how to use the method addedToWorld() ?
Show entire page of
MyWorld
class codes. Oh, line 3 above, given by me, is flawed. It should be: <Code Omitted>
Picture Switching Problem
By ItzLukeStorm, with 4 replies.
Last reply by ItzLukeStorm, over 5 years ago:
Thanks so much. It worked!
109
110
111
112
113
114
115
X