Jump to content

Slaughterfish Aggression


glowplug

Recommended Posts

Would running begin gamemode block on all NPCs in a cell cause excessive lag? From what I've read, it only runs gamemode blocks on an NPCs script if the player is in the same cell, so if one subdivided the cells out a lot, then lag problems should be minimal.

Gamemode scripts are run on everything within the active area. The important thing is not how many of these scripts are being run, but rather what it is those scripts are doing. Certain functions, like getdistance, are more process heavy than other functions, like isdead. More scripts with process heavy functions can eventually lead to processing issues, but this is mostly only present in extreme cases or slower computers. Technically speaking, you would need about a dozen scripts doing distance checks at exactly the same time to notice any significant issues. But, that does not mean that it's ok to use these functions thoughtlessly. Usually restricting them behind some conditions is enough to limit the number of calls for the function to where it no longer matters. Most processing issues come from having too many actors in the scene, or from just having a slow computer.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...