CryENGINE uses LUA for its scripting language.
The Entity System can attach a script proxy to any entity. This appear in the form of a table that can include data and functions. The AI System has behaviors and GoalPipes written in scripts. Additionally, several game system such as the Actor, Item System, Vehicle System and the GameRules rely on scripting to extend their functionalitiesfunctionality.
Some of the advantages of using scripts are the following:
- Fast iteration - Scripts can be reloaded within the engine.
- Runtime Run-time performance - Careful usage of the available resources can result into scripts running nearly as fast as compiled code.
- Easy to use troubleshooting - An embedded LUA debugger can be invoked at any time.
Various systems in CryENGINE expose scriptbind ScriptBind functions which allow Lua scripts to call existing code written in C++. The existing scriptbind ScriptBind functions are listed in the reference section.
This functionality is limited to Sandbox or running the launcher in Dev Mode (using the -DEVMODE command-line argument).
Reloading scripts during
In Sandbox it's always possible to reload entities within the user interface. When selecting a Script Entity, this can be done by clicking on the Reload Script button found in the Rollup Bar.