AHSS Posted April 8, 2011 Share 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 Link to comment
Chlorek Posted April 8, 2011 Share Posted April 8, 2011 Ehm... I really don't understand you -,- Link to comment
Discord Moderators Zango Posted April 8, 2011 Discord Moderators Share 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. Link to comment
AHSS Posted April 9, 2011 Author Share 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 Link to comment
Castillo Posted April 9, 2011 Share Posted April 9, 2011 So...? he gave you the code to make a random place between your table. 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