|
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...
|
|
◆ ChangeToClass()
entity entsAPI_t::ChangeToClass |
( |
entity |
targetEntity, |
|
|
string |
className |
|
) |
| |
Transitions an entity from one class to another.
- Parameters
-
targetEntity | is the target entity. |
className | is 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
-
className | the type of entity class to create. |
spawnPos | the 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
-
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. |
◆ isAI()
bool entsAPI_t::isAI |
( |
entity |
entityToCheck | ) |
|
Returns true/false depending on if the entity is an AI character.
- Parameters
-
entityToCheck | specifies the entity to check. |
◆ isAlive()
bool entsAPI_t::isAlive |
( |
entity |
entityToCheck | ) |
|
Returns true/false depending on if the entity is alive.
- Parameters
-
entityToCheck | specifies the entity to check. |
◆ isBot()
bool entsAPI_t::isBot |
( |
entity |
entityToCheck | ) |
|
Returns true/false depending on if the entity is a bot.
- Parameters
-
entityToCheck | specifies the entity to check. |
◆ isGodMode()
bool entsAPI_t::isGodMode |
( |
entity |
entityToCheck | ) |
|
Returns true/false depending on if the entity is in "god" mode.
- Parameters
-
entityToCheck | specifies the entity to check. |
◆ isPlayer()
bool entsAPI_t::isPlayer |
( |
entity |
entityToCheck | ) |
|
Returns true/false depending on if the entity is a player.
- Parameters
-
entityToCheck | specifies 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
-
entityToCheck | specifies 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
-
- Returns
- Success.
The documentation for this struct was generated from the following file: