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 won't disappear when it hits the edge of the screen
By WhiteRoseAshes, with 6 replies.
Last reply by Yehuda, over 9 years ago:
The problem is that the X is always less than 600 so doing 'else' will make that 'if' not run. The 'if' statements should not both be checking for the same area (599). You can use 'else' if you lower the value in the first 'if' statement.
How to make an actor stay always in the centre of the scene
By GreenfootNewbie2000, with 1 reply.
Replied to by danpost, over 9 years ago:
Use the world act method to move the player back to the center and move everything else the same amount in the same direction including the background image.
text doesn't update (counter) – please help
By ProgrammingPanda, with 1 reply.
Replied to by danpost, over 9 years ago:
You really should not create a new GreenfootImage object every act cycle if not necessary. Add methods to the class that the player classes can call to bump the score (instead of changing the field values directly) and update the image only when the score changes:
I need help with my code the actor is supposed to run and jump but it just floats and moves left and right need help due monday
By Programmingprodigy, with no replies.
<Code Omitted>
how to make platforms?
By chlo, with 8 replies.
Last reply by chlo, over 9 years ago:
I added that line of code but I'm unsure how to change it to fit the width and height of the platform. I have my game set up where the world that I'm trying to put the platforms in, calls from an imported class that allows the background to scroll as the actor moves but I don't know if that would have anything to do with the actor not being able to land on the platforms. Here is the jump code I have for my actor when it jumps and where I added the code you suggested:
How do I add a visible timer that counts down?
By ProgrammingPanda, with 2 replies.
Last reply by ProgrammingPanda, over 9 years ago:
Thanks! It worked perfectly! :)
Programming A.i. for Pong
By Kronos, with 35 replies.
Last reply by Kronos, over 9 years ago:
danpost wrote...
Kronos wrote...
Line 20 and 32 needed to have '==' not '=' Line 32 was not indented enough, so it was being called as the else statement to line 18
I missed all that in the one class (I had expected the corrections in the other class to be made in that one also -- but, they were not).
No problem. I had not been looking for minor errors like that either. Anyway, the entire game now works. Thank you so much for your assistance. It is much appreciated.
How to subtract units attack from enemies health
By InfuriatedHog, with 3 replies.
Last reply by InfuriatedHog, over 9 years ago:
Thank you so much!
Method Interval Delay
By zeke.shoe, with 4 replies.
Last reply by zeke.shoe, over 9 years ago:
Omg thank you so much! I can't believe I overlooked such a simple fix.
How to make new Predator spawn.
By SprayNPray, with 5 replies.
Last reply by danpost, over 9 years ago:
A single equal sign is an assignment operation, which in this case assigns 5 to the variable showCounter. To compare 5 to the current value of showCounter, use a double equals sign, the equality comparison operator.
been trying to get this pizza main gui program to work
By divinity, with 1 reply.
Replied to by Yehuda, over 9 years ago:
I don't know what the plceorder JButton is supposed to do. Right now it will change it's text to "place order" and if pizzaSize.isSelected(ThinCrust) then it will also display in the terminal window "place orderPlace your order ". I know this from lines 375 - 383. What is the plceorder button supposed to do as opposed to what it does. (There are a lot of variables here that I don't know where they're created, also there is no main method.) (P. S. It looks like you created the JFrame with the NetBeans IDE GUI builder or something like that.)
HELP!
By GewoonAxl, with 1 reply.
Replied to by Yehuda, over 9 years ago:
What is your menu? If it's just an actor that's added into the world in the constructor then you can remove it with the started method. <Code Omitted> I think I may have misunderstood you. If you mean that you want to remove an actor when your "Play" button is
Pokeball cant get out a pokeman
By Kalpshah6, with no replies.
I tried the pokeball to add an pokeman but it doesnt work.
How to add an actor at a specific time.
By bombrz, with 2 replies.
Last reply by bombrz, over 9 years ago:
neverminf i figured it out
Simple issue
By TisHenry, with 5 replies.
Last reply by danpost, over 9 years ago:
If want the Short_Brian object to be a Brian object, then you need to have the Short_Brian class extend the Brian class instead of the Mover class (line 10 of Short_Brian). But then, because both classes have an act method, the one in the Brian class will not automatically execute for a Short_Brian object unless you add: <Code Omitted>to the Short_Brian act method.
347
348
349
350
351
352
353
X