Scripting Best Practices

Variable Scope

Keep the scope of your variables as limited as possible.

Use “local” as much as possible. Not only does this make debugging easier, it will make the Lua script run faster as Lua does not handle global variables very well.

Tagged:

Leave A Comment?