Jump to content
  • 0

Spawning Set NPC's


Coza

Question

So I was messing around with a prototype Bossfight, in which the second "phase" the boss would transition to a new NPC. And Spawn several 'turret' NPC's for the players to dodge at the same time. 

 

However with my current setup, it seems to spawn infinite NPC's in these set locations, causing absolute carnage. How do I go about limiting it to only spawning 1 per designated tile? 

 

Thanks! 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

Its best to just spawn npcs on the map and set their spawn locations. Stick npc avoids around their spawn locations to stop them moving if you want stationary turrets.

 

Honestly I wish I never implemented that spawn npc event as its caused people more hassle and grief than benefit. Because its extremely easy to overflood your maps. If you want to go this way still make a global switch called and set it to true when you spawn npcs. There is a condition that checks if all spawned npcs are destroyed I believe if so set the global switch back to false and then the cycle will repeat and npcs will spawn again. If you want a delay put a delay in etc...

 

But again I'd just personally use default npc spawn timers on the map and just hard code their spawn locations.

 

Hope this helps.

 

Kibz

Link to comment
Share on other sites

×
×
  • Create New...