Jump to content

making coord and picking random one


AHSS

Recommended Posts

  • Discord Moderators

You could put the coordinates in a table in a table, for example:

  
local coordsTable = { 
            {0, 0, 3},  
            {1, 1, 3},  
            {2, 2, 3} 
        } 
         
function getRandomCoord ()  
    return unpack (coordsTable[math.random (#coordsTable)]) 
end 

you can then call getRandomCoord for the random xyz coordinate.

Link to comment

i mean making like a pizza mission

when some one enter the marker a new marker appear but i want the new marker to be in a random place i mean random coord

so i wanna make like 3 coords and when the player enters the start mission marker it dissapears and another one appear

the x,y,z of the marker will be a random one of the 3 coords

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...