Deleted56253002User Posted July 2, 2021 Share Posted July 2, 2021 Wondering if it worth the effort incorporating arrays into my script. There are about 20+ actors to work with, each with their own variables. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 2, 2021 Share Posted July 2, 2021 Performance or speed really depend upon what it is you are trying to do. The advantage to using arrays and even form lists is that you can use a while loop to iterate through each entry rather than listing out an "If block" for each object / variable. Which in turn makes it easier to add new entries down the road. Link to comment Share on other sites More sharing options...
Deleted56253002User Posted July 2, 2021 Author Share Posted July 2, 2021 For all 20+ actors, I am checking for each actor if they have a bow equipped,and if so, they will perform X, otherwise they will perform Y. Wondering since I have already written an if statement for each actor already if this is worthwhile. The time to check takes at least a second or more in most cases, wondering if arrays can speed this process up so it takes less than a second or instant if possible. Link to comment Share on other sites More sharing options...
Deleted56253002User Posted July 2, 2021 Author Share Posted July 2, 2021 For all 20+ actors, I am checking for each actor if they have a bow equipped,and if so, they will perform X, otherwise they will perform Y. Wondering since I have already written an if statement for each actor already if this is worthwhile. The time to check takes at least a second or more in most cases, wondering if arrays can speed this process up so it takes less than a second or instant if possible. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 2, 2021 Share Posted July 2, 2021 The only way to really know is to try it out and compare the two results. Link to comment Share on other sites More sharing options...
Deleted56253002User Posted July 2, 2021 Author Share Posted July 2, 2021 Seems like there isn't any difference as far as computational speed from my testing. On the bright side, I don't have to rewrite my code. Link to comment Share on other sites More sharing options...
maxarturo Posted July 2, 2021 Share Posted July 2, 2021 I've always support modders with all possible ways, but right now there is a more important issue unfolding. They are violating our "Intellectual Property" !!!. https://www.nexusmods.com/news/14538 Link to comment Share on other sites More sharing options...
dylbill Posted July 4, 2021 Share Posted July 4, 2021 Are your actors custom actors? What event are you using? A way to speed it up is to put a script on each actor as Events are multi threaded, instead of referencing 20 actors in the same script. If they're vanilla actors, you can put each one in a reference alias in a quest, then put a script on each reference alias with the event. Link to comment Share on other sites More sharing options...
Recommended Posts