Mouse over character class

Ive watched the Tutorials on how to make the mouse do something to a static mesh and that all makes sense to me. im wondering how to do something similar but to actors of a class. Like if i have a bunch of AI’s running around and i want to mouse over one of them it doesn’t make sense to set up a mouse over event for every one of them. so im curious if i can base it off of “AICharacter Class” instead of just a single “AICharacter” and if so how i would go about doing it. My first thought is to cast to “AICharacter Class” and then get all actors of class and plug that Array into a ForEachLoop. and then some how set the actor moused over to a variable that changes based on what im hovering over.
No clue where to start this! any help is much appreciated. Let me know if anymore pictures would help.

Hi CodyScrib, I’m not sure that I understood your question. But assuming that you want to get a reference to the AI Character over which your mouse is hovering, you can get that by using ‘Get Hit Result under Cursor by channel’. You can then break the hit result to get the object that the mouse is hovering upon. Just cast the hit actor to your AI Character class and if the cast succeeds, and then you can proceed with the rest of your logic. You could set up this logic in your player character or controller blueprint.

Perfect! Thank you!