Announcement

Collapse
No announcement yet.

Infinite loop only with applied radial damage.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Infinite loop only with applied radial damage.

    I have a problem with an infinite loop detection when appling radial damage to an actor.
    The actor is a second world war halftrack having a collision box working for overlap with pawn...when the pawn overlaps the box it triggers a cycle for firing with the machine gun and to move up and down it. So there is a "on component begin overlap" and then two fuctions...the first is for firing and the second to move the gun working with two timelines. The concept is very simple...and the two fuctions are called only once (using do once before).
    Now if i hit the actor with normal damage (apply damage) everything works well and the actor is destroyed...but if i hit with radial damage it detects infinite loop...not every time but say once on four. No matter what node is involved...is ever the first node of the loop...i tried deleting it (it was a delay to make fire and move the cannon not immediately) but then it detects the second node in infinite loop so it makes no sense.
    For example it happened that has been detected like infinite loop a delay node in a fuction no more called in the bluprint...it was an hold fuction i decided to not call any more and i forgot to erase it...but how can be an infinite loop a node in a fuction with no reference for calling?
    I don't understand why normal damage works and radial cause this infinite loop...how ue4 works with radial damage?

    #2
    I forgot...i read in an old post that someone suggested to use triggered delay instead of delay...it doesn't solve the problem...i tried also this.

    Comment


      #3
      Maybe i solved the problem...i noticed that when the actor is been destroyed it spawns two points instead of one like i programmed in the bluprint (i mean the classic shoot em up points to collect)...so it means that it takes damage two time even after the actor is destroyed. This is why this error happens only with radial damage...for what i understand in ue4 the destroy node doesn't destroy the actor immediately but put it in a garbage collector for stability reasons for some time. I have two kind of weapons that apply radial damage...the first is rocket and the secondo a carpet bombing that releases 6 bombs. With the carpet bombing the bug happens very much because there are at least two radial damage that hit the actor (every bomb has a radial damage)...for the rockets the question is different...it takes 2 rockets to destroy the actor but at the second rocket sometimes the error happen. I checked the assett and i noticed that the meshes were set up with block all collisions...so i thought that the meshes and even the collision box takes the damage. Setting meshes with no collision seems to solve the bug...i forgot to check mesh collisions when i did the bluprint.
      For the carpet bombing bug i found two way to solve it...the first is adding a delay before the destroy node with 0,4 seconds...but it's too long!
      The second way is adding a do once node after the branch that checks if the health is below or equal to zero...so the destroy node after it can work only one time.
      It's the first time i needed to use the do once node in the health system of an actor but the problem is caused by the cannon movement and fire loop....too much complicated i think.
      Anyway i posted two pictures about fire loop and cannon movement loop...maybe you can understand better why it detect infinite looping.

      Comment

      Working...
      X