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
Having issues with setImage()
By GaijinVagabond, with 2 replies.
Last reply by GaijinVagabond, over 8 years ago:
thanks that works great
Broken code
By Ticker175, with no replies.
hey guys im having trouble with my code for my pacman game can anyone see whats causeing the problem of the check methods. <Code Omitted>
Can't Add Scoring
By jjboy, with 2 replies.
Last reply by jjboy, over 8 years ago:
thank you so much, now it works!!
Side Scroll
By GaijinVagabond, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
Basically, you need to differentiate between objects which scroll, objects which should be fixed on the screen (for example score displays) and the object which causes the scrolling. When you add an object to the world, you add it to a scrolling or non-scrolling list. Whenever the object which is causing the scrolling reaches a certain point on the x-axis, you move all objects in the scrolling-list (and the object itself) to the side. You could look at this scenario from danpost:
http://www.greenfoot.org/scenarios/19020
Calling Methods
By SevenGrnSix, with 2 replies.
Last reply by SevenGrnSix, over 8 years ago:
Interesting, but I think it is something else than my question that is the problem. That is, I answered my own question, I think.
Jump/Fall
By GaijinVagabond, with 2 replies.
Last reply by GaijinVagabond, over 8 years ago:
Thanks for the help! I'm new to this so I have no idea what I'm doing.
Pacman Game code
By Ticker175, with 6 replies.
Last reply by Super_Hippo, over 8 years ago:
Please upload your code here to the site or post relevant code here in the discussion. To see if there is a wall next to you, locate where the ghost is in the world's array and check the "neighbors".
Tracking and chaseing player
By Bananarama, with 3 replies.
Last reply by Super_Hippo, over 8 years ago:
Use the 'Math.hypot' method (Pythagoras) to check the distances if you moved to the direction. So use the player's location and the current location of the enemy ± some x/y value depending on the direction you check.
how to move an actor from world to world
By rookiecoder, with 3 replies.
Last reply by Super_Hippo, over 8 years ago:
Option 1: <Code Omitted> <Code Omitted> Option 2:
Collision problem
By Zendeth, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
What is the size of a platform? An often used approach to do it is: - move - if it collided, move back to where it was It seems much easier than using all those variables.
setActOrder
By mcarvalhoc, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
Not sure if Google Translate works as it should, but I guess you should use the 'setPaintOrder' method. You can not place a specific object on top of everything else, but you can let all instances of a class be on top of all others.
How to draw a rounded rectangle (for popup message)
By Gui, with 6 replies.
Last reply by Super_Hippo, over 8 years ago:
If you draw a string on an image using the GreenfootImage constructor, it will use the default font. (You can't change the font before the image is created).
TicTacToe Minimax Algorithm - NullPointer
By Tucky50, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
You use "children_boards", but "children_boards" is null. You never set it to anything.
How to add border to a rectangle/square?
By ImanMalhi, with 3 replies.
Last reply by danpost, over 8 years ago:
I apparently mistook what you had in your original code. Reverse the order -- fill first, then draw the rectangle.
Damage change
By B_rob1, with 5 replies.
Last reply by danpost, over 8 years ago:
B_rob1 wrote...
The laser stays alive for a short duration, but one is created right afterward if a target is in range
Maybe you can have a laser hold which unit it is touching and only deal damage when it does not currently hold the unit it is found to be touching (setting it to a unit when found touching and dealing damage so it does not deal multiple damage).
246
247
248
249
250
251
252
X