Help me please!

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • So, i`m experimenting with weapons and i want a rifle that has cooldown between shots.

    So, when i shoot for the first time, there is a 1 sec CD, and when 1 sec passes, i can shoot again

    The problem is that after first shot, i can shoot multiple times between the cooldown

    (i tried "trigger once")

  • Don't use "Wait" action for this, give your object the timer behavior instead, on clicked, set to 0 and start timer "Cooldown" for 1 sec, then on timer "Cooldown", set to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, i`m experimenting with weapons and i want a rifle that has cooldown between shots.

    So, when i shoot for the first time, there is a 1 sec CD, and when 1 sec passes, i can shoot again

    The problem is that after first shot, i can shoot multiple times between the cooldown

    (i tried "trigger once")

    For your actions, try moving all actions from the cooldown = 0 event to the Mouse/Sprite event without changing the order. Then, delete the cooldown = 0 event.

    This way, there are no complications or problems with multiple shots! Also, you have one less event.

  • Make sure your rifle object has a boolean instance variable (in the screenshot "canShoot") set to true on start of the project.

    Add the Timer behavior as well.

    Use Mouse Button is down (instead of on clicked)

  • Thanks! I love construct community, cause it always helps!

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