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
Adding actors
By nadouda, with 19 replies.
Last reply by danpost, over 13 years ago:
The bottom post is the code for a world that starts with a gun, and adds a random number of birds to it every 40 seconds. The top post is the code for the Bird class, which moves the birds across the screen toward the right, checking for collisions and (right) edge of world. Also, if four birds make it across the screen, the game ends. I noticed one more problem with the counting of birds making it across the screen. The count variable has to be a 'class' variable, not an 'instance object' variable. As an instance object variable, each bird that makes it across the screen will increment
Two Questions PLEASE HELP As soon as possibly..
By Sidstar, with 11 replies.
Last reply by Sidstar, over 13 years ago:
MatheMagician wrote...
Question 1: right after <Code Omitted> define this variable: <Code Omitted> Then, in the act cycle of your world put: HEy Thanks do you have to put "define this variable" in your cade? Also Where do you put <Code Omitted> This code should work, though I have
Object Chain Movement
By kartikitrak, with 42 replies.
Last reply by danpost, over 13 years ago:
I updated the demo linked on my previous post. It has two movement methods: a 4-way movement and an 8-way movement method. I have two views: one with dots (4 or 8, depending on which method is being used) to guide the actor and the other with shapes and lines, where you can adjust the thickness of the lines. Also, you can change the 'hand' that the actor uses to guide along the edge of the background color. I added bars (from my Bar class), three for switches and two for adjustable values for the thicknesses of the lines.
getColorAt(int x, int y), coordinates relative?
By erdelf, with 7 replies.
Last reply by erdelf, over 13 years ago:
Edit: I saw only your first post, thx
Random Numbers quesition
By seal308, with 3 replies.
Last reply by seal308, over 13 years ago:
k thx
Error in my game
By teikkhim, with 2 replies.
Last reply by davmac, over 13 years ago:
There is some information
here
.
How do I use getObjectsInRange?
By Gazzzah, with 9 replies.
Last reply by Gazzzah, over 13 years ago:
Ahhhh, yeah thanks guys
checking if object is in world
By h123n, with 1 reply.
Replied to by davmac, over 13 years ago:
if (getWorld() != null) { ...
Actor- changing between two images
By Benedict, with 2 replies.
Last reply by Benedict, over 13 years ago:
thx this helped :)
Publishing is endless. help pls
By erdelf, with 11 replies.
Last reply by mjrb4, over 13 years ago:
davmac wrote...
Sounds like you have something in there that's not meant to be there...
erdelf wrote...
Ok. I looked after it. It was an archive which was from an old project. the file size was 667 MB
That would be it ;)
Error Code 500
By erdelf, with 6 replies.
Last reply by mjrb4, over 13 years ago:
In itself, the error (500) essentially just means "the server encountered some form of problem, so your request couldn't be completed." It doesn't mean anything more specific, just that something's gone wrong on our end :-) In the relatively near future a lot of these issues should hopefully go away - we're soon getting a new server with heaps more of everything (especially disk space!)
Error An attempt was made to use the actors location...
By Corfisto, with 13 replies.
Last reply by Corfisto, over 13 years ago:
right ill give it ago . ^_^
Delay Spawn
By SayMyName, with 2 replies.
Last reply by danpost, over 13 years ago:
That is something that would have to be done in the act() method of the world (using a counter initialized to the number of frames before a spawning). You will probably need an int to count the spawns also (initialized to zero). Each act cycle, do the following if the number of spawned actors is less then the total number of spawnings required { decrement the frame counter if frame counter is zero { spawn an actor increment spawn counter reset frame counter } }
Costume Changing
By Beckninja, with 2 replies.
Last reply by Beckninja, over 13 years ago:
Thank you sooo much!
Java Components
By Julian, with 4 replies.
Last reply by Julian, over 13 years ago:
Thank you for a clear reply. And I agree reinventing can be good for beginners. Now that I know the AWT or Swing route is not valid for this part of my project. I am now really looking forward to dissecting the scenarios I have found. To workout what the programmers did, and to understanding why they did it that way; a bit like taking my toys apart to see how they worked .
965
966
967
968
969
970
971
X