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
testing for actors
By bonana, with 2 replies.
Last reply by bonana, over 12 years ago:
Thank you for your quick answer! It works :-)
Ice Hockey Game Questions
By camsterb, with 3 replies.
Last reply by camsterb, over 12 years ago:
Hey, again. I have posted another two discussions with questions about collisions if you can help. Thanks. http://www.greenfoot.org/topics/find/17806#post_17806 http://www.greenfoot.org/topics/2775
How to make the ground keep scrolling?
By AnneMacaroni, with no replies.
I don't want to make a scrolling background b/c it's too confusing so I decided to make a scrolling ground, which is an object, to make it look like my actor is moving. How would I make it so that the ground (Ground.class) could keep remaking itself? However I want it so that there are gaps in between so the actor can jump over the gap. Please help. I tried many ways but it lags a lot b/c I used counters and the counter eventually got to big (greater than 2000....) <Code Omitted> I then called it in the world's act() method so that this would keep repeating itself. Anyway to make it better? or provide a scenario that has a scrolling object (ground)
How to make one actor to move with another actor?
By tuzi, with no replies.
hi, im doing this mario type of game and i got a problem i have this bar that is moving back and forth on the screen how am i able to make mario to move with the bar once it lands on it?
worlds using methods from other worlds
By bonana, with 8 replies.
Last reply by bonana, over 12 years ago:
Ahh okay, understood. Thank you
Move in the direction of a mouse click?
By solokeh, with 7 replies.
Last reply by danpost, over 12 years ago:
@Hawx_, the 'turnTowards' method is in the Actor API and needs an Actor object to run on. If this line of code is in the Ball class 'act' method (or a method that the 'act' method calls), just use: <Code Omitted>
Constructor Errors
By Gingervitis, with 15 replies.
Last reply by Gingervitis, over 12 years ago:
Ok. Thank you. It worked.
How do you make obstacles?
By LonelyCreeper, with 11 replies.
Last reply by LonelyCreeper, over 12 years ago:
so do i just put the code in the move() method?
timer
By milanapa, with 6 replies.
Last reply by danpost, over 12 years ago:
@milanapa, it would make sense to put the code in the class that creates the object that you are timing (if you are timing how long a world is active, put it in the class of that world; if you are timing how long an actor is 'alive', put it in the class of that actor). That way, as you add additional code, there will be less chance of having to modify this part.
2D sidescroll help
By Sergio, with 9 replies.
Last reply by danpost, over 12 years ago:
danpost wrote...
Then relocate and scroll after setScrollingBackground and before adding the other objects.
The key word was
after
.
Hockey Game Boundary Collision Problems
By camsterb, with 1 reply.
Replied to by camsterb, over 12 years ago:
New link to view scenario: http://www.greenfoot.org/scenarios/7184
Changing the background (world)
By bbwf, with 3 replies.
Last reply by danpost, over 12 years ago:
Yeah, I just copied the 'if' command from what was given and did not evaluate it. I was concerned mostly with getting the new world underway.
enemy?
By theuberjew, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
If you just want an enemy you should look at a little-crab game. This ones are the simpelst scenarios. If you download a scenario you can look at the source.
Probably Small Conway's Game of Life Problem...
By camsterb, with 8 replies.
Last reply by danpost, over 12 years ago:
From any cell, there are eight possible neighbours, they occur at offsets of <Code Omitted>The x-offsets range from negative one to one; as do the y-offsets. The hole in the center is the current cell which is not a neighbour of itself. The first 'for' loop creates the values of the x-offsets and the second does the same for the y-offsets. The first 'if' eliminates self-neighbouring. The second one eliminates non-existent cells outside the world bounds. The last one checks the status of t
turnTowards problem
By DaBist, with 5 replies.
Last reply by DaBist, over 12 years ago:
Duta wrote...
I assume what you mean is that you want to be able to do <Code Omitted>but not have the rotation change. One way to do this is to store what the rotation was before turnTowards, and then set it back to the original rotation after it's done. What I'm trying to say is: <Code Omitted>
thanks, it works now :)
895
896
897
898
899
900
901
X