How to set hit result under cursor to character variable

In my player controller, i have a variable ‘SelectedCharacter’ as a character reference variable.
On InputAction LeftMouseButton - Pressed, which is a self-explanatory event, i want to set any character under the cursor as the value for ‘SelectedCharacter’.

I have tried using ‘get hit result under cursor’ both by channel and by object. Both hit result, when broken, yields to ‘hit actor’ that is not a valid reference for characters.

What can I do?

Suggestion to staff: can we please make UE blueprints friendlier for those who want to make RTS or third person multi-character RPGs? All of the blueprint tutorials for RTS-styles out there looks more like a clever workaround to Action/FPS/Single-Character oriented engine, which i’m pretty sure can be made to be less… taxing.

If it matters, me and my friends are just trying to clone The Sims.

Like this?

omg omg omg. I love you.
I’m so stupid. I’ve been working on it for a week, almost 4 hours almost everyday.

what if the actor under the cursor is not a character? what will happen?

It returns reference to actor, and you need to cast it to character class to “convert” that reference to character. Then set it to “selected character”.

“Cast failed” will be fired.
If you need to handle this situation - connect something from it, it not - live it as is.