Time for action - creating a new entity
In CryENGINE 3, there are various types of Lua entities predefined. Their basic functionality can be easily overwritten and expanded. Additionally, there are interfaces to communicate with C++ and also directly with the flow graph.
A Lua entity has two parts:
The
.ent
definition file defines the name of this entity class and the script file locationThe
.lua
code associated with the entity class
In order to create a new entity, we first have to create the .ent
file. The .ent
definitions can be found in <engine root>\Game\Entities
(if this folder does not exist, just create it).
Create a new file named
Teleporter.ent
and open it with a text editor such as NotePad++. Each.ent
file is basically an XML file with a single tag that defines the name of this entity class and the associated Lua script file. Write the following code into theTeleporter.ent
file:<Entity Name="Teleporter" Script="Scripts/Entities/Others/Teleporter.lua" />
Tip
Downloading...