SRL Archive - Discussions & Debates

Why tempCTS if it must be 1?


riwu

2012-09-21 05:55:14

Almost every procedure i've seen would call GetColorToleranceSpeed before changing the CTS. Since the default CTS is 1, and you would always change back the CTS to the original (=default) CTS if it was changed, then why do we don't we directly change the CTS to 1 instead of having to store that original CTS (which should always be 1 anyway) and change to it?

NKN

2012-09-21 06:44:59

Incase you changed it to zero or three earlier in the script, and want to keep it that way. You could just hard-code it to 1.

It's all up to the scripter. :)

riwu

2012-09-21 07:06:05

From: NKN
Incase you changed it to zero or three earlier in the script, and want to keep it that way. You could just hard-code it to 1.

It's all up to the scripter. :)

Yeah but most of the time you don't/shouldn't keep the CTS across procedures, since some SRL functions are coded with CTS 1. So in fact it is unnecessary to store the original CTS as almost everyone always intend to change back to the default.

Just find it weird why everyone is doing it :p

Daniel

2012-09-21 08:09:04

From: riwu
Just find it weird why everyone is doing it :p


It was carried over from when ACA was new years back (as ACA did this to ensure script compatibility).

litoris

2012-09-21 10:03:55

Because everyone does it. I just make it 1 in the newer script I write.