I need fill array in one game location (level) and use it later in Game Instance. It look like Unreal Engine 4 have no ability work with arrays in Game Instance. It keep only one last variable. After added new variable, others set to default. Any variable, not in array, are useable in Instance. Picture of part my blueprint.
You know the index represents the location of which container (array) right?
You should set it to 0 to represent the first container(array) index for the array.
It looks like you might set the index value to something other than 0. We need more info on this.
… Default index value is 0. I do not set value especially… Character take quest from other NPC, and quest name must be placed as next in array. So in other level function can get it from array and make note in Character quest journal. There need array because quest can be not one. With one quest all works great.
May be I try set some value to index… But I print index value after add. After first NPC it print 1, after next NPC 2. So first quest name must be placed in 0 index. But after Character get second quest, array value with 0 index return to default… It must work. Similar problems talked on forum about 10 years. Game Instance return " no value " when instance operate with arrays. It look like Unreal Engine peculiarity.
I found my mistake. There Instance array must be connected to “Set Array Elem”. I connect Third Person Character blueprint array. Even they have identical name, they are not same. Ahah. Now all are work as I want. See new picture.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.