By default, Pupaes have too low Intelligence (BRAINS_None), so when TT_PawnProximity is used, the Trigger's function IsRelevant returns False
Code: Select all
function bool IsRelevant( actor Other )
{
if ( !bInitiallyActive )
return false;
switch ( TriggerType )
{
case TT_PlayerProximity:
return Pawn(Other)!=None && Pawn(Other).bIsPlayer;
case TT_PawnProximity:
return Pawn(Other)!=None && ( Pawn(Other).Intelligence > BRAINS_None );
case TT_ClassProximity:
return ClassIsChildOf(Other.Class, ClassProximityType);
case TT_AnyProximity:
return true;
case TT_Shoot:
return ( (Projectile(Other) != None) && (Projectile(Other).Damage >= DamageThreshold) );
}
}
and the SpecialEvent won't be triggered at all.
Sliths and IceSkaarjes trigger the SpecialEvent actor, but they can't harm themselves via TakeDamage called by the SpecialEvent actor. By default, Sliths and IceSkaarjes are supposed to be completely immune to some damage types: Sliths cannot be corroded, IceSkaarjes cannot be frozen. This is implemented by setting default values of ReducedDamageType and ReducedDamagePct to
'Corroded' and 1 respectively for Slith, and
'Frozen' and 1 respectively for IceSkaarj.
When a SpecialEvent calls TakeDamage for a Slith or an IceSkaarj, Engine.Pawn.TakeDamage is called. This function includes the following lines:
Code: Select all
if ( bIsPlayer )
{
if (ReducedDamageType == 'All') //God mode
actualDamage = 0;
else if (Inventory != None) //then check if carrying armor
actualDamage = Inventory.ReduceDamage(actualDamage, DamageType, HitLocation);
else actualDamage = Damage;
}
else if ( (InstigatedBy != None) && (InstigatedBy.IsA(Class.Name) || IsA(InstigatedBy.Class.Name)) )
ActualDamage = ActualDamage * FMin(1 - ReducedDamagePct, 0.35);
else if ( (ReducedDamageType == 'All') || ((ReducedDamageType != '') && (ReducedDamageType == damageType)) )
actualDamage = float(actualDamage) * (1 - ReducedDamagePct);
When the event is initiated by the same pawn for which TakeDamage is being called and its bIsPlayer == false, we have evaluation of
Code: Select all
ActualDamage = ActualDamage * FMin(1 - ReducedDamagePct, 0.35)
Therefore, in case of Slith or IceSkaarj whose ReducedDamagePct is 1, the actual damage will be reduced to zero.
I have no idea why Epic decided to overload the meaning of ReducedDamagePct in such perverted way, but this is how it works now.
If InitialState of a SpecialEvent actor is set to 'KillInstigator', then pawn's function Died will be called instead.