The best would be to create a Lua script, which is doing the following (pseudo code):   Create a table Insert all 8 characters in the table Do 3 times Select a random entry in the character table Set selected character visible Remove character from table end This could look in Lua like (when zc1...zc8 the ZCharacter objects):   function ActivateCharacters() -- Create table and insert all 8 characters local characters = {zc1, zc2, zc3, zc4, zc5, zc6, zc7, zc8} -- Init random gene