How AI can get actor's variables (i.e. health)?

Well, in this case with casting you are checking, if the pawn you see is the bot_1 if it is, its going to fire from the top pin, and return the health value. If its not the bot_1, its going to fire from the cast failed