22
u/Didaktylos Feb 10 '17
well to be fair, the upper script is from half life 1 engine/cs 1.6 where incrementvar didn't exist
18
u/YMK1234 Feb 10 '17
Plus, how would you do the nice slider thingy?
-2
Feb 10 '17
I really hope that's not a serious question
20
u/YMK1234 Feb 10 '17
I see you never worked with valve's scripting language, especially pre-source. There is no such thing as ifs and string formats.
3
Feb 10 '17
I have not, that sounds like the scripting language itself is the bad code
15
u/YMK1234 Feb 10 '17
Well, it is really not meant as a general purpose scripting language ... back in the HL1 days it could really be summarized as "bind a chain of console commands to a key" (including rebinding keys). Which, in 1998, was totally fine and surprisingly versatile, if verbose.
I had a lot of very intricate ones, it gets really funny if you have a multi-level menu-kind of structure bound to your numpad and each command reprograms all keys there (basically think of a manually resolved state engine)
2
u/Prom3th3an Feb 11 '17
Could the bindings trigger other bindings? If so, could you have bindings that didn't actually correspond to any keys? I think if both are true, then it's Turing-complete and could be transpiled from a real programming language.
3
9
Feb 10 '17
I would love to see a proper scripting engine for source. Or just some form of real IPC so you can do things like auto record demos.
36
u/WhAtEvErYoUmEaN101 Feb 10 '17
incrementvar? I bet it's the Source Engine