Top-Down Game Click Damage

I’m trying to create an RPG game and the way the default player controls are set up are perfect. How would I be able to keep that and also be able to attack or do damage to an object when clicking on it (and using other keys)? I’m wanting the controls to be very Diablo-like.

Hey MDeathK,

Did you basically want something to the affect of. Keeping the click to location, and if an object such as a Item Drop or Monster. Navigate to that object and do whatever action?

Peace

Yes, exactly like that.

Okay here is my simple setup. This should help you get in the right direction.

We have to create 2 Actors, a Health Modifying Actor (Health Pot, Floor Mines, etc) and A Monster. The Controller in this example is from the Top Down Blueprint Project.

Health Modifier is simply interacting, it can change health or trigger an event such as Pick Up.

We then declare a tag in the Monster Blueprint to differentiate this Actor from other Players and such. Actions for the monster will be within its own Blueprint.

Player Controller detects Actor is Monster then Attacks.

We bind OnTakeAnyDamage Event to receive Damage from outside sources such as the Monster or the floor mine I created in this example.

Health Modifier from Within Actor Blueprint

A Monster from Within Actor Blueprint

Hey there, I’m looking to do something similar to this. When I try out your solution, I can’t get anything to return. I keep getting the “None Actor from Break Hit Result” error.

Pretty much whatever I click on, even if it has an actor connected to it (in the details), it won’t return and print the string.

Did you add the Tag under Actors? It returns none regardless since there is no check on the hit return but if you don’t have the actor tag it won’t return anything.

Yeah, I added the tag, but still nothing :frowning:

This is actually happening on pretty much everything I create. I make new blueprints based off of actors and nothing is ever returned.

I had problems with posting all the images. You the image “AttackFromMonsterController”, this is what needs to be in the Controller of your Pawn. It will detect any mesh with the tag “Monster” in it.

Super late reply, but thank you! I got it to work now. :slight_smile: