# GetRandomInt(Min, Max) returns a random integer between Min and Max (inclusive). # AllPlayers.Length gives the total count; subtract 1 for a valid last index. RandomIndex : int = GetRandomInt(0, AllPlayers.Length - 1) if (RandomPlayer := AllPlayers[RandomIndex]): set KillerAgent = option{RandomPlayer}