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
drawing a radius around the towers when their selected
By darkmist002, with 9 replies.
Last reply by danpost, over 13 years ago:
If you declare both the 'tpic' and 'g' images in the tower class and create the images in the constructors of the subclasses, then you should be able to use the code I provided in the tower class using 'setImage(tpic);' and 'setimage(g);' at lines 11 and 6 in my code above. When upgrading the tower the 'g' image will need to be updated, also.
What role does the semicolon play?
By mpmullins, with 1 reply.
Replied to by bourne, over 13 years ago:
Indicates where the statement terminates. Probably mostly to aid the compiler. In Java you can write an entire program on one line.
my "Enemy" wont move like its supposed to when it is 250 leftTurn, it moves half way across the map. I want it to run the full way. how do i fix this problem??
By qsapp.3, with 1 reply.
Replied to by danpost, over 13 years ago:
Forgive me if I am wrong, but it appears that the 'atTurningPoint' method will always return true. The x-coordinate of the enemie will always be either less than or equal to leftTurn (450) or greater than or equal to rightTurn (also 450). This means that the speed will always be changing directions and your actor will jiggle in place. Your conditions for turning in your 'atTurningPoint' method needs some work.
pressing buttons and then adding an object to the world by clicking in it
By darkmist002, with 15 replies.
Last reply by darkmist002, over 13 years ago:
had the right idea, was sticking it in the wrong part lol. thanks for the help.
IcedTea Error
By sametguzelgun, with 1 reply.
Replied to by davmac, over 13 years ago:
I'm pretty sure this is a problem with the IcedTea plugin. I don't think you can use it to view applets on greenfoot.org.
Problem with my code
By Dinokilla7, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
Your class is never closed. Try adding '}' at the end of your class. That may help.
I have Enemy 1, 2 and 3 but Enemy 2 is compiled perfectly but the other 2 say they r compiled but still have the lines and wont let me place them on the map. what am i doing wrong?? here is Enemy1
By qsapp.3, with 1 reply.
Replied to by danpost, over 13 years ago:
In order to manually place them on the map, they must have a constructor method in the class. For the class given above, add this constructor: <Code Omitted>
How do I channel a "MainPlayer" into a new world if something happens such as he dies??
By qsapp.3, with 1 reply.
Replied to by FlyingRabidUnicornPig, over 13 years ago:
Could you explain it a bit better? If I understand you correctly, you want to spawn the player again when he dies... If that's the case, just set the world to a new version of that or something. It will look like the world is reset, but it didn't really reset. Or you could have a reset method that adds/deletes objects back into their original places (such as the MainPlayer at the beginning of the level)
I keep getting the error cannot find method for gameOver(); how do i fix this properly?? im very confused
By qsapp.3, with 5 replies.
Last reply by qsapp.3, over 13 years ago:
Thank you so much!
Need help with concept
By iWin4Poland, with 3 replies.
Last reply by danpost, over 13 years ago:
You probably have some tags within the sound file that the streamreader does not like. Try saving the sound file without any tag information.
need help for calling a method
By darkmist002, with 26 replies.
Last reply by darkmist002, over 13 years ago:
thanks, added an if else statement to the act method of the attack objects with that, and it works now.
Pausing
By DoctorProfessorYoshi, with 13 replies.
Last reply by DoctorProfessorYoshi, over 13 years ago:
Well i didn't realise you could remove it without the code going funny. The DoctorPrrofessor is out!
Space ship
By RahulUK, with 3 replies.
Last reply by danpost, over 13 years ago:
Use 'setLocation' instead of 'move' and only allow the 'left' and 'right' keys to work for movement.
Noob problem.
By Infucoder, with 7 replies.
Last reply by Kartoffelbrot, over 13 years ago:
Ok
Shooting
By eddietheboss27, with 2 replies.
Last reply by eddietheboss27, over 13 years ago:
Hahahahahahahahahaha very funny umar
812
813
814
815
816
817
818
X