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
Code not working
By Blackop778, with 4 replies.
Last reply by Blackop778, almost 11 years ago:
Yep it works. Thanks guys!
getting nullpointer exception
By ngokhale, with 6 replies.
Last reply by Super_Hippo, almost 11 years ago:
Oh sorry, I said you should change the method to the following but because I failed with the ending 'code' tag, it wasn't visible... <Code Omitted> For your current problem, you can have a counter. So you can write, if the ball hits the edge, the counter is increased by one. If the counter is 1 now, change color to yellow, else you change it to red. When the ball hits the edge and the method that you use doesn't transport the ball to a region which is not detected as the edge, then you need
I keep getting a terminal error
By coder04, with 5 replies.
Last reply by NikZ, almost 11 years ago:
danpost wrote...
Adding the actor twice will not throw an exception. The error is occurring in the MiniShip class, not the Ship class. Please show the code for that class; particularly the 'fire' and 'act' methods of that class. Use the 'code' link below the 'Post a reply' input box to insert your code into any posts.
Yeah, but if you want to have two shots, don't do that.
Need help with remove object
By Fulman, with 2 replies.
Last reply by Fulman, almost 11 years ago:
Oh, thank you man, that was the problem. Did not see that i forgot that. :D
Randomly spawn & remove actor
By eekje87, with 7 replies.
Last reply by danpost, almost 11 years ago:
I was suggesting something like this: <Code Omitted>
Access and change a variable from another actor
By TheUnknown, with 14 replies.
Last reply by TheUnknown, almost 11 years ago:
Thank you very much! Everything works perfectly!
Pushing crates.
By hesh, with 7 replies.
Last reply by danpost, almost 11 years ago:
@kristal, although I cannot say how JetLennit solved this, I can say how I would solve it (which is a bit different from the method used above). I would add a method in the Crate class for moving the crate. The method would check to see if it can move in the direction given as parameter value(s), move in that direction (if possible), and return a boolean value (true/false) to indicate whether it moved or not. The method could start something like this: <Code Omitted>Then, the code to move or move while pushing a crate in the Player class could use l
MouseInfo.getButton() only works when mouse moves fix?
By Entity1037, with 2 replies.
Last reply by Entity1037, almost 11 years ago:
Got it. Thank you!
How do I upload a Scenario?
By Green_Code, with 3 replies.
Last reply by danpost, almost 11 years ago:
You do have a member page -- and any scenarios you upload will be accessible through it. This is your page:
http://www.greenfoot.org/users/24176
.
Drawing a line from one object to another
By jshallow86, with 14 replies.
Last reply by Super_Hippo, almost 11 years ago:
Edit last post: Line 28 should be the following of course: <Code Omitted>
My Pong score counter isn't working
By jbrown401, with 5 replies.
Last reply by danpost, almost 11 years ago:
By instance reference field, yes. However, you do not need a 'Score1' and a 'Score2' class; you just need a 'Score' class that you create two instance objects with: <Code Omitted>The 'get' methods will allow obj
Why Isnt the Code Working For The Red Bike(Light Cycle Game)
By tReks, with 3 replies.
Last reply by danpost, almost 11 years ago:
tReks wrote...
Lol don't worry its not like a hack or anything Idk how to do dat stuff
It does not have to be coming directly from you. Dormant malware is not non-existent.
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 11 years ago:
Ah! Thank you!!
World constructor
By wslade, with 4 replies.
Last reply by davmac, almost 11 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)?
642
643
644
645
646
647
648
X