Ah I found your real problem. Your beam class extends samus and so calls the samus constructor also. What should be done is that beam should not extend samus, and same with couple other classes. But for a quick fix change the constructor of samus to contain the following:
if (!(this instanceof beam || this instanceof missile || this instanceof Counter))
{
run0 = new GreenfootImage("samusstand0.png");
run1 = new GreenfootImage("samusstand1.png");
run2 = new GreenfootImage("samusstand2.png");
jump1 = new GreenfootImage("spinjump1.png");
jump2 = new GreenfootImage("spinjump2.png");
missilenum=10;
f = false;
setImage(run0);
}
Okay i took a look at your code. Its like I thought, you have static variables in your samus class: a boolean called "f" and an int called "missilenum". "f" is set to false, and "missilenum" is set to 10. I'm assuming "f" has something to do with direction. The problem is that these variables are set to these values once, when the applet first loads. To fix it, set "f" to false and "missilenum" to 10 inside the constructor.
Kinda confused on some things. I got the little guy to run backwards (animation), and missles don't reset, after restarting scenario? (if direction is to the right, then reset scenario, then animation is backwards) - Think this could maybe be a static variable that is not initialized (set equal to something) for the beginning setup outside of just its declaration? Fell into hole and came out uptop. Jump is now 's' and the missles are shot by holding 'a' then 'w' (should just be one key?). And pressing 'q' stops the scenario?
Hey nice scenario. I'm confused on if you are shooting bugs at the red balls, and if so, what are the red balls? First impression was that bugs would be the invaders, if not pigs. Also when you lose a life it says "Live lost", think should be "Life lost". And I thought maybe since pigs like mud, there could be some ability to hide in mud (like if the 'invaders' were to shoot some deadly strike at you). And some sort of theme around the pig and invaders could be established. Might help for future levels. And pigs also like slops.. And a farm style background might fit. - Just some thoughts. Keep up the good work!
2011/1/17
MusicVisualizer
2011/1/17
Mortide
2011/1/16
Mortide
2011/1/15
Mortide
2011/1/14
Mortide
2011/1/11
This is the Only Level
2011/1/5
Qwop
2010/12/7
GreenMonster
2010/11/22
Pigivaders