Jump to content

Search the Community

Showing results for tags 'size'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sou

Found 1 result

  1. function create_random_area(sizex, sizey, typecenter) local area = {} for y = 1, sizey do tab = {} for x = 1, sizex do table.insert(tab, ((sizey - 1) / 2) + 1 == y and ((sizex - 1) / 2) + 1 == x and typecenter or math.random(0, 1) ) end table.insert(area, tab) end return area end cria uma area randomizada, para ele criar o centro vc precisa usar numeros impares no tamanho do x e y, pois não tem como achar o centro de uma area 2, 2 por exemplo . create_random_area(3, 5, 2) resultado: {0, 1, 1} {0, 1, 1} {0, 2, 1} {1, 1, 0} {0, 1, 0} até.
×
×
  • Create New...