Hey people of the forum i am new to ue4 and i wanted my caracter to start without weapon and later in the game he will be able to shoot, he will start with bare hands and later he will be able to get a gun what he can find, how do i do this? please help thx.
- Place the weapon mesh in your scene.
- Create a collision event so that when your player hits it the mesh disappears and respawns in the players hands (happens in like a billionth of a second).
- Make sure your character can use it (see the FPS or TPS Blueprint templates for this)
can you explain 2-3 becouse i am new to ue4?
Create a sock in the skeleton at the hand you want to attach to.
On event overlap cast to the weapon. attach to actor.
OR
on overlap, destroy actor(weapon), the spawn a new one and attach to actor.
(You’ll probably run into an issue of constant overlap if the overlap is in the weapon BP because when you pick up the gun you’ll constantly be overlapping it)
SO you’ll have to have a variable if the character is armed. what he is currently armed with(cast to the weapon, promote to variable.
when you shoot, take that variable of the casted weapon and have a function in the that fires. You might need one that also makes it stop firing)
This is must custom function for firing a single bullet(actually a ray).
Good luck
Hey, are the attached files only available for the thread starter? I’m working on something similar and would like to view what you’ve shared but I can’t seem to maximize the attached files…
Try right clicking them and choose “Show Image” (works using firefox).
I highly suggest that you play around with UE4 for a couple of weeks, many people would consider this advanced, and you will learn a lot just by playing around and experimenting.