Nuclide
Software Development Kit for id Technology (BETA)
entsAPI_t Struct Reference

About this class

Ents library.

Public Member Functions

entity Create (string className, vector spawnPos)
 Creates a new entity of a given class name. More...
 
float ChangeToClass (entity targetEntity, string className)
 Transitions an entity from one class to another. More...
 
void Input (entity target, string inputName, string dataString, entity activator)
 Sends an input (See ncIO::Input) to an entity. More...
 

Member Function Documentation

◆ ChangeToClass()

float entsAPI_t::ChangeToClass ( entity  targetEntity,
string  className 
)

Transitions an entity from one class to another.

Parameters
targetEntityis the target entity.
classNameis the class type to change targetEntity to.
Returns
The created entity.

◆ Create()

entity entsAPI_t::Create ( string  className,
vector  spawnPos 
)

Creates a new entity of a given class name.

It is guaranteed to return an entity, unless you have run out of memory.

Parameters
classNamethe type of entity class to create.
spawnPosthe position at which it should spawn.
Returns
The created entity.

◆ Input()

void entsAPI_t::Input ( entity  target,
string  inputName,
string  dataString,
entity  activator 
)

Sends an input (See ncIO::Input) to an entity.

While you're able to manipulate entities in most ways using bare MapC, you might want to change Nuclide specific attributes of them as well. This can only be done using the I/O system.

For the variety of inputs an entity supports, please look at the respective entity-specific documentation.

Parameters
targetis the entity which will receive the input
inputNameis the name of the input. E.g. "SetOrigin"
dataStringcontains parameters for the input. E.g. "0 0 0"
activatorreferences which entity is "responsible" for triggering this input.

The documentation for this struct was generated from the following file: