Posts: 237
Threads: 106
Joined: Aug 2012
Reputation:
0
Hi
Let's say I get the highest ground position from some X and Y position. After that should I unload MapAndreas if I am going to use it afterwards or not?
Posts: 37
Threads: 3
Joined: Jul 2012
Reputation:
0
No, as far as I know you need MapAndreas loaded whenever you plan on using it.
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
No, I wouldnt recommend that. The current mapandreas version reloads the data pretty fast, but its still 0.5-1 seconds to load, and so 1 second to lag the server. So you really wouldnt want to reload that data everytime before using it.
The unload function was rather meant to be used when you wont need mapandreas anymore, to give back the used ram. E.g. when unloading the only filterscript that uses it, or when switching to a gamemode that doesnt need it.
If you just use it rarely (not in OnPlayerUpdate or fast timers) you could use the NOBUFFER mode that doesnt take up any ram. But as you usually want your script to run as fast as possible I would always recommend the normal full buffer mode unless youre really short on ram.