Variables in structure are getting randomly changed when retrieved randomly from an Array

Hello all, weird issue here that I’ve been trying to figure out for the past couple days.

I have an array of structures (Four in total), each structure has three variables: Behavior Tree, Enum, Integer. The Behavior Tree and Enum SHOULD be the same (i.e BehaviorTree = BT_MeleeWeak, Enum = Meleeweak) but it SEEMS like the BehaviorTree or Enum gets edited or changed after retrieving it using a ‘Random Array Item’ node.

Looping through the array and checking every item, it all looks like fine, but as soon as I try to retrieve a Random Item from said array… one of the two variables change. I’ve tried to isolate it outside of the Loop, it still happens.

Array Creation: SetArray posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Accessing the random array item: SpawnEnemy posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Calling the function that calls the random array item: SpawnLoop posted by anonymous | blueprintUE | PasteBin For Unreal Engine

I can upload the full project if necessary :slight_smile:

Cheers!

1 Like

I’ve worked around it by setting the Random Item from the Array as its own variable and THEN breaking it and getting the info I need/ Seems like a weird issue, however