AHSS Posted April 8, 2011 Posted April 8, 2011 i wanna make a few coordinates and pick random one of it like 3 coordinates for something and it will auto pick one of them thanks
Discord Moderators Zango Posted April 8, 2011 Discord Moderators Posted April 8, 2011 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.
AHSS Posted April 9, 2011 Author Posted April 9, 2011 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
Castillo Posted April 9, 2011 Posted April 9, 2011 So...? he gave you the code to make a random place between your table.
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