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
Information game.
By Greenfootnoob, with no replies.
i am currently doing a project, this project requires students to have a interactive with the speech, in which the other students can play or look at.... i was thinking of making an application in which when my class mates click a button, text comes up. anyone have any ideas? THANKYOU
Color in alpha values?
By Entity1037, with 7 replies.
Last reply by Entity1037, almost 12 years ago:
Ah! Thank you!!
World constructor
By wslade, with 4 replies.
Last reply by davmac, almost 12 years ago:
It does compile
It couldn't possibly compile, for the reasons I gave above - the score_field variable is not accessible from the method in which you use it. Are you now talking about different code (perhaps the second variant that you posted originally)?
Just here
By holumeedey, with 1 reply.
Replied to by Super_Hippo, almost 12 years ago:
With what exactly do you need help?
Too many rocks! D:
By Ariadia, with 10 replies.
Last reply by davmac, almost 12 years ago:
For some reason, I thought that a world didn't use an act method, because I had never seen one there.
Ok. You should read over the documentation for both the World and Actor classes in the
API reference
. You will see that they both have an "act" method. (Furthermore, you can put an "act" method in
any
class, though it will not have any special significance to Greenfoot unless it's in a World or Actor subclass).
Can u help me to update my health bar
By coder04, with 1 reply.
Replied to by danpost, almost 12 years ago:
It looks like you are creating a healthbar for the laser, which is not the same healthbar that you have in your Ship class. Remove line 12 and change line 50 to: <Code Omitted>You should, however, refrain from using the same name of a class as a variable name. That is, you should use something like 'Actor ship;' instead of 'Actor Ship;'. I noticed that your 'life' field starts at zero and is decreased from there. It will never be checked and found to be zero (see lines 21 through 25) . Also after that (line 26),, you are using a method that requires the actor
Projectiles removing themselves
By ajmetal, with 3 replies.
Last reply by Super_Hippo, almost 12 years ago:
The 'checkHit' method now returns a boolean. So if the Laser objects touches a SpaceFly, it will return true. Then, or if it is at an edge of the world (only top or bottom as it is right now), it will be removed from the world.
What will the following method do?
By jogit666, with 1 reply.
Replied to by danpost, almost 12 years ago:
Yes -- since 'UrRobot' is the superclass of 'AugmentedRobot', that is exactly what it will do.
I have an error in my space class
By coder04, with 1 reply.
Replied to by danpost, almost 12 years ago:
Apparently, you do not have a no-argument constructor for the Ship class and the constructor you do have required a Bar object reference be passed to it. Try changing line 96 to this: <Code Omitted>
Character won't jump properly to the left
By sunjay001, with 3 replies.
Last reply by sunjay001, almost 12 years ago:
It is indeed a hardware limitation, shift worked, thanks! @davmac
So how exactly do 3d games work?
By rrose5, with 3 replies.
Last reply by rrose5, almost 12 years ago:
Yeah but he's really helpful :)h
in range detection
By Maricano, with 7 replies.
Last reply by Maricano, almost 12 years ago:
we solved it:) thanks for all the help:)
String in switch
By erdelf, with 13 replies.
Last reply by leuveg, almost 12 years ago:
Oh, sounds good. Than i hope my shool migrate from Windows XP to Win7 or 8 so we can use Java 8. ^_^ Greetings, L.
Random Movement of 3 Actors.
By Pizza020, with 1 reply.
Replied to by davmac, almost 12 years ago:
Why do you have three subclasses? Are the requirements different between each actor? I mean: why not just have three instances of one class?
Help With Turning/Flipping!
By tReks, with 5 replies.
Last reply by danpost, almost 12 years ago:
I think you just need to add another condition (other than whether it is going left or right) for mirroring the image. That is, something like this for adjusting the image: <Code Omitted>
645
646
647
648
649
650
651
X