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
HELP ME X2
By goku888, with 1 reply.
Replied to by danpost, about 7 years ago:
goku888 wrote...
as I do to put as walls that can not be transferred
At what point are you having difficulty: (1) building wall class; (2) adding wall(s) into world; (3) having actor(s) not pass through wall.
AYUDENME X2
By goku888, with 1 reply.
Replied to by ndembayle79, about 7 years ago:
need help guys
How could I set my ship to stop shooting for a few seconds after being hit by an object?
By Someguyoutside, with 1 reply.
Replied to by danpost, about 7 years ago:
Someguyoutside wrote...
if processShot() is my method for shooting, how would I be able to delay that or pause it for a few seconds?
Add shot delay field: <Code Omitted>Then: <Code Omitted>Set value of field to something like 180 when hit by object.
Making objects fall in a certain area
By vysh, with 4 replies.
Last reply by vysh, about 7 years ago:
Thank you lord danpost :D ! I'll try this out!
Ayuda para que el objeto coma
By Jesus1357, with 1 reply.
Replied to by danpost, about 7 years ago:
Usa: <Code Omitted>
Bringing functions from another class
By anonymous_panda, with 1 reply.
Replied to by danpost, about 7 years ago:
Using just: <Code Omitted>in your
Fish
class indicates that the method is either (1) in the
Fish
class; (2) in any one of its super classes (as a non-private method); or (3) in an interface that one of the aforementioned classes implements. Since it (the method) is located in your
Level2
class, you need to indicate that that is where to find the method. Actually, it is the
Level2
object (your current world object) that "has" the method. It is the
score
in that world that you want to increment. The
getWorld()
method will return a r
Comer
By Jesus1357, with no replies.
Hola, alguien me podria ayudar con el programa para poder hacer comer a un objetos
Background image location
By JamesR, with 1 reply.
Replied to by danpost, about 7 years ago:
JamesR wrote...
How do I make the background image move to the bottom left corner?
Very vague and without details.
Actor has to place a Track.
By ITStudent, with 5 replies.
Last reply by ITStudent, about 7 years ago:
Thanks a lot! :) Its not like i had imagined, because of the gaps and so on, but its fine. If you have an idea how i can edit that with the big gaps i would like to hear. But afterall my school-mission is completed. Thank You. Thats my script: myworld: private void prepare() { Ball ball = new Ball(); addObject(ball,277,257); ball.setLocation(300,300); RobotMaBoi robotMaBoi = new RobotMaBoi(); addObject(robotMaBoi,80,600); robotMaBoi.setLocation(80,565); } RobotMaBoi: public class RobotMaBoi extends Actor
Help with keeping a key down after one press.
By Someguyoutside, with 4 replies.
Last reply by Someguyoutside, about 7 years ago:
danpost wrote...
Someguyoutside wrote...
Here it is << Code Omitted >>
Add a boolean field to track which key set is currently being used: <Code Omitted>To change its value, use; <Code Omitted>Call the appropriate move/turn method with: <Code Omitted>The two code sets above would replace lines 23 thru 31
This seems to be working well. Thanks f
How to make a character shoot ONCE every time a key gets pressed?
By chipmunkrage, with 2 replies.
Last reply by chipmunkrage, about 7 years ago:
Thank you! This worked great.
ayudenme :,c
By goku888, with no replies.
quiero hacer que dentro de la base haya columnas que no se puedan traspasar PD:no se si me explique bien :v
Im trying to make my actor move in a simple hour glass patern
By Faizcon, with 9 replies.
Last reply by SushiLlama, about 7 years ago:
Faizcon wrote...
also what should i change my move(10) to?(like you said below) because this may be the reason the pattern does not work.
This should be no problem as long as you dont ask for things like if(getX() == 45) because getX() will never be 45 when moving in steps of 10.
SushiLlama wrote...
Moving in a rectangular shape given 2 integers
By iElucien, with 1 reply.
Replied to by danpost, about 7 years ago:
iElucien wrote...
I'm very new to java and my instructor threw a curve ball at me telling me to have an object move in a rectangular pattern. I know that I need a constructor but I'm not sure about how to go about it.
You do not need a constructor -- all you need is an
act
method with a
move
command and four sets of conditions, one set per
turn
. HINT: make use of the actor's rotation as a condition in each set.
help, I need the sphere to move in the form of a random parable in the world
By cavencad, with 1 reply.
Replied to by danpost, about 7 years ago:
In
Super Pang
, they seem to appear at a random x along the top, drop a short amount (straight down) and then randomly turn left or right as they begin to fall and bounce as with gravity and no drag, bouncing at slower speeds (not bouncing as high) as the size of the sphere gets smaller. Actually, the behavior of the largest spheres are very similar, if not the same, as the bombs and the coin (if that is what it is). It might be a good idea to have a class between
Actor
and the classes of these falling object, maybe called
Bouncer
so you do not have to write code multiple
166
167
168
169
170
171
172
X