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
Using Greenfoot classes outside of Greenfoot
By MrBradley, with no replies.
Is it possible to make use of the GreenfootSound class from BlueJ? I have added the greenfoot/extensions/greenfoot.jar file to the library path, and it compliles fine, but it appears that there are other classes that need to be initialized in advance. Thanks
Circle image becoming square when scaling
By tudibk, with 3 replies.
Last reply by danpost, over 6 years ago:
tudibk wrote...
I dont really understand why it worked, but it worked ;)
It worked because it does not scale an image that has already been modified by scaling. Scaling slightly distorts an image, usually not noticeably. However, multiple scaling of the same image will compound that distortion and make it quite noticeable.
Enemy with healthbar
By Yoshi21137, with 5 replies.
Last reply by danpost, over 6 years ago:
Yoshi21137 wrote...
What do you mean by << Quote Omitted >>
To give a simple example: <Code Omitted>Here is an
Actor
subclass that describes something that slowly spins in place. The
angle
field, though initially set by the rotation of the actor, will have a value that does not change. There is no permanent link between the actor's rotation and the value of the field.
and what about << Quote Omitted >>
Just that
Switching and scaling sprite images in a Constructor
By earnold, with 1 reply.
Replied to by danpost, over 6 years ago:
earnold wrote...
what the best way to both switch and scale images in a constructor.
You would only set one image in the constructor -- never switch (although setting one will replace one, I would not call that switching).
I'd like to know the BEST way to keep all of the sprite images scaled or reduced down during a game.
Am I correct in saying you mean the following? "I'd like to know
how
to keep all of the sprite images scaled or reduced down during a game." Because whatever works along with everything else is good. Because there is not much t
How do I make a scrolling world go sideways?
By footpickle, with 2 replies.
Last reply by footpickle, over 6 years ago:
It doesn't matter anymore. I figured it out, but thanks anyway.
Spawning an Actor randomly inside a certain Area
By JacobM2612, with 1 reply.
Replied to by danpost, over 6 years ago:
A coordinate value would begin with the lowest value to spawn at. The random additional amount would be the highest value minus the lowest value plus one.
Explosion
By Hundmat, with 2 replies.
Last reply by Hundmat, over 6 years ago:
Okey thank you :)
incompatible types: java.lang.Class<dino> cannot be converted to greenfoot.Actor
By Levantaj, with 4 replies.
Last reply by Levantaj, over 6 years ago:
It's working properly now.
Can't stop updating text
By Levantaj, with 3 replies.
Last reply by Levantaj, over 6 years ago:
Thanks!
I need desperate help with making levels
By Happycrusher764, with 9 replies.
Last reply by danpost, over 6 years ago:
Happycrusher764 wrote...
How do i get reference to the counter object
Same as in Strawberry class above, except instead of
getWorld()
you would use
level2
.
how do i adjust the value of the counter value? sorry im brand new to coding
<Code Omitted>taking value of score in current counter and making score in counter of
level2
equal it.
Greenfoot on Linux Mint
By eljot, with no replies.
Hello, I've installed Greenfoot 3.6.1 on an new Linux Mint; no problems. When I try to do something with Greeenfoot (a new Stride-project) after about 5 seconds, the whole system slows down extremly (max. speed of mousepointer on the screen : 10 cm in 10 seconds). I do not live inside the processor, but it feels like a bunch of infinite loops generated by Greenfoot. Under MS Windows 10 on the same PC it'a all OK. Thanks in advance for any hint Jochen
What is a constructor
By dejong1968, with 1 reply.
Replied to by danpost, over 6 years ago:
dejong1968 wrote...
fom 09 - 13 sec the author says that "a constructor is a special method that runs when you first create an object". So I conclude a constructor is a method... (special method). Then, at 22-23 sec he says that the Circle() - part is the constructor
He was definitely not clear as to what he was trying to say. This line: <Code Omitted>does not contain a constructor. "Circle()" is the name of a constructor and "new Circle()" calls that constructor to execute, creating a new Circle object. A constructor looks exactly like a method, except fo
Removing the ability to spam keys
By DaRafster, with 1 reply.
Replied to by danpost, over 6 years ago:
DaRafster wrote...
Hi, I managed to map out a sound file and an image file to the space key, however if you spam the space key, the sound file can't seem catch up to the flashing image. So how would I add a delay of some sort that would only allow the player to press the space key every 2 seconds?
Add an int delay (timer) field. Set it to 120 when space is pressed. Reduce its value by one if it is not zero. Put condition on checking space key that its value must be zero.
Dont respond to this
By Happycrusher764, with 2 replies.
Last reply by Happycrusher764, over 6 years ago:
<Code Omitted>
Displaying an Image when a key is pressed
By DaRafster, with 4 replies.
Last reply by DaRafster, over 6 years ago:
thank you guys for your help, will keep this future knowledge in mind
145
146
147
148
149
150
151
X