Download

Multiplayer + FPS + Blueprint = No Joy? Spawning Actor / Setting Owner Troubles

I’ve got a fairly typical setup for an FPS, I think. I have a player pawn with two meshes - the third person mesh and the first person mesh. (I note that this is also how it’s set up for the both the template and the first person shooter C++ demo.)

The problem I ran into was with spawning weapons. The weapons spawn, but Owner Only Sees and Owner No See don’t have the intended affect. Instead of the owner being my player pawn, the owner is the Actor that that the weapon mesh is a part of.

So, I broke open the C++ FPS Demo to see how they did it, and switched my stuff to do something similar, but through Blueprints instead of C++. I spawn a Knife Actor which has 2 meshes in it - one for third person, one for first person.

Then I “Equip” the weapon, passing those meshes into my Player Pawn, so that the third person Knife can get attached to the third person character mesh, and same with the first person.

However, the owner doesn’t change, so Owner Only Sees and Owner No See do not work. (Owner Only Sees causes the knife to be invisible, Owner No See shows for everyone including the Player that is supposed to be the Owner.)

In C++ “Set Owner” is exposed as a simple function on the Actor (https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/SetOwner/index.html) - unfortunately, it’s not exposed in the Blueprints.

So my question is: Is there some other way of doing this in Blueprints? Because right now, without being able to do this, it seems like multiplayer FPS isn’t really doable in Blueprints. (That is to say, it isn’t doable solely with Blueprints.)

I’d appreciate any help or input, thanks!