Doongogar Posted November 22, 2021 Share Posted November 22, 2021 olá eu tava querendo saber como eu faço pra fazer uma tabela de coordenadas randomizadas com o math.random Link to comment
Other Languages Moderators Lord Henry Posted November 22, 2021 Other Languages Moderators Share Posted November 22, 2021 local Coords = { -- Deixe isso fora das funções. {123, -321, 12}, -- Coordenada 1 {123, -321, 12}, -- Coordenada 2 {123, -321, 12}, -- Coordenada 3 } -- Quando for usar no script: local x, y, z = unpack (Coords[math.random(#Coords)]) 2 Link to comment
Doongogar Posted November 22, 2021 Author Share Posted November 22, 2021 9 minutes ago, Lord Henry said: local Coords = { -- Deixe isso fora das funções. {123, -321, 12}, -- Coordenada 1 {123, -321, 12}, -- Coordenada 2 {123, -321, 12}, -- Coordenada 3 } -- Quando for usar no script: local x, y, z = unpack (Coords[math.random(#Coords)]) valeu Link to comment
Other Languages Moderators Lord Henry Posted November 23, 2021 Other Languages Moderators Share Posted November 23, 2021 De nada. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now