Easy Ammo & Reloading System in Unity

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 21

  • @mateoballa149
    @mateoballa149 2 роки тому +10

    Great video!
    Just in case someone finds this useful, the reloadAmount could also be calculated with the "min" function:
    reloadAmount = Mathf.Min(maxClipSize - currentClip, currentAmmo);

  • @i_am_set
    @i_am_set 2 роки тому +3

    Dude. I don’t think you understand how amazing your channel is. The quality to quantity is completely unmatched. You are a unity tutorial power house and I can’t thank you enough for the content you have blessed me with.
    Funnily enough, I don’t even need this specific tutorial for my current project, I don’t even plan to add guns, but I just wanted to say thank you for what you have released and I hope you continue to share your wisdom upon us all :) again, thank you.

  • @robbybobbijoe
    @robbybobbijoe Рік тому +1

    Thanks for the video! I made it so there is no ammo, just the clip in the gun and it reloads automatically at 0 or if the player presses r. Also made it so you can hold down left click to keep shooting at a specified fire rate, works pretty good!

  • @miladyghost
    @miladyghost 2 роки тому +1

    Thank you for all of the amazing tutorials you’ve put out so far! :)

  • @drewlong3201
    @drewlong3201 Рік тому

    Thank you for this tutorial!

  • @NotSoSeriousGaming
    @NotSoSeriousGaming 2 роки тому +1

    Just trying to set up weapons. Made 2 using particle system tried to add a swap weapon into it a broke it all... this was my next step hahaha hopefully I can fix it then im dying to get onto this haha

  • @GBSCronoo
    @GBSCronoo 2 роки тому

    Nice timing, I was just starting to work on weapon ammo pickups xD, you are the BEST!

  • @javiflores5896
    @javiflores5896 2 роки тому

    Im learning c # and i was doing console scripts, I was able to make an ammo pickup function but I was having sooooo much trouble figuring out how to keep the reload function from going negative, this solved my problem! Thanks! I know its basic math but it gets confusing.

  • @frostyflankz120
    @frostyflankz120 2 роки тому

    Just the video I needed! Thank you so much!!

  • @lokosstratos7192
    @lokosstratos7192 2 роки тому +1

    Can you Make one for stats interaction like attack power and defense/dodge crit etc

  • @Crazyfamlam
    @Crazyfamlam 2 роки тому

    You are the best keep it up 👍

  • @T3QN1Q
    @T3QN1Q 2 роки тому

    you make it seem so easy my little breakfast quiche

  • @stuffedmannequin
    @stuffedmannequin 9 місяців тому

    Hi, this tutorial works great. However, how would you be able to retain the values (how much ammo you have, how much is in the gun, etc) between scenes? Everything resets when leaving the intital scene and going to another.

  • @atharwa46
    @atharwa46 5 місяців тому

    Better than brackey's!

  • @random_precision_software
    @random_precision_software 2 роки тому +1

    Any chance you can do a SPIRAL STAIRCASE in 2d.I can only get one way working as the colliders block other way..I've using 2d one way effector.is there an other way?

  • @justusisbestest4122
    @justusisbestest4122 2 роки тому

    youre soooo fucking great dude! so understandable and helpful, greetings from germany!

  • @atharwa46
    @atharwa46 5 місяців тому

    how do I save ammo value on disabling and enabling the weapons? as of now it only resets the value that I set in Start function

  • @Saf.aep01
    @Saf.aep01 2 роки тому +1

    Can this be used in multiple weapons?

  • @Stompin40
    @Stompin40 2 роки тому

    Sick!

  • @Glasraf
    @Glasraf 9 місяців тому

    You can send script