—
well, random is random so duplicates may happen.
In your case a 1 in 16 chance.
korbaach knows a better way I am sure, (please let us know Korbaach )
but
one way is
I like using sprites as it is more visual for me...
.
be sure to change the count to however many sprite2 you have on your layout
and
remember even in this example above, when the count resets to zero, there is a chance (1 in 16 your game) it may reset to the same sprite.