# how to prevent Function is being called multiple times.

**URL:** <https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014>\
**Category:** Blueprint\
**Tags:** unreal-engine, crash, editor, Widget, Blueprint, CPP, question\
**Created:** [August 19, 2025, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014 "2025-08-19T14:16:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dozzirik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Post date:** [August 19, 2025, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/1 "2025-08-19T14:16:15Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/d/06d7309e7f04a8a389c897424124de4ad70f17c5.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/b/d7b43a2e0786ef42217787ef475a4af50a3c0b5d.png)  
die func works 2 times i want to take 100 point when i kill the enemy but it gives me 200 point. thx for helps.

---

<div class="post-metadata">

**Author:** ![Mad.King](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mad.king/32/761302_2.png) [@Mad.King](https://forums.unrealengine.com/u/Mad.King)\
**Post date:** [August 19, 2025, 4:35pm UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/2 "2025-08-19T16:35:56Z")

</div>

You figure out _why_ it’s being called twice and stop it from happening in the first place. I don’t expect anyone will be able to tell you why it’s happening based on those 2 screenshots alone.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [August 19, 2025, 4:43pm UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/3 "2025-08-19T16:43:01Z")

</div>

you have an IsDead bool, put that before your DieFunc and it can only die once.

assuming the logic is in the right place, ie on the enemy not the character

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [August 19, 2025, 4:46pm UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/4 "2025-08-19T16:46:44Z")

</div>

The set timer by function name has a function called DieGoomba in it. Does that function also add to score?

Either way, I’d suggest changing die into an event and using a DoOnce or logic Gate node in it to control execution. Event graph tends to be a better place for stuff that gets delayed or delegated to a timer.

---

<div class="post-metadata">

**Author:** ![Dozzirik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Post date:** [August 20, 2025, 7:31am UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/5 "2025-08-20T07:31:57Z")

</div>

thank you

---

<div class="post-metadata">

**Author:** ![Dozzirik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Post date:** [August 20, 2025, 7:32am UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/6 "2025-08-20T07:32:26Z")

</div>

thank u

---

<div class="post-metadata">

**Author:** ![Dozzirik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Post date:** [August 20, 2025, 7:36am UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/7 "2025-08-20T07:36:00Z")

</div>

it does not adding score before but i deleted all points and only add points from here. now it adding 100 points. thank you. btw this casting is true? access from enemy to my character. object is get player character.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/c/5ecd0513c423a476796f3ab3e5689405a0669742.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [August 20, 2025, 8:10am UTC](https://forums.unrealengine.com/t/how-to-prevent-function-is-being-called-multiple-times/2647014/8 "2025-08-20T08:10:52Z")

</div>

Use the engines Apply Damage events. Pass your controller as the instigator.

From controller → Get Player State → Add Points.

Damage functions should start with a conditional check.

Is Health and Damage \> 0 → process damage.
