Increment/Decrement and remove

sorry , I’m beginner in Unreal. I would like to know, how can i stop to decrement a variable when it attains 0 ? And if this variable is equal to 0, how to remove the object ?

I’m sorry , i’m very bad in programming …

If someone help me .

Hello MoustikBleue,

The easiest way would be to set up a branch before the decrement is called to check if the variable is at or below 0. If it is, to destroy the object (I’m assuming that you want to destroy the actor that this variable is inside of), you can call Destroy Actor.

Hope this helps!

Yes ! Thank ! I spent my afternoon on this problem ^^"".