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"

Storing Permanent Variables In GameMode For Multiplayer?

Hi guys,

I currently have an item structure array (which includes an item ID) stored in Player Controller which makes up my players inventory, all works fine with it. When I log in I get my array of item IDS from my backend (GameSparks for now) and this is the part I'm struggling with. Currently I have all of my actual item structure variables stored in my GameMode (since this is server only and clients cannot modify the variables).

So when I get my item ID array from my backend, I cast to GameMode through an RPC and have my GameMode return the item structures based on the item ID and then I set my item structure array in my Player Controller to this return value. Is this a valid way to perform this? Or is there a better way to achieve this data storage? It feels weird to create hundreds of variables for each item structure and keep them all in my GameMode class...

I've looked into storing the item structures in Data Tables but from what I can tell it seems like they could be modifiable by a client which would compromise the stats on an item and ruin gameplay. I could use any advice on where to keep a list of never-changing item data that players could retrieve with a list of item IDS (integer array).

Product Version: UE 4.18
Tags:
more ▼

asked Jul 03 '18 at 06:45 PM in Blueprint Scripting

avatar image

TBrooks27
18 3 5 7

(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