Apply Radial Damage with Falloff Not Working

Perhaps it is something that I am currently doing wrong, but I am unable to get the falloff to work on apply radial damage with falloff.

I have set my base damage to 50 and my minimum damage to 1. The inner radius is 100, and the outer radius is 500. It always applies 50 damage no matter what my Damage Falloff variable is (the falloff exponent of damage). I tried numbers between 0 and 1. I tried whole numbers as well as very large numbers and negative numbers.

When viewing the documentation, there is no equation to show the falloff of the damage from radial damage, so I am unable to determine what the correct falloff exponent should be for the damage. At this point in time, though, I feel that it is not working at all (the damage doesn’t falloff), and I would be grateful for any assistance someone has to offer.

Thanks,

Walker

2 Likes

I have the same problem with both c++ and blue prints radial damage with falloff. However, for me, this is only a problem when it damages character actors. I have networked destructible walls I was working on as just an actor and the damage seems to apply to them fine. I don’t know if this is a bug or has something to do with damage falloff.

I am trying to make a grenade:
Base damage 100
min damage 10
damage inner radius 120
damage outer radius 500
damage fall off: tried many things and doesn’t do anything.

Yea mine is a character actor too. This is quite depressing.

Hi mavendigital & walk 12288,

I just tested this in 4.7.5 and it is working correctly for me. Which version of the editor are you using?

What results do you get with this setup?

38566-radialfalloff01.jpg

I am using 4.7.5. My character I made is using TakeDamage in C++. My walls are using take any damage in blue prints as just an actor. The character actors take full damage for me while the walls seem to work correctly. This seems off to me.

I will try to use event radial damage and see if that will work. Also, could you explain the damage fall off? I should use a value of 0-1 that will determine the curve of the radius damage? Meaning that a value of 1 is linear damage?

edit: Ignore this edit.

My setup is identical to his. I am running 4.7.5. I am using TakeDamage in C++ as well. Characters take full damage no matter the area that you are within the blast radius.

Are you suggesting that the calculation for the falloff damage is done within the radial damage event vs actually calculating that in the ApplyRadialDamageWithFalloff function? That would make sense as it is always passing the maximum damage instead of lowering it. It doesn’t seem logical to let the TakeDamage function calculate the radial falloff though.

I got it to work in c++ for takedamage. Looked through the api and seen you need to add a super::takedamage to calculate actual damage. This wasn’t mentioned in the damage overview.

Header:

 //Damage taken override.
	virtual float TakeDamage
		(
			float DamageAmount, 
			struct FDamageEvent const& DamageEvent, 
			class AController* EventInstigator, 
			class AActor* DamageCauser
		) override;

cpp:

//Take damage overide function.
float ACH_3PSCharacter::TakeDamage(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, class AActor* DamageCauser)
    {
    	
    	if (Role == ROLE_Authority) //Server calculate Only
    	{
    
    		const float ActualDamage = Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
    		CurHealth -= ActualDamage;
    		
    		if (CurHealth <= 0.f)
    		{
    			if (DebuggerLog) 
    				GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "Dead!");
    			CurHealth = 0.f;
    			isDead = true;
    		}
    	}
    
    	if (isDead)
    		ACH_3PSCharacter::SimulateRagdoll();
    
    	return 0;
    }

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/TakeDamage/index.html

4 Likes

you very much! DamageAmount will always be equal to the BaseDamage, the actual (Felloff) damage value is thus returned by Super::TakeDamage. This is a bit confusing!

Wow you! I never hat this found out! Big Thanks!
And I totally do not understand the sense of this implementation. Can anyone explain, why on radial damage with fall of in “DamageAmount” is every time the base damage and not the “real damage”? This makes totally no sense for me.

I fixed in CPP for my PlayerPawns now. Next I have to check for my AI if it’s the same.
Big Thanks! This is really great help!