![]() |
obj.scriptdone();
It tells the server that the object is not needed on serverside (Static Objects) and still display it clientside.
Pretty simple, but comes in handy for repeated NPCs. (Era Trees or Shrubs etc) |
Oh cool, what's the difference between that and letting the script finish itself?
|
It's not storing it on the serverside once it's finished haha.
(On each update etc) |
Yes, this is used on GK for our trees. :)
|
Could there perhaps be a server option to do this by default where any level NPC has no serverside script or set variables?
|
Quote:
|
Quote:
Would also be nice if Stefan would publish these efficiency related updates when they become available rather than having to wait on enlightenment from somebody he has told individually, appreciate it though. |
This was already in the server for 5-6 or more years :D The only problem is that it's only detecting if (created) {} scripts by default, while npcs with function onCreated() are not 'optimized away' right now. So you have to call this.scriptdone(); yourself on those objects.
The big advantage is that those npcs don't appear in level.npcs[] anymore, which speeds up findareanpcs() or scanning levels.npcs[]. |
| All times are GMT +2. The time now is 07:04 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.