In my game, you can interact (I’m using component overlap to enable input + enhanced input system) with child BPs in the world to collect items, and those items should be added to their parent array, but it isn’t working.
The children “BP_Sigils_Child” (there’s 3 manually placed in the lvl) have a Name variable that’s editable and transfers it to a parent variable, nothing fancy.
However, clicking the child BPs returns their names, but always with zero index. This is me clicking on one BP after the other and getting the same result.
I’ve tried using ADD UNIQUE, doesn’t work. INSERT doesn’t even show any result. I’m not setting the array anywhere else, and it’s empty by default, since the plan is to add items at runtime. Both BPs start with tick enabled.
I don’t know if it’s a bug or just I’m not seeing what’s wrong : /
I was transferring the array to my Game Mode for testing, just to see if my parent BP was the problem. The event below is being called on begin play by a Set Timer by Function Name node.
Try making other variable arrays that adding to the same function and print the index.(some Name, String, Int array for measurement.)
If other array type’s index prints fine(not 0), you may have to clean/rebuild your project(delete Binaries folder to regenerate blueprint codes).
And if other array type’s index is also 0, then I donno
I’ve created another array and deleted the project folders, got the same result. I was testing sending the array content to a Game Mode array, but yeah, nothing changed.
The only thing I fixed was deleting the Do Once node and adding a branch check in the interaction code, and now I can click LMB multiple times and the items stops being added to the array. But the index doesn’t change, it keeps the name at 0.