Character Array/Map Selection

Hey there,

I’m trying to set up a player character class setup in my JRPG project. I’m at the moment attempting to setup on who spawns and who doesn’t. I figured that connecting it with a Boolean check would help with keeping the variable from switching out order due to the fact the names must stay in order. Example

Correct orderly way: Unit 1(Check) - Unit 2(Un-check) - Unit 3(Check) - Unit 4(Check) - Unit 5(Check) - Unit 6(Un-check)

Incorrect orderly way: Unit 1(Check) - Unit 3(Check) - Unit 4(Check) - Unit6(Check) - Unit 2(Un-check) - Unit 5(Un-check)

I have a current setup that using “For Each Loop” to show the current player characters but I would like the ones to show up if they are selected which come in the Boolean and maybe with the Branch connected with the Spawn Actor.

][1]

Please, does anyone know a way to make your Array/Map of player characters spawn class from a Boolean check connected to the SpawnActor or so? I just want an idea of how to connect that.

Assuming your array called Party Members is an array of Explore Character classes, define a shouldSpawn? bool or something of the sort in that class. Set it true or false as needed via editor or runtime.

When you drop into that for loop, before you spawn, you can get the instance of your Explore Character class in the array at current index, get the value of the shouldSpawn?, and branch accordingly.

Can somehow show me on that? The Explore Characters are indeed the array.