-
Book Overview & Buying
-
Table Of Contents
Mastering CryENGINE
By :
Most entities you can place in CryENGINE Sandbox are based on the Lua script. This means these entities have a script proxy attached to them. This script proxy provides you access to a Lua table that contains the entity information and various functions. These Lua tables let you add new properties or functions to an entity.
Creating a new Lua script entity is easy and can be done within a few minutes without recompiling any code.
Only a few steps are necessary to create a new Lua script entity. Firstly, an entity definition file, a so-called .ent file, has to be created. This file registers the Lua entity with the engine and points to a script that will be used. The entity definition files are placed in the ../Game/Entities/.. folder.
Let's create a new entity by first creating an .ent file with the name Testy.ent and place it in the ../Game/Entities/..folder. For our example, we will just call our entity Testy, but you can change the entity...
Change the font size
Change margin width
Change background colour