Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealGame.DOMSquadAI


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
class DOMSquadAI extends SquadAI;

function AssignCombo(Bot B)
{
	if ( GetOrders() != 'Attack' )
		Super.AssignCombo(B);
}

function name GetOrders()
{
	local name NewOrders;
	
	if ( PlayerController(SquadLeader) != None )
		NewOrders = 'Human';
	else if ( bFreelance && DOMTeamAI(Team.AI).StayFreelance(self) )
		NewOrders = 'Freelance';
	else if ( (SquadObjective != None) && (SquadObjective.DefenderTeamIndex == Team.TeamIndex) )
		NewOrders = 'Defend';
	else
		NewOrders = 'Attack';
	if ( NewOrders != CurrentOrders )
	{
		NetUpdateTime = Level.Timeseconds - 1;
		CurrentOrders = NewOrders;
	}
	return CurrentOrders;
}

function byte PriorityObjective(Bot B)
{
	if ( DomTeamAI(Team.AI).DominationPending() )
		return 2;
	return 0;
}

function bool AssignSquadResponsibility(Bot B)
{
	if ( GetOrders() == 'Attack' )
		B.TryCombo("Random");

	if ( bFreelance )
		DOMTeamAI(Team.AI).CheckFreelanceObjective(self);

	if ( (DominationPoint(SquadObjective) != None) && !DominationPoint(SquadObjective).bControllable && B.FindInventoryGoal(0.0001) )
	{
		B.GoalString = "Need weapon or ammo";
		B.SetAttractionState();
		return true;
	}
			
	return Super.AssignSquadResponsibility(B);
}

defaultproperties
{
	GatherThreshold=0.0
	MaxSquadSize=5
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:08.000 - Creation time: Do 14.8.2014 09:58:37.692 - Created with UnCodeX