Check who shot a Projectile
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
asked Feb 26 '18 at 10:22 PM in Blueprint Scripting
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 ;)
I have editor closed, but I think this can work https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/GetOwner/ Also you can set tag on projectile and read it. I'm sure few more ways.
answered Feb 26 '18 at 11:02 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here