Xurr
03-21-2008, 22:44
So today I took a look at the giant script that comes with EB. I noticed in section 10 at the end a bunch of do while loops that would effectively stop the script at the "while" loop. This would and probably is the cause of most of the "lag" that players see. I'm wondering if there is any real reason to use a loop like this?
console_command date 10
console_command season summer
set_counter seasonCounter 3
while I_TurnNumber = 1130
suspend_unscripted_advice true
end_while
I guess my question really is, is there a reason to turn off unscripted advice 1000 times per second other than stopping the script?
I think if you replaced each block with a simple if test you increase performance quite a bit
Something like this.
If I_TurnNumber = 1130
console_command date 11
console_command season summer
set_counter seasonCounter 2
suspend_unscripted_advice true
end_If
Hope this helps.
console_command date 10
console_command season summer
set_counter seasonCounter 3
while I_TurnNumber = 1130
suspend_unscripted_advice true
end_while
I guess my question really is, is there a reason to turn off unscripted advice 1000 times per second other than stopping the script?
I think if you replaced each block with a simple if test you increase performance quite a bit
Something like this.
If I_TurnNumber = 1130
console_command date 11
console_command season summer
set_counter seasonCounter 2
suspend_unscripted_advice true
end_If
Hope this helps.