Well, I've search everywhere for something on the topic..perhaps my search teerms are just wrong...anyway...I've figured out how to get the stuff to add to the HeadShot (DecapitationMessage) actor..I just don't know how to get the DecapitationMessage actor to halt...I've tried many variations of code..here is what I'm working with:
Any ideas? Your help would be greatly appreciated...
Also, I am doing this in the form of a mutator so it can be redistributed....
Code:
//=============================================================================
// Headshot Mutator file....
//
// by p455w0rd
//=============================================================================
class headshot expands Mutator;
#exec AUDIO IMPORT FILE="Sounds\exiled.wav" NAME="exiled"
var bool bInitialized;
event PostBeginPlay()
{
if (bInitialized)
Return;
bInitialized = True;
Level.Game.RegisterDamageMutator( Self );
}
function MutatorTakeDamage(out int ActualDamage, Pawn Victim, Pawn InstigatedBy, out Vector HitLocation, out Vector Momentum, name DamageType)
{
local LocalMessagePlus lmp;
foreach AllActors(Class'LocalMessagePlus', lmp) {
if (lmp.IsA('DecapitationMessage')) {
lmp.Destroy();
}
}
if (DamageType == 'Decapitated' && (InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn')))
{
HeadshotScenario(InstigatedBy, Victim);
}
else
{
Super.MutatorTakeDamage(ActualDamage, Victim, InstigatedBy, HitLocation, Momentum, DamageType);
}
}
simulated function HeadshotScenario(Pawn Exiler, Pawn Exilee)
{
PlayerPawn(Exiler).ClientPlaySound(Sound'exiled', true, true);
Level.Game.BroadcastMessage(Exiler.PlayerReplicationInfo.PlayerName $" exiled "$ Exilee.PlayerReplicationInfo.PlayerName $"!!!", true, 'CriticalEvent');
}
defaultproperties
{
}
Any ideas? Your help would be greatly appreciated...
Also, I am doing this in the form of a mutator so it can be redistributed....
Last edited: