IN THIS ARTICLE
Writing Lua Scripts
Writing Lua Scripts
Topics
- Learning Lua
- Learning Lua in Lumberyard
- Adding Lua Scripts to Component Entities
- Basic Structure of a Component Entity Lua Script
- Properties Table
- Network Binding Properties
- Using EBuses in Lua
- Lua Editor
- Debugging Lua Scripts
- The Lua Environment (Advanced)
- Component Entity Lua API Reference
You can use Lua in Lumberyard to facilitate quick iteration of your game project. Lua is a powerful, fast, lightweight, embeddable scripting language. When you construct new gameplay and game systems, you can run your changes immediately, without compiling your source code.
Learning Lua
For learning the Lua language itself, the lua.org website is a good place to start.
- Official Lua Documentation – Provides a central location for information about Lua, including a Getting started page.
- Programming in Lua – This text is a resource for getting started with Lua programming.
- Lua 5.1 Reference Manual – Provides a reference of all the functions that are available by default in Lua.
Learning Lua in Lumberyard
After you read through this tutorial on writing Lua scripts for the component entity system, learn more about using Lua in Lumberyard by consulting the following resources.
- For information on Lumberyard’s built-in Lua editor, see Lua Editor.
- For sample Lua
scripts , see the Lumberyard
\dev\SamplesProject\Scripts
directory and its subdirectories. - For information about Lua API operations in Lumberyard, see the Component Entity Lua API Reference.
- For information about the Lumberyard EBus, see Working with the Event Bus (EBus) system.