(02-22-2010, 08:46 PM)Overlord link Wrote: But as many of you have mentioned, too many or complex scripts and/or triggers can cause lag along with too many units in the mission. Of course VD can play a trick or two.Scripts may actually be less demanding than triggers. I recently have read in the ofpec.com forum that trigger conditions are checked virtually constantly (probably many hundred times per second, I can provide links to the source of information with the exact numbers later). Therefor a dozen of medium complex trigger conditions could already cause a significant drop of performance.
Edit: source for the above paragraph: http://www.ofpec.com/forum/index.php?top...#msg107989
Quote:A trigger with condition "this" polls every 0.5 seconds or so. In other words its equivalent to a loop with a delay of 0.5s.  Otherwise a trigger polls as often as an @ condition in a script, which is like a loop with no delay
A script running a loop to check equally complex conditions with reasonable pauses between each iteration certainly would be less demanding than the trigger-only alternative.
The 'problem' is that triggers in conjunction with game logics are more comfortable for the mission designer than external scripts (well at least for me) Â And with scripts you have to worry more about locality of execution etc. than with triggers.