This site requires JavaScript, please enable it in your browser!
Greenfoot back

Gevater_Tod4711's Comments

Back to Gevater_Tod4711's profile

I sent you the game. Whish you much fun with it.
Using this programm: http://www.greenfoot.org/scenarios/5949 you can calculate how many acts there are per second. If you know this you can count the acts using a integer that you count up every act. For example: You got 35 acts per second. int counter; public void act() { counter++; if (counter >= 35) { //one second is over; } }
setImage(new GreenfootImage("fiename")); is the whole code. You can find the method in the Greenfoot API (http://www.greenfoot.org/files/javadoc/greenfoot/package-summary.html). The method setImage is in the class Actor and new GreenfootImage(String filename) is in the class GreenfootImage.
If you want an actor to use your image you have to save the image in your greenfootproject. Then you can set an actors image using this code: //in the class you want the actor to change the image; setImage(new GreenfootImage("filename.png"));//filename has to be the name of the picture;
Ok but we can't programm your whole source code. Maybe you should first do the Greenfoot Tutorials (link: http://www.greenfoot.org/doc) before you try to programm your own game. They're realy helpfull.
That's realy much. Do you want us to programm your whole game??? Well first you should reed the Greenfoot API (link: http://www.greenfoot.org/files/javadoc/greenfoot/package-summary.html) That would be helpfull. For key controlls use the method Greenfoot.isKeyDown("keyname"). To animate movement you should use setLocation. You should first try to add this because the code for the other things in your list are much longer and also much more difficult.
ok but then it would be helpfull to know what this game is all about and what should happen there
It's realy not easy to help you if you've got no question and if you don't publish your source code.
I'm not sure if it's alowed to publish the source but if you give me your e-mail I can give you a downloadlink.