function spawnNpc (client-side)
Available since version: 0.1.1
Note
If you try to spawn the local player by passing heroId as npcId, the instance argument gets ignored.
This function will add NPC to the current world.
Declaration
bool spawnNpc(int npcId, string instance = "PC_HERO")
Parameters
intnpcId: the npc id.stringinstance: the instance of the NPC.
Returns bool
true when NPC was successfully spawned, otherwise false.