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

Comments for meow

Return to meow

It's realy not easy to help you if you've got no question and if you don't publish your source code.
josiahrc13josiahrc13

2013/1/11

i have no source code i have completely forgot basically everything.
ok but then it would be helpfull to know what this game is all about and what should happen there
josiahrc13josiahrc13

2013/1/11

oh sorry it's a boss fight between metroid and gannondorf? i just want the key controls the code to animate the movement hitboxes for her cannon a code for the shots a code so that it takes more than one shot to kill him and anything else that you can thing of for a basic game
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.
josiahrc13josiahrc13

2013/1/11

i have tried looking in other places and its hard to find the codes i need.
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.
josiahrc13josiahrc13

2013/1/11

how would i go about animating a pictures i already have.
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;
josiahrc13josiahrc13

2013/1/13

whats the entire code that's not seeming to work. I cannot find it anywhere!
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.
josiahrc13josiahrc13

2013/1/13

how do i make a timer thing so things react when its a specific timning
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; } }