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 do I make my life meter animate?
By ginger--ale, with 9 replies.
Last reply by ginger--ale, over 8 years ago:
it works now, thank you
How do i get camera to move with character?
By FutureCoder, with 4 replies.
Last reply by FutureCoder, over 8 years ago:
thanks
isTouching being Private
By Psychpsyo, with 20 replies.
Last reply by danpost, over 8 years ago:
Psychpsyo wrote...
But a square shape can't be higher than wide.
No, it cannot. However, there are other things you can do using one or more of these methods. For example, you can relocate the actor, temporarily, and check collision at various nearby locations using one of them. Here is one possible way:
I'm getting an actor not in world error plz help
By hockeydude1155, with 19 replies.
Last reply by Nosson1459, over 8 years ago:
k, thanks for sharing
problem
By Nosson1459, with 3 replies.
Last reply by danpost, over 8 years ago:
Nosson1459 wrote...
yeah but i need that in case theres something in the way bec if move is false then it goes back to the penguin moving then the penguin "sees" somethings there and stops moving
I think you should dispense with the 'moving' field altogether and just use the current conditions to determine whether it can move or not at that moment. If you need to (so that you do not check the same thing multiple times during the same act cycle), you can set a local variable to the results of the check on current conditions; but, conditions can change from act to act, so it makes little
Help! Press space once to start game
By j.moseley99, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
If you just want it to start the game with it, you could use this in your world: <Code Omitted>In the Ball class, you let it move without a condition.
Moving an actor with a mouse click
By Justinh, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
Do it step by step. Check for a mouse click and save the x and y position of the mouse in the actor. Use the turnTowards method (to the saved x and y), move and set the rotation back to 0.
Trying to make Rockets fall out of the sky randomly
By DuckGod, with 38 replies.
Last reply by danpost, over 8 years ago:
DuckGod wrote...
I just figured out that i had it backwards i was suppose to have it like this < Code Omitted >
I mentioned my concern over that code previously in this discussion:
I am actually puzzled about the code starting from there. If a Ground object is found intersecting, it does not seem correct to give it 'shootingSpeed'; and to remove 'shootingSpeed' if no ground is detected.
White Blood Cell
By LimeLava, with 17 replies.
Last reply by LimeLava, over 8 years ago:
Yes it is. Thank you
ball
By Nosson1459, with 10 replies.
Last reply by danpost, over 8 years ago:
Nosson1459 wrote...
wats isEmpty()
Same as 'size() == 0'. The list exists, but there is nothing in it (no intersecting objects, in this case).
compile
By Nosson1459, with 4 replies.
Last reply by Nosson1459, over 8 years ago:
thnx
Memory issues
By AuroraGamer, with 10 replies.
Last reply by danpost, over 8 years ago:
AuroraGamer wrote...
I hate being that person asking a million question, but what do you mean by do not scroll the background image?
I am saying that in a side-scroller with a background image like this: <Image Omitted> there is really no change in the image. So, why scroll it at all. You still need to scroll the actors; but, the background will then only appear to scroll.
How Do You Make 2 Actors Rotate And Position Together?
By Sellion, with 1 reply.
Replied to by danpost, over 8 years ago:
The main actor should have a reference to its gun and control its location. That is, set location to (getX(), getY()), set rotation to 'getRotation()', move some distance out from center of main actor, turn(90), move some distance sideways, and turn(-90). Doing this at the end of every act cycle (after the main character has moved and turned) will keep the gun in place. The gun object should create the bullet objects and add them into the world, initializing their rotations and placement in a similar fashion (except not continuously).
Support for Kinect on Windows 10
By peartree, with no replies.
Looking for updates on connecting the Kinect on a Windows 10 system. Will this be made functional at any point?
How do I put a basic timer into my game
By mmoodle, with 2 replies.
Last reply by danpost, over 8 years ago:
The steps involved are explained and illustrated in my
Value Display Tutorial
. Maybe it can help you out.
433
434
435
436
437
438
439
X