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
Hold button and fire with delay.
By Unreliable, with 2 replies.
Last reply by shrucis1, almost 13 years ago:
I answered a similar question yesterday, here: http://www.greenfoot.org/topics/5057 Except you replace Greenfoot.isKeyDown("space") with whatever method you use for sensing if the mouse is down.
How to reflect an object of another object?
By UltimateCoder, with 1 reply.
Replied to by Yogibaer, almost 13 years ago:
The general code how to reflect the ball your code shows already. Instead of 'worldEdge' now you have to check if the ball is near or hits the paddle. The method to do this is <Code Omitted>The class is your paddle-class. To be able to hit the paddle it`s necessary one or two paddles are in the world. I hope this hints lead you to the solution. kind regards Yogibaer
Global Variable
By Yedya, with 4 replies.
Last reply by Yedya, almost 13 years ago:
Working now thanks
ArrayList out of index? (range 1, index 1)????
By 8bitcarrotjuice, with 11 replies.
Last reply by 8bitcarrotjuice, almost 13 years ago:
I just tried this project on my MAC, and it gives me an error when the object Class is initiated... I have no idea what the problem is...
Player get hit and subtract health problem
By Unreliable, with 8 replies.
Last reply by Unreliable, almost 13 years ago:
Ooh ok I got that to work but the reason I had it add the player is so that the player didn't have to do it themselves. But I need the board reference in the player because I need to subtract hp if the player gets hit by an enemy. I am using danposts progress bar.
Greenfoot drawImage
By Bolino, with 4 replies.
Last reply by Bolino, almost 13 years ago:
Thank for your reply, this is my current code. Like I said, I need a copter-based game. But I generating background is far to hard for me. So I would like to create a background from 10000px width and 600px height. And while the copter is moving I need the 'current' part of the picture to shift every time if you know what I am tryin to say? :)
removeTouching Method
By UltimateCoder, with 1 reply.
Replied to by Gevater_Tod4711, almost 13 years ago:
The problem probably is that the objects are touching but the areas which are touching each other are transparent so you don't see them. Maybe Busch2207's
Pixel-perfect collision detection
can help you fixing this problem.
Help! with switching Actor directions?
By SpecialK705, with 3 replies.
Last reply by SpecialK705, almost 13 years ago:
Works perfectly, I can't thank you enough, I was going partially insane trying to figure this out!!
How do I add Text to a world?
By Keyblade37, with 1 reply.
Replied to by bourne, almost 13 years ago:
Look into the GreenfootImage class, either its constructor or drawString method: (The GreenfootImage then could be set to an Actor that is added to the World) GreenfootImage(java.lang.String string, int size, java.awt.Color foreground, java.awt.Color background) drawString(java.lang.String string, int x, int y)
Playing Music
By jennifer56, with 1 reply.
Replied to by Yogibaer, almost 13 years ago:
See the discussion
multiple Worlds
How can I make an object bounce off the walls going left to right?
By Lautima, with 4 replies.
Last reply by Yogibaer, almost 13 years ago:
A good solution: look the thread: "Help! with switching Actor directions?" a few steps down. (postmaster, please delete my previous posting)
End Breakout Game
By hdeforest, with 4 replies.
Last reply by hdeforest, almost 13 years ago:
.
Passing Parameters Between Worlds
By Adept_Red, with 15 replies.
Last reply by Adept_Red, almost 13 years ago:
HE CAN BE TAUGHT!!! Just tested it out by adding a System.out.println in the HS_controller and it successfully printed the score.
Thank you guys so much for your help!
There is of course the issue that HS_controller wont draw anything on the screen like it should... but the hardest part for me has been resolved. Here is the code as it is:
using a class parameter with setWorld() method
By jkc1113, with 2 replies.
Last reply by davmac, almost 13 years ago:
Really, you should use the
factory pattern
and pass in a factory instance instead of a class. However, this also works: replace line 05 above with the following lines: <Code Omitted> As you can see it is a bit messy, la
different end screens?
By chrissy098, with 1 reply.
Replied to by danpost, almost 13 years ago:
Have your actor count how many bonuses were picked up and use its value to determine which end screen to use.
761
762
763
764
765
766
767
X