Page 1 of 1

bLeadTarget

Posted: Thu Jan 30, 2020 7:27 pm
by OjitroC
In the UnrealShare.ScriptedPawn properties under Combat there is a bool property bLeadTarget - what is the effect of setting this to False (True seems to be the default)?

Re: bLeadTarget

Posted: Thu Jan 30, 2020 8:07 pm
by sektor2111
This one:

Code: Select all

function PreBeginPlay()
{
	Super.PreBeginPlay();

	if ( Level.Game.bVeryLowGore )
		bGreenBlood = true;

	if ( Skill > 2 )
		bLeadTarget = true;
	else if ( (Skill == 0) && (Health < 500) )
	{
		bLeadTarget = false;		
		ReFireRate = 0.75 * ReFireRate;
	}	

	if ( bIsBoss )
		Health = Health + 0.15 * Skill * Health;

	bInitialFear = (AttitudeToPlayer == ATTITUDE_Fear);
}
...
...
final function FireProjectile(vector StartOffset, float Accuracy)
{
	local vector X,Y,Z, projStart;

	MakeNoise(1.0);
	GetAxes(Rotation,X,Y,Z);
	projStart = Location + StartOffset.X * CollisionRadius * X 
					+ StartOffset.Y * CollisionRadius * Y 
					+ StartOffset.Z * CollisionRadius * Z;
	spawn(RangedProjectile ,self,'',projStart,AdjustAim(ProjectileSpeed, projStart, Accuracy, bLeadTarget, bWarnTarget));
}
As I could see in during my MH time, this is when skilled monster is firing some rocket in front of enemy's movement direction attempting to predict a death meeting. Different said if you run to the left and you keep running there, skilled monster will fire rocket having all chances to hit you if you keep moving in that direction even if initially apparently missed you.
It was one of my reasons for setting up difficulty properly right from run-line... A.I. pawn generally it's initialized based on difficulty byte capping at 3 in Pawn's PrebeginPlay(). You can take a look at function AdjustAim(....).

Re: bLeadTarget

Posted: Thu Jan 30, 2020 8:32 pm
by OjitroC
I see - thanks for that explanation.