HoS_PRC8/_mod/_module/nss/airmother_cre.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

39 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name x2_def_endcombat
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default Combat Round End script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
object oMe=OBJECT_SELF;
object oAW;
object oWP;
int nN;
int bFound=FALSE;
nN=1;
oWP=GetNearestObjectByTag("AIRWARRIOR_SPAWN",oMe,nN);
while(oWP!=OBJECT_INVALID&&!bFound)
{ // look for available spawn location
oAW=GetNearestObjectByTag("AIRWARRIOR",oWP,1);
if (oAW==OBJECT_INVALID||GetDistanceBetween(oWP,oAW)>3.0) bFound=TRUE;
else
{
nN++;
oWP=GetNearestObjectByTag("AIRWARRIOR_SPAWN",oMe,nN);
}
} // look for available spawn location
if (bFound)
{ // spawn
oAW=CreateObject(OBJECT_TYPE_PLACEABLE,"airwarrior",GetLocation(oWP));
SetLocalObject(oAW,"oMother",oMe);
} // spawn
ExecuteScript("nw_c2_default3", OBJECT_SELF);
}