← Previous | Next →
getNPC
Description
Retrieves an NPC by its ID from the NPC repository and stores it in a global variable.
| Name | Type | Possibilities |
| getNPC | both | 2 |
Parameters
| # | Name | Type | Mandatory | Description | Multiple |
| 1 | name | NPC | Yes | The global variable name where the retrieved NPC will be stored. | No |
| 2 | id | string | Yes | The unique identifier of the NPC to retrieve. | No |
Outputs
| # | Description |
| 1 | The NPC was found and stored in the global variable. |
| 2 | The NPC with the specified ID was not found. |
Example
NPC
name Helper
model s_m_m_paramedic_01
position -1020.72 4839.78 258.30 0.0
interaction
nothing
behaviour
getNPC helperNPC npc_id_example