min max damage in formulas?

Vagabond Animator 5 months ago in Stats updated 5 months ago 2

I'm confused on how to use the random value of the formula.

I'm trying to have a min damage and a max damage formula and then a random value between the two to get the final damage.

But it's not working, or at least I'm not sure where to get the min,max numbers from.

Any tips would help....or are formulas not the way to go.

I'm not a coder...just a vagabond animator.

Unity version:
Game Creator version:
Satisfaction mark by Vagabond Animator 5 months ago

Hi Vagabond Animator :-)

Yeah, I think using a Formula is the way to go here. However, I believe you're mistaking min/max symbols for random values. The min symbol, returns the smallest value between two. For example, the Formula:

min[5, 10]

Results in 5. Because 5 < 10. If you want to have the character deal damage between the strength of the character and the strength + 10 points you would have:

minimum damage = stat[strength]

maximum damage = stat[strength] + 10

Now, you need to pick a random value between the two using the rand symbol. The first parameter is the low boundary and the second the upper boundary:

rand[stat[strength], stat[strength] + 10]

Hope this helps!


It does thank you!!!