UnrealShare
Class CreatureFactory

source: e:\games\UnrealTournament\UnrealShare\Classes\CreatureFactory.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Keypoint
         |
         +--UnrealShare.ThingFactory
            |
            +--UnrealShare.CreatureFactory
Direct Known Subclasses:None

class CreatureFactory
extends UnrealShare.ThingFactory

//============================================================================= // CreatureFactory. //=============================================================================
Variables
 int AddedCoopCapacity
           Extra creatures for coop mode
 name AlarmTag
           alarmtag given to creatures from this factory
 name OrderTag
           creatures from this factory will have these orders
 name Orders
           creatures from this factory will have these orders
 Pawn enemy
           creatures from this factory will have these orders

States
Waiting

Function Summary
 void PostBeginPlay()
 void PreBeginPlay()


State Waiting Function Summary
 void Touch(Actor Other)



Source Code


00001	//=============================================================================
00002	// CreatureFactory.
00003	//=============================================================================
00004	class CreatureFactory extends ThingFactory;
00005	
00006	var() name Orders;      // creatures from this factory will have these orders
00007	var() name OrderTag;
00008	var pawn	enemy;
00009	var() name AlarmTag;	// alarmtag given to creatures from this factory
00010	var() int  AddedCoopCapacity; // Extra creatures for coop mode
00011	
00012	function PreBeginPlay()
00013	{
00014		if ( Level.Game.bNoMonsters )
00015			Destroy();
00016		else
00017			Super.PreBeginPlay();
00018	}
00019	
00020	function PostBeginPlay()
00021	{
00022		Super.PostBeginPlay();
00023		if ( (Level.Game != None) && Level.Game.IsA('CoopGame') )
00024			capacity += AddedCoopCapacity;
00025	}
00026	
00027	Auto State Waiting
00028	{
00029		function Touch(Actor Other)
00030		{
00031			local pawn otherpawn;
00032		
00033			otherpawn = Pawn(Other);
00034			if ( (otherpawn != None) && (!bOnlyPlayerTouched || otherpawn.bIsPlayer) )
00035			{
00036				enemy = otherpawn;
00037				Trigger(other, otherPawn);
00038			}		
00039		}
00040	}	
00041			
00042	
00043	defaultproperties
00044	{
00045	     Orders=Attacking
00046	     capacity=1
00047	     bCovert=True
00048	}

End Source Code