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

UnrealI.Dampener


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
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
//=============================================================================
// Dampener.
//=============================================================================
class Dampener extends PickUp;

#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\Pickups\Dampndea.wav" NAME="dampndea"       GROUP="Pickups"
#exec AUDIO IMPORT FILE="..\UnrealShare\Sounds\Pickups\DAMPNER1.wav" NAME="DampSnd"       GROUP="Pickups"

#exec TEXTURE IMPORT NAME=I_Dampener FILE=Textures\Hud\i_Damp.pcx GROUP="Icons" MIPS=OFF

#exec MESH IMPORT MESH=DampenerM ANIVFILE=Models\acoust_a.3d DATAFILE=Models\acoust_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=DampenerM X=0 Y=0 Z=-50 YAW=64
#exec MESH SEQUENCE MESH=DampenerM SEQ=All STARTFRAME=0  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Ainv1 FILE=..\UnrealShare\Models\inv.pcx GROUP="Skins"
#exec MESHMAP SCALE MESHMAP=DampenerM X=0.03 Y=0.03 Z=0.06
#exec MESHMAP SETTEXTURE MESHMAP=DampenerM NUM=1 TEXTURE=Ainv1

//
// Player has activated the item.
//
// Count down the charge, turn acoustic damping on.  If charge runs out, remove from
// inventory and destroy, resetting sound to normal
//
state Activated
{
	function Timer()
	{
		Charge -= 1;
		if (Charge<=0)
		{
			if ( Owner != None )
			{
				Owner.PlaySound(DeActivateSound);
				if ( Owner.IsA('Pawn') )
					Pawn(Owner).SoundDampening = 1.0;
			}
			UsedUp();
		}
	}
	function EndState()
	{
		if ( Owner.IsA('Pawn') )
			Pawn(Owner).SoundDampening = 1.0;
		bActive = false;
	}
Begin:
	SetTimer(0.1,True);
	Owner.PlaySound(ActivateSound);
	Pawn(Owner).SoundDampening = 0.1;
}

state DeActivated
{
Begin:
	if ( Owner != None )
	{
		Owner.PlaySound(DeActivateSound);
		if ( Owner.IsA('Pawn') )
			Pawn(Owner).SoundDampening = 1.0;
	}
}

defaultproperties
{
				ExpireMessage="Acoustic dampener has run out."
				bAutoActivate=True
				bActivatable=True
				bDisplayableInv=True
				PickupMessage="You got the Acoustic Dampener"
				RespawnTime=30.000000
				PickupViewMesh=LodMesh'UnrealI.DampenerM'
				Charge=200
				PickupSound=Sound'UnrealShare.Pickups.GenPickSnd'
				ActivateSound=Sound'UnrealI.Pickups.dampndea'
				DeActivateSound=Sound'UnrealI.Pickups.DampSnd'
				Icon=Texture'UnrealI.Icons.I_Dampener'
				RemoteRole=ROLE_DumbProxy
				Mesh=LodMesh'UnrealI.DampenerM'
				AmbientGlow=69
				CollisionRadius=15.000000
				CollisionHeight=10.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:18.209 - Created with UnCodeX