Problem with casting different animations based on different actors

Hi, currently my friend is working on a top down game with survival aspects. As in the game he wants player character to be able to do different things based on different actors player has clicked on. For example, if the player clicks on a enemy, pawn will attack. If he clicks on a tree, pawn will do a cutting down animation and cut the tree down, or if he clicks on a ore then pawn will do a mining animation and mine the ore. The problem is, we are trying to do this on the an actor rather than the player itself. Like if the player clicks on an ore actor, then ore actor will cast the rest of the stuff to player pawn. But even.when we simply delete the code and just see if the input is working or not, we dont get any kind of feedback from print string. How can we solve this?

You have to enable the blueprint for input:

The standard way to do what you’re talking about there, is a line trace from the player ( so they can click on things ), followed by a message over a blueprint interface to the actor just seen ( clicked ).

Here’s something about interfaces:

Try putting the print string in front of the branching condition. My guess is the branching condition isnt being met therefore the code isnt executing past the branch.

Ok I see what you did. You have the Left Mouse Input in the Ore actor. In order for the Ore actor to receive the input you have to “enable input” in the Ore actor’s blueprint. See my attachment. Ultimately I don’t think your set up will work because the Ore actor’s “enable input” will override other inputs your trying to do. You may need your ore, trees, and enemies to all be children of the same actor parent.

We tried that but it doesnt print anything

We’ll try that, thanks!