# “In-Animation” Property?

I have a little game I am working on, and I ran into a small issue. When i do a weapon swap, an animation plays of the gun coming out of the bottom of the screen, but you can still shoot while you are not supposed to. What a player can do is immediately swap between a sniper and a secondary and the sniper will be able to shoot as fast as a rifle. How can I have a property set to 1 when a certain animation is going on and set to 0 when the certain animation is completed?

It basically works by having your button that triggers the weapon change (in this case we are using X) assign a Boolean property Playing Animation? to be true. When this property is true, it adds to the frame property. This plays the animation. once this is working, it is fairly easy to make it so that it will Not fire when the animation is playing. To do this simply have a property sensor detect when the Boolean Playing Animation? is false. When it is false, you can press Spacebar (or any other key) and it will shoot your projectile.