ok well it's not really a keyword, but i need help putting the algorithm together.
basically in my head the code should go like this:
else if (!facing_left)
{
//change the animation from standing to shooting
sprite_index = PMbackLBlast;
//speed at which animation should cycle; < 1 means slower cycle
image_speed = 0.75;
//image_index holds the animation cell index of the current one shown
when (image_index == 11)
{
PMBB = instance_create(x-5, y-32, PMBackBullet);
PMBB.sprite_index = PMBackRBullet;
PMBB.direction = 0;
}
}
//keeps gun from firing before it's time
backBlastReady = false;
//sets timer for variable above to be true.
//in this case every 20 frames or 3 bullets a second.
alarm[1] = 20;
} //ending outer if block
any ideas?
edit: i solved the problem. i had to make it so it got a range of indexes namely:
if (image_index >= 11 && image_index <= 21) ...
those are the cells of the animation that show the arm raised. but any suggestions to prove on this is more than welcomed. cuz i'm pretty sure this isn't the best way.
edit2: added shooting animation code for PharaohMan.
edit3: thread formerly: "coming up with an equivalent to the when keyword"
[Edited by - Alpha_ProgDes on May 7, 2006 2:11:21 PM]