Spawn chracter from class on an empty map

Hello world! This is -i hope- an utterly simple question.
I am using blueprints on a project, and i have an empty map in wich i need to spawn characters on depending on some variables.
Since the map itself is empty i cannot use a “get all actors from class”, how can pick a class and spawn an actor of that class usin blueprints?

Thanks in advance to anyone that can help me with this inquiry.

You can spawn actor and set the class. You can use a select node and add more options or and array. Just provide it with a random or calculated index.

or you could promote the class pin to variable and work with the variable. or you could create a variable of type class and make it an array then use the get from array node and have the index set as you like.

Whats great about that method too is that you can make the variable public so if you do have the spawer actor in the level then you can set what it spawns in the details panel on a per instance basis. Makes the script highly reusable too

That’s what I did, works well. Create a variable for the “class” then in an array have a bunch of “classes” you would like to spawn and based on the index of the array you choose will change the output class variable and thus the actor spawned.

Yep, used that for spawner volumes in my levels, and you just throw the spawner in there and select what you want to spawn from the details panel. Super efficient.

Thanks for the replies everyone, there’s lots of nodes on blueprints i still don’t know. I will try out all of these as soon a i have a chance, and when i get to do so i will select the answer. Thanks again!

I tried promting a “actor” pin to variable but it didn’t work out, cold you please give me a “step by step” of this? i might be doing something wrong

Like this, it isn’t the “actor” pin it is the class pin. You right click on it and the option should appear to promote to variable as shown below. The first is the regular node, the second after right clicking on the purple input pin.

Thank you for this, mister, will try

This solution worked effectively fr me, thankyou.

Dunno who you’re talking to but I think I can speak for all of us here…happy to help!