How do I add bullet delay/bullet cooldown?

0 favourites
  • 3 posts
From the Asset Store
Customize the animation of character when item changed
  • Currently in my game, you can click however fast you want, and every time you click, a bullet with spawn. I want it to make the player wait, lets say, half a second to fire another shot.

    I create this and dont know why it is not working.

    The variable BulletDelay is set to 0 by default. When you fire, it is set to 1. This should make it so that the player can not shoot. Then once the BulletDelay is set to one, it adds 1 to DelayAmount. Once DelayAmount is 5 then it sets the BulletDelay back to 0 letting the player fire again.

    This is a very confusing way of doing this, I know. But this is how I did it when working with raw javascript so with construct it seems different.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In what sense is it not working? I guess because you are adding 1 every tick it won't be a noticeable delay, you should add an every X seconds to the add event. Also remember to set delay back to 0.

  • Thank you! Do you know what this is?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)