I have seen this in the iSlave monsterĀ“s code
//=========================================================
// TakeDamage - get provoked when injured
//=========================================================
int CISlave :: TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType)
{
// don't slash one of your own
if ((bitsDamageType & DMG_SLASH) && pevAttacker && IRelationship( Instance(pevAttacker) )<= R_DL )
return 0;
m_afMemory |= bits_MEMORY_PROVOKED;
return CSquadMonster::TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType);
}
But I cannot understand well how to modify it so the enemy attacks you...