XIDCine
Class XIIISpecificController

source: C:\XIII\XIDCine\Classes\XIIISpecificController.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Controller
         |
         +--Engine.AIController
            |
            +--XIDCine.XIIISpecificController
Direct Known Subclasses:None

class XIIISpecificController
extends Engine.AIController

//============================================================================= // XIIISpecificController. // Created by iKi on Dec ??th 2001 // Last Modification Feb 04th 2002 //=============================================================================
Variables
 XIIIPlayerController PC


Function Summary
 void CorrectPosition()
     
// put the right pawn position and rotation after a developped animation
 int CountPawnByTag(name t)
 void DebugLog(string str)
     
// DebugLog
 void DisableEnnemyGroupByTag(name t)
 void EnableEnnemyGroupByTag(name t)
 void FindPlayerController()
 Actor GetPositionInfo(int index)
 void UseActorRotation(Actor A)



Source Code


00001	//=============================================================================
00002	// XIIISpecificController.
00003	// Created by iKi on Dec ??th 2001
00004	// Last Modification Feb 04th 2002
00005	//=============================================================================
00006	class XIIISpecificController extends AIController;
00007	
00008	VAR XIIIPlayerController PC;
00009	
00010	FUNCTION Actor GetPositionInfo(int index)
00011	{
00012		LOCAL PositionInfo pi;
00013	
00014		foreach DynamicActors( class'PositionInfo',pi )
00015		{
00016			if (pi.name==name("PositionInfo"$index))
00017			return pi;
00018		}
00019		DebugLog("###"@Name@": Can't find actor 'PositionInfo"$index$"'.");
00020		return none;
00021	}
00022	
00023	FUNCTION FindPlayerController()
00024	{
00025		PC=XIIIPlayerController(Level.ControllerList);
00026	/*	LOCAL Controller C;
00027		for( C=Level.ControllerList; C!=None; C=C.nextController )
00028			if( C.IsA('PlayerController') )
00029			{
00030				PC=XIIIPlayerController(C);
00031				break;
00032			}*/
00033	}
00034	
00035	FUNCTION int CountPawnByTag(name t)
00036	{
00037		LOCAL Pawn P;
00038		LOCAL int n;
00039		n=0;
00040		foreach DynamicActors( class'Pawn',P ,t)
00041			n++;
00042		return n;
00043	}
00044	
00045	FUNCTION DisableEnnemyGroupByTag(name t)
00046	{
00047		LOCAL Pawn P;
00048	
00049		foreach DynamicActors( class'Pawn',P ,t)
00050		{
00051			if (P.IsA('basesoldier'))
00052			{
00053				P.bstasis=true;
00054				P.Controller.bstasis=true;
00055			}
00056		}
00057	}
00058	
00059	FUNCTION EnableEnnemyGroupByTag(name t)
00060	{
00061		LOCAL Pawn P;
00062	
00063		foreach DynamicActors( class'Pawn',P ,t)
00064		{
00065			if (P.IsA('basesoldier'))
00066			{
00067				P.bstasis=false;
00068				P.Controller.bstasis=false;
00069			}
00070		}
00071	}
00072	
00073	FUNCTION UseActorRotation(Actor A)
00074	{
00075		FocalPoint=A.Location+1000*vector(A.Rotation);
00076		Focus=none;
00077	}
00078	
00079	// DebugLog
00080	FUNCTION DebugLog(string str)
00081	{
00082		PC.MyHud.LocalizedMessage(class'XIIIDialogMessage',0, none,none,none,"DEBUG : "@str);
00083	}
00084	
00085	// put the right pawn position and rotation after a developped animation
00086	FUNCTION CorrectPosition()
00087	{
00088		Pawn.SetLocation(Pawn.GetBoneCoords('X').Origin);
00089		Pawn.SetRotation(Pawn.GetBoneRotation('X'));
00090	}
00091	
00092	
00093	
00094	defaultproperties
00095	{
00096	}

End Source Code