How do I Make Shot delay??

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Sorry I'm just a Newbie.. HAHA..

    But ,, how can I add a delay on bullet.?. Like when you pressed SPACE, it will shoot a bullet, and wait one second, until you can shoot again.... That you can't shoot 2 bullets, without waiting a second..

    Sorry for my wrong grammar.. XDDD

    Please explain it step by step.. Thank you

    I'm Planning to make a Platform Game..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a couple of ways, either an instance variable for the amount of frames left until you can shoot, a timer, or an instance variable which sets the time with a later event to check if [time] is greater than the variable + something.

    For example.

    1. I fire, it sets player.firerate to its default, 100.

    2. Every frame, decrease (firerate) by 1.

    3. When you fire, it checks that player.firerate ≦ 0

    Not the best way, but it gets the job done.

    Here's a capx.

    [attachment=0:23548nrc][/attachment:23548nrc]

  • There are a couple of ways, either an instance variable for the amount of frames left until you can shoot, a timer, or an instance variable which sets the time with a later event to check if [time] is greater than the variable + something.

    For example.

    1. I fire, it sets player.firerate to its default, 100.

    2. Every frame, decrease (firerate) by 1.

    3. When you fire, it checks that player.firerate ? 0

    Not the best way, but it gets the job done.

    Here's a capx.

    [attachment=0:2r1ks9kf][/attachment:2r1ks9kf]

    Oh.. THanks .. I'm gonna study this.. Thanks

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