I am considering using a procedure to return a random emoji character from a text string for a game. While testing the procedure, I thought of this way to simply simulate the value returned by rolling two dice. The Hexadecimal (aka 'hex' aka 'base 16') characters in the text block represent the numbers 2 through 12 where A =10, B = 11, and C = 12 (what you get when your roll two sixes). This is then converted to base 10 (Decimal) by the 'convert number' math block.

Suppose we wanted to know what was on each die face? Then we could modify the text input to range from 1 to 6 and run the procedure twice. We would not need the 'convert number' math block in that case, of course.

END

1 Like