Check who shot a Projectile

Hi everyone,

I am currently working on a multiplayer shooter Project and my question is, how I get which player shot a Projectile that killed an enemy?

I hope you can help me out here,

Sincerely,
Mike Ponton

I have editor closed, but I think this can work GetOwner | Unreal Engine Documentation
Also you can set tag on projectile and read it. I’m sure few more ways.

Hi there!

The simpliest ways are the best. If the projectile is spawned from the player character actor right after it’s spawned - set the reference of the character to the freshly spawned projectile. The “reference” to the Actor will be a variable inside the Projectile class.
You can also save the Id of the player, but then you will need to assign unique Ids to each player somehow.

You just have to replicate this Id/Reference.

So yeah, GetOwner is probably a better solution :wink:

Could have taught of that myself, thanks for pointing it out :slight_smile: