/////////////////////////////////////////////////////////////////////////// // Real Time Strategy - NWN - Unit Creation Tool //======================================================================== // By Deva Bryson Winblood. 02/23/2003 /////////////////////////////////////////////////////////////////////////// #include "rtsh_multiplay" int fnCountUnits(string sID) { // return how many units this team currently has int nRet=0; object oWP=GetWaypointByTag(sID+"_UNITS"); object oNPC; int nC=0; int nUnitTypes=StringToInt(GetName(oWP)); int nNum=0; string sTag; while(nCnCount) { // not at max units if (oDest!=OBJECT_INVALID&&(GetArea(oDest)==GetArea(oPC)||fnNearControlPoint(oPC)==TRUE)) { // in base location lLoc=GetItemActivatedTargetLocation(); oDest=CreateObject(OBJECT_TYPE_PLACEABLE,"creature_create",lLoc,FALSE); int nTeamNum=GetLocalInt(oPC,"nTeamNum"); int nUnitC=GetLocalInt(oMod,"nTeamU"+IntToString(nTeamNum)); string sTeamN=GetLocalString(oMod,"sTeamN"+IntToString(nTeamNum)); int nL=0; string sName; if (oDest==OBJECT_INVALID) SendMessageToPC(oPC,"ERROR RTS: Waypoint to create creature not created!!"); SetLocalObject(oPC,"oCreateUnit",oDest); SetLocalInt(oPC,"nTeamU",nUnitC); /// Create custom tokens here SetCustomToken(1000,sTeamN); while(nL