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
Actor disappearing for seemingly no reason
By Harrypotamus, with 14 replies.
Last reply by Harrypotamus, over 2 years ago:
I found the issue, I had the initialization as "public void token()" instead of "public token()"
Cut and paste not working in Stride
By lester52, with no replies.
The Stride editor will not cut, copy or paste. The standard editor works fine. Thankyou.
how do u make shots delay
By Beebon, with 5 replies.
Last reply by danpost, over 2 years ago:
The
Gun
class needs a field for the number of bullets it has to shoot. When shooting, the value should be decremented and then checked to see if any are left. If none left, remove gun from world.
HELLO PLS HELP ME
By Beebon, with 8 replies.
Last reply by Beebon, over 2 years ago:
thx alot :D
Problem: after scenario was restarted score does not reset
By verstruGGelt, with 4 replies.
Last reply by verstruGGelt, over 2 years ago:
Thanks for your time. I figured it out by myself, but appreciate your help
Problem playing sounds (MP3).
By Harrypotamus, with 4 replies.
Last reply by Harrypotamus, over 2 years ago:
I got it to work soon after I posted this, thanks!
this is title
By AlphaKennyOne, with 2 replies.
Last reply by AlphaKennyOne, over 2 years ago:
damn yo!
How do I make a input box?
By Billkingtang, with 1 reply.
Replied to by danpost, over 2 years ago:
Billkingtang wrote...
I want to make a label thats editable by the user. So they can click on it and change it to any value they want. << Image Omitted >> (For the money settings) It would be very much appreciated if you have any idea how to do this thanks!
What have you tried? Have you done any searches? I have a
Dialog
class that contains elements for this and more. See my support collection.
acceleration
By ADAM68801, with 1 reply.
Replied to by danpost, over 2 years ago:
Anything proportional to zero will be zero, so there must be some initial speed that is added non-proportionally to start it moving. The simplest way would be something like this: <Code Omitted>However, the actor will quickly accelerate off to the edge of the window. Placing a cap on the speed might be helpful. Also, using location values that are smaller that one pixel would aid in a slower speed-up as well as allowing a smaller proportionality. Unfortunately, this becomes not so simple.
how to make bullets stop when ammo is 0
By Alex20, with 1 reply.
Replied to by danpost, over 2 years ago:
You not only need to stop when no ammo is available, but you also must only fire when the key is initially pressed (not supposed to fire continually while the key is in the down state -- aka "pressed"). Therefore, you need to track the state of the key so that you can determine when its state actually changes. You will need a boolean field to retain the current state of the firing key:
how do ik make the timer work?
By Jip_maris, with 6 replies.
Last reply by danpost, over 2 years ago:
Jip_maris wrote...
how can i stop the actor from jumping without touching the solid ground?
First check if touching ground. Then only jump if touching ground. The order that I prefer to do things is: (1) fall (move vertically regardless of objects); (2) collision check (is it touching anything it should not or, possibly, is it at the bottom of the window); Note: if vertical speed is positive (in downward direction) and a collision with platform or ground occurs, then the on-ground state is
true
. (*) upon collision, adjust vertical position of actor so that the two a
how do i start and stop a backgroundsong?
By Jip_maris, with 1 reply.
Replied to by danpost, over 2 years ago:
You
would use: <Code Omitted>These methods and more can be found
here
.
why do my scenarios crash the browser
By BOTchad, with 3 replies.
Last reply by RcCookie, over 2 years ago:
"Space Game" does work for me, maybe you are using an outdated browser?
java heap error
By Aaron-aid, with 7 replies.
Last reply by Aaron-aid, over 2 years ago:
RcCookie wrote...
Another thing to always do with images (and gifs even more, even more memory expensive) is to only load them once and store them in a static variable. That way you can use as often as you want, but only ever load a single instance
this would help a ton, the only yhing is i dont know how to do that, could u show me?
Incompatible types: greenfoot.actor cannot be converted into boolean.
By 200263, with 1 reply.
Replied to by AbdulrazaqAS, over 2 years ago:
It should be <Code Omitted>As in line 24
35
36
37
38
39
40
41
X