Nuclide
Software Development Kit for id Technology

Public Member Functions

entity Create (string className, vector spawnPos)
 Creates a new entity of a given class name. More...
 
bool Precache (string className)
 Precaches a given entity class. More...
 
entity ChangeToClass (entity targetEntity, string className)
 Transitions an entity from one class to another. More...
 
entity Input (entity target, string inputName, string dataString, entity activator)
 Sends an input (See NSIO::Input) to an entity. More...
 
bool isAI (entity entityToCheck)
 Returns true/false depending on if the entity is an AI character. More...
 
bool isAlive (entity entityToCheck)
 Returns true/false depending on if the entity is alive. More...
 
bool isGodMode (entity entityToCheck)
 Returns true/false depending on if the entity is in "god" mode. More...
 
bool isPlayer (entity entityToCheck)
 Returns true/false depending on if the entity is a player. More...
 
bool isSentient (entity entityToCheck)
 Returns true/false depending on if the entity is either a player, or AI character. More...
 
bool isBot (entity entityToCheck)
 Returns true/false depending on if the entity is a bot. More...
 

Member Function Documentation

◆ ChangeToClass()

entity 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()

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

Sends an input (See NSIO::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.

◆ isAI()

bool entsAPI_t::isAI ( entity  entityToCheck)

Returns true/false depending on if the entity is an AI character.

Parameters
entityToCheckspecifies the entity to check.

◆ isAlive()

bool entsAPI_t::isAlive ( entity  entityToCheck)

Returns true/false depending on if the entity is alive.

Parameters
entityToCheckspecifies the entity to check.

◆ isBot()

bool entsAPI_t::isBot ( entity  entityToCheck)

Returns true/false depending on if the entity is a bot.

Parameters
entityToCheckspecifies the entity to check.

◆ isGodMode()

bool entsAPI_t::isGodMode ( entity  entityToCheck)

Returns true/false depending on if the entity is in "god" mode.

Parameters
entityToCheckspecifies the entity to check.

◆ isPlayer()

bool entsAPI_t::isPlayer ( entity  entityToCheck)

Returns true/false depending on if the entity is a player.

Parameters
entityToCheckspecifies the entity to check.

◆ isSentient()

bool entsAPI_t::isSentient ( entity  entityToCheck)

Returns true/false depending on if the entity is either a player, or AI character.

Parameters
entityToCheckspecifies the entity to check.

◆ Precache()

bool entsAPI_t::Precache ( string  className)

Precaches a given entity class.

Ensuring models, sounds and other assets referenced within are loaded ahead of time.

Parameters
classNameto precache
Returns
Success.

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