GameMaker Bow and Arrow Help

S

Shrekster

Guest
I basically want my bow to play an animation, and when the animation is done, I want it to fire a projectile (an arrow). However, I can't get the animation to play solely when I press the left mouse button, and stop and fire the projectile.

Here is my current code:

shootingdelay = shootingdelay - 1;
if (mouse_check_button (mb_left)) and (shootingdelay < 0)
{
if image_number = 1
{
shootingdelay = 15;
with instance_create_layer (x, y, "Arrows", obj_arrow)
{
speed = 30;
direction = other.image_angle;
image_angle = direction
}
}
}
Any help would be much appreciated!
 
Top