I wrote:JackGriffin wrote:Lines like "If something != None" are sanity checks and are needed to prevent scriptlog errors. If a function is called within UScript then there will always be some sort of return. If there is not then it will error.
Code: Select all
function PostBeginPlay()
{
Level.Game.RegisterDamageMutator( Self );
}
function MutatorTakeDamage (out int ActualDamage,Pawn Victim,Pawn InstigatedBy,out Vector HitLocation,out Vector Momentum,name DamageType)
{
if(DamageType == 'Fell')
{
ActualDamage = 100;
//ActualDamage *= 1;
}
if ( NextDamageMutator != None )
NextDamageMutator.MutatorTakeDamage(ActualDamage, Victim, InstigatedBy, HitLocation, Momentum, DamageType);
}