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
World to another world problem
By holla, with 3 replies.
Last reply by holla, about 13 years ago:
Thanks, my problem was excactly that. Now it's solved :)
Player Detection
By GrimCreeper312, with 1 reply.
Replied to by Gevater_Tod4711, about 13 years ago:
You can use the getObjectsInRange method (see the
Greenfoot API
) to check whether your actor is in a certain range of your enemy.
AI Error
By lgbrf, with 2 replies.
Last reply by lgbrf, about 13 years ago:
Thanks, I knew it would be something simple..
Object Spinning?
By SWAG, with 5 replies.
Last reply by danpost, about 13 years ago:
First, you would need to hold the GreenfootSound in an instance field in the class of your character (I will call it 'sound'). Then, in the class of the character, use 'getObjectsInRange' to see if a boomerang is in the desired range (I will use '80' for the range).
Background star shift
By GreenGoo, with 6 replies.
Last reply by GreenGoo, about 13 years ago:
Thanks, it works very well.
Moving one actor on the x-axis for- and backwards
By d4|\|i31, with 3 replies.
Last reply by d4|\|i31, about 13 years ago:
Thank you, danpost! You are my hero of the day! I have to finish this game until tomorrow and didn't had figured it out until now! :) Thanks you a lot!
java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.cool-midi.com:80" "connect,resolve")
By jagrosh, with 4 replies.
Last reply by iau, about 13 years ago:
For an applet to get permission to access any URL on the Web (which is what you need), you will need to "sign" your applet's jar file before uploading it to the Gallery. This is not simple, and may well cost real money. Applet signing is described in many places, including
here
and
here
. If you want other users to run your scenario, you'll need to buy a "code signing certificate" that th
Elevator
By GrimCreeper312, with 4 replies.
Last reply by danpost, about 13 years ago:
The logic of your 'fall' method does not look correct. It says "if in air, direct right or direct right or fall." It should be more like "if in air, fall; else, direct right or direct left." And, yes. When the player is on the elevator, the elevator should detect and move the player up and down as it moves.
Multiple mice and keyboards into one game Help?
By RedManRocket, with 3 replies.
Last reply by jagrosh, about 13 years ago:
However, Greenfoot does have some gamepad functionality if I recall correctly, but maybe I'm mistaking that for the Ouya dev kit...
NEED HELP SHOOTING
By SWAG, with 9 replies.
Last reply by SWAG, about 13 years ago:
thanks for your help, but I got it to work.
Anyone help on making the collision code?
By Laurynas281, with 1 reply.
Replied to by RedManRocket, about 13 years ago:
Well what you would have to do is put the detection in the dog or CatAmmo class it would be a little something like this and I'm doing in the dog class
Multiple target acquistion
By GreenGoo, with no replies.
I have a ship which fires two missiles when I press space. At the moment, both of the missiles attack the same target, because I cannot think of a way within my abilities to retrieve, store and then use the locations of more than one enemy at a time. Any ideas?
more world in one game.
By erid, with no replies.
How to be create some world in one game and display them on different event? Like that Map_World - its main world and depending (children world): like town and battlefield. For example, if i want to display world town, when acter hero touch acter town on Map_World. (found_town method of acter hero) Then execute some action like buy an items. And then return hero with changed properties to the same Map_World from he was came. 1 How it realease transfer actor between different world? 2 And where (in code) create new (child-)world object and how it to display instead of Map_World? May be exist some demo or example on this subject?
HELP ME PLEASE :)
By SWAG, with 2 replies.
Last reply by RedManRocket, about 13 years ago:
Ok so a really simple way to do this is to make a boolean variable in the class the says gotGun or whatever you want it to be. And if you confused right now don't worry i will explain it in a moment. And you shoot with keys im assuming so to start off with the code heres where it will begin. this is below the class signature. public static boolean gotGun "or whatever you will call it" = false; then you will put the code for when you pick it up below the act method public void pickUpGun() //"or whatever you want to call it" { Gun is whatever the name of the gun is Gun gun =
Player Animation
By GrimCreeper312, with 1 reply.
Replied to by FlyingRabidUnicornPig, about 13 years ago:
A loop won't work because a loop will all happen in one frame (unless you add Greenfoot.delay() but in the case you want it, it won't turn out well). You need to instead have a counter and an if statement to reset that counter. I recommend something like this:
850
851
852
853
854
855
856
X