Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.18
more ▼

asked Feb 26 '18 at 10:22 PM in Blueprint Scripting

avatar image

17 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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 ;)

more ▼

answered Feb 26 '18 at 11:03 PM

avatar image

650 24 48 145

avatar image MikePonton Feb 27 '18 at 10:31 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Feb 26 '18 at 11:02 PM

avatar image

1.3k 24 27 50

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question