# DestructibleComponent::ApplyDamage & ApplyRadiusDamage not exposed to Rocket Users

**URL:** <https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054 "2014-03-11T01:50:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/1 "2014-03-11T01:50:41Z")

</div>

Dear Friends at Epic,

I am spawning an apex destructible BP via code this way:

```
ADestructibleActor* NewDestruct = 
	GetWorld()->SpawnActor(
		SkelHeadDestructBP, 
		VictoryUnit->GetActorLocation() + 256 * VictoryUnit->GetActorRotation().Vector(),
		FRotator::ZeroRotator, 
		SpawnInfo 
);

```

I have tried Various apply damage functions, ApplyRadialDamage and ApplyPointDamage

but I cannot get a spawned apex destructible to be destroyed by C++ code

**The only way I know to destroy an apex from c++, and it is quite the hacky mess, is to do the following:**

-get a ref to an actual ARadialForce that exists in the level

-move this radial force via C++ to location where I spawn the apex

-fire the radial force by using a BlueprintImplementableFunction, because the ARadialForce functions are not exposed to Rocket users

**I also cannot get ApplyRadialForce to work in Blueprints.**

So far the only method that works for me in editor or C++ is an ARadialForce actor that has Destructible Damage specifically set.

**This is very limiting!**

Here are the c++ functions I’ve tried:

```
NewDestruct->TakeDamage(
       300, 
       FDamageEvent(), 
	this, 
	VictoryUnit 
);

TArray IgnoreNone;
UGameplayStatics::ApplyRadialDamage(
	this, //world context
	50, //dmg
	NewDestruct->GetActorLocation(), //origin
	512, //radius
	UDamageType::StaticClass(), 
	IgnoreNone, 
	VictoryUnit, 
	this, 
	false //full damage
);

```

#Custom Damage Type

I tried making a custom damage type and setting the appropriate variables that did not work either

#Any Ideas?

Any way you know I can destroy an apex from C++ without moving around an ARadialForce and using a blueprintimplementable function due to Rocket symbol exposure limitations?

Thanks!

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/2 "2014-03-11T01:50:41Z")

</div>

#The Answer

The only way to apply damage to apex seems to be two functions nestled inside of DestructibleComponent

#Apply Damage and Apply Radius Damage Are Not Exposed to Rocket Users

#These are critical functions, ESSENTIAL

* * *

**Please Expose to Rocket Users**

* * *

```
NewDestruct->DestructibleComponent->ApplyDamage(
	300, 
        FVector::ZeroVector, 
	FVector::ZeroVector, 
	500
);

```

**They cannot be called from C++ !!!**

```
// Take damage
	UFUNCTION(BlueprintCallable, Category=Destruction)
	void ApplyDamage(float DamageAmount, const FVector& HitLocation, const FVector& ImpulseDir, float ImpulseStrength);

	// Take radius damage
	UFUNCTION(BlueprintCallable, Category=Destruction)
	void ApplyRadiusDamage(float BaseDamage, const FVector& HurtOrigin, float DamageRadius, float ImpulseStrength, bool bFullDamage);

```

#Major Functionality Loss of Destructible Meshes If You Cant Destroy Them From C++

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/3 "2014-03-11T01:50:42Z")

</div>

#Working with DestructibleComponents at Runtime

Please expose the DestructibleComponent symbols to rocket users so I have any hope of working with Apex in UE4, currently it is all walled off from me

(I’m very upset about this)

#Thanks!

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/4 "2014-03-11T01:50:42Z")

</div>

The whole of the UDestructibleComponent class should have been exposed as ENGINE\_API in CL 1985070. Hopefully this will fix your problem in future! Sorry for the trouble.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 1:50am UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/5 "2014-03-11T01:50:43Z")

</div>

woohooo thanks !

The whole of the class!

- Starts Salivating \*

!!!

#❤

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 1, 2014, 2:37pm UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/6 "2014-05-01T14:37:34Z")

</div>

UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category=“Game|Damage”, meta=(HidePin=“WorldContextObject”, DefaultToSelf=“WorldContextObject”, AutoCreateRefTerm=“IgnoreActors”))  
static bool ApplyRadialDamage(UObject\* WorldContextObject, float BaseDamage, const FVector& Origin, float DamageRadius, TSubclassOf DamageTypeClass, const TArray\<AActor\*\>& IgnoreActors, AActor\* DamageCauser=NULL, AController\* InstigatedByController=NULL, bool bDoFullDamage=false );

Yep real nice, but we are still apparently missing a way to to Apply RadialImpulse… I attempted this with a blueprint barrel explosion, the function to radialimpulse did nothing… And I have started digigng thru code to see why…

---

<div class="post-metadata">

**Author:** ![SteeleDriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SteeleDriver](https://forums.unrealengine.com/u/SteeleDriver)\
**Post date:** [May 1, 2014, 2:39pm UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/7 "2014-05-01T14:39:45Z")

</div>

DECLARE\_FUNCTION(execAddRadialImpulse)   
{   
P\_GET\_STRUCT(FVector,Origin);   
P\_GET\_PROPERTY(UFloatProperty,Radius);   
P\_GET\_PROPERTY(UFloatProperty,Strength);   
P\_GET\_PROPERTY(UByteProperty,Falloff);   
P\_GET\_UBOOL(bVelChange);   
P\_FINISH;   
this-\>AddRadialImpulse(Origin,Radius,Strength,ERadialImpulseFalloff(Falloff),bVelChange);

Being the Code used in the Blueprint, it should apply this force to the actor next to it that shot it 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [May 1, 2014, 8:41pm UTC](https://forums.unrealengine.com/t/destructiblecomponent-applydamage-applyradiusdamage-not-exposed-to-rocket-users/275054/8 "2014-05-01T20:41:32Z")

</div>

Hi SteeleDriver,

This post is from pre-release, however your contribution is much appreciated. I will lock the comments and close the thread. Thank you!
