Issue: Int + Int = 0 when range starts at 1

Hi All

Set initial Damage

da655c98ee14a2c72a8a650116922c9e5b8f3229.jpeg

Add a little to damage if possible; 1+18 variable

Then a Choose a random number

And yet I can get a ZERO. It show 999 unles damage is done.

Capture.JPG

Any ideas

Is ’ 1 Damage’ ever being init? It’s confusing because you’re showing ’ 2 Damage’ being set, but then never using it. If ’ 1 Damage’ isn’t being set, and is defaulting to zero, then it’ll mess up your random-int-in-range node (mix being 1 and being zero).

Nothing looks worrisome from your screenshots. I would put a breakpoint on the Random Integer in Range node in the last part and see what value is getting fed in from ’ 1 Damage’. Maybe even add some logging (Print String node) that logs the various values being used in the intermediate steps so that you can do a bunch of trials and then analyze the results once you see some cases of 0 damage showing up.