changing the HeadShot!! messages in UT99

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

p455w0rd

New Member
Oct 6, 2005
2
0
0
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:

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:

p455w0rd

New Member
Oct 6, 2005
2
0
0
i know it isn't that hard...i just can't figure it out...would womeone pleeeeeeeeeeeeeeeeeeeeeeeeeeeeease help....