Okay so i have a sprite sheet with over 200 sprites, on that sheet there is a series of sprites to perform a slash animation, the problem is: i do not know how to perform all those animations when a button is pressed such a 'return'.
Here is a segment of my code:
while ( LoopGDK ( ) )
{
if (dbReturnKey())
{
if ((dbSpriteFrame ( hero ) < 22) || (dbSpriteFrame ( hero ) > 26))
dbSetSpriteFrame ( hero, 22 );
for (int i = 22; i < 27; ++i)
{
dbPlaySprite ( hero, 22, 26, 100);
}
}
dbSync ( );
}
In the "for loop" i was attempting to play all my sprites related to my slash animation but it seems like the "for loop" is ignored because once i release the 'return' key the animation stops.
Any help would be appreciated.