Hello.
I have a side-scroller game and my hero has a melee attack animation. but my problem is that i have to hold the key (in my case "E") to go trough the animation-s.... but i want to press "E" once and the animation to go trough once. is there such a way, because i don't think of any. maybe use pngs instead of gifs but i rather would work with gifs.
if(Greenfoot.isKeyDown("E") && onGround())
{
if(DIRECTION =="LEFT")
{
setImage(RADL.getCurrentImage());
}
else
{
setImage(RADR.getCurrentImage());
}
moving = false;
attacking = true;
}
else
{
attacking = false;
}
