1. Code:
    newplayer = global.GameManager.server:CreateEntity( "assets/prefabs/player/player.prefab", ent.transform.position, new( UnityEngine.Quaternion._type, nil ) )               
                    newplayer:Spawn(true)
    Im running this in a while loop, creating 50 NPC's, how to ensure that the NPC has actually spawned before spawning the next one?
     
  2. Wulf

    Wulf Community Admin

    Have you looked at the Human NPC plugin?
     
  3. Yes, thats where i got this snippet from, the while loop is too fast, i need to make sure that the npc is actually spawned spawned and registered by the server before i create the next one .. versus creating all 50 at once
     
  4. Can you paste the snippet of your loop? Also, couldn't you just use a really short timer?