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

mjrb4's Comments

Back to mjrb4's profile

It's not that hard to figure out ;) The exception reads: java.lang.IllegalArgumentException: Could not find file: runleft0 Now the last part of this should give you a pretty good idea what's happening, it's looking for a file that it can't find called runleft0. It even gives you a line number to look at in Samus ;) On this line you'll see: setImage("runleft0"); Hint: You've forgotten to add something to the end of the file name!
It's in the actor class because it wouldn't make sense to have it in the world class - getX() returns the x position of an actor when it's in the world. If it was implemented for world, how could it behave sensibly? In the above loop you need to use the iterator that you've instantiated to set the location of the ground. So replace your getX() + 40 to i*40 and it should work as you planned.
That's odd - nope you should just need the JDK. Try deleting all the class files in the folder and restart to force a recompile.
I'll give you a clue. Comment out your reset method in Bomb and try compiling ;)
What's wrong with the reset? It seems to work ok for me at a glance.
Well, as said before there's a lot of attacks at the moment and remembering them all is tricky. How about introducing them one by one throughout the different levels, tutorial style to get people into the game and used to them? That's one way of doing it.
Instead of adding more I'd work on simplifying it a bit or at least making the attacks a bit more coherent - there's a lot of them at the moment and as mbread said it can take a while to figure them all out. I'd personally suggest just picking a couple or so of attacks and work on improving them rather than adding lots of different ones.
That's because you're trying to modify the contents of the list: enemies.removeAll(enemies); There you're trying to empty the list you've just formed, which isn't what you want to do (and why you're getting said exception). Instead you want to remove each object from the world: getWorld().removeObject(enemy); You need to be careful about what you're actually removing the object from!
That's the idea ;)