Hi, I'm trying to modify the script I have so it will stop spawning in mobs when the number of NPC/hostile faction members equals the number of PC faction members. If it could also possibly keep track of the ones that have already died that would be awesome. I need help if anyone's willing or knows how to do this.
Here's what I have right now.
{
object oSpawn;
effect eVFX;
object oSelf = OBJECT_SELF;
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 27.0, GetLocation(OBJECT_SELF), TRUE);
int i = 0;
while(oTarget != OBJECT_INVALID)
{
if(GetIsPC(oTarget))
{
if(GetObjectSeen(oTarget) && i != 1)
{
i++;
}
else if(GetObjectSeen(oTarget))
{
//DO CALL FOR HELP THING HERE
eVFX = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_EVIL);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ephemeralnegativ", GetLocation(oSelf));
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
break;
}
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 27.0, GetLocation(OBJECT_SELF), TRUE);
}
}





Retour en haut







