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

Standalone NPCs by archetype, built like the engine's spawn director does (FINDINGS "NPC SPAWN WORKS"). More...

Data Structures

struct  ShNpcArchetype

Functions

SH_API int ShNpcCount (void)
 The archetype registry, read once per session on first use.
SH_API const ShNpcArchetype * ShNpcAt (int index)
SH_API uint64_t ShSpawnNpc (uint64_t archetypeId, const ShVec3 *pos)
 Spawn an NPC and return its ENTITY, or 0 on failure.
SH_API int ShDespawn (uint64_t entity)
 Retire a spawned entity, NPC or vehicle, through the spawn manager.

Detailed Description

Standalone NPCs by archetype, built like the engine's spawn director does (FINDINGS "NPC SPAWN WORKS").

Function Documentation

◆ ShNpcCount()

SH_API int ShNpcCount ( void )

The archetype registry, read once per session on first use.

About 530 entries, about 150 of them kind 1.

◆ ShNpcAt()

SH_API const ShNpcArchetype * ShNpcAt ( int index)

◆ ShSpawnNpc()

SH_API uint64_t ShSpawnNpc ( uint64_t archetypeId,
const ShVec3 * pos )

Spawn an NPC and return its ENTITY, or 0 on failure.

Blocks until it exists, usually a frame or two. The NPC joins the population manager with the current Camp and Job, so its AI runs like a native spawn.

◆ ShDespawn()

SH_API int ShDespawn ( uint64_t entity)

Retire a spawned entity, NPC or vehicle, through the spawn manager.

Entities built outside the spawn system have no spec and refuse.