|
GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
|
The local player, via the engine's own component. More...
Data Structures | |
| struct | ShPlayer |
| root is the top of the parent chain, and the only position that survives a direct write. More... | |
Typedefs | |
| typedef int(*) | ShLastError_t(void) |
| typedef const char *(*) | ShErrorString_t(int err) |
| typedef int(*) | ShGetVersion_t(void) |
| typedef int(*) | ShGetPlayer_t(ShPlayer *out) |
| typedef int(*) | ShTeleportPlayer_t(const ShVec3 *pos, const ShVec3 *orient) |
| typedef int(*) | ShWalkToRoot_t(uint64_t entity, uint64_t *outRoot) |
| typedef int(*) | ShGetPlayerPosition_t(ShVec3 *out) |
| typedef void(*) | ShInvalidate_t(void) |
Functions | |
| SH_API int | ShGetPlayer (ShPlayer *out) |
| The local player. | |
| SH_API int | ShGetPlayerPosition (ShVec3 *out) |
| The soldier's own position, from its matrix. | |
| SH_API int | ShGetCameraEyePosition (ShVec3 *out) |
| Where the player global says the view sits, about 1.9m behind and 1.6m above the body in third person. | |
| SH_API int | ShTeleportPlayer (const ShVec3 *pos, const ShVec3 *orient) |
| Teleport the player, at any range. | |
| SH_API int | ShTeleportPlayerHops (const ShVec3 *pos, const ShVec3 *orient, float hopMetres, int delayMs) |
| Teleport in hops rather than one jump, for when a single long move misbehaves. | |
| SH_API int | ShIsInVehicle (void) |
| True while riding a vehicle, read from the entity link in the parent chain. | |
| SH_API int | ShWalkToRoot (uint64_t entity, uint64_t *outRoot) |
| Walk an entity's parent chain to its root. | |
| SH_API void | ShInvalidate (void) |
| Drop the cached player, so the next call re-resolves. | |
The local player, via the engine's own component.
| typedef int(*) ShLastError_t(void) |
| typedef const char *(*) ShErrorString_t(int err) |
| typedef int(*) ShGetVersion_t(void) |
| typedef int(*) ShGetPlayer_t(ShPlayer *out) |
| typedef int(*) ShWalkToRoot_t(uint64_t entity, uint64_t *outRoot) |
| typedef int(*) ShGetPlayerPosition_t(ShVec3 *out) |
| typedef void(*) ShInvalidate_t(void) |
The local player.
In a vehicle the root re-parents to the vehicle; the entity stays the soldier.
The soldier's own position, from its matrix.
Use this for anything placed in the world.
Where the player global says the view sits, about 1.9m behind and 1.6m above the body in third person.
Teleport the player, at any range.
Verified 9.9km cross map, landing within 3m of the target. In a vehicle it carries the car and the camera, and that is verified cross map too.
| SH_API int ShTeleportPlayerHops | ( | const ShVec3 * | pos, |
| const ShVec3 * | orient, | ||
| float | hopMetres, | ||
| int | delayMs ) |
Teleport in hops rather than one jump, for when a single long move misbehaves.
0 hopMetres gives 300m. delayMs is a real pause per hop. 300 is the value proven over long routes, 0 has crashed the game.
| SH_API int ShIsInVehicle | ( | void | ) |
True while riding a vehicle, read from the entity link in the parent chain.
Verified both ways.
| SH_API int ShWalkToRoot | ( | uint64_t | entity, |
| uint64_t * | outRoot ) |
Walk an entity's parent chain to its root.
| SH_API void ShInvalidate | ( | void | ) |
Drop the cached player, so the next call re-resolves.