ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Equip and Switch Multiple Weapons in Unity 2D | Weapon System Unity 2D
ฝัง
- เผยแพร่เมื่อ 16 ส.ค. 2024
- Consider donating to help me keep this channel and website alive : paypal.me/supp... 💖
or Support me on Patreon : / the_game_guy 💖
In this video im gonna show you how to equip multiple weapons and switch between them using Q and E keys. We will learn how to make a dynamic weapons system so that we don't have to make any changes for more weapons. You can add as many weapons as you want.
But before you watch this video I recommend you watch my previous video where i show you how to make a 2D gun and shoot bullets with it, with all the gun settings such as fire rate, recoil, bullets speed and stuff.
Check out the video here : • How to make 2D Shootin...
and here are some more tutorials which might be useful :
How to throw knife in UNITY :
• How to throw knife usi...
How to make an AWESOME game Menu :
• How to make an AWESOME...
How to make level saving System :
• How to make a simple L...
Remote Configuration by BRACKEYS :
• CHANGE YOUR GAME ANYWH...
Game difficulty by Brackeys :
• Difficulty in Video Ga...
How to make first person game in UNITY by BRACKEYS :
• MAKING YOUR FIRST FPS ...
Some interesting and fun Unity videos by DANI
I made an evil bot my friend :
• I Accidentally Made an...
I turned TH-cam into giant battle royal game :
• I Turned TH-cam into ...
I made a game in 30 Minutes :
• Making a Game in 30 Mi...
Music: www.bensound.com 🎵
For the *Copy/Paste gang* 😜
Grab the assets from : thegameguy.net/resources.html
cooooooooool
I wish i could find more tutorials like yours. Thank you so much
Here's a tip. You don't need to make a public gameObject for the object the script is attached to. You can simply write gameObject. For example the weaponHolder gameobject didnt need that since the script was already attached to the weaponholder.
Tip: when u have shot sound and fast switch weapon sound will be disabled with weapon so add sound to the player
You should put currentGun =currentWeaponsIndex out of the if statements.. So that it updates it automatically and you dont have to type it in every if statement for weapon change..Same goes to some other lines that you wrote.. You win about 5-6 lines (around 67-92KB)
can you please rewrite the code
I am learning well.
If weapon replacement is implemented in 3D rather than 2D, where and how can I change the code in the video?
Is there any simple way to drop and pickup your weapons aswell? This would REALLY help me please I really need this
anyone know how one would do this but make it so the player can only hold two weapons max and then drop/swap the current weapon for one on the ground with a key press like Call of duty. a reply or a link to a video that would help me do this is appreciated. plz & thx
i love you. that was an amazing tutorial.
hello i'm currently making a stickman game and I want to put the mechanic that when you touch a weapon you pick it up. Can somebody help me
LOVED IT!! can you do weapon pick up and drop too?
Yeah me too
me too couldnt find anything on the internet so I'm making my own now >_
Yeah I feel like if you do this kind of video you should cover it all, weapon firing, hotbar slots, drop and pickup. It would be the best video out there
Thank you)
I tried to apply this and the previous tutorial to my ragdoll stickman, but it doesn't work! Maybe make a weapons tutorial for stickman like Stick Fight the Game?
Great video, overall!
Thank you
Keep up the good work
I need Help my problem is make a 3d game and when i move the cam only the first weapon cam moves when i change to the second the cam is not moved
Great ❤️
Very informative, thanks for the tutorials man!
is there a way to holster the weapons on the player? like a shotgun on your back
you are the best
Hey can you make a drop item and enquip item? Its ok if you can not if can i will wait
Sure why not.
@@TheGameGuy when will you make it
@@TheGameGuy have u done this yet? im looking to use this in a way like COD does where i have two weapon slots but can swap them with ones on the ground and ones dropped by other players/npc
Thx man
In the last video You had Player Shot Script . But now is shootingScript . What you changed?
In codes
I just took out some of the gun settings from the previous script as i lost my project.. rest of the script works in the same way, you can just use the previous script without any changes to the code..
anyway to edit this script for if the player is picking up weapons and starting with none?
trying to figure out how to make the array search in update but I can't get it to work properly
hey, i watched your previous video about how to shoot, but here i saw a lot of gaps in your tutorial. for instance, in the previous video your shooting script, i saw the bullet speed, shoot point, etc. but here it moved in the particular weapon. can you please explain it?
yeah, thats cuz i lost the previous project and made a simpler version of it.. but no worries, itll work in the same way you'll just have more gun settings for your gun if you follow my tutorial..
How you can add Sound shoot ?
Nice vid! But how do I make it so I can switch the weapons with the scroll wheel
did u solve this?
You can use if(Input.GetAxis("Mouse ScrollWheel")) instead of the E key
Deberias hacerlo para los celulares
How Can I use this script with a touch button?
how many game do you make and publish on play store
i have made quite alot of games over the years but only published a couple games on play store.
@@TheGameGuy sorry but i want to ask that can google play ban our developer account if we publish our games which are not interesting and not good . i mean flop games
@@dfcdw5937 NO you can upload by game (Even if it's shit
)
Thanks copy paste gang go brrrrrrrrrr
10min video 4 min ads