; CreateUuid Example ; ------------------ ; Requires Extended mode. ; Give three freshly spawned game objects permanent identities. ; CreateUuid uses the OS cryptographic random generator, so ids ; are unique across machines - perfect for save files and networking. player_id$=CreateUuid() monster_id$=CreateUuid() chest_id$=CreateUuid() Print "player_id = "+player_id Print "monster_id = "+monster_id Print "chest_id = "+chest_id Print "" ; Every id is a lowercase RFC version-4 UUID: ; the 15th character is always the version digit '4' Print "Version digit of player_id: '"+Mid(player_id,15,1)+"'" Print "Valid according to UuidValid: "+UuidValid(player_id) Print "" Print "Run the example again - the ids are different every time." Print "" Print "Press any key to close the example" WaitKey End