Hello. Thanks for checking out my question. I’m not around my code atm so I’ll keep this question as general as possible.
I’ve been studying the ShooterGame example, and I’ve added my own weapon (ShooterWeapon > MyWeapon_Projectile). This goes onto my own character (ShooterCharacter > MyShooterCharacter). These classes don’t change much from their bases and mainly reuse the base code. One big difference is that MyCharacter begins with an empty inventory, and weapons must be picked up.
The listen server player is able to pickup MyWeapon and use it just fine. The client players are NOT able to pickup the weapons. The weapons are spawned for them, but they are placed off-map at location(0,0,0). So if a client picks up X many weapons, then X many weapon actors are created and placed at location(0,0,0) where they do nothing.
I’ve combed through the forums quite a bit to find out what the issue is and I believe it has to do with replication. Specifically, I don’t believe the weapons are being told “SetOwner” is the client. I’ve also seen that this is something the server needs to remotely tell the client to do in their own function (I think. I’m really not sure about this part). I haven’t changed the “OnEquip”(and it’s helpers) so that’s still all stock code from the example.
TL;DR
So, does anyone have ideas as to why the ShooterGame project doesn’t seem to support client’s picking up new weapons?
Also, how would one correctly implement a client picking up a weapon and having it placed into her inventory (in C++)?