Damage system isn't working
This time I've got a far more precise issue, I'm trying to get this damage system to work however when I implement it the cycle in the script with the bullet goes through properly and the bullet is removed just fine, however the health script isn't working properly, despite having the health set to 3 and the damage set to 1, the loop always goes around and thinks that 3 damage was delievered giving the "You're dead" debug.log, any help on fixing this issue?
7 Replies
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/From a debugging perspective, how many times do you see your "this is also hitting you" and "you're hit" messages for each interaction?
I'm not a unity expert, my thought is that it's a result of the collision being registered on multiple frames before being destroyed.
I only see each one time before they disappear and get replaced by the next bullet hitting the player
So it'll be
bullet hits
"You're hit"
"You're dead"
"This is also hitting you"
next bullet hits
"You're hit"
"You're dead"
"This is also hitting you"
so on and so forth
are you willing to get on call so that we can collaborate and remove this blocker of yours?
Sure, won't have a whole lot of time cause I gotta go to work in 20 minutes, but it could help
vc-0 than