The fact that you reuploaded a video you had already done because you found an error/better way make you a champ in my heart. So tired of youtube tutorials where they mess something up and then spend 3 videos having to make workarounds/fixes instead of just doing what you did. I have one question for you. Have you given any thought to using Data Assets housed in a Skeletal Mesh Component? I have used your system of a master class housed in an Actor before, and was curious what you think is the most streamlined way to equip & manage a weapon system.
@moosehead13 Hey thanks, that's really kind of you to say. I do try... Ummm I'm not 100% sure what you mean, but I do have this new weapons system video that may be of interest to you: ua-cam.com/video/H_Q57Yso9mM/v-deo.html 🙂
@@PitchforkAcademy Hey thanks for the reply! So rarely do creators actually respond to comments & questions. I checked the video you linked me and I see you are using a skeletal mesh component for your "BP_WeaponMaster" blueprint ,which is reassuring, but I was curious of the value in using Primary Data Assets to store all the properties of a weapon instead of putting them inside the skeletal mesh component blueprint. I am currently deep in AI systems following GameDevRaw's "Making an AI Guard" series (link below) and he went about using a PDA to create essentially a master data asset and then creating basically a child data asset of the PDA for each weapon he uses in the series. Other then having to go into the Project Settings>Asset Manager>"Primary Asset Types to Scan" and adding a new index for the PDA it seems like a much more efficient & streamlined system. I have never been the biggest fan of Data Tables as they seem to have issues when they get too big or when information is changed too often, but Data Assets seem to be a solution that feels a lot more stable. My question is centered around these new, to me, blueprint types and if you had any opinions or experiences using PDAs that could help me decide if they are worth using or if its better to just store all the properties of the weapon within the skeletal mesh component? Thanks again for your time & I look forward to checking out your series when I get into weapon systems! Link to GameDevRaw's video on "Weapons using Data Assets - Making an AI Guard #2 - Multiplayer AI - Unreal Engine 5 tutorial": ua-cam.com/video/xxIY0h670DQ/v-deo.htmlsi=pKKUg3NMT2hznykN Clip explaining Primary Data Assets: ua-cam.com/users/clipUgkxKt_Dd3MGLEGMY11mbd3MPB92S-z1FBJd?si=p7sb2H-2JvCE9sgh
I saw a nifty tutorial a couple years ago where the new weapon that was picked up was shown slung over the player's shoulder rather than just disappear into an inventory, or whatever. With a push of a button, the equipped weapon could be swapped out for the secondary. (Would be nice to have a pistol in a holster on the players belt, and maybe a knife, too!) Enemies don't stop attacking if you run out of ammo. You need a back-up! Don't want to be reduced to hand-to-hand...
I get tons of error logs: Accessed none trying to read class from: 1. Switch on Enum Weapon Class 2. Set current weapn int 3. attach component to componenr Would appreciate your help Mizzo, I followed your tutorial 1:1 and I also followed the physical weapn pickup tutorial. And additionally the weapons I am picking up are not attached to the sockets anymore. They are just not at the socket. Idk where they are
@@PitchforkAcademyThanks for the answer! Much appreciated. Yes, I set the indezies and set them both to none. Even tried to put a default selection of the Pistol in there. Thought this might fix something but it did not. So I changed it back to none. Then I thought I might missed something that you eventually explained in another tutorial. But that cannot be the case since I also watched the other "physics weapon pickup/spawn" tutorial. And that worked back then. So what could be wrong else?
@@aurustarsia5244 I'm really not sure. I follow my own tutorials 1:1 and make sure that everything works as expected, so I don't know what to say other than you must have missed something. Either try some debugging methods or even start over (I did this many, many times when I was starting out).
@@PitchforkAcademy Okay. So, if I follow this tutorial and the one with physics weapon spawn/pickup then it should work? Or is there something you add in another tutorial which is important for it to work?
Thank you for this excellent tutorial. QUESTION:How would you give weapons spell slots that you can drag and drop differnt activatble spells to? I'm prototyping a hack and slash with a two weapon system. Weapons have a basic attack and I want 3 additonal slots for flexible spells like Albion Online.
Did you decouple the Input Action in the character model compared to the previous, one gun version of this code? I set it up this way but I noticed the IA was just not there, and as such, I straight up couldn't pick up anything. Is it in another BP? For context, I came here from How to Create a Weapons System with Simulated Physics, so I haven't been following the FULL tutorial, and I was able to keep up with most of the small changes you made to some of the logic since you went over them (like the new namespaces to reference socket points on the model).
It worked so fine, really! I brought it to work for 3-4 weeks now. But today when I started unreal engine and just pick up the pistol and shoot, it will rotate to it's right. This is not happening with the other weapons. This bug just comes out of nothing.. any idea what the problem is?
@@PitchforkAcademy Yes. All worked fine perfectly. But today, out of literally nothing, the weapon (ONLY THE PISTOL) rotates to the right when I shoot.
@@PitchforkAcademy I cannot imagine this being the error since it always worked fine until now. But I highly appreciate your time and I will have a look on the pistol w animation tomorrow. Thanks
@@PitchforkAcademy Quick update. Since all worked fine until yesterday, I deleted the pistol mesh, bp_pistol and bp_pistol_pickup and I did everything from start again. Creating the mesh, collisions etc. Still, this error occurs that the weapon is getting deformed and rotated to the right when I play the shoot animation. But as soon as I play the reload animation the pistol works fine again. Then, if I shoot, the rotation and displacement happens again. I am so confused since it worked at the beginning and the fact, that it is working for all the other weapons. I have no clue what's happening.
Hi , is there a way to attach the weapon "disappearing" to the belt or in the back? I dont understand where the weapon unequipped goes... it just destroy?
@DefaltThunder I'd recommend my new video instead: ua-cam.com/video/H_Q57Yso9mM/v-deo.html In this one we set them to be invisible, but you could just as easily set them to attach to a holster socket...
! Solved it by changing the Not equals to Equals to.! Im not entire sure where i am going wrong, Everything is working but spawning drop. did it exactly like yours but it always hits the false = SAME WEAPON.. am i missing where we populate the weapon to spawn var on the spawn weapon event? followed the previous tut and it was working fine. change it to the new system and it no longer drops. I added it as an input and it is a class reference to the BP_WeaponMaster. This has got me scratching my head.
for me my index 0 is knife, as the player always has a knife, this setup works but the knife stays attached when swapping other weapons. any ideas? I really appreciate the help. I imagine bc knife its it's own class, what if I make the knife a primary. But also the palyer should never be able to drop knife
I’m going to go back through and try this again. But somewhere I went wrong. When we do our first test and it works for you it don’t for me. Something with my socket or something. And the names are all spelled correctly. My gun spawns in my players legs or a random area. It’s different for both guns (I only have the AR and pistol) And I no longer have up and down movement for my guns just sideways. So looking left and right my guns move where ever they are floating but when I look up and down they just stay stationary
can you please make a video on how to make camera ignore character mesh so that it wont clipped through the character when character is getting too close to the camera
7:55 if you did want to say start with a knife, i tried to set array 0 to my knife bp and it equips to the players index but you must use the input to equip it, it does not spawn in hand on play start.
@@PitchforkAcademy could you help me from what node to what node i need to bring to event begin play? I would think from spawn actor to attach component to component, but idk where to get transform from and If i use get actor transform it stil does not attach to the socket at the start
@6henny443 Sorry mate no, I don't have the time to help everybody in that way. There are countless forums on facebook and reddit for example where anybody can easily find help, or you could join my discord where there are several very generous people who can help. I literally just finished work and it's midnight here, soooo... goodnight! ✌️
Why do I have two meshes on my BP_FirstpersonCharacter? One is named FirstPersonMesh and contains the arms the second one is named just mesh(CharacterMesh0) and doesn't contain anything
Probably because Mesh is inherited from the Character class and because they need to parent the First Person Mesh to the camera they've just added another skeletal mesh component.
I added a drop system to this but it only drops the one specific weapon so what would be wrong in there 😂 i have checked the weapons blueprints multiple times and dont find the answer. The print string what we made there says same weapon when try to drop other weapon. Works good with that one weapon.
As I said at the start of the video, this is built on top of my weapons system with simulated physics. You need to follow that tutorial first: ua-cam.com/video/MYNFf17ujbo/v-deo.html
It looks like this is caused by both weapons being set as primary, do you know how to make it so if you only have a primary in your hand you can pick up another primary
I have the same error. I will try to fix it this evening. If it worked imma post it here as reply then you can try the fix as well. Meanwhile you may re-watch the video as we might really missed out something
many thanks, Mr mizzo, I really appreciate how hard you have been working to upload the best way to do this code, as always you are awesome!!!
I've been looking for this type of system for the longest! Thank you!
The fact that you reuploaded a video you had already done because you found an error/better way make you a champ in my heart. So tired of youtube tutorials where they mess something up and then spend 3 videos having to make workarounds/fixes instead of just doing what you did. I have one question for you. Have you given any thought to using Data Assets housed in a Skeletal Mesh Component? I have used your system of a master class housed in an Actor before, and was curious what you think is the most streamlined way to equip & manage a weapon system.
@moosehead13 Hey thanks, that's really kind of you to say. I do try... Ummm I'm not 100% sure what you mean, but I do have this new weapons system video that may be of interest to you:
ua-cam.com/video/H_Q57Yso9mM/v-deo.html 🙂
@@PitchforkAcademy Hey thanks for the reply! So rarely do creators actually respond to comments & questions. I checked the video you linked me and I see you are using a skeletal mesh component for your "BP_WeaponMaster" blueprint ,which is reassuring, but I was curious of the value in using Primary Data Assets to store all the properties of a weapon instead of putting them inside the skeletal mesh component blueprint. I am currently deep in AI systems following GameDevRaw's "Making an AI Guard" series (link below) and he went about using a PDA to create essentially a master data asset and then creating basically a child data asset of the PDA for each weapon he uses in the series. Other then having to go into the Project Settings>Asset Manager>"Primary Asset Types to Scan" and adding a new index for the PDA it seems like a much more efficient & streamlined system. I have never been the biggest fan of Data Tables as they seem to have issues when they get too big or when information is changed too often, but Data Assets seem to be a solution that feels a lot more stable.
My question is centered around these new, to me, blueprint types and if you had any opinions or experiences using PDAs that could help me decide if they are worth using or if its better to just store all the properties of the weapon within the skeletal mesh component? Thanks again for your time & I look forward to checking out your series when I get into weapon systems!
Link to GameDevRaw's video on "Weapons using Data Assets - Making an AI Guard #2 - Multiplayer AI - Unreal Engine 5 tutorial":
ua-cam.com/video/xxIY0h670DQ/v-deo.htmlsi=pKKUg3NMT2hznykN
Clip explaining Primary Data Assets:
ua-cam.com/users/clipUgkxKt_Dd3MGLEGMY11mbd3MPB92S-z1FBJd?si=p7sb2H-2JvCE9sgh
I saw a nifty tutorial a couple years ago where the new weapon that was picked up was shown slung over the player's shoulder rather than just disappear into an inventory, or whatever. With a push of a button, the equipped weapon could be swapped out for the secondary. (Would be nice to have a pistol in a holster on the players belt, and maybe a knife, too!)
Enemies don't stop attacking if you run out of ammo. You need a back-up! Don't want to be reduced to hand-to-hand...
Actually I set up exactly that in my replicated weapons system tute (just not the animations):
ua-cam.com/video/s6cItbr8zL0/v-deo.html 🙂
@@PitchforkAcademy Nice! I'll have to check that out!
Another awesome tutorial, thanks mate! Learning lots ;)
nice cant wait to implement TY
I get tons of error logs:
Accessed none trying to read class from:
1. Switch on Enum Weapon Class
2. Set current weapn int
3. attach component to componenr
Would appreciate your help Mizzo, I followed your tutorial 1:1 and I also followed the physical weapn pickup tutorial.
And additionally the weapons I am picking up are not attached to the sockets anymore. They are just not at the socket. Idk where they are
It sounds like there's nothing stored in the index of the array you're trying to access. Did you add the two default indeces on the array?
@7:13
@@PitchforkAcademyThanks for the answer! Much appreciated.
Yes, I set the indezies and set them both to none. Even tried to put a default selection of the Pistol in there. Thought this might fix something but it did not. So I changed it back to none.
Then I thought I might missed something that you eventually explained in another tutorial. But that cannot be the case since I also watched the other "physics weapon pickup/spawn" tutorial. And that worked back then.
So what could be wrong else?
@@aurustarsia5244 I'm really not sure. I follow my own tutorials 1:1 and make sure that everything works as expected, so I don't know what to say other than you must have missed something. Either try some debugging methods or even start over (I did this many, many times when I was starting out).
@@PitchforkAcademy Okay. So, if I follow this tutorial and the one with physics weapon spawn/pickup then it should work? Or is there something you add in another tutorial which is important for it to work?
Thank you for this excellent tutorial. QUESTION:How would you give weapons spell slots that you can drag and drop differnt activatble spells to? I'm prototyping a hack and slash with a two weapon system. Weapons have a basic attack and I want 3 additonal slots for flexible spells like Albion Online.
I'd probably just store them inside your weapon BP as class references to your spell class.
@@PitchforkAcademy THank you for your prompt respone I appreciate you taking the time to get back to me
Did you decouple the Input Action in the character model compared to the previous, one gun version of this code? I set it up this way but I noticed the IA was just not there, and as such, I straight up couldn't pick up anything. Is it in another BP? For context, I came here from How to Create a Weapons System with Simulated Physics, so I haven't been following the FULL tutorial, and I was able to keep up with most of the small changes you made to some of the logic since you went over them (like the new namespaces to reference socket points on the model).
No, that's not it. It's in the Pickup Master, the entire reason Spawn Weapon happens is off Event Interact. This is very odd.
...well it might be my attach points, I checked my model in decoupled camera and it was sticking out my torso. But it still wasn't firing...
...it was because I swapped the body and attach point inputs. WHOOPS.
It worked so fine, really!
I brought it to work for 3-4 weeks now. But today when I started unreal engine and just pick up the pistol and shoot, it will rotate to it's right. This is not happening with the other weapons.
This bug just comes out of nothing.. any idea what the problem is?
Have you got military weapons dark AND silver added to your project?
@@PitchforkAcademy Yes. All worked fine perfectly. But today, out of literally nothing, the weapon (ONLY THE PISTOL) rotates to the right when I shoot.
@@aurustarsia5244 It's probably playing the animation for the wrong pistol. Try changing that.
@@PitchforkAcademy I cannot imagine this being the error since it always worked fine until now. But I highly appreciate your time and I will have a look on the pistol w animation tomorrow. Thanks
@@PitchforkAcademy Quick update. Since all worked fine until yesterday, I deleted the pistol mesh, bp_pistol and bp_pistol_pickup and I did everything from start again. Creating the mesh, collisions etc. Still, this error occurs that the weapon is getting deformed and rotated to the right when I play the shoot animation. But as soon as I play the reload animation the pistol works fine again. Then, if I shoot, the rotation and displacement happens again. I am so confused since it worked at the beginning and the fact, that it is working for all the other weapons. I have no clue what's happening.
Hi. Whats the advantage of using a child actor for the equipped item vs directly attaching it to the mesh and socket.
Hi , is there a way to attach the weapon "disappearing" to the belt or in the back? I dont understand where the weapon unequipped goes... it just destroy?
@DefaltThunder I'd recommend my new video instead:
ua-cam.com/video/H_Q57Yso9mM/v-deo.html
In this one we set them to be invisible, but you could just as easily set them to attach to a holster socket...
! Solved it by changing the Not equals to Equals to.!
Im not entire sure where i am going wrong, Everything is working but spawning drop. did it exactly like yours but it always hits the false = SAME WEAPON.. am i missing where we populate the weapon to spawn var on the spawn weapon event? followed the previous tut and it was working fine. change it to the new system and it no longer drops. I added it as an input and it is a class reference to the BP_WeaponMaster. This has got me scratching my head.
NIce tutorial!
Remember to set the value of the "current weapons class ref" array to nothing or else you'll have the items in your inventory
In what scenario?
for me my index 0 is knife, as the player always has a knife, this setup works but the knife stays attached when swapping other weapons. any ideas? I really appreciate the help. I imagine bc knife its it's own class, what if I make the knife a primary. But also the palyer should never be able to drop knife
I’m going to go back through and try this again. But somewhere I went wrong. When we do our first test and it works for you it don’t for me.
Something with my socket or something. And the names are all spelled correctly.
My gun spawns in my players legs or a random area. It’s different for both guns (I only have the AR and pistol)
And I no longer have up and down movement for my guns just sideways. So looking left and right my guns move where ever they are floating but when I look up and down they just stay stationary
Why does the transition from being unarmed to picking up a weapon go straight to aiming? Is there no idle holding weapon animation?
It's the first state in the state machine. If you want to animate things, you have to animate things... 🙂
@@PitchforkAcademy okay, thanks for all tutorial you've made, its help full
can you please make a video on how to make camera ignore character mesh so that it wont clipped through the character when character is getting too close to the camera
go to project settings>search for Near Clip Plane and change value low to something like 1 or .1 then restart project
7:55 if you did want to say start with a knife, i tried to set array 0 to my knife bp and it equips to the players index but you must use the input to equip it, it does not spawn in hand on play start.
Copy the equip logic and slap it on Event Begin Play. 😉
@@PitchforkAcademy could you help me from what node to what node i need to bring to event begin play? I would think from spawn actor to attach component to component, but idk where to get transform from and If i use get actor transform it stil does not attach to the socket at the start
@6henny443 Sorry mate no, I don't have the time to help everybody in that way. There are countless forums on facebook and reddit for example where anybody can easily find help, or you could join my discord where there are several very generous people who can help. I literally just finished work and it's midnight here, soooo... goodnight! ✌️
I made it and it works fine but my weapons are not scaled properly I don’t know why
Why do I have two meshes on my BP_FirstpersonCharacter? One is named FirstPersonMesh and contains the arms the second one is named just mesh(CharacterMesh0) and doesn't contain anything
Probably because Mesh is inherited from the Character class and because they need to parent the First Person Mesh to the camera they've just added another skeletal mesh component.
I added a drop system to this but it only drops the one specific weapon so what would be wrong in there 😂 i have checked the weapons blueprints multiple times and dont find the answer. The print string what we made there says same weapon when try to drop other weapon. Works good with that one weapon.
I'll throw together a drop weapon video after work today (in about 12 hours). ✌️
@@PitchforkAcademy awesome 👍 you are the best
What is the spawn weapon thing at 6:09 on the pickup master bp
andh ho do I get the custom event Spawn weapon
As I said at the start of the video, this is built on top of my weapons system with simulated physics. You need to follow that tutorial first:
ua-cam.com/video/MYNFf17ujbo/v-deo.html
when i pickup a weapon the currently held weapon is put on the ground instead of the players back
Are they both primary or both secondary?
It looks like this is caused by both weapons being set as primary, do you know how to make it so if you only have a primary in your hand you can pick up another primary
@spiritdragon6224 This set up is to carry one primary and one secondary. A set up that allows any weapon in any slot is going to be different.
at the beginning of the tutorial you pickup two primary's, in my version which followed the tutorial you cant do that @@PitchforkAcademy
@spiritdragon6224 No I don't. Look again.
Is this replicated?
No, but I do have a replicated weapons system that is more streamlined than this!
ua-cam.com/video/s6cItbr8zL0/v-deo.html
It just deletes the weapon i pick up and i don't take it.
You must have missed a step or two. I suggest having another go. ✌️
@@PitchforkAcademy i checked id it it's identical to the video
@@PitchforkAcademy nym im dumb it was invisiable
I have the same error. I will try to fix it this evening. If it worked imma post it here as reply then you can try the fix as well. Meanwhile you may re-watch the video as we might really missed out something
@@PitchforkAcademy Not it;s deleting the second weapon I picked up
do u have a discord?
Nope. I don't have the time to create and manage one.