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

UTGameContent.UTInvisibility


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
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
/**
 *
 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 */


class UTInvisibility extends UTTimedPowerup;

var Material InvisibilityMaterial;
var SoundCue AmbientSound;
var SoundCue WarningSound;

function GivenTo(Pawn NewOwner, bool bDoNotActivate)
{
	local UTPawn P;

	Super.GivenTo(NewOwner, bDoNotActivate);

	// boost damage
	P = UTPawn(NewOwner);
	if (P != None)
	{
		// apply invisibility material
		P.SetSkin(InvisibilityMaterial);
		P.SetInvisible(true);
		P.SetPawnAmbientSound(AmbientSound);
		SetTimer(TimeRemaining - 3.0, false, 'PlayWarningSound');
	}
}

/** Plays a warning the powerup is running low */
function PlayWarningSound()
{
	// reset timer if time got added
	if (TimeRemaining > 3.0)
	{
		SetTimer(TimeRemaining - 3.0, false, 'PlayWarningSound');
	}
	else
	{
		Instigator.PlaySound(WarningSound);
		SetTimer(0.75, false, 'PlayWarningSound');
	}
}


function ItemRemovedFromInvManager()
{
	local UTPlayerReplicationInfo UTPRI;
	local UTPawn P;

	P = UTPawn(Owner);
	if (P != None)
	{
		P.SetSkin(None);
		P.SetInvisible(P.default.bIsInvisible);
		P.SetPawnAmbientSound(None);
		ClearTimer('PlayWarningSound');

		//Stop the timer on the powerup stat
		if (P.DrivenVehicle != None)
		{
			UTPRI = UTPlayerReplicationInfo(P.DrivenVehicle.PlayerReplicationInfo);
		}
		else
		{
			UTPRI = UTPlayerReplicationInfo(P.PlayerReplicationInfo);
		}
		if (UTPRI != None)
		{
			UTPRI.StopPowerupTimeStat(GetPowerupStatName());
		}
	}
}

defaultproperties
{
   InvisibilityMaterial=Material'PICKUPS.Invis.M_Invis_01'
   AmbientSound=SoundCue'A_Pickups_Powerups.Powerups.A_Powerup_Invisibility_PowerLoopCue'
   WarningSound=SoundCue'A_Pickups_Powerups.Powerups.A_Powerup_Invisibility_WarningCue'
   HudIndex=2
   PowerupOverSound=SoundCue'A_Pickups_Powerups.Powerups.A_Powerup_Invisibility_EndCue'
   PowerupStatName="POWERUPTIME_INVISIBILITY"
   IconCoords=(U=744.000000,V=55.000000,UL=48.000000,VL=54.000000)
   PP_Scene_HighLights=(X=0.000000,Y=-0.070000,Z=-0.140000)
   PP_Scene_Desaturation=0.160000
   bRenderOverlays=True
   bReceiveOwnerEvents=True
   PickupMessage="INVISIBILITY!"
   PickupSound=SoundCue'A_Pickups_Powerups.Powerups.A_Powerup_Invisibility_PickupCue'
   Begin Object Class=StaticMeshComponent Name=MeshComponentA ObjName=MeshComponentA Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
      StaticMesh=StaticMesh'PICKUPS.Invis.Mesh.S_Pickups_Invisibility'
      CullDistance=8000.000000
      CachedCullDistance=8000.000000
      bUseAsOccluder=False
      CastShadow=False
      bForceDirectLightMap=True
      bCastDynamicShadow=False
      CollideActors=False
      BlockRigidBody=False
      Translation=(X=0.000000,Y=0.000000,Z=-20.000000)
      Name="MeshComponentA"
      ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
   End Object
   DroppedPickupMesh=MeshComponentA
   PickupFactoryMesh=MeshComponentA
   Begin Object Class=UTParticleSystemComponent Name=InvisParticles ObjName=InvisParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
      Template=ParticleSystem'PICKUPS.Invis.Effects.P_Pickups_Invis_Idle'
      bAutoActivate=False
      Translation=(X=0.000000,Y=0.000000,Z=-20.000000)
      Name="InvisParticles"
      ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
   End Object
   DroppedPickupParticles=InvisParticles
   Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite'
      ObjectArchetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite'
   End Object
   Components(0)=Sprite
   Name="Default__UTInvisibility"
   ObjectArchetype=UTTimedPowerup'UTGame.Default__UTTimedPowerup'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:56.000 - Creation time: sk 18-3-2018 10:01:21.745 - Created with UnCodeX