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"

Multiplayer game - client is unable to destroy actor

So my game has a listen server. This can be either client when I run it with 2 players as it is managed by a menu that allows someone to host and someone to join. It has items that are able to be picked up- it works by having a single actor for all items with an index that changes what specific item it is, and if a player picks it up, it stores it on their user interface alt text

(off screen is just a range check between either player and the object itsself- not super relevant as it works for sure on both clients) My problem is that when I start the game, and let someone join the other's game, the host can pick up an item and it adds it to their display port as normal and then the actor is destroyed from both clients as it should be, but if the client (NON HOSTING CLIENT) picks it up, the item widget is added to the inventory display port, but the actor is not destroyed. I did the networking tutorial and therefore I know to select the "replicates" property and have done that, however I am not sure why the client cannot initiate the script with it destroying the actor as the above screenshot is present on the item actor itsself. When the server picks up the item, it is destroyed on both the server and client. When the client picks up the item, it is destroyed on neither but the rest of the code in the first screenshot appears to work (IE it adds the item widget to the inventory box)

alt text

The second screenshot is the add item function. I'm quite new to UE4 (i've literally started learning it maybe a few months ago so maybe it is something obvious that I have missed). I can provide further screenshots if you want to see other related parts of my project.

Product Version: UE 4.17
Tags:
ue4rumpost.png (93.0 kB)
asjdakh.png (69.0 kB)
more ▼

asked Oct 10 '17 at 02:19 PM in Blueprint Scripting

avatar image

VellusVulpes
1 1

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

0 answers: sort voted first
Be the first one to answer this question
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