How do I stop the player from spamming dash?

1 favourites
  • 4 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hello!

    So I just bought a subscription to construct after playing around with for a day or so. I wanted to make the player able to dash but only 3 times before needing to recharge them and also to stop them from spamming it too fast.

    It's the last part I have trouble with so far. I've added a picture of how I have it set up in the event sheet.

    Thanks.

  • I fixed this by making the boolean global rather than local. No idea what that means but it seems to have fixed it. I now have another problem because I'm trying to make it so every time the player uses the dash a timer begins before it starts recharging so they cant accidentally dash 3 times if the recharge timer lines up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I fixed this by making the boolean global rather than local. No idea what that means but it seems to have fixed it. I now have another problem because I'm trying to make it so every time the player uses the dash a timer begins before it starts recharging so they cant accidentally dash 3 times if the recharge timer lines up.

    Forgot to attach a picture.

  • I solved it!

    The problem was that every time I used a dash it would set the boolean to false which in turn would trigger the check for if it was false to turn it to true. However because I didn't use "System>Trigger Once" as a condition it would stack on top of each other causing it to remain true even when it was supposed to be false.

    I don't know, but maybe this will be helpful for someone who might have similar problems in the future.

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