Infinite loop detected problem

Hello everyone. I am new here on this forum and I am hoping I can get a response for this because this is quite a roadblock for me and I’m not sure what to do. I am trying to create a “damage test” box so when the player collides with the box, it takes some of their health and armor away from them. I have the widgets set up for them and they display just fine. However, I am having difficulty with the code. I created a “Damage Recieved” function for my character and health/armor float variables as well. But everytime I collide with the box, I am greeted with an Infinite Time Loop detected error and this error is in my function everytime. I don’t understand what is wrong here. (I also included my health and armor values. Could potentially be an issue as well?)



Armor Value
Health Value

Seems like the function Receive Damage is making a recursive call to itself that is causing the infinite loop.

3 Likes

Thanks for responding. Could you potentially show it visually so I can get a better idea on what is wrong? The way that I am thinking about it could be wrong.

Try Apply Damage node instead. Note that it will do nothing if damage is 0.0.

1 Like

Will I need to do this for my box collision and damage recieved function for it to work?

IMO first get to know what UE has to offer with its built in damage system. For example this is the volume that causes damage on overlap:


This is in the character for debug:

For more info: https://www.youtube.com/watch?v=8RuMckVAA4c

1 Like

I finally got it all figured out now. Thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.