Announcement

Collapse
No announcement yet.

Help creating weapons

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

    Help creating weapons

    So I'm making a game, it's an fps, and I need help with a sniper I'm making. I currently have it able to shoot but you can just click and click and shoot with no delay. Is there a way i can make it so once you shoot you have to wait 1 second play an animation then be able to shoot again? Thank you, Im pretty new to coding so any videos etc would be very helpful.

    #2
    You could make a bool variable CanShoot and set it to true by default, then when you have the event that fires the gun, check if CanShoot is true, and if it is, set it to false, do your fire mechanics, play the animation, use a delay, and at the end of the delay set CanShoot back to true.
    Stylized Low Poly Environment
    Stylized Low Poly Pine Forest
    Stylized Low Poly Buildings
    First Person Horror Template

    Comment


      #3
      Thanks a lot I'll do that

      Comment

      Working...
      X