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 birth an death
By nexus, with 12 replies.
Last reply by nexus, almost 13 years ago:
Hahaha found my mistake: I accidentally deleted the act() method so I put the method call for addBoids() right below addObject(new Boid).... Changed it and now it works fine! Last question, after that the scenario is completed: I want to set a maximum amount of boids. If this maximum is reached a random number of boids shall be removed. That's my code:
Direct moving to an Object
By erdelf, with 2 replies.
Last reply by kartikitrak, almost 13 years ago:
What do you mean directly? You mean diagonally in one straight line? If that's the case can't you just move 1 down and 2 left and repeat that?
Changing Pivot point of Actor
By BadatCoding, with 4 replies.
Last reply by BadatCoding, almost 13 years ago:
Thanks dan I'll try it out, sorry for the last message , a couple of friends modified my message. BaC
Question about List
By darkmist255, with 1 reply.
Replied to by danpost, almost 13 years ago:
The String class directly extends the Object class. So, a String is an Object!
drawString
By thefutureisnow, with 5 replies.
Last reply by thefutureisnow, almost 13 years ago:
Oh, now I get it. Thanks!!!
Pathfollower and detection of objects
By kartikitrak, with no replies.
Is it possible to make a chain of objects follow a predetermined path in greenfoot and still know that the individual objects in the chain are still seperate objects? For example, random types of orbs come out of no where and link to other orbs to form a chain and this chain follows a path. Luxor Evolved is a good example of this. In the game the orbs are spawned and then follow a path and link up on collision with another orb and then you're supposed to shoot the orbs with the corresponding color orb and when your shot blue orb touches a blue orb that was part of a chain both orbs remove themselves. (That was a lot of orbs) <Image Omitted>
Movement and Control
By kartikitrak, with 2 replies.
Last reply by kartikitrak, almost 13 years ago:
OOPS. Forgot to read over my post before posting it. However you got the question I was asking. Thank you.
cannot find symbol-constructor
By Andriyanto, with 4 replies.
Last reply by Andriyanto, almost 13 years ago:
ok thank you..i have solve an error..
How to loop sound, but only when the sound finished.
By TechWebLock, with 4 replies.
Last reply by davmac, almost 13 years ago:
TechWebLock:
Ok you have lost me there, do I need to put this into a new "void"?
A what now? They're called
methods
. 'void' is just the return type! :)
World Switching
By thefutureisnow, with 2 replies.
Last reply by thefutureisnow, almost 13 years ago:
Thanks!
Inheritance?
By kartikitrak, with 2 replies.
Last reply by kartikitrak, almost 13 years ago:
Thanks so much. Works fine.
WANTED! : Good coder
By h123n, with 12 replies.
Last reply by danpost, almost 13 years ago:
Thinking it through logically, to turn toward the
closest
pig, this is what needs done: 1) find the closest pig by starting at distance of 1 and incrementing distance until pigs found in range or out of range by this pseudo-code: <Code Omitted> 2) upon exiting the loop, pigs in range List will either be empty or ... not; close with this pseudo-code:
Light in a Dark Room
By RM6442, with 39 replies.
Last reply by danpost, almost 13 years ago:
I posted an example with code for you to look at. It is
here
.
Help for mouse.
By h123n, with 4 replies.
Last reply by danpost, almost 13 years ago:
You need an instance boolean variable (or field) to track 'mouse pressed on me, and not yet released' or 'dragging'. Set it to 'true' if mouse pressed on this object. Set it to 'false' if the mouse is clicked (released) anywhere (use 'null' as parameter). Write an 'if' block to follow the mouse (SPower's code, but using 'if (dragging && Greenfoot.mouseMoved(null)) {' in line 1).
Having trouble with get one object at offset
By Scoter_man1, with 2 replies.
Last reply by Scoter_man1, almost 13 years ago:
OH, duh, that totally makes sense. Thank you very much danpost.
970
971
972
973
974
975
976
X