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
Problem playing sounds (MP3).
By Harrypotamus, with 4 replies.
Last reply by Harrypotamus, about 3 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, about 3 years ago:
damn yo!
How do I make a input box?
By Billkingtang, with 1 reply.
Replied to by danpost, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 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, about 3 years ago:
It should be <Code Omitted>As in line 24
getLifeCounter undeclared even though I have a actor called LifeCounter
By 200263, with 4 replies.
Last reply by Spock47, about 3 years ago:
Well, if the getLifeCounter method is in the MyWorld class, you need to call it on a MyWorld object, e.g. <Code Omitted>
run Problem
By Omar6489, with 1 reply.
Replied to by Super_Hippo, about 3 years ago:
Show your code.
timer doesnt change value
By Aaron-aid, with 3 replies.
Last reply by Aaron-aid, about 3 years ago:
nah i figured it out, it ran i just forgot to add the bullet to the world
Animation freezes on last image
By SlayGirlSlay, with 6 replies.
Last reply by SlayGirlSlay, about 3 years ago:
No worries!
Need help with a "Greenfoot.MouseClicked" code
By Puffshroom, with 1 reply.
Replied to by Puffshroom, about 3 years ago:
Nevermind, I fixed it by putting the code in the world, not create a seperate actor for it.
40
41
42
43
44
45
46
X