Hello, I am making a game for the Game On Jam, I chose exploding barrels as the cliche`, I gave them a lives system. I have it Explode and Revive. But, when the Revive script is executed it keeps minusing here is the code
If I print it gives me number in the negatives like -188, and keeps going down
I know that I named the IsExploding Var is named wrong should be ShouldRevive
You can ask for the uasset files
You hooked up you function to the event tick. You are calling this every frame.
You need to limit the execution to once per action. Either add a do once node with a reset factor or move it to an event based action (like on take any damage)
Now, after making it the the part of ActorBeginOverlap, If i hit it the first time it shows 5, which is default amount of lives, then if, I hit it again, it prints multiple lines:
1
2
2
3
3
4, and then hitting it again removes it.
Ok so add a branch with a check for is exploding at the begginning. If false then set is exploding to true then put the rest of your code. (You can remove the later set for is exploding)