# How can I recreate apply dmg function?

**URL:** <https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884>\
**Category:** Blueprint\
**Tags:** how-to, apply-damage, unreal-engine, Blueprint, question\
**Created:** [June 17, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884 "2017-06-17T15:06:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8499f357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8499f357](https://forums.unrealengine.com/u/anonymous_user_8499f357)\
**Post date:** [June 17, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884/1 "2017-06-17T15:06:36Z")

</div>

I need to recreate apply dmg function because I would like to change the single float dmg input to array dmg input. The problem is, that I dont know how to create a part where you tell the function which actor whould you like to dmg. I would be very thankful if someone could explain that part to me.

---

<div class="post-metadata">

**Author:** ![SertacOgan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sertacogan/32/970490_2.png) [@SertacOgan](https://forums.unrealengine.com/u/SertacOgan)\
**Post date:** [June 17, 2017, 3:08pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884/2 "2017-06-17T15:08:28Z")

</div>

Hello White Fantasy,

Maybe this [link](https://www.youtube.com/watch?v=8RuMckVAA4c) helpful.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8499f357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8499f357](https://forums.unrealengine.com/u/anonymous_user_8499f357)\
**Post date:** [June 17, 2017, 3:12pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884/3 "2017-06-17T15:12:46Z")

</div>

Thx for the answear, but I had already watched that video and it only tells you how to use this function and not how it’s made.

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [June 17, 2017, 3:35pm UTC](https://forums.unrealengine.com/t/how-can-i-recreate-apply-dmg-function/398884/4 "2017-06-17T15:35:25Z")

</div>

make a blueprint interface, call it iMortal, and define some functions for it, like TakeDamage, InstaKill, Heal, Burn, CauseStatusEffect, etc… then make a character or actor that implements that interface, in its class settings. then you can define those interface functions for that actor, allowing them to change their own health or set other variables.

then you can make an actor that causes damage on overlap, getting the OtherActor, and calling one of the iMortal damage functions on it.

> **[Blueprint Interface](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Types/Interface/)**
>
> Blueprints that declare functions to define an interface between Blueprints.

> **[Implementing Blueprint Interfaces](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Types/Interface/UsingInterfaces/)**
>
> Blueprint Interfaces allow Blueprints to call functions in different types of targets, if they also implement the interface.
