To add custom functionality for input controls, enemy controls, and other various gameplay values, we need to harness the powers of the Lua programming language. In this chapter, we will first have a programming in Lua crash course, then we will look at in-game examples for Amazon Lumberyard. In these examples, we will modify our player character’s camera control script as well as the enemy AI spawner script.
In the crash course, we will learn about comments in Lua, both writing and invoking functions, loops, collections, variables, conditional statements, ...