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
How to get a location from a class to another?
By kronama, with 4 replies.
Last reply by Yehuda, over 8 years ago:
It gets the first Object in a (zero based) java.util.List.
How to make a timer?
By FlorianZhu, with 15 replies.
Last reply by danpost, over 8 years ago:
Super_Hippo wrote...
You can try this to display minutes and seconds: (I partially copied it from one of my scenario, so some of it is German. But maybe that's not a problem, because I saw you using the word "nichts" in your last post.) ;) << Code Omitted >>
I think the code supplied might be a bit advanced for FlorianZhu with usage of an array, the Font class and especially using an inner class.
Getting a variable from an Actor class in the World class
By Juno, with 2 replies.
Last reply by danpost, over 8 years ago:
Or, use: <Code Omitted>which is equivalent to: <Code Omitted>This is presuming that exactly one killCounter object is always in the world.
Problem with colinear points
By delijamiki, with 2 replies.
Last reply by delijamiki, over 8 years ago:
I have fixed the problem, thanks for help. The problem was in the position of this block in act method.
Slow down one object at a time?
By MilesChamomile, with 2 replies.
Last reply by danpost, over 8 years ago:
The SmoothMover class or my QActor class (see my Demo Collection) could be used to help in controlling the speed of the actor.
Im trying to add a counter limit and im failing :(
By thomaswillett, with 2 replies.
Last reply by Yehuda, over 8 years ago:
...and what's the problem?
How to make turnTowards inversion
By arthurmadson, with 1 reply.
Replied to by danpost, over 8 years ago:
arthurmadson wrote...
i want to do the reverse of this function turnTowards(x,y); where instead of the sawdich chase the boy it run away from him.
The following would be like the reverse method ("function"): <Code Omitted>Pretty simple -- probably not worth creating a seperate method for.
How to use 2 Gif's in one Actor?
By Ototo, with 19 replies.
Last reply by Ototo, over 8 years ago:
Nvm... Thank you so much ! I Love you !!!
How to check if 2 objects are touching each other?
By Zweeg, with 1 reply.
Replied to by danpost, over 8 years ago:
For intersecting a specific object, use the
intersects(Actor)
method For intersecting any object of a specific class, use the
isTouching(Class)
method.
How to make a you win and you lose in a two player game(can someone help me!!!)
By DawnLight, with 3 replies.
Last reply by danpost, over 8 years ago:
DawnLight wrote...
but how am i going to check if red or blue win??? i've been trying for a few days for now but i can't solve this problem.
danpost wrote...
determine winner by comparing scores
Having problems with a "missing return statement"
By DeRock, with 4 replies.
Last reply by DeRock, over 8 years ago:
Thank you so much, worked perfectly!
Changing the code editor
By VladislavMoldovan, with 4 replies.
Last reply by Yehuda, over 8 years ago:
I have Windows 10 Pro, and I found them here: C:\Program Files (x86)\Greenfoot\lib\bluejcore.jar C:\Program Files (x86)\Greenfoot\lib\extensions\greenfoot.jar
Typing Game: pop() the first word in a stack one at a time
By cycv5, with 1 reply.
Replied to by danpost, over 8 years ago:
You cannot pop the elements from the stack unconditionally if you want the list to retain anything. The command to pop needs to be in an 'if' block or something similar.
Remove an arraylist of the same actor in order
By cycv5, with 6 replies.
Last reply by cycv5, over 8 years ago:
danpost wrote...
Line 5 assigns a new List object to 'ene' every act. You need to move that line outside of the method for it to remain persistent as long as the World object exists.
Thank you very much, really helpful!!
I need help! How do you make it when a certain amount of points is not reached Game over
By TheMidget, with 1 reply.
Replied to by danpost, over 8 years ago:
TheMidget wrote...
when the person doesn't get a certain score how do I make it game over.
Well, first you would need some indicator for when this condition should be checked. This could be a time limit or a limit on number of moves. It could be at a certain break point as like the end of a level or something else. Whatever this indicator is, when indicated, check the score and either allow the game to continue or not. To stop the game, usually all it takes is a "Game Over" text message (with possibly showing the score) and stopping the scenario (using "Greenfoot.stop();").
279
280
281
282
283
284
285
X