(Solved) AI Projectile Damage Player?

Hello,

I would like to know how to create a damage system in my projectile that will cast to the Player?

Please send me a link if this question has been answered and resolved.

Thanks,

I do not believe this would work with the Player because I have my AI shooting Projectiles at my character but they do not do damage to him.

However, my character can do damage to the AI.

Two links:

Good luck :stuck_out_tongue:

The thing is that your question is totally generic. You are asking how to develop a feature without providing anything you already work on. Try to locate the real issue which is blocking your at the moment and ask help about it.

In the current state of your question, you won’t get lot of help.

Your blueprint is not readable, however I can see “OnComponentBeginOverlap” so I guess this is your projectile blueprint.
So what is the issue here, does the “OnComponentBeginOverlap” event fire when the AI shoot at the character ?
If not, you have an issue with your character overlap settings
If yes, then your character probably doesn’t implement the interface (I can’t read which one) and is not damaged.

Sorry, here you go

Basically, I can shoot him with my projectiles and he can take damage but when he shoots me, I do not take damage at all.

Thanks, but did you read what I said ? …
So to repeat myself:

  • Check that your “EventActorBeginOverlap” is fired when AI shoots at your character. If not, you character has some wrong overlap settings.
  • if it fires, check that you character does implement the interface “Damageable”

EDIT:

I do not take damage at all.

Do you mean your projectile is destroy when hitting your character but doesn’t do any damage ? Or do the projectile just goes through your character ?

Are you sure your “Damage” variable is correctly set then ?

The Enemy AI Shooter does fire his gun, but I take no damage from it.

I have check my character and it does implement interface “Damageable”

Nothing is basically happening to my character.

Projectile gets destroyed when the it touches my Player Character yes. It does not go through which is fine. It does destroy when it hits yes but I do not loose health from it.

Yes because I had done the same way as my Player Character when he shoots.

Problem Solved

Hello everyone,

I found a way to fix my issue that I had. For those who had went to a similar issue like me, read this on how I done my.

I had follow this video, - YouTube that talk about damaging the Player. This can also applied and work with projectiles using the same style of it as well.

You need to make sure you at least add any collision and play around with the time it takes to damage the player if you are working with Projectiles.

Hope this helps to anyone here.