It may be obvious but I just don’t understand on HOW the number is going down? If it’s doing addition shouldn’t it go up?
local dmgamount = math.random(3, 9)
local satad = dmgamount / 20
local ogsat = 0
local sat = ogsat + satad
ogsat = sat
It may be obvious but I just don’t understand on HOW the number is going down? If it’s doing addition shouldn’t it go up?
local dmgamount = math.random(3, 9)
local satad = dmgamount / 20
local ogsat = 0
local sat = ogsat + satad
ogsat = sat
You’re taking 1/20th of the dmgamount
and adding zero to that result won’t change the result, as that’s how addition works.
ah never mind it was doing this because I was reinstating the original amount
yeah but the divided damage amount would replace it and be added the next time they were damaged.
ogsat is always zero ebcause you always reset it. You don’t have the new value
yeah ik I figured it out, thank you though
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.