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 you make enemies shoot
By coder04, with 3 replies.
Last reply by Super_Hippo, over 11 years ago:
Don't you also shoot with your ship? Then you should already know how to spawn the bullet. To set the rotation, you can give the 'Shot' class a parameter in the constructor and pass the rotation of the ship there. If you want it to target you, you can use the 'turnTowards' method. As an alternative, which I used in my
Space Shooter
scenario for the enemies which shoot at you, I calculated the rotation "by hand".
Does anyone know how to Remove the bullet when it gets to end of world
By coder04, with 14 replies.
Last reply by coder04, over 11 years ago:
K
My ammo gets stuck in the edge of the world
By coder04, with 2 replies.
Last reply by coder04, over 11 years ago:
sorry
my warship is not following me when I run my game
By coder04, with 1 reply.
Replied to by danpost, over 11 years ago:
You need to add movement commands to your code if you want your actor to move.
Anyone tell me how to make my actor shoot
By coder04, with 5 replies.
Last reply by coder04, over 11 years ago:
THANX
Third part library when packing to a gfar.
By Upupzealot, with 3 replies.
Last reply by davmac, over 11 years ago:
Will third part library (such as json library in an jar file) be packed into the gfar also?
Can't you just try this and see? I think the answer is probably "yes" but it would be much simpler for you to just test it.
Help with boolean Statements
By Loaf, with 2 replies.
Last reply by danpost, over 11 years ago:
You need to show the related code where you are calling these 'set' methods.
Levels
By DarkSoulDemon, with 16 replies.
Last reply by DarkSoulDemon, over 11 years ago:
Thank you
Reset
By DarkSoulDemon, with 6 replies.
Last reply by DarkSoulDemon, over 11 years ago:
Thank you
My music wont play!
By coder04, with 3 replies.
Last reply by danpost, over 11 years ago:
Show world class code where you add a Music actor into it.
Link between actors
By VideoGame, with 23 replies.
Last reply by VideoGame, over 11 years ago:
Perfect, thanks !
My ship will not move backwards and forwards
By coder04, with 5 replies.
Last reply by danpost, over 11 years ago:
Now, it appears you tried to use code similar to the Ship in my Teleporting Demo scenario. Maybe try something like this for your 'move' method:
My song will not work can fix my code
By coder04, with 1 reply.
Replied to by Super_Hippo, over 11 years ago:
You create a new GreenfootSound object every act cycle. Of course this new sound doesn't play, so every act cycle another sound starts to play. Put line 17 to line 11 or so.
Advancing in levels
By MeccaMaxima, with 3 replies.
Last reply by danpost, over 11 years ago:
MeccaMaxima wrote...
Would the limiting value be the time or is it another variable??
It can be a hard-coded value or you can put the value in a constant field and refer to it.
HELP
By BrownBoii333, with 4 replies.
Last reply by Super_Hippo, over 11 years ago:
Did you try my code? Change the 3000 to something like 170 and see if it works. What I changed was, that the 'else' is in relation to the other 'if' now.
649
650
651
652
653
654
655
X