20.02.2012, 00:37
Ill give ya a general rundown but wont code this for ya as i dont have the skillset just yet.
and i think i know what your looking for but not 100%
but if it was me ID start off with an array of the start points something like {id,name,x,y,z}
then I would run a loop and get my distance from each point
after that is some simple math to find the closest point
Id wrap that up in a function and return the ID back so I could mark it in game.
depending on how your gonna use it you may need a timer also.
Like if you want it to update itself.
Goodluck
and i think i know what your looking for but not 100%
but if it was me ID start off with an array of the start points something like {id,name,x,y,z}
then I would run a loop and get my distance from each point
after that is some simple math to find the closest point
Id wrap that up in a function and return the ID back so I could mark it in game.
depending on how your gonna use it you may need a timer also.
Like if you want it to update itself.
Goodluck