//-----------------------------------------------------------------------------
// Purpose: Creates a new NPC every so often.
//-----------------------------------------------------------------------------
void CNPCMakerXenInvasion::MakerThink(void)
{
	SetNextThink(gpGlobals->curtime + m_flSpawnFrequency);
	if (HasSpawnFlags(SF_NPCMAKER_DOUBLETROUBLE))
	{
		MakeNPC();
		SetNextThink(gpGlobals->curtime + 0.5);
		MakeNPC();
	}
	else
	{
		MakeNPC();
	}
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
// Purpose: Input handler that spawns an NPC.
//-----------------------------------------------------------------------------
void CBaseNPCMaker::InputSpawnNPC( inputdata_t &inputdata )
{
	if( !IsDepleted() )
	{
		MakeNPC();
	}
}
void CSurvivalZombieSpawn::Think()
{
	if ( ChildsAlive < 5 )
		MakeNPC();

	SetNextThink(gpGlobals->curtime + 10);
}
Ejemplo n.º 4
0
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CTemplateNPCMaker::MakeMultipleNPCS( int nNPCs )
{
	bool bInRadius = ( m_iszDestinationGroup == NULL_STRING && m_flRadius > 0.1 );
	while ( nNPCs-- )
	{
		if ( !bInRadius )
		{
			MakeNPC();
		}
		else
		{
			MakeNPCInRadius();
		}
	}
}
void CSurvivalZombieSpawn::InputSpawnCount(inputdata_t &inputdata)
{
	int i;
	CAI_BaseNPC *pZombie = NULL;

	for ( i = 0; i <= inputdata.value.Int(); i = i + 1)
	{
		pZombie = MakeNPC();

		if ( !pZombie )
		{
			DevMsg("[SURVIVAL ZOMBIE MAKER] No se ha podido crear el zombi %i \r\n", i);
			continue;
		}
	}
}
//=========================================================
// Crea un Zombi sin colisiones.
//=========================================================
CAI_BaseNPC *CDirectorSpawn::MakeNoCollisionNPC(bool Horde, bool disclosePlayer)
{
	// Desactivado
	if ( Disabled )
		return NULL;

	// Creamos el NPC normalmente.
	CAI_BaseNPC *pNPC = MakeNPC(Horde, disclosePlayer, false);

	// Emm... ¿puso todas las clases en "no crear"? :genius:
	if ( !pNPC )
	{
		Warning("[DIRECTOR NPC] Ha ocurrido un problema al intentar crear un zombie. \r\n");
		return NULL;
	}

	// Lugar de creación.
	pNPC->SetAbsOrigin(GetAbsOrigin());
	// No colisiona con otros NPC's.
	pNPC->SetCollisionGroup(COLLISION_GROUP_SPECIAL_NPC);

	return pNPC;
}
Ejemplo n.º 7
0
//-----------------------------------------------------------------------------
// Purpose: Creates a new NPC every so often.
//-----------------------------------------------------------------------------
void CBaseNPCMaker::MakerThink ( void )
{
	SetNextThink( gpGlobals->curtime + m_flSpawnFrequency );

	MakeNPC();
}
Ejemplo n.º 8
0
//-----------------------------------------------------------------------------
// Purpose: Input handler that spawns an NPC.
//-----------------------------------------------------------------------------
void CHL1NPCMaker::InputSpawnNPC( inputdata_t &inputdata )
{
	MakeNPC();
}
void CDirectorSpawn::InputSpawn(inputdata_t &inputdata)
{
	MakeNPC();
}
void CSurvivalZombieSpawn::InputSpawn(inputdata_t &inputdata)
{
	MakeNPC();
}
//-----------------------------------------------------------------------------
// Purpose: Input handler that spawns an NPC.
//-----------------------------------------------------------------------------
void CNPCMakerXenInvasion::InputSpawnNPC(inputdata_t &inputdata)
{
	MakeNPC();
}