39 lines
1.1 KiB
Plaintext
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);
|
|
}
|