Yo! I’m wanna to add many weapons to my player. I’m newbie in this world so i did a socket to add only one weapon but i think that it’s a bad mechanic for many weapons. Can somebody share to me any idea? Thx
Hi @Untalmarian, how many weapons are you planning to add?
If you planning to add dual weapons, then a socket may be the best option. There might be some better solution depending on the amount of weapons.
Although this might also depend on the weapon’s use, for example gliding swords may be best to attach them using a socket and then code the functionality for them to detach and fly.
If you were to have more flying swords, many people would just make that into a VFX.
That’s just an example, again all depends on the amount of weapons and the uses for them. If you share your idea with the weapons maybe I might be able to give some insight about it.
Hope this help!
Thank’s to write! I want to add 5 guns. I forgot to say that i’m gonna add guns(pistol, rifle, shotguns,etc).
Hi @Untalmarian, in this case I would still use sockets. For smaller guns like a pistol can be attached to the players waist while the larger guns can be attached on the back.
I’ve seen many shooters that have multiple guns on the players back, and it’s pretty safe to assume they use something like sockets too. The only issue is making an animation that would grab the weapon. There are many animation that grabs the gun on the right shoulder and very few for grabbing weapons from other parts on the body.
This also may depend on the type of game. Action games like Devil May Cry & Metal Gear Rising have guns, but the guns are not attached to the player. If the player were to switch into a gun, the player character will play an animation then the gun will appear out of thin air. And if that’s the case then you wouldn’t need a socket to attach the weapon the the back of the character, you just need one to attach the weapon into the player’s hand.
There are other shooters that also have the weapon appear out of thin air like Fortnite. Other games like Apex Legends attaches the weapon onto the player’s back, but it depends on what you want.
Depending on what you want, it may or may not be harder to implement.
Hope this helps!
It definitely sounds like you might need to gain access to different animations so you can be using the right weapon actions. Also, is it third or first person? It is good to have many animations for the weapons you’ll be using.
You might need to make a weapon actor class and make child classes for guns. Then have the parent weapon class attach to component (the player’s sockets) which the child will inherit from. I can get into more detail if you’d like. I’m fairly new myself, but getting a bit better at understanding weapons.
My current game uses blades, but I think the concept is the same.