ETHEntity /Core objects

Reference object that points to an entity in scene. An ETHEntity must always be used as a reference (@handle). It allows entity direct manipulation. More about entities.

There are several ways to retrieve a reference to a specific entity. The most common way is to use entity callbacks, but they may also be retrieved with functions like SeekEntity and GetEntitiesFromBucket.

Examples of in-script ETHEntity usage:

// Moves the entity to the left
void ETHCallback_bullet(ETHEntity@ thisEntity)
{
    thisEntity.AddToPosition(vector3(10,0,0)); 
}
// finds the starting point in the map
ETHEntity @circle = SeekEntity("starting_point.ent");
if (circle !is null)
{
    // Add the main character into the scene, place him at the start point and give him full HP
    //                 file name,       position,             angle
    int id = AddEntity("character.ent", circle.GetPosition(), 0.0f);

    ETHEntity @character = SeekEntity(id);
    character.SetFloat("hp", 100.0f);
}