Blueprint that randomizes other blueprints ?

I’m new to blueprints, my goal is for players to be able to push a prop in the direction they’re facing, after entering it’s collision box.

Is it possible to only make one blueprint of this that will randomize the prop (and it’s respective collision box) that spawns when I put it in the scene? And so each time the game starts, the props are different?

Also, I’m planning on making this blueprint spawn the random props within a specific zone later.

Thanks!

Hello!
Yes, it is possible. You can create a blueprint that’s called for example, PropSpawner, and has logic like this:

What this does is to pick a random Prop from the PropList, spawn it exactly where the PropSpawner is, and then destroy the PropSpawner.

You’ll also need to create a variable that’s an array of the possible Props that can be spawned. Each Prop would be its own Blueprint.
You can create the variable as a Class Reference Array of Actors, that should allow you to map the Prop blueprints:

image

You can then select all your Props either as the default values of the PropList, or configure them in each instance of the PropSpawner in the level in case you want a different list of Props for each spawner.

If you want to configure a default list of spawners, just select the PropList in the Blueprint editor and configure the default list at the bottom of the Details panel in the right side of the editor