Cast to variable actor/class

Basically I have a camera which I want to only be triggered by a specific characters

I have 3 characters, all children one unused parent class, lets call them “Red guy, purple guy and yellow guy”

Whilst it’s not hard to code, so I don’t have to have 3 seperate camera blueprints for each character to specifically trigger, I would like a way to use a variable to sort of quickly change the cameras intended character?

So for example I spawn in the blueprint, go to the right and change it to “red guy” so it is only triggered by red guy

and do the same for yellow and vice versa.

How would I go about this?

My teacher actually showed me how to do something like this but to be frank I kinda forgot.

I hope this makes sense

Add tags to your characters. Upon triggering, check if an actor has a respective tag, and only then perform your functions.

Get Class node will get class (blueprints are classes) of the object, then you can either use Switch or Select to generate diffrent behaviors

Don’t know about you camera set up, but you can also have camera component on those characters that behave different internally and switch view target (in player controller) to selectedcharacter to switch characters cameras, you don’t need to posses character to change view target