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
Hi
By amilsameer, with 5 replies.
Last reply by amilsameer, over 4 years ago:
danpost wrote...
A zero rotation is always to the right. Rotation increases as you go clockwise. To "face" upward, an object must be turned three quarters the way around clockwise (3/4 of 360, 360 being a full circle, is 270). So setting an actor's rotation to 270 will have it face, or point, upward.
OMG THANQ IT WORJKER HSDDHSSAHHSHS
how to call this method to Blizzard.class
By mariq_rasyid29, with 3 replies.
Last reply by danpost, over 4 years ago:
mariq_rasyid29 wrote...
if alien died will be give exp to blizzard class how to making the method for that?
In
Alien
class
Died
method, before removing from world: <Code Omitted>
Volume Up and Down Chp 10 Simple Mp3
By Seb_3, with 2 replies.
Last reply by danpost, over 4 years ago:
Problem 1: two instances of sound. Remove sound from
PlayPauseButton
class. Problem 2: unchecked argument for
setVolume
. Ensure value is in range
0
to
100
, inclusive to avoid throwing
IllegalArgumentException
. Controlling the sound through the user is (or should be) a behavior of the object containing that sound. Make button classes basically empty of added code and have world (where sound is) check for clicks on these objects.
Greenfoot won't recognize same image
By AnJoMorto, with 5 replies.
Last reply by AnJoMorto, over 4 years ago:
danpost wrote...
You probably are using a default image of a
chestBleu.png
for the class, which is NOT the same
instance
of the first image in
images
.
*facepalm* that's exactly it... Oh well thank you for your help I really started to think that nothing could be done here
How do I randomize placement of answers?
By ConorK, with 1 reply.
Replied to by danpost, over 4 years ago:
ConorK wrote...
I am making a math game where I need to randomize the placement of the answers on a multiple choice. I don't want all the correct answers to be on a single box, and I want to create the problems and answers randomly.
Save true answer object in field. Shuffle answers and display them. Compare picked object with saved object to check for correctness.
How do I make an actor navigate around obstacles?
By johnLearnsToCode, with 5 replies.
Last reply by danpost, over 4 years ago:
johnLearnsToCode wrote...
danpost wrote...
If you do horizontal and vertical movement separately
Is there a better way to approach this problem?
Not really. It is the best way to allow movement along the walls of the house. If not done separately, you would need to test each way anyway after a collision to see which axis of movement caused the collision. There is no guess work if you do them separately to begin with.
mmm help me With Java.lang.PointerExeception
By mariq_rasyid29, with 2 replies.
Last reply by mariq_rasyid29, over 4 years ago:
all work, thx sir
Circular Progress Bar
By ronald, with 16 replies.
Last reply by ronald, over 4 years ago:
i do not think implement setRotation
Let an actor do different things in other worlds
By liekevaniep01, with 3 replies.
Last reply by liekevaniep01, over 4 years ago:
Thanks! it works
How to make my enemy go towards my player
By ThiagoPorto, with 2 replies.
Last reply by danpost, over 4 years ago:
ThiagoPorto wrote...
I can't solve the problem on line 48
Replace the line with: <Code Omitted>If when
speed
is reduced and movement does not look right, consider implementing.a class that provides smooth movement.
Get Location
By JuliusF03, with 2 replies.
Last reply by danpost, over 4 years ago:
More simply might be: <Code Omitted>or <Code Omitted>Swap rotations ("90" and "270") if needed.
My Project freezes if I click on "run"...
By InfernoUser, with 1 reply.
Replied to by danpost, over 4 years ago:
InfernoUser wrote...
So my project basically freezes every time I want to run it. Can somebody help me out? If needed ask for codes.
Start with
World
subclass codes.
help i keep getting this msg
By JCD, with 2 replies.
Last reply by danpost, over 4 years ago:
Start by removing lines 15 thru 18. You will most probably get different errors that will lead you toward fixing it. Oh, and change line 52 to: <Code Omitted>(that is one you would have been led to)
How to change world using inheritance?
By Risen, with 10 replies.
Last reply by rocket770, over 4 years ago:
I really don't understand why you need a new method to change the world, it makes no difference and if anything, having an extra layer just makes in inconvenient if anything since it is causing problems? As for the sound, create a sound object where you can then pause or stop it before you exit the world. <Code Omitted> Start the sound using sound.play(); then you may pause it or stop it using <Code Omitted> or <Code Omitted>
reset help
By JCD, with 1 reply.
Replied to by danpost, over 4 years ago:
JCD wrote...
i am trying to make a program but everytime that you play it and stop the simulation you neeed to reset it, is there a way to make it so i automatically resets on game start.
Show codes. Cannot fix w/o them.
82
83
84
85
86
87
88
X