Tuesday, February 24, 2009

Making Main Character's Eye Twitch

Hey, all! As this seems to be the first posting on our blog, I would like to say a few things about the sort of game this blog is for. Our developer has told us that it's going to be a third person shooter game, and that we're going to use Greenfoot to build it. A little stick figure guy will run around shooting monsters. Mr. Developer will be able to tell you more when he posts.
On to the subject of this post. So, I had the idea of creating an animated .gif file of the guy with his eye twitching slowly, another one with his eye twitching faster, and so on. Then, have a bit of program that will look at the number of monsters killed, (probably stored in a variable named, 'monkill') find out if the variable equals a certain number, then change the .giff file to the faster twitching animation. So the code will probably look something like this:
public wordIcan'tremember{
if {
monkill = 5;
}
then{
setImage("twitchFaster.gif");
}