TheMastersSon Posted March 7, 2016 Share Posted March 7, 2016 Just out of curiosity, has anyone ever figured out which functions in the CS cost the least and most in cpu time? E.g. a script is supposed to run only at a certain hour, and only when PlayerRef is in a specific cell. So is it logical to assume the cell check should be performed first, since it's a boolean function, instead of a fixed value like GameHour. Etc. Link to comment Share on other sites More sharing options...
forli Posted March 9, 2016 Share Posted March 9, 2016 (edited) Attach the script to an object in the cell. The script will only run when the object is loaded in memory (so, when the player is in the cell and for a while after leaving it). About cost, there's no benchmark, but you can assume all commands run (individually) reasonably fast, except for GetLOS called with an not-actor parameter or GetFPS. Performance problems rise when the script need to run continuously, doing a ForEach/While/GetFirstRef with an expensive algorithm (look at HUD Status Bars if you want to see a very expensive algorithm/script). Edited March 9, 2016 by forli Link to comment Share on other sites More sharing options...
Recommended Posts