How to spawn a projectile at the end of a gun for multiplayer

I’ve been talking to some people in the unreal engine irc’s and i cannot work out how to get projectile spawning to work for multiplayer, i’m not really sure how to even start spawning a projectile out the end of a gun, especially not working with multiplayer.

Could someone please show me a simple blueprint for projectile spawning at the end of a gun, and it working for multiplayer? (replication and such) I’m also not sure how to handle a simple damage system for other players when a projectile would hit.

Thanks alot!

Basically, you need to set Socket locations at the end your mesh where you want the projectiles to spawn. Thats your first step.

It would be good for you to look into First Person Template to really get a feel on how spawning projectiles work. For multiplayer, you will need to have a RPC to the server to initiate the spawn. Then make sure the projectile itself is replicated in its detail panels.

Thats one generic way of doing it. However, Its best to really understand this fundamental process by tearing apart a project template. Good luck!

The best solution as Devero suggested is to use the First Person Template. Take that Template and make it Network Enabled … I have done it a few times and it isn’t actually too difficult to do.

The first person template doesn’t have a gun anymore, i don’t know why.

Luckily for you Billy Brammer made an awesome set of vids for Networking that just happen to contain getting the server to spawn projectiles for you :slight_smile:

As Devero mentioned you need to spawn it from a socket location at the end of your gun, so remember to get that socket location and rotation instead of self Forward Vector and Location .
GL , rOb :slight_smile: