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
NEED HELP SHOOTING
By SWAG, with 9 replies.
Last reply by SWAG, over 12 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, over 12 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, over 12 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, over 12 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:
*NEW* HELP
By SWAG, with no replies.
NVM fixed problem
need help
By Pinopip, with 4 replies.
Last reply by Pinopip, over 12 years ago:
<Code Omitted>
Score Help
By SWAG, with 2 replies.
Last reply by SWAG, over 12 years ago:
danpost wrote...
When creating the new world, before setting it, set the counter of the new world to that of the old. As an example, this code transfers the value of the counter in the old world to the counter in the new one. <Code Omitted>
List<Counter> counters = getWorld().getObjects(Counter.class); Counter co
How do a make a song play in the background of my program?
By QWERTY894, with 4 replies.
Last reply by QWERTY894, over 12 years ago:
Thank you! It did the same thing again on the act() method but it gave me a new idea.
Enemies Help
By SWAG, with 4 replies.
Last reply by SWAG, over 12 years ago:
it worked thxs
How do I make the world count my score?
By Yasmine, with 1 reply.
Replied to by danpost, over 12 years ago:
You are changing the value of 'pontos' when intersecting the 'bonusganho'; but you are not adjusting the image of the object that you want to use to display that value (hoping and praying it is an object).
What's the best method ?
By Solringolt, with 7 replies.
Last reply by Solringolt, over 12 years ago:
Yeah thx works great like this, I have many actors but it works ^^ I didn't needed the Instance I just put the variable declaration in the parent act class.
counter
By gonnaownurass, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
To get the values of variables in other classes or objects you need references. You should have a look at the
Greenfoot Tutorials
. Especally
this one.
Member messaging?
By m.legere1323, with 8 replies.
Last reply by JetLennit, over 12 years ago:
mik wrote...
Yes, we are working on that. We will add notifications to the site. It will notify you when someone has replied to any of your posts, and there will be optional email notification.
When are you doing this??
850
851
852
853
854
855
856
X