Skip to content

function createNpc (server-side)

Available since version: 0.3.0

Note

By default npcs won't be added to world. In order to do that, you have to call spawnPlayer.

Note

Remote NPC id will always begins from max slots value.

This function creates remote NPC.

Declaration

int createNpc(string name, string instance = "PC_HERO")

Parameters

  • string name: the displayed name of the npc.
  • string instance: the instance name of for the npc.

Returns int

The identifier of created npc. If identifier is set to -1 then creation of npc failed.