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
Game over when hit 3 times
By Frost, with 4 replies.
Last reply by danpost, almost 12 years ago:
I do not think you are being consistent with the name of your field. I see 'healthPoint' as the name of the field; but I also see 'damagePoint' being used in the code. I think 'hitCount' might be a more appropriate name since hits are what it is counting.
Making a square hitbox
By Dillybar, with 8 replies.
Last reply by danpost, almost 12 years ago:
If you mean like taking an exaggeratedly large square transparent image and drawing Mario in the middle of it and then setting that image to a Mario object, then yes. All images are rectangular to begin with, regardless of where the actual color portions within that image are, however, and since normal collision detection uses the extent of the image, not the color portions within it, the hitbox is already rectangular. Most people have problems with the image itself being larger than the color portion within it and want the image size to be reduced without reducing the size of the color port
Need Help Spawning random actors
By Thanatos, with 2 replies.
Last reply by danpost, almost 12 years ago:
Will this be during gameplay? if so, what parts should be random? possibilities are (a) when one is spawned (b) which one is spawned, (c) where one is spawned.
Need help when touching another actor
By Thanatos, with 2 replies.
Last reply by Thanatos, almost 12 years ago:
Thank You!
Pacing Guide
By gmann, with 1 reply.
Replied to by davmac, almost 12 years ago:
gmann, the best place to ask for this sort of thing is probably the
Greenroom
, which focuses on teaching resources.
Actor not in World problem.
By MrBunni, with 10 replies.
Last reply by SomeRandomStuff, almost 12 years ago:
wait i will move this to another discussion please ignore
Basic AI Difficulties
By KingCowWill, with 3 replies.
Last reply by danpost, almost 12 years ago:
KingCowWill wrote...
enemyRot is just getting the rotation for the bullet that comes out of the TIE fighter.
Although that method of getting the rotation to the bullet may work, it is not good programming -- to use a class field for something that should belong to an object of the class. There are other ways to get the bullet to rotate the proper way. You can break line 55 above into its components, like this: <Code Omitted>The first line gets a local reference to the bullet created. T
Need Help with adding a 'health pack' to my game!
By JLItachi, with 17 replies.
Last reply by JLItachi, almost 12 years ago:
Never mind, I figured out what I did wrong, it works all perfectly now. Thanks for everything Dan!
Error with 2d array
By Raideron, with 6 replies.
Last reply by Raideron, almost 12 years ago:
It was indeed not in a method, this fixed it, thank you!
how to change the font
By Steven.Z., with 2 replies.
Last reply by Steven.Z., almost 12 years ago:
thanks
mirrorHorizontally() changes Image color. How to fix?
By EnderPicture, with 3 replies.
Last reply by EnderPicture, almost 12 years ago:
Running on Windows 8.1 With GreenFoot 2.4.0. http://gyazo.com/4cf93f7ab1d255929faeedb84123a248 http://gyazo.com/3ef0c9630b111660ee12440e31776cd1 I think it is the problem. How to fix it?
Relative movement issue with scrolling world
By Dillybar, with 16 replies.
Last reply by danpost, almost 12 years ago:
One discussion on the 'getUnivX' and 'getUnivY' methods is
here
. It appears that is when I added the 'getScrollingWidth' and 'getScrollingHeight' methods. Anyways it does provide a use for the methods (as they were written at the beginning before this post; or, as in
this
discussion) and shows how they can be used.
Remove score once.
By Gzilia, with 4 replies.
Last reply by danpost, almost 12 years ago:
The initial line I gave would be the least you would need; however, this would require the counter to update its image every act cycle. The second way, lines 3 and 4, is better only in that the counter only updates when needed -- that is, when the score actually changes. This reduces the workload on the system as working with multiple or large images is one of the major causes in producing lag.
Take Score to the next Level - How to do it?
By Riegsche, with 1 reply.
Replied to by danpost, almost 12 years ago:
You probably have a line like the following to go to the Level 2 world: <Code Omitted>That line is short for this: <Code Omitted>The expanded code gives you a reference to the new Level 2 world created. You can access any public field and execute any public method in that Level2 world right between those lines. For example: <Code Omitted>
How do I access a score from another world?
By Ruvero, with 2 replies.
Last reply by Ruvero, almost 12 years ago:
The first solution did the trick, thank you!
616
617
618
619
620
621
622
X