View Single Post
  #18  
Old 08-20-2003, 10:29 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
I read through alot of the yelling and what not and the ocassional spouting of ideas and I wanted to get to an idea solution for the first problem in this thread.
The having a timeout loop in the control npc.

I think you should not do it for the simple fact that the control npc has alot of other processes involved with it and you might run into complications (doubled variables/strings, one small typo that renders all actions in the npc to cease and you cant seem to find it but you see it about 5 hours later after you have had to take 3 asprin and beat your head on the wall several times and it was a frigin extra ")" that you put in while trying to do 50 things with one string, ect...) later on when you have so many things being used at once on one npc. Although I see no problem with doing it as far as lagging or cpu time is concerned, loading down one npc would pretty much the same as giving 1/3 the script to 3 other npcs that might even cause more of a problem.
[edit] condsidering its all part of the same process

I was working on a Control2 NPC that had a timeout loop in it but other npcs could access this npc and give it information and depending on the information the Control2 NPC could do tasks and give information back. Example- instead of having a timeout loop in 4 npcs that I realy need it in but only at certain times and a high timeout time I would have the 4 npcs access the control2 npc give it the time they need before another proccessing was needed say 30 seconds then the control2 npc would log those npcs names/id and would have seperate countdowns as a this.var or just one variable as an array and would call those npcs when 30 seconds was up for them to repeat their action.

I know that sounds like a pain but say it wasnt just 4 of those npcs maybe it was 100 and they had to be accessed at different times for different reasons some player initiated and some casualy then that would reduce server lag tremendiously than having 100 npcs running timeout loops(thats a little nutz btw).
__________________

To the sun of your age, I arise
Reply With Quote