x

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"

Who should own the non player controlled replicated object?

Dumb question I know.

So imagine your player has a gun and the player character is the owner of the gun so it replicates and makes RPC call via that player.

Now player leaves server and drops the gun that others can pickup, but for clients that join after this its problematic as there is no owning connection through which Replication can be done. This is because when the player left the server the connection no longer exists.

So what should be done here?

Product Version: UE 4.14
Tags:
more ▼

asked Dec 24 '16 at 05:50 PM in C++ Programming

avatar image

Commander Shepard
817 62 83 220

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

1 answer: sort voted first

Nobody would own it. It would be the same as any other actors that are replicated but now owned by players like a box of ammo for example. I think that the issue here is that the gun that you are leaving on the ground was previously owned by a player, if you want to avoid cleaning up this object you could just spawn a new gun that imitates the old gun (copy the values of ammo, damage, location, rotation, etc.), so to the player it looks like it's the same gun but in reality is a completely different object that when you pick it up it gets destroyed but it gives the player the appropriate weapon.

more ▼

answered Dec 24 '16 at 11:36 PM

avatar image

Rekenq
722 19 6 26

avatar image Commander Shepard Dec 25 '16 at 02:25 PM

Well your answer is on point, but I just realised that the question is invalid in the sense it does not need to be owned by anyone . Thanks for additional clarifications though.

(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