So I made a blueprint for a locked door requiring a key, and a key itself, both with an array in it so I can drag and drop and just set the key array to match the door. But I want them to spawn on random locations, so its not always the same placement. And idea how I can set them to randomly spawn the keys in with different array numbers?
You want the index of the right key to be the same as the index for the door, right?
You need to use ‘dereference’ arrays.
So you keep the doors and keys arrays the same, in the same order. But for both, you make a second array which just holds the indexes of the main arrays.
These secondary arrays, you CAN shuffle
Does it make sense ( quite hard to explain )?
EDIT: Setup the doors:
Then I can
Then I can spawn ( or whatever ) the doors randomly with: