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

About this class

Actor library.

Public Member Functions

string GetInventory (entity targetActor)
 Returns a tokenizable string containing a list of inventory items of a specified actor (this includes players). More...
 
bool HasItem (entity targetActor, string itemClass)
 Returns whether an item class exists in an actor's inventory. More...
 
int GetReserveAmmo (entity targetActor, int ammoType)
 Returns the amount of reserve ammo of a given ammo type ID. More...
 
bool MaxAmmo (entity targetActor, int ammoType)
 Returns the amount of maximum ammo of a given ammo type ID. More...
 
int TotalActors (void)
 Returns the current amount of actors in the game. More...
 
int TotalActorsOnTeam (int teamID)
 Returns the current amount of actors in the game, on a specific team. More...
 
string CurrentWeapon (entity targetActor)
 Returns the current weapon of the referenced actor in string form param targetActor is the actor to query active weapon information from. More...
 
entity DropItem (entity targetActor, string namedItem)
 Asks the actor to drop a named item. More...
 
float AimAtPos (entity, vector)
 
float MoveToPos (entity, vector)
 
bool CanSee (entity, entity)
 
bool CanShoot (entity, vector, vector)
 
bool ClearEnemy ()
 
entity FindCoverNode (entity)
 

Member Function Documentation

◆ AimAtPos()

float actorAPI_t::AimAtPos ( entity  ,
vector   
)

◆ CanSee()

bool actorAPI_t::CanSee ( entity  ,
entity   
)

◆ CanShoot()

bool actorAPI_t::CanShoot ( entity  ,
vector  ,
vector   
)

◆ ClearEnemy()

bool actorAPI_t::ClearEnemy ( )

◆ CurrentWeapon()

string actorAPI_t::CurrentWeapon ( entity  targetActor)

Returns the current weapon of the referenced actor in string form param targetActor is the actor to query active weapon information from.

Returns
string value containing the classname of the weapon, identifying the classname (e.g. weapon_pistol).

◆ DropItem()

entity actorAPI_t::DropItem ( entity  targetActor,
string  namedItem 
)

Asks the actor to drop a named item.

It'll be removed from their inventory as a result. param targetActor is the actor to request this to.

Returns
entity handle with the dropped item reference. When unsuccessful, returns __NULL__

◆ FindCoverNode()

entity actorAPI_t::FindCoverNode ( entity  )

◆ GetInventory()

string actorAPI_t::GetInventory ( entity  targetActor)

Returns a tokenizable string containing a list of inventory items of a specified actor (this includes players).

Returns
the tokenizable string. Exaple output: "item_book item_wallet item_multitool"

◆ GetReserveAmmo()

int actorAPI_t::GetReserveAmmo ( entity  targetActor,
int  ammoType 
)

Returns the amount of reserve ammo of a given ammo type ID.

Parameters
targetActoris the actor to query ammo information from.
ammoTypeammo type ID, which you can discover with ammo.NumForName().
Returns
integer value reflecting the reserve ammo requested.

◆ HasItem()

bool actorAPI_t::HasItem ( entity  targetActor,
string  itemClass 
)

Returns whether an item class exists in an actor's inventory.

Returns
true or false if the item is present.

◆ MaxAmmo()

bool actorAPI_t::MaxAmmo ( entity  targetActor,
int  ammoType 
)

Returns the amount of maximum ammo of a given ammo type ID.

Parameters
targetActoris the actor to query ammo information from.
ammoTypeammo type ID, which you can discover with ammo.NumForName().
Returns
integer value reflecting the maximum ammo.

◆ MoveToPos()

float actorAPI_t::MoveToPos ( entity  ,
vector   
)

◆ TotalActors()

int actorAPI_t::TotalActors ( void  )

Returns the current amount of actors in the game.

Not counting dead ones.

Returns
integer value of the total amount of actors.

◆ TotalActorsOnTeam()

int actorAPI_t::TotalActorsOnTeam ( int  teamID)

Returns the current amount of actors in the game, on a specific team.

Not counting dead ones.

Parameters
teamIDis the id of a team set up with the teams API
Returns
integer value of the total amount of actors in a team.

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