![]() |
Order of operation of npc loading
Ok here is something odd i just found
Ok here is the first instance of the problem im having. When you enter a level normaly the npcs in your inventory do the "if(created || playerenters)" and in level non serverside npcs next then the server npcs usualy catch up after a small lag thats hardly noticable on most servers. However!!! If you change to fullscreen mode (alt + enter) Then -Weapons load their if(playerenters) script after clientside level npcs load their if(created). Ive tested this on my server only can someone else verify this? you can do it with an easy setplayerprop #c,first; and so forth in a weapon and a clientside npc and then try it in both screen modes. Is this an error ? or is there no order of operation? if it is an error can it be fixed in the next version? It is quite vital to some of my npcs that there be an order of operations and i was hoping weapon npcs first then db npcs but I guess that can be worked around. Thanks :) |
*bump and hopes for an answer*
|
1. The npc server program consist of following instructions:
- load options -- connect to gserver if connection can be established: --- load levels ----load npcs from database ----- while the connection to the gserver is up: ------ get data from gserver; this contains following type of data: --player attributes --temporary level data (bombs, explosions, bush removing, items, ...) -- PMs -- game time -- levels to update/reload -- server. flags added/deleted ---------- run all npc scripts ------------ send changed npc attributes to the players --------------- send changed player attributes to the gserver & players --------------------- wait till 0.1 seconds are over |
? He means the order of scripts sent to the client
Possibly try to use the weaponorder= option in the server options, where you can list weapon scripts that should be sent first. I think the weapons are not sent all at once if you have several big scripts, so some of them might come after the local npcs are sent. If you need data in the local npcs then you can use client strings or serverr. strings, those should be sent first, or you add some sleep 1 or so in the necessary npcs although that is making the scripts look ugly. It could also be possibly to add a server options to enforce sending the weapon scripts before the npcs. |
Quote:
It seems that if you change screen mode it changes order that it loads around odd I didn't think that would do something like that but it does. A server option that enforces , and or a change that forces scripts in weapons such as playerenters to run before level npcs or visa versa would be wonderfull :) |
Quote:
Heh i just posted that in the hope it was useful. I thought he was meaning database NPCs and weapon scripts (if they're not the same -_-) |
Quote:
|
All times are GMT +2. The time now is 05:04 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.