Respawn at nearest Hospital script not working correctly
#3

Instead of a check against 1000 units of distance, why don't you search for the closest hospital within THEMSELVES? Use sorting techniques or make your own, it's not difficult!

1) Get distance of each hospital from player
2) In a loop, get the smallest distance at index 0 by sorting (or simply temp vars)
3) Spawn at gArray[ 0 ][ 0 ]....
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)