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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Replication and TArray with static size.

Hey i have replicated dynamic arrays in the past with no problem. The only "issue" i found is that in order to have it replicate a array with structs. And you change a variable in that struct it will not neceserely replicate so workaround was a interger that always gets changed if some member is changed. (No item was added or removed just changed values.)

But now i am in need of a more static array but the integer dont seem to do the trick anymore. Am assuming this is becuse size is stile the same.

Is there any way to set the sensetivaty of array replication on certen members? I want this to replicate any changes how ever small.

Thanks for any advice. WCode

Product Version: Not Selected
Tags:
more ▼

asked Jan 07 '15 at 12:53 PM in C++ Programming

avatar image

WCode
508 43 44 73

avatar image WCode Jan 12 '15 at 07:17 AM

Bumping this thread since i can`t find any documentation on this. Cheers.

avatar image Raikoh Jan 14 '15 at 07:55 PM

Hello, im having the same issue, i would love some advice too. Thx

avatar image WCode Jan 15 '15 at 07:36 AM

Yes stile looking for a way to do this my self. Am sure there are some tid bit of information out there that explains it. Just need to find it. :p

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

1 answer: sort voted first

Hey, i found what was my issue, maybe it is the same as you : "Clients should not add or remove elements on replicated arrays." https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Replication/Implementation/DynamicArrays/index.html

more ▼

answered Jan 15 '15 at 10:15 AM

avatar image

Raikoh
346 13 12 30

avatar image WCode Jan 15 '15 at 12:16 PM

Hei i am aware of that thanks :)

Did you get it replicating?

A static array that never changes the amount of elements in the array?

Array.Num() == AlwaysTheSame and only element itself is changed?

avatar image Raikoh Jan 15 '15 at 12:53 PM

Yeah i got it working, i have an array of a struct, at begin play i add to the array and never touch it again, i simply get/set the variables i need and it replicates just fine. Everything is handled on the server.

avatar image WCode Jan 15 '15 at 03:28 PM

Ok great to have that confirmed. When you say add at Begin Play do you mean that its uninitelized and at launche, you add a static amount of elements you want?

Or is it the static amount of elements set in the constructor?

e.g: YourArray.SetNum(int32 ); or YourArray.SetUninitelized(int32 ); ?

Thanks for the continues help. Much aprichiated.

avatar image Raikoh Jan 15 '15 at 04:01 PM

Im doing it in blueprint.

avatar image WCode Jan 15 '15 at 06:31 PM

Ok, but what is the element count before your game starts?

avatar image Raikoh Jan 15 '15 at 07:27 PM

I just tried with both ways : with empty array before game start then adding to it and with populating the array with default values in the editor so the array elements are added before the game start. Both ways work for me.

avatar image WCode Jan 15 '15 at 08:59 PM

Ok thank you so much Raikoh i must have some other problem then. Aprichiate all the help.

Cheers!

avatar image Raikoh Jan 15 '15 at 10:35 PM

You're welcome, good luck.

(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