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

UTGameContent.UTEnergyShield


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
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
/**
 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 */
class UTEnergyShield extends UTDeployedActor;

/** Array of current health of each shield piece */
var int ShieldHealth;

/** shield mesh (has collision) */
var StaticMeshComponent ShieldMesh;

/** shield generation effect */
var UTParticleSystemComponent ShieldEffect;

var SkeletalMeshComponent ShieldBase;

/** sounds to play */
var SoundCue SpawnSound, DestroySound, PanelDestroySound;

event PostBeginPlay()
{
	Super.PostBeginPlay();

	if ( !bDeleteMe && (Role == ROLE_Authority) )
	{
		PlaySound(SpawnSound);
	}
}

simulated event Destroyed()
{
	Super.Destroyed();

	if (Role == ROLE_Authority)
	{
		PlaySound(DestroySound);
	}
}

event Landed(vector HitNormal, Actor HitActor)
{
	PerformDeploy();
}

simulated function PerformDeploy()
{
	bDeployed = true;
	
	ShieldBase.PlayAnim('Deploy');

	ShieldMesh.SetHidden(false);
	ShieldMesh.SetActorCollision(true, false);
	ShieldEffect.SetActive(true);
	bCollideWorld = FALSE;
}

event TakeDamage(int DamageAmount, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
	if ( WorldInfo.GRI.OnSameTeam(EventInstigator, self) )
	{
		return;
	}
	ShieldHealth -= DamageAmount;
	PlaySound(PanelDestroySound);

	if ( ShieldHealth <= 0 )
	{
		destroy();
	}
	
	// call Actor's version to handle any SeqEvent_TakeDamage for scripting
	Super.TakeDamage(DamageAmount, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
}

defaultproperties
{
   ShieldHealth=4000
   Begin Object Class=StaticMeshComponent Name=ShieldMesh ObjName=ShieldMesh Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
      StaticMesh=StaticMesh'PICKUPS.Deployables.Mesh.S_Pickups_Shield_Deployable_Whole'
      HiddenGame=True
      bUseAsOccluder=False
      CastShadow=False
      bAcceptsLights=False
      CollideActors=False
      BlockActors=False
      BlockRigidBody=False
      Scale=5.000000
      Name="ShieldMesh"
      ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
   End Object
   ShieldMesh=ShieldMesh
   Begin Object Class=UTParticleSystemComponent Name=ShieldEffect ObjName=ShieldEffect Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
      Template=ParticleSystem'PICKUPS.Deployables.Effects.P_Deployables_Shield_Projector'
      bAutoActivate=False
      Name="ShieldEffect"
      ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
   End Object
   ShieldEffect=ShieldEffect
   Begin Object Class=SkeletalMeshComponent Name=DeployableMesh ObjName=DeployableMesh Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent'
      SkeletalMesh=SkeletalMesh'PICKUPS.Deployables.Mesh.SK_Deployables_Shield'
      Begin Object Class=AnimNodeSequence Name=MeshSequenceA ObjName=MeshSequenceA Archetype=AnimNodeSequence'Engine.Default__AnimNodeSequence'
         Name="MeshSequenceA"
         ObjectArchetype=AnimNodeSequence'Engine.Default__AnimNodeSequence'
      End Object
      Animations=AnimNodeSequence'UTGameContent.Default__UTEnergyShield:MeshSequenceA'
      AnimSets(0)=AnimSet'PICKUPS.Deployables.Anims.K_Deployables_Shield'
      bUseAsOccluder=False
      CastShadow=False
      Name="DeployableMesh"
      ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent'
   End Object
   ShieldBase=DeployableMesh
   SpawnSound=SoundCue'A_Pickups_Deployables.ShieldGenerator.ShieldGenerator_OpenCue'
   DestroySound=SoundCue'A_Pickups_Deployables.ShieldGenerator.ShieldGenerator_CloseCue'
   PanelDestroySound=SoundCue'A_Pickups_Deployables.ShieldGenerator.ShieldGenerator_PanelBlowCue'
   Begin Object Class=DynamicLightEnvironmentComponent Name=DeployedLightEnvironment ObjName=DeployedLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTDeployedActor:DeployedLightEnvironment'
      ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTDeployedActor:DeployedLightEnvironment'
   End Object
   LightEnvironment=DeployedLightEnvironment
   Components(0)=DeployedLightEnvironment
   Begin Object Class=AudioComponent Name=AmbientSoundComponent ObjName=AmbientSoundComponent Archetype=AudioComponent'Engine.Default__AudioComponent'
      SoundCue=SoundCue'A_Vehicle_Paladin.SoundCues.A_Vehicle_Paladin_ShieldAmbient'
      bStopWhenOwnerDestroyed=True
      bShouldRemainActiveIfDropped=True
      Name="AmbientSoundComponent"
      ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
   End Object
   Components(1)=AmbientSoundComponent
   Components(2)=DeployableMesh
   Components(3)=ShieldMesh
   Components(4)=ShieldEffect
   Begin Object Class=AudioComponent Name=AmbientComponent ObjName=AmbientComponent Archetype=AudioComponent'Engine.Default__AudioComponent'
      SoundCue=SoundCue'A_Pickups_Deployables.ShieldGenerator.ShieldGenerator_OutsideLoopCue'
      bAutoPlay=True
      bStopWhenOwnerDestroyed=True
      bShouldRemainActiveIfDropped=True
      Name="AmbientComponent"
      ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
   End Object
   Components(5)=AmbientComponent
   bPushedByEncroachers=False
   bAlwaysRelevant=True
   bHardAttach=True
   bBlockActors=False
   bProjTarget=True
   LifeSpan=90.000000
   CollisionComponent=DeployableMesh
   Name="Default__UTEnergyShield"
   ObjectArchetype=UTDeployedActor'UTGame.Default__UTDeployedActor'
}

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