Author Topic: About NESS spawn system problem with some flags!  (Read 501 times)

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« on: November 15, 2010, 05:08:14 pm »


               I'm using NESS spawn system (v8.1.3) in my module and encountered a problem that makes me scratch my head ^^
Using the flag DS0 (deactivate when all childrens are dead) with a timer flag (DOD/NOD/HRnTm) make the creature spawn at the specified hour (that's what we're looking for here!!) then despawn when the time comes but never respawn the next day.....
Looking through the code i've found this:
                // Deactivate if all Children are Dead
                case 0:
                    if (nSpawnCount == 0 && nChildrenSpawned != 0)
                    {
                        nSpawnDeactivated = TRUE;
                        nRunDeactivateScript = TRUE;
                        nSpawnBlock = TRUE;
                    }
                break;
That means that when they despawn nSpawnCount is 0 and nChildrenSpawned is greater than 0 because creature have been spawned during the right hours, so the spawn point deactivates as if all creatures were dead....And that's not what I was expecting!! Has anyone been using this system and found a solution to this problem? Thanks in advance for your help!
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #1 on: November 15, 2010, 08:19:16 pm »


               We use NESS quite a bit and I do not think I am understanding you...in my defense though I amd rugged up a bit from pain meds, lol....
               
               

               
            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #2 on: November 15, 2010, 08:26:47 pm »


               What I mean is i'd like to have a spawn point that will spawn a group of creature say between hour 12 and 18, and that spawn point will deactivate when the group is dead...The problem is that if the creatures are spawned at 12 and not killed before 18 they despawn, but the spawn point is deactivated as if they were killed....
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #3 on: November 15, 2010, 11:49:59 pm »


               Okay, and it is a group spawn then? When i get home tonight I will do it and post it in the morning for you...any other request?



(or just post the Flags your using on the waypoint and I will incorprate them real quick.)
               
               

               
            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #4 on: November 16, 2010, 08:24:20 am »


               The problem show up for groups and singles also...The first are for merchant that spawn from 08 to 18 I use the following flags SP_PC5_HR08T18_DS0 (I use DS0 because I don't want them to respawn if they're killed...) and these are for groups in a camp SP_SG_SN6_SA_PC5_HR07T19_DS0 (again I want them to spawn from day to day if they're not killed, but I don't want them to respawn in the other case...) thanks for your help TSM
               
               

               


                     Modifié par Krevett, 16 novembre 2010 - 08:29 .
                     
                  


            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #5 on: November 16, 2010, 01:02:55 pm »


               On the PC5 you are despawning them after 5 minutes which in effect is killing them and deactivating the spawn I think. I think it needs to be like this...

SP_SA_HR04T08_PC05R_DS0
 
PC05R means they despawn from the area after 5 minutes of no PC in the area but the spawn resets otherwise with just PC5 they despawn when a player is gone from the area for five minutes and the spawn flag is then deactivated.
               
               

               


                     Modifié par TSMDude, 16 novembre 2010 - 01:05 .
                     
                  


            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #6 on: November 16, 2010, 01:03:47 pm »


               And no you do not need the 0 in there and it can just be PC5R I am just used to writing the 0 in for some reason.
               
               

               
            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #7 on: November 16, 2010, 06:10:54 pm »


               Tested a bit today...The problem is not with the PC flag as it stores information when the PC leave the area and then respawn them as normal (the spawn is not deactivated with the PC flag)

The problem lies within the HRnTm flag or DOD/NOD flags, really killing and deactivating the spawn by despawning the creature...I tried to edit a bit the spawn_main to solve this issue but for now still scratching my head lol!
               
               

               
            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
About NESS spawn system problem with some flags!
« Reply #8 on: November 16, 2010, 06:18:43 pm »


               I tried this but it doesn't seems to work



switch (nDeactivateSpawn)

           {

               // Deactivate if all Children are Dead

               case 0:

                   if (nSpawnHourEnd > -1 || nDayOnlyDespawn == TRUE || nNightOnlyDespawn == TRUE)

                    { if (IsBetweenHours(GetTimeHour(), nSpawnHourStart, nSpawnHourEnd)

                         || (nDayOnlyDespawn == TRUE && (GetIsDay() || GetIsDawn()))

                         || (nNightOnlyDespawn == TRUE && (GetIsNight() || GetIsDusk())))

                         { if (nSpawnCount == 0 && nChildrenSpawned != 0)

                            {

                             nSpawnDeactivated = TRUE;

                             nRunDeactivateScript = TRUE;

                             nSpawnBlock = TRUE;

                            }

                         }

                    }

                   if (nSpawnHourEnd == -1 && nDayOnlyDespawn == FALSE && nNightOnlyDespawn == FALSE)

                    { if (nSpawnCount == 0 && nChildrenSpawned != 0)

                       {

                         nSpawnDeactivated = TRUE;

                         nRunDeactivateScript = TRUE;

                         nSpawnBlock = TRUE;

                       }

                    }

               break;