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"

Networking Event Question

Hello all!

I have a load from save event that executes on server. This loads all the players stats and inventory items. I have an issue where if I run the game with two clients, the load from save will work perfectly for the first player but not any players after that. When the second player "logs in" and loads from their save, the server tries to run the loading of the inventory for the first client that connected. I have to have the events that deal with inventory items run on the server to avoid cheating but in this one case I cannot figure out how to ensure the event sequence makes the loading from save happen ONLY for the client that is logging in.

Right now the user presses "log in" which calls a server event to load a save slot based on their credentials. It is loading the stats, player location, etc correctly but the inventory part (which is in the same event) is not working correctly. For example when the second client logs in from a save they cannot pick anything up because the server thinks the inventory is full even though it is showing up as blank in the UI. If I kill that second client and respawn them with a blank inventory, the server no longer thinks that and allows the player to pick up items.

Please send me some ideas on my work flow.

Product Version: UE 4.21
Tags:
more ▼

asked Feb 08 '19 at 10:22 PM in Blueprint Scripting

avatar image

DK Buzzin
11 3 6

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

1 answer: sort voted first

I swear to god whenever I take the time to write out my issues on here it gives me better ideas of what to look for. I found my issue. On my saving and loading event i was casting to player controller, and using "Get Player Controller- 0" when I should have been using "Get Controller- Self". That made all the difference. Problems solved.

more ▼

answered Feb 08 '19 at 10:34 PM

avatar image

DK Buzzin
11 3 6

(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