Quote:
Originally Posted by Stefan
It can reduce problems with typing errors (typing the same object name over and over again), it can also make scripts look easier to understand. If you need to write very efficient code then it should probably be avoided (e.g. loops inside with() are not optimized), but that should not happen often.
Making scripts look easier to understand is often more important than you think, because code often needs to be understood by other scripters to be able to fix or improve stuff (or by yourself in the future).
|
In my opinion, the first (and possibly best thing) people can do in general is use practical, logical names for their variables and/or functions as they apply to the npc they're being used in. This makes it 10x easier on any future scripter who may have to edit/debug your work if they can relate easily to the code in front of them.