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
My Characters wont jump for some reason
By MrSkyPanda, with 1 reply.
Replied to by RcCookie, over 5 years ago:
You aren’t calling the jump() method, only the checkJump() method. You generally don’t need the gravity variable. If you want to be able to adjust the gravity strength you need to adjust how much vSpeed is changed when the object is falling
Mouse click hold ?
By Paul12345, with 1 reply.
Replied to by RcCookie, over 5 years ago:
You need to track the mouse‘s state: <Code Omitted>If you want pressed only to be true if the mouse was clicked onto a specific actor, replace the null in line 4 with the specific actor, BUT NOT in line 5! <Code Omitted>
Explanation in need
By Roshan123, with 10 replies.
Last reply by RcCookie, over 5 years ago:
No, that are just example methods that show what should be done in a certain case. These methods are: getSpeedX() getSpeedY() setSpeed() paintToColor() setColors() They just indicate what could be implemented right there
hello world
By ronald, with 4 replies.
Last reply by ronald, over 5 years ago:
thanks for the code I understand better by using a private access for the buttons which allows to differentiate them, I did not think about it thank you
Color
By Roshan123, with 5 replies.
Last reply by danpost, over 5 years ago:
Roshan123 wrote...
Its full of errors
Not if implemented properly.
How to create a variable on Initialization
By FranzVnH, with 3 replies.
Last reply by danpost, over 5 years ago:
FranzVnH wrote...
<< Code Omitted >> This is the code of one actor in particular, but the value will consistently change because X and Y will constantly change.
Where did you put that? Show entire class codes please.
does anyone know how to make a hitbox?
By MrSkyPanda, with 3 replies.
Last reply by MrSkyPanda, over 5 years ago:
oh! that could work. I will see if i can figure out how to code that.
My Platforms dont work with My gravity
By MrSkyPanda, with 18 replies.
Last reply by danpost, over 5 years ago:
MrSkyPanda wrote...
ok so how do i fix it?
Again refer to my demo. If you have behavioral issues with the code, then show that code and ask questions. Or, you can upload the scenario with the unwanted behavior (or a sample exhibiting that behavior with the same problem code).
Please Help: My Circles won't become Transparent
By justwooki, with 1 reply.
Replied to by MrSkyPanda, over 5 years ago:
is your oval an actor?
Adding only one actor
By NikoAa, with 1 reply.
Replied to by danpost, over 5 years ago:
NikoAa wrote...
I'm making a game where i want to add another actor every time the score is divisible 5. << Code Omitted >>
Move line 7 to after line 12. This will limit the score divisibility check to only when the score changes.
Collision
By Roshan123, with 21 replies.
Last reply by danpost, over 5 years ago:
Roshan123 wrote...
I noticed that u wrote 90* If i m not wrong then the algorithms are only for only 90° rotation and not for all degrees of rotation
I guess you are looking for something more along these lines:
ZIG-ZAG MOVEMENT OF CHESS PIECES
By 1234567890, with 1 reply.
Replied to by danpost, over 5 years ago:
Answers to hints: 1) every other move; 2) same as (1), but not on same moves; 3) always; 4) when at (right) edge (or after 7 moves, if starting at left edge). If you flip the
boolean
value every act, it should not be hard to move in a zigzag across the board using an
if
conditioned on the
boolean
.
My Platforms dont work with My gravity
By MrSkyPanda, with no replies.
it keeps going right through the platform. and everytime i run it, it also slowly moves to the left for some reason. How Do i fix it?<Code Omitted>
How to make a clock
By Kanha, with 4 replies.
Last reply by RcCookie, over 5 years ago:
Do you want to know how to implement a timer or how to display it?
Question to print a message with loop
By Sslur, with 1 reply.
Replied to by danpost, over 5 years ago:
Sslur wrote...
How do I print text on the screen using a for loop?.
Please provide context and example (or complete attempted codes). The reason I am not giving any type of answer immediately here is because a
for
loop will complete within a single act frame -- so it would be like printing the entire text string at once. Maybe you have some reason for using a loop. I just don't know; therefore more information would be helpful in determining the best response.
108
109
110
111
112
113
114
X