I made this code and added a broadcastmessage to the function to check if it is called , but it never does
any ideas?
Code: Select all
function MutatorTakeDamage( out int ActualDamage, Pawn Victim, Pawn InstigatedBy, out Vector HitLocation,
out Vector Momentum, name DamageType)
{
local inventory s;
if ( NextDamageMutator != None )
NextDamageMutator.MutatorTakeDamage( ActualDamage, Victim, InstigatedBy, HitLocation, Momentum, DamageType );
BroadcastMessage("mutatortakedamage");
if (playerpawn(InstigatedBy) != none)
{
s = InstigatedBy.FindInventoryType(class'S_MMSpawner');
if (s != none)
{
s_MMspawner(s).ownerinfo.damagedone[4] = s_MMspawner(s).ownerinfo.damagedone[3];
s_MMspawner(s).ownerinfo.damagedone[3] = s_MMspawner(s).ownerinfo.damagedone[2];
s_MMspawner(s).ownerinfo.damagedone[2] = s_MMspawner(s).ownerinfo.damagedone[1];
s_MMspawner(s).ownerinfo.damagedone[1] = s_MMspawner(s).ownerinfo.damagedone[0];
s_MMspawner(s).ownerinfo.damagedone[0] = actualdamage;
}
}
}