SpatialFear.SFMultiZone

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
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
//=============================================================================
// Spatial Fear
// Class: SFMultiZone 
// Descripton: 	Using the boolean properties the MultiZone can be configured to be 
// one of multiple zone types.
// Some zone types require additional settings. 
// See property descriptions for more details.
//
// Author: Markus Nuebel
//=============================================================================

class SFMultiZone extends ZoneInfo;

var (LadderZone)	bool bLadderZone; // Zone is a ladder zone.
var (LadderZone)	float fLadderSpeedAcceleration; // Acceleration change factor for climbing. Default: 0.4
var (SpeedZone)		bool bSpeedZone; // Zone changes player speed according to the fSpeedAcceleration setting.
var (SpeedZone)		float fSpeedAcceleration; //Percentage of speed acceleration in zone. Default is 1.0 (no acceleration) e.g fSpeedAcceleration=0.7 decreases the player speed to a level of 70% of the normal speed


event BeginPlay()
{
	// Call to base class
	Super.BeginPlay();
}

// When an actor enters this zone.
event ActorEntered( actor Other )
{
	// Call to base class
	Super.ActorEntered(Other);

	if ( Other.IsA('SFPlayer') && Pawn(Other).bIsPlayer )
	{
		if(Other.IsInState('CheatFlying'))
			return;

		if(bLadderZone)
			SFPlayer(Other).ClimbZoneEntered(fLadderSpeedAcceleration);
		if(bSpeedZone)
			SFPlayer(Other).SpeedZoneEntered(fSpeedAcceleration);
	}
}

// When an actor leaves this zone.
event ActorLeaving( actor Other )
{
	// Call to base class
	Super.ActorLeaving(Other);

	if ( Other.IsA('SFPlayer') && Pawn(Other).bIsPlayer )
	{
		if(Other.IsInState('CheatFlying'))
			return;

		if(bLadderZone)
			SFPlayer(Other).ClimbZoneLeaving(fLadderSpeedAcceleration);
		if(bSpeedZone)
			SFPlayer(Other).SpeedZoneLeaving(fSpeedAcceleration);
	}
}

defaultproperties
{
     fLadderSpeedAcceleration=0.400000
     fSpeedAcceleration=0.700000
     MaxCarcasses=1
}

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX