Initialze actors after spawn thru class variable


I’ve created a ‘spawner’, which is supposed to pawn different actors (enemies) for the player. I just figured out how to let that one spawner spawn multiple classes by using an enum, but now I’m facing the following problem:

When I had the spawner set up to spawn only one class (for testing purposes), I could take the return value and the variables exposed on spawn and initialize them right away. But now that I’ve promoted the class input to a variable, I can no longer set these variables.

Any suggestion how this can be achieved?

Initially when reading the question I was gonna give you loads of work arounds but after rereading I realise your issue is due to changing the class to something like AActor variable you have lost access to the unique properties of your actor class.

To regain the properties of the variable you need to cast your variable into the type you want for example. You can do it before you pass into the spawn node or when you exit the node like in the images: