Talk:Npc template maker

From Valve Developer Community
Jump to: navigation, search

Sometimes spawns won't move to path_corner?

This is so frustrating. The reason it's frustrating is because it seems like it is completely random!

I have four npc_template_maker entities. Everything is default, except for:

  • Start Disabled Yes
  • Num. of NPCs 4
  • Frequency -1
  • Max Live NPCs 1

The naming scheme for all four are tunnel_spawner[1,2,3,4], which also follows their template NPC name (antlion[1,2,3,4])

The four npc_antlions are in a nodraw container outside the map. Everything is default, except for:

  • Alert Radius 2064


  • Fall to ground Checked
  • Template NPC Checked

Now. When I begin the map, all of the template makers are enabled (at different times) whenever the player triggers a trigger_once volume. It is supposed to be set up as a battle so that after I kill one antlion (say from tunnel_spawner1), then another one replaces it after it dies. After a total of four kills from each spawner, the player can advance.

But sometimes when the antlion is spawned, it doesn't friggin' move! Each antlion has a path_corner to go to after spawning to get to the player's area. Like I said, sometimes it works, sometimes it doesn't. I did notice that it works well if there's only one npc_template_maker entity. Any help would be great, this is my current roadblock in front of my project. Any more information needed, let me know, I've been awake for 24 hours and might not be clear. --Mattshu 12:18, 6 February 2011 (UTC)

Just a hunch: It may take a while for the antlion to spawn, so give it a tick or two's delay before giving it order to move. --MossyBucket (formerly Andreasen) 13:49, 6 February 2011 (UTC)
They move by using the key Target Path Corner. Isn't there a way to custom move NPCs without using something like the Target Path Corner so I could put a little delay to move after spawning? --Mattshu 19:52, 6 February 2011 (UTC)
I wish I had the time to check this out for you, but what would happen if you didn't use the Target Path Corner key, but instead set something like OnSpawn, SetNextPathCorner, Delay 0.5? Also, you could look into aiscripted_schedule. --MossyBucket (formerly Andreasen) 20:09, 6 February 2011 (UTC)
Ugh, thank you. I don't even need path_corner's now. aiscripted_schedule's did the trick. Appreciate it. --Mattshu 20:55, 6 February 2011 (UTC)

Sometimes can't find npc_template_maker in game

I want make this entity, but this entity don't create npc, it is create weapon, but in game I got this:

unhandled input: (Spawn) -> (weapTemplatePist), from (func_button,weapbuybutton); target entity not found


P.S. Before some new tests, it is works at well, but now... --]{o$Tya It is me B-) 15:41, 17 May 2011 (UTC)