Author Topic: How To Spawn Random Objects  (Read 536 times)

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
How To Spawn Random Objects
« on: February 19, 2011, 09:02:25 pm »


               I'm trying to find a simple solution to spawning a random object using NESS. Any ideas?
               
               

               
            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
How To Spawn Random Objects
« Reply #1 on: February 19, 2011, 09:43:34 pm »


               Spawn only one object? or 1 object from a group? Or randomly spawn a Object? Also is the object a creature, placeable or Item? NESS allows for all, just a matter of putting in the right set of markers.



Setting it up to spawn a random thing from a set of things, requires editing the spawn_cfg_group script, and creating the group name, and the resrefs of the objects in the group- they can be creatures placeables or Items. The SG_ tells the system to spawn from the group, the group name is used in the TAG of the way point.



Setting it up to randomly spawn 1 thing is easier, just put the RS"whatever%_ you want to have, like RS30_ for a 30%



As an example, here is how I set up my NESS waypoint, to randomly spawn in 1 in 4 placeables from a group. SP_PL_SD15_SG_RS50 in the name, crypt_fungi in the tag. Now SP_, denotes that it should spawn something, PL_ tells it that it is a placeable type object, SD15, tells it to wait 15 heartbeats from the time the first PC enters the area, SG_ tells it to look at the group script, and RS50 tells it that there is a 50% chance for it to spawn.

In my spawn_cfg_group file, I have 4 different placeables listed, and have set it to roll a d4, and if roll is a1 spawn this, if 2 spawn that and so on. you can go upto d100, but you must put the resref, not the tag of the object to spawn in, other wise it might mess up.  



the NESS system is well documented, and should have come with the dl.

good luck!
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
How To Spawn Random Objects
« Reply #2 on: February 19, 2011, 11:31:29 pm »


               SP_PL_SD15_SG_RS50 is what I needed.. Thank you kindly Shova. You're right about the documentation (131 pages).