GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
Loading...
Searching...
No Matches
Entities

Enumeration by kind, via the net identity component. More...

Data Structures

struct  ShEntity
struct  ShComponent
 Components. More...

Macros

#define SH_FIND_UNNAMED   0x1
 Untyped entries are scenery logic and markers, so they are hidden unless this flag is passed.

Enumerations

enum  ShEntityKind {
  SH_KIND_ANY = 0 , SH_KIND_PLAYER , SH_KIND_NPC , SH_KIND_VEHICLE ,
  SH_KIND_DRONE , SH_KIND_TEAMMATE , SH_KIND_TURRET , SH_KIND_MINE ,
  SH_KIND_DOOR , SH_KIND_LOOTCHEST , SH_KIND_OTHER
}
 Entity kinds, from the engine's own net identity component. More...

Functions

SH_API int ShPlaceEntity (uint64_t entity, const ShVec3 *pos, const ShVec3 *orient)
 Place any entity through the engine's set transform.
SH_API int ShPlaceEntityRot (uint64_t entity, const ShVec3 *pos, float yaw, float pitch, float roll)
 Full orientation in radians, which ShPlaceEntity cannot express: roll puts a car on its roof.
SH_API int ShGetEntityTransform (uint64_t entity, ShVec3 *pos, float *yaw, float *pitch, float *roll)
 Its inverse: where a thing is and how it is turned, so a caller can rotate relative to that.
SH_API int ShQueueTransform (uint64_t entity, const ShVec3 *pos, float yaw, float pitch, float roll)
 Applied on the frame path rather than right now.
SH_API int ShFindEntities (int kind, float radius, uint32_t flags, ShEntity *out, int max)
 Fills out with entities within radius of the player, nearest first.
SH_API int ShGetEntityKind (uint64_t entity)
 Kind of one entity.
SH_API const char * ShKindName (int kind)
 The readable name of a kind.
SH_API int ShGetComponents (uint64_t entity, ShComponent *out, int max)
 Fills out with the entity's components, returning how many were written.
SH_API uint64_t ShFindComponent (uint64_t entity, uint32_t classHash)
 The component of a given class, or 0.

Detailed Description

Enumeration by kind, via the net identity component.

Macro Definition Documentation

◆ SH_FIND_UNNAMED

#define SH_FIND_UNNAMED   0x1

Untyped entries are scenery logic and markers, so they are hidden unless this flag is passed.

Enumeration Type Documentation

◆ ShEntityKind

Entity kinds, from the engine's own net identity component.

SH_KIND_ANY matches every typed entity.

Enumerator
SH_KIND_ANY 
SH_KIND_PLAYER 
SH_KIND_NPC 
SH_KIND_VEHICLE 
SH_KIND_DRONE 
SH_KIND_TEAMMATE 
SH_KIND_TURRET 
SH_KIND_MINE 
SH_KIND_DOOR 
SH_KIND_LOOTCHEST 
SH_KIND_OTHER 

Function Documentation

◆ ShPlaceEntity()

SH_API int ShPlaceEntity ( uint64_t entity,
const ShVec3 * pos,
const ShVec3 * orient )

Place any entity through the engine's set transform.

Children follow, which is how vehicles carry riders.

◆ ShPlaceEntityRot()

SH_API int ShPlaceEntityRot ( uint64_t entity,
const ShVec3 * pos,
float yaw,
float pitch,
float roll )

Full orientation in radians, which ShPlaceEntity cannot express: roll puts a car on its roof.

◆ ShGetEntityTransform()

SH_API int ShGetEntityTransform ( uint64_t entity,
ShVec3 * pos,
float * yaw,
float * pitch,
float * roll )

Its inverse: where a thing is and how it is turned, so a caller can rotate relative to that.

◆ ShQueueTransform()

SH_API int ShQueueTransform ( uint64_t entity,
const ShVec3 * pos,
float yaw,
float pitch,
float roll )

Applied on the frame path rather than right now.

Set transform wants a game thread's scratch allocator.

◆ ShFindEntities()

SH_API int ShFindEntities ( int kind,
float radius,
uint32_t flags,
ShEntity * out,
int max )

Fills out with entities within radius of the player, nearest first.

Returns how many were written.

◆ ShGetEntityKind()

SH_API int ShGetEntityKind ( uint64_t entity)

Kind of one entity.

◆ ShKindName()

SH_API const char * ShKindName ( int kind)

The readable name of a kind.

◆ ShGetComponents()

SH_API int ShGetComponents ( uint64_t entity,
ShComponent * out,
int max )

Fills out with the entity's components, returning how many were written.

A vehicle carries about fifty.

◆ ShFindComponent()

SH_API uint64_t ShFindComponent ( uint64_t entity,
uint32_t classHash )

The component of a given class, or 0.