Author Topic: Endless Spawning  (Read 514 times)

Legacy_Megaloptus

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Endless Spawning
« on: May 30, 2013, 08:18:55 pm »


                How do I make a spawn point that spawns x number of x npc, every x seconds for x amount of time or an infinite amount of time? Also, once the npc(s) spawn, how can I make them move to a location or post? Most of this stuff is seen in the kobold demo module made by Bioware, but even after looking through the scripts I cannot figure out how to do this on my own.
I am not an experienced scripter at all and have been attempting to use the Script Generator to complete this task but i had trouble figuring out how to spawn multiples of something for a long period of time. Basically I want encounters, but without needing a trigger and the ability for the spawned NPCs to move to a location.
This is all for the ability to create endless battles between NPCs, which would be quite amusing. Thanks for any help that can be offered.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Endless Spawning
« Reply #1 on: May 31, 2013, 07:12:49 pm »


               Just do a delaycommand executescript "nameofthespawncript" oArea where oArea is defined as the area the oPC is in preferably checking to see it is the same area where the monsters are to spawn. Place the line at the bottom of your spawn script.  It will juar keep spawning.  You can put a counter on it too, to stop it after a certain point.
Look at my random spawner for clues. 
http://nwvault.ign.c....detail&id=3318
               
               

               


                     Modifié par ffbj, 31 mai 2013 - 06:14 .
                     
                  


            

Legacy_CaveGnome

  • Sr. Member
  • ****
  • Posts: 432
  • Karma: +0/-0
Endless Spawning
« Reply #2 on: May 31, 2013, 07:18:38 pm »


               Hello, i am not sure the script generator can cope. What you want probably needs custom hand scripting or perhaps it can be done tweaking the standard "encounter" system (i recommend studying it before rolling your own). To learn scripting, try the "lexicon" and "omnibus". You can repost your question on the "scripting" forum for better replys.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Endless Spawning
« Reply #3 on: May 31, 2013, 07:20:18 pm »


               For moving npc's to a wp just use the move to object, or wp, or move to location.  Usually  you want to do it onperception of the PC.  This can be done fairly easily using LS script generator.  It is only like a line long.
It is true that it is a scripting question.
               
               

               


                     Modifié par ffbj, 31 mai 2013 - 06:21 .
                     
                  


            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Endless Spawning
« Reply #4 on: May 31, 2013, 09:00:03 pm »


               NESS (Neshke Narovken Extendable Spawn System) could allow you to set this kind of thing up pretty easily, IIRC.  Here is a link to one of the first hits that came back on a search but it isn't necessarily the latest version.  From the testing I did with it, NESS didn't seem to be so much of a spawn system (in a conventional sense) so much as an area populator.  It does the kind of thing you mentioned.  The method has its drawbacks though it's probably more flexible than I recall.

If you were to use it, you might want to consider something that applies the EffectCutsceneGhost onto the creatures that're spawned.  If you have a lot of creatures moving around and/or fighting at once, EffectCutsceneGhost can dramatically lessen the resources they take up.  A little more information and a demo module in this thread.  The creatures will be able to walk through each other but when in combat they'll assume the appropriate attack distance and maintain it.  The other way to cut down on resources all those guys would use is cutting down on sound resources they play, oddly enough.  That one I don't have a turnkey solution for off the top of my head but an oversaturated scene sound-wise is a known bottleneck.  There are a few other tips and tricks for pulling off crowd scenes/big battles you can find in various threads in the Omnibus.  The two biggest ones, IIRC, if you're just using default AI are pathing and sounds, tho.