Aller au contenu

Photo

About NESS spawn system problem with some flags!


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Krevett

Krevett
  • Members
  • 104 messages
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!

#2
TSMDude

TSMDude
  • Members
  • 865 messages
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....

#3
Krevett

Krevett
  • Members
  • 104 messages
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....

#4
TSMDude

TSMDude
  • Members
  • 865 messages
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.)

#5
Krevett

Krevett
  • Members
  • 104 messages
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 .


#6
TSMDude

TSMDude
  • Members
  • 865 messages
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 .


#7
TSMDude

TSMDude
  • Members
  • 865 messages
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.

#8
Krevett

Krevett
  • Members
  • 104 messages
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!

#9
Krevett

Krevett
  • Members
  • 104 messages
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;