![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
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... | |
float entsAPI_t::ChangeToClass | ( | entity | targetEntity, |
string | className | ||
) |
Transitions an entity from one class to another.
targetEntity | is the target entity. |
className | is the class type to change targetEntity to. |
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.
className | the type of entity class to create. |
spawnPos | the position at which it should spawn. |
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.
target | is the entity which will receive the input |
inputName | is the name of the input. E.g. "SetOrigin" |
dataString | contains parameters for the input. E.g. "0 0 0" |
activator | references which entity is "responsible" for triggering this input. |