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

Shots and impacts from the projectile hook. More...

Data Structures

struct  ShHit
 Bullets often strike a child part, so root is resolved for you and is the one worth acting on. More...
struct  ShShot
 A shot, reported on the projectile's first step. More...

Macros

#define SH_EVT_MINE_ONLY   0x1
 Flags on the subscription.
#define SH_EVT_NO_SELF   0x2

Typedefs

typedef void(*) ShHitFn(const ShHit *hit, void *user)
 Receivers run on a worker thread the API owns, so any API call is safe from inside one.
typedef void(*) ShFireFn(const ShShot *shot, void *user)

Functions

SH_API int ShHitHookInstall (void)
 Install the hook.
SH_API int ShHitHookReady (void)
SH_API int ShOnHit (ShHitFn fn, void *user, int flags)
 Register a receiver, up to eight.
SH_API int ShOffHit (ShHitFn fn)
 Remove one receiver, or all of them when fn is NULL.
SH_API uint32_t ShHitCount (void)
 A ring, for callers that would rather poll.
SH_API int ShGetHits (ShHit *out, int max)
SH_API int ShOnFire (ShFireFn fn, void *user, int flags)
 Register a receiver for shots, up to eight.
SH_API int ShOffFire (ShFireFn fn)
SH_API uint32_t ShShotCount (void)
SH_API int ShGetShots (ShShot *out, int max)

Detailed Description

Shots and impacts from the projectile hook.

Macro Definition Documentation

◆ SH_EVT_MINE_ONLY

#define SH_EVT_MINE_ONLY   0x1

Flags on the subscription.

0 delivers every event. MINE_ONLY depends on the shooter field, which some projectiles omit, so it is opt in.

◆ SH_EVT_NO_SELF

#define SH_EVT_NO_SELF   0x2

Typedef Documentation

◆ ShHitFn

typedef void(*) ShHitFn(const ShHit *hit, void *user)

Receivers run on a worker thread the API owns, so any API call is safe from inside one.

◆ ShFireFn

typedef void(*) ShFireFn(const ShShot *shot, void *user)

Function Documentation

◆ ShHitHookInstall()

SH_API int ShHitHookInstall ( void )

Install the hook.

Needed before any hit is reported.

◆ ShHitHookReady()

SH_API int ShHitHookReady ( void )

◆ ShOnHit()

SH_API int ShOnHit ( ShHitFn fn,
void * user,
int flags )

Register a receiver, up to eight.

◆ ShOffHit()

SH_API int ShOffHit ( ShHitFn fn)

Remove one receiver, or all of them when fn is NULL.

◆ ShHitCount()

SH_API uint32_t ShHitCount ( void )

A ring, for callers that would rather poll.

◆ ShGetHits()

SH_API int ShGetHits ( ShHit * out,
int max )

◆ ShOnFire()

SH_API int ShOnFire ( ShFireFn fn,
void * user,
int flags )

Register a receiver for shots, up to eight.

◆ ShOffFire()

SH_API int ShOffFire ( ShFireFn fn)

◆ ShShotCount()

SH_API uint32_t ShShotCount ( void )

◆ ShGetShots()

SH_API int ShGetShots ( ShShot * out,
int max )