Theme
Entities
Enumeration by kind, via the net identity component.
| Export | Summary |
|---|---|
ShPlaceEntity | Place any entity through the engine's set transform. |
ShPlaceEntityRot | Full orientation in radians, which ShPlaceEntity cannot express: roll puts a car on its roof. |
ShGetEntityTransform | Its inverse: where a thing is and how it is turned, so a caller can rotate relative to that. |
ShQueueTransform | Applied on the frame path rather than right now. |
ShFindEntities | Fills out with entities within radius of the player, nearest first. |
ShGetEntityKind | Kind of one entity. |
ShKindName | The readable name of a kind. |
ShGetComponents | Fills out with the entity's components, returning how many were written. |
ShFindComponent | The component of a given class, or 0. |
ShPlaceEntity
c
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.
scripthook.h, line 671
ShPlaceEntityRot
c
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.
scripthook.h, line 677
ShGetEntityTransform
c
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.
scripthook.h, line 683
ShQueueTransform
c
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.
scripthook.h, line 690
ShFindEntities
c
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.
scripthook.h, line 726
ShGetEntityKind
c
SH_API int ShGetEntityKind(uint64_t entity);Kind of one entity.
scripthook.h, line 730
ShKindName
c
SH_API const char *ShKindName(int kind);The readable name of a kind.
scripthook.h, line 732
ShGetComponents
c
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.
scripthook.h, line 747
ShFindComponent
c
SH_API uint64_t ShFindComponent(uint64_t entity,
uint32_t classHash);The component of a given class, or 0.
scripthook.h, line 751