I had posted before wondering if it was because it was “server sided only” and was told that’s not the problem, so what I am trying to do is shoot a rocket and have the enemy get a blow back from it and take damage. They have the knockback but not the damage I put a break point on the radial damage event and it didn’t fire. First picture enemies radial damage event, second the radial force component settings.
Have you set your damage-taking actors to “Can Be Damaged”? Every actor has a flag for that.
And do you only have the radial force? Because there’s also a radial damage node. I think you need both.
I’m also not sure I would use a component for a 1-time firing event like that. I would use “AddRadialImpulse” and “ApplyRadialDamage” in combination.
Well if you had looked at the first screen shot its a radial damage event. I did not know about the “CanBeDamaged,” but I just added it to begin play and checked true with them still not taking damage.
Well, believe it or not, I have actually looked at the first picture and what I see is an implementation for a damage event inside your damage-taking actor. What I don’t see is where/if you fire this event.
I have been told that, that event fires when receiving radial damage. I mean I can’t call that event else where, so I don’t understand what the point of this node would been then if it can’t be called and it doesn’t fire when receiving radial damage
So this means, when you explode your rocket, you execute the node called “ApplyRadialDamage”?
Maybe a picture of the graph where the explosion happens would be helpful.
I just saw that node while trying to call this event from another section, so I am correct in this node being pointless?
What do you mean? The “Event RadialDamage” node? If all you do there is to subtract health, you may as well use the “AnyDamage” event. But the problem here seems to be that neither event will get triggered, because no damage gets applied from whatever “explosion-logic” you implemented. That’s why I’m asking, if you are using an apply-damage node there.
no I’m trying to do that now by using the apply radial damage with the hit event when he gets hit by the rocket
It makes more sense to use the node inside the rocket’s OnHit event.
Well here it is, but I don’t understand how to set the enemies health from it, since it doesn’t have an output of damage how am I suppose to set the enemies health afterwords from the hit? And I was just testing it, it was firing tried removing the array of ignored damage and now I can’t get it to fire again
ok nvm I think it was destroying the bullet before this fire, but same thing how am I suppose to effect my enemy health?
You don’t set the enemies’ health from it. By calling ApplyRadialDamage you define the amount of damage that actors take inside a radius. This triggers the “TakeDamage” events for every actor that’s affected. And that’s where you can deal with the effects and subtract health, like you did in the first picture.
edit: I see you are casting there, which probably means you are doing it inside the character’s (or whoever is taking damage) OnHit-function. You should do it from the rocket instead, because it is the one that causes the damage.
And your enemies still have the “Event RadialDamage” where health is being reduced and are set to “Can Be Damaged”?
Here is what I would try:
- print out on-screen messages from your events, so you know if they are being called at all (or use break-points)
- also print out or “watch” interesting values like the returned bool from ApplyRadialDamage and the damage amount inside the “TakeDamage” event
- see what happens when you increase the damage radius, it looks very small
- connect the rocket to “Damage Causer”, maybe it makes a difference (doubt it though…)
- check your collision settings for all involved shapes with respect to the “damage prevention channel”
edit: I also believe the damage’s outer radius should never be smaller than the inner radius
I put a print string at the end of my radial damage and printed the string of the damage it caused, there is no fall off and no difference, but enemies are getting hit for 100 dmg which doesn’t make any sense. Because their heath is not dropping
Can you show me the part where the string is being put together?
so I turned it up to 150, they are taking damage. Enemies health is 100 but for some reason 100 isn’t enough to kill them, but the radius of the knock back is way bigger than the radius of the damage they receive and has no form of fall off damage
Another note I even increased the radius of the radial force it increased their knockback range but not damage range.
I would print out the health value along with the damage, because I don’t see why it shouldn’t decrease. I think it’s more likely that your “kill-event” doesn’t trigger or your health gets reset somewhere else. But I can just guess from here.
Then I would get rid of the component you use for the radial impulse and add a node “AddRadialImpulse” to the OnHit-event of the rocket, because you only need it once on explosion and you can easily set the same parameters (like radius) for damage and impulse nodes.
Have you made the outer radius larger than the inner radius? I would do that, because you don’t know what the engine does with these values internally when they don’t “fit” together.
In the radial force component there is no choice of inner and outer radius, just the radius which I set to 1k pretty is a pretty big circle
And you said to get rid of the fire impulse and use a add radial impulse instead?
I tried doing the damage before the impulse incase they were blasted out of range before damage which I didn’t expect, and that still had the same result.
the enemies health are being subtracted right when getting hit for 150 they have -50