Hey Guys,
I
was wondering whether its possible to randomly select a function. I have created 4 functions i want to get randomized.
Thanks for any support!!!
Hey Guys,
I
was wondering whether its possible to randomly select a function. I have created 4 functions i want to get randomized.
Thanks for any support!!!
I found a solution for this problem on my own
niceeee one
Mah just for hte sake of, here my process to select a random “eexc path” but still with some “weight” to it.
I basically hava matrix that goes from 0 to 100 (one could pick any suited range) and put some values between it.
In my example, I have 10 50 80 100
Meaning that the first index represents a 10% chance, then a 40% chance, then 30% and finally 20%.
i generate a number with the range of the matrix, and the number has the “chances” to end womewhere on the matrix. since hte gap on the matrix are more or less high, that give me more or less whance to enf up within than gap.
Next, just loop the matrix and see if the random number is smaller than the one current check on within a loop with break.
if it is, then it fall within that number"s defined gap. we pick the index and attach the switch on INT to decide what to do next.
I htis case, it is to determine what attack the wizzard should go for when it’s action time .
That’s the most uncluttered whay i though of. Hope it helps.