Engine
Class ZoneInfo

source: e:\games\UnrealTournament\Engine\Classes\ZoneInfo.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ZoneInfo
Direct Known Subclasses:KillingField, PressureZone, VacuumZone, LevelInfo, SkyZoneInfo, WarpZoneInfo, CloudZone, NitrogenZone, TarZone, LavaZone, SlimeZone, TeleporterZone, ToggleZoneInfo, WaterZone

class ZoneInfo
extends Engine.Info

//============================================================================= // ZoneInfo, the built-in Unreal class for defining properties // of zones. If you place one ZoneInfo actor in a // zone you have partioned, the ZoneInfo defines the // properties of the zone. // This is a built-in Unreal class and it shouldn't be modified. //=============================================================================
Variables
 int DamagePerSec
 string DamageString
 name DamageType
 class EntryActor
           e.g. a splash (only if water zone)
 sound EntrySound
           only if waterzone
 class ExitActor
           e.g. a splash (only if water zone)
 sound ExitSound
           only if waterzone
 LocationID LocationID
 int MaxCarcasses
 byte MaxLightCount
           maximum number of lights to use (when MeshPolyCount drops below MinLightingPolyCount)
 int MaxLightingPolyCount
           maximum number of lights to use (when MeshPolyCount drops below MinLightingPolyCount)
 byte MinLightCount
           minimum number of lights to use (when MaxLightingPolyCount is exceeded)
 int MinLightingPolyCount
           maximum number of lights to use (when MeshPolyCount drops below MinLightingPolyCount)
 int NumCarcasses
 SkyZoneInfo SkyZone
           Optional sky zone containing this zone's sky.
 float ZoneFluidFriction
 vector ZoneGravity
 float ZoneGroundFriction
 int ZonePlayerCount
 name ZonePlayerEvent
 name ZoneTag
 float ZoneTerminalVelocity
 vector ZoneVelocity
 bool bBounceVelocity
           this velocity zone should bounce actors that land in it
 bool bDestructive
           Destroys carcasses.
 bool bFogZone
           Zone is fog-filled.
 bool bGravityZone
           Use ZoneGravity.
 bool bKillZone
           Zone instantly kills those who enter.
 bool bMoveProjectiles
           this velocity zone should impart velocity to projectiles and effects
 bool bNeutralZone
           Players can't take damage in this zone.
 bool bNoInventory
           Destroys carcasses.
 bool bPainZone
           Zone causes pain.
 bool bWaterZone
           Zone is water-filled.


Function Summary
 
simulated
LinkToSkybox()
     
//=============================================================================
 
simulated
PreBeginPlay()
     
//=============================================================================
// Engine notification functions.
 void Trigger(Actor Other, Pawn EventInstigator)



Source Code


00001	//=============================================================================
00002	// ZoneInfo, the built-in Unreal class for defining properties
00003	// of zones.  If you place one ZoneInfo actor in a
00004	// zone you have partioned, the ZoneInfo defines the 
00005	// properties of the zone.
00006	// This is a built-in Unreal class and it shouldn't be modified.
00007	//=============================================================================
00008	class ZoneInfo extends Info
00009		native
00010		nativereplication;
00011	
00012	#exec Texture Import File=Textures\ZoneInfo.pcx Name=S_ZoneInfo Mips=Off Flags=2
00013	
00014	//-----------------------------------------------------------------------------
00015	// Zone properties.
00016	
00017	var() name   ZoneTag;
00018	var() vector ZoneGravity;
00019	var() vector ZoneVelocity;
00020	var() float  ZoneGroundFriction;
00021	var() float  ZoneFluidFriction;
00022	var() float	 ZoneTerminalVelocity;
00023	var() name   ZonePlayerEvent;
00024	var   int    ZonePlayerCount;
00025	var   int	 NumCarcasses;
00026	var() int	 DamagePerSec;
00027	var() name	 DamageType;
00028	var() localized string DamageString;
00029	var(LocationStrings) localized string ZoneName;
00030	var LocationID LocationID;	
00031	var() int	 MaxCarcasses;
00032	var() sound  EntrySound;	//only if waterzone
00033	var() sound  ExitSound;		// only if waterzone
00034	var() class<actor> EntryActor;	// e.g. a splash (only if water zone)
00035	var() class<actor> ExitActor;	// e.g. a splash (only if water zone)
00036	var skyzoneinfo SkyZone; // Optional sky zone containing this zone's sky.
00037	
00038	//-----------------------------------------------------------------------------
00039	// Zone flags.
00040	
00041	var()		bool   bWaterZone;   // Zone is water-filled.
00042	var() const bool   bFogZone;     // Zone is fog-filled.
00043	var() const bool   bKillZone;    // Zone instantly kills those who enter.
00044	var()		bool   bNeutralZone; // Players can't take damage in this zone.
00045	var()		bool   bGravityZone; // Use ZoneGravity.
00046	var()		bool   bPainZone;	 // Zone causes pain.
00047	var()		bool   bDestructive; // Destroys carcasses.
00048	var()		bool   bNoInventory;
00049	var()		bool   bMoveProjectiles;	// this velocity zone should impart velocity to projectiles and effects
00050	var()		bool   bBounceVelocity;		// this velocity zone should bounce actors that land in it
00051	
00052	//-----------------------------------------------------------------------------
00053	// Zone light.
00054	
00055	var(ZoneLight) byte AmbientBrightness, AmbientHue, AmbientSaturation;
00056	var(ZoneLight) color FogColor;
00057	var(ZoneLight) float FogDistance;
00058	
00059	var(ZoneLight) const texture EnvironmentMap;
00060	var(ZoneLight) float TexUPanSpeed, TexVPanSpeed;
00061	var(ZoneLight) vector ViewFlash, ViewFog;
00062	
00063	//-----------------------------------------------------------------------------
00064	// Reverb.
00065	
00066	// Settings.
00067	var(Reverb) bool bReverbZone;
00068	var(Reverb) bool bRaytraceReverb;
00069	var(Reverb) float SpeedOfSound;
00070	var(Reverb) byte MasterGain;
00071	var(Reverb) int  CutoffHz;
00072	var(Reverb) byte Delay[6];
00073	var(Reverb) byte Gain[6];
00074	
00075	//-----------------------------------------------------------------------------
00076	// Lens flare.
00077	
00078	var(LensFlare) texture LensFlare[12];
00079	var(LensFlare) float LensFlareOffset[12];
00080	var(LensFlare) float LensFlareScale[12];
00081	
00082	//-----------------------------------------------------------------------------
00083	// per-Zone mesh LOD lighting control
00084	 
00085	// the number of lights applied to the actor mesh is interpolated between the following
00086	// properties, as a function of the MeshPolyCount for the previous frame.
00087	var() byte MinLightCount; // minimum number of lights to use (when MaxLightingPolyCount is exceeded)
00088	var() byte MaxLightCount; // maximum number of lights to use (when MeshPolyCount drops below MinLightingPolyCount)
00089	var() int MinLightingPolyCount;
00090	var() int MaxLightingPolyCount;
00091	// (NOTE: the default LOD properties (below) have no effect on the mesh lighting behavior)
00092	
00093	//=============================================================================
00094	// Network replication.
00095	
00096	replication
00097	{
00098		reliable if( Role==ROLE_Authority )
00099			ZoneGravity, ZoneVelocity, 
00100			// ZoneTerminalVelocity,
00101			// ZoneGroundFriction, ZoneFluidFriction,
00102			AmbientBrightness, AmbientHue, AmbientSaturation,
00103			TexUPanSpeed, TexVPanSpeed,
00104			// ViewFlash, ViewFog, // Not replicated because vectors replicated with elements rounded to integers
00105			bReverbZone,
00106			FogColor;
00107	}
00108	
00109	//=============================================================================
00110	// Iterator functions.
00111	
00112	// Iterate through all actors in this zone.
00113	native(308) final iterator function ZoneActors( class<actor> BaseClass, out actor Actor );
00114	
00115	//=============================================================================
00116	simulated function LinkToSkybox()
00117	{
00118		local skyzoneinfo TempSkyZone;
00119	
00120		// SkyZone.
00121		foreach AllActors( class 'SkyZoneInfo', TempSkyZone, '' )
00122			SkyZone = TempSkyZone;
00123		foreach AllActors( class 'SkyZoneInfo', TempSkyZone, '' )
00124			if( TempSkyZone.bHighDetail == Level.bHighDetailMode )
00125				SkyZone = TempSkyZone;
00126	}
00127	
00128	//=============================================================================
00129	// Engine notification functions.
00130	
00131	simulated function PreBeginPlay()
00132	{
00133		Super.PreBeginPlay();
00134	
00135		// call overridable function to link this ZoneInfo actor to a skybox
00136		LinkToSkybox();
00137	}
00138	
00139	function Trigger( actor Other, pawn EventInstigator )
00140	{
00141		if (DamagePerSec != 0)
00142			bPainZone = true;
00143	}
00144	
00145	// When an actor enters this zone.
00146	event ActorEntered( actor Other )
00147	{
00148		local actor A;
00149		local vector AddVelocity;
00150	
00151		if ( bNoInventory && Other.IsA('Inventory') && (Other.Owner == None) )
00152		{
00153			Other.LifeSpan = 1.5;
00154			return;
00155		}
00156	
00157		if( Pawn(Other)!=None && Pawn(Other).bIsPlayer )
00158			if( ++ZonePlayerCount==1 && ZonePlayerEvent!='' )
00159				foreach AllActors( class 'Actor', A, ZonePlayerEvent )
00160					A.Trigger( Self, Pawn(Other) );
00161	
00162		if ( bMoveProjectiles && (ZoneVelocity != vect(0,0,0)) )
00163		{
00164			if ( Other.Physics == PHYS_Projectile )
00165				Other.Velocity += ZoneVelocity;
00166			else if ( Other.IsA('Effects') && (Other.Physics == PHYS_None) )
00167			{
00168				Other.SetPhysics(PHYS_Projectile);
00169				Other.Velocity += ZoneVelocity;
00170			}
00171		}
00172	}
00173	
00174	// When an actor leaves this zone.
00175	event ActorLeaving( actor Other )
00176	{
00177		local actor A;
00178		if( Pawn(Other)!=None && Pawn(Other).bIsPlayer )
00179			if( --ZonePlayerCount==0 && ZonePlayerEvent!='' )
00180				foreach AllActors( class 'Actor', A, ZonePlayerEvent )
00181					A.UnTrigger( Self, Pawn(Other) );
00182	}
00183	
00184	defaultproperties
00185	{
00186	     ZoneGravity=(Z=-950.000000)
00187	     ZoneGroundFriction=8.000000
00188	     ZoneFluidFriction=1.200000
00189	     ZoneTerminalVelocity=2500.000000
00190	     MaxCarcasses=3
00191	     bMoveProjectiles=True
00192	     AmbientSaturation=255
00193	     TexUPanSpeed=1.000000
00194	     TexVPanSpeed=1.000000
00195	     SpeedOfSound=8000.000000
00196	     MasterGain=100
00197	     CutoffHz=6000
00198	     Delay(0)=20
00199	     Delay(1)=34
00200	     Gain(0)=150
00201	     Gain(1)=70
00202	     MinLightCount=6
00203	     MaxLightCount=6
00204	     MinLightingPolyCount=1000
00205	     MaxLightingPolyCount=5000
00206	     bStatic=True
00207	     bNoDelete=True
00208	     bAlwaysRelevant=True
00209	     Texture=Texture'Engine.S_ZoneInfo'
00210	     NetUpdateFrequency=2.000000
00211	}

End Source Code