Posts: 772
Threads: 223
Joined: Sep 2011
Reputation:
0
Hello,
Does anyone know if there is a IsInRangeofDynamicArea function? I cant seem to find anything..
It would check if a point/person is in range of a dynamic area with a specified range.
Posts: 1,801
Threads: 21
Joined: Mar 2008
Reputation:
0
IsPointInDynamicArea should do what you are looking for. It checks if a point is in a dynamic area. To get the distance you can simply use Streamer_GetFloatData for X, Y and Z coord and calculate the distance to the point using VectorSize or floatsqroot (only needed if the point is actually in the area).
Furthermore, shouldn't the loop start at index 0 and end at loadedStreets - 1 ? Just asking as you directly access the array which doesn't start at index 1, unless you did this intentionally for some reason.
Posts: 772
Threads: 223
Joined: Sep 2011
Reputation:
0
Done that for a reason yeah.
Anyway the point is not in the area, i want to use this for street adresses for houses to see what street is closest. But it doesnt calculate the distance properly.