Probleme with Timing the shooting

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I'll try to explain may problem. I want to slow the shooting rate of the player. So I try lot of solutions. Here the last one but it's not working.

    <img src="http://imageshack.com/a/img812/7458/8da0.png" border="0" />

    Can you explain what I did wrong?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem you have is the last event : "player isReloading". Let's see how the computer will work with your script :

    • Ctrl pressed, set isShooting = true.
    • isShooting=true ? then start fire, and set isReloading = true
    • isReloading = true ? then wait 1 second and setReloading to false.

    Last event will be checked every tick, and so, every tick for 1 second, you will start a waiting period of 1 second and then set Reloading to false. This will make the Reloading set to false all ticks for 1 second basicaly.

    What you need to do : add a condition "Once while true" on the last event.

  • Ohh thanks a lot. I understand. I have one more question please. For you what is the best way.

    This one ?

    <img src="http://imageshack.com/a/img823/6083/50qm.png" border="0" />

    or this one

    <img src="http://imageshack.com/a/img37/3588/fvmd.png" border="0" />

  • Both seem ... equal. I wouldn't go with any of those though.

    What I would do :

    <img src="http://i.imgur.com/ISp46A8.jpg" border="0" />

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