Announcement

Collapse
No announcement yet.

Making the first shot instantaneous

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Making the first shot instantaneous

    I was following a tutorial on youtube and it said to make a timer to set the delay between shots to create the RPM of a gun. I found that to get the delay you need to divide 60 by the rpm wanted but the first shot is not instant. I found this when making a slow firing weapon. The weapon had almost like a windup before it shot, is there any way to fix this?
    https://www.youtube.com/watch?v=9PNcnF-2f0g
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	178.0 KB
ID:	1148903

    Thanks for any responses in advanced!

    #2
    I had a similar problem when I had a mining mechanic in my block game, it would have a delay before the first hit. Here was my solution:

    Click image for larger version

Name:	a.png
Views:	1
Size:	287.5 KB
ID:	1075349

    This method will also not let people with rapid-fire mouse/controller mods work, or at least it shouldn't. If you want them to be able to shoot faster than the RPM (as fast as they can click), then set the 'mineDelay' to 0 upon mouse release.

    You could use delay like I do in my situation as well if you'd like, I'm not sure how timers work, or what the timers execute when done, but my method would have the same effect as yours. Instant first click/shoot, and delay for the rest.
    Last edited by Jamendxman3; 04-28-2015, 10:36 PM.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    Comment


      #3
      Thanks so much, I added a quick if statement to check the weapons so I can add different rpm for each!

      Again thanks for you response

      Comment


        #4
        You can just use a Branch with a Boolean, call the boolean "Can Fire" make the default True. When you fire, have the branch check to see if Can Fire is true. If true Set Can Fire to false, perform firing logic, delay, set can fire true. This prevents turbo click firing and allows you to use a delay/timer as the firerate
        Last edited by DEDRICK; 04-29-2015, 05:46 PM.

        Comment


          #5
          Originally posted by BadgeSWS View Post
          Thanks so much, I added a quick if statement to check the weapons so I can add different rpm for each!

          Again thanks for you response
          Glad I could help, turns out i'm not the only one who runs into my problems making my game.

          Originally posted by DEDRICK View Post
          You can just use a Branch with a Boolean, call the boolean "Can Fire" make the default True. When you fire, have the branch check to see if Can Fire is true. If true Set Can Fire to false, perform firing logic, delay, set can fire true. This prevents turbo click firing and allows you to use a delay/timer as the firerate
          Well, only difference between mine & your solutions is that mine uses a float, yours uses a delay.
          Marketplace Assets

          Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
          Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
          Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

          Comment

          Working...
          X