Fastest way to check proximity?
#1

My gamemode features lots of radioactive areas, sometimes very small ones.

I don't think 100-150 areas with radiation is an exaggeration - so how can I check the players proximity to all of these points the fastest?

I mean, one timer that has to check for this many points and add a certain amount of radiation every second, that'll be lagging, won't it?

Any help on this would be appreciated. Also any faster alternatives than IsPlayerInRangeOfPoint would be nice.
Reply
#2

You could subdivide your map into smaller areas, then only check for proximity to zones in the area the player is in.
If you can use rectangular zones instead of circular (isplayerinrangeofpoint) it will also be faster, because checking for them is simpler.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)