Advertisement
Guest User

UTVehicle_SManta

a guest
Nov 26th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.70 KB | None | 0 0
  1. /**
  2. * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
  3. */
  4.  
  5. class UTVehicle_SManta_Content extends UTVehicle_SManta;
  6.  
  7. simulated function InitializeEffects()
  8. {
  9. Super.InitializeEffects();
  10.  
  11. // we need to do this here as we have a bunch of code that correctly spawns on demand but these are a special case
  12. // of needing to exist when ever there is a manta
  13. if( VehicleEffects[FanEffectIndex].EffectRef == None )
  14. {
  15. CreateVehicleEffect( FanEffectIndex );
  16. }
  17.  
  18. // immediately start and stop the fan effect, causing the blade particle to be left there unmoving so it's not missing
  19. //@note: requires a nonzero WarmupTime in the particle system itself
  20. if (FanEffectIndex >= 0 && FanEffectIndex < VehicleEffects.Length && VehicleEffects[FanEffectIndex].EffectRef != None)
  21. {
  22. VehicleEffects[FanEffectIndex].EffectRef.ActivateSystem();
  23. VehicleEffects[FanEffectIndex].EffectRef.DeactivateSystem();
  24. }
  25. }
  26.  
  27. simulated event MantaJumpEffect()
  28. {
  29. PlaySound(JumpSound, true);
  30. VehicleEvent('BoostStart');
  31. }
  32.  
  33. simulated event MantaDuckEffect()
  34. {
  35. if (bHoldingDuck)
  36. {
  37. PlaySound(DuckSound, true);
  38. VehicleEvent('CrushStart');
  39. }
  40. else
  41. {
  42. VehicleEvent('CrushStop');
  43. }
  44. }
  45.  
  46. simulated function SetVehicleEffectParms(name TriggerName, ParticleSystemComponent PSC)
  47. {
  48. if (TriggerName == 'MantaOnFire')
  49. {
  50. PSC.SetFloatParameter('smokeamount', 0.95);
  51. PSC.SetFloatParameter('fireamount', 0.95);
  52. }
  53. else
  54. {
  55. Super.SetVehicleEffectParms(TriggerName, PSC);
  56. }
  57. }
  58.  
  59. simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
  60. {
  61. // manta is fragile so it takes momentum even from weapons that don't usually impart it
  62. if ( (DamageType == class'UTDmgType_Enforcer') && !IsZero(HitLocation) )
  63. {
  64. Momentum = (Location - HitLocation) * float(Damage) * 20.0;
  65. }
  66. Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
  67. }
  68.  
  69. function bool Died(Controller Killer, class<DamageType> DamageType, vector HitLocation)
  70. {
  71. VehicleEvent('MantaNormal');
  72. return Super.Died(Killer,DamageType,HitLocation);
  73. }
  74.  
  75. simulated function DrivingStatusChanged()
  76. {
  77. if ( !bDriving )
  78. {
  79. VehicleEvent('CrushStop');
  80. }
  81. Super.DrivingStatusChanged();
  82. }
  83.  
  84. simulated function BlowupVehicle()
  85. {
  86. if(WorldInfo.Netmode != NM_DEDICATEDSERVER && VehicleEffects[11].EffectRef != none)
  87. {
  88. VehicleEffects[11].EffectRef.SetHidden(true); // special case to get rid of the blades
  89. }
  90. super.BlowUpVehicle();
  91. }
  92.  
  93. defaultproperties
  94. {
  95. Begin Object Name=CollisionCylinder
  96. CollisionHeight=40.0
  97. CollisionRadius=100.0
  98. Translation=(X=-40.0,Y=0.0,Z=40.0)
  99. End Object
  100.  
  101. Begin Object Name=SVehicleMesh
  102. SkeletalMesh=SkeletalMesh'VH_Manta.Mesh.SK_VH_Manta'
  103. AnimTreeTemplate=AnimTree'VH_Manta.Anims.AT_Manta'
  104. PhysicsAsset=PhysicsAsset'VH_Manta.Mesh.SK_VH_Manta_Physics'
  105. MorphSets[0]=MorphTargetSet'VH_Manta.Mesh.VH_Manta_MorphTargets'
  106. End Object
  107.  
  108. Seats(0)={( GunClass=class'UTVWeap_MantaGun',
  109. GunSocket=(Gun_Socket_01,Gun_Socket_02),
  110. TurretControls=(gun_rotate_lt,gun_rotate_rt),
  111. CameraTag=ViewSocket,
  112. CameraOffset=-180,
  113. SeatIconPos=(X=0.46,Y=0.45),
  114. DriverDamageMult=0.75,
  115. bSeatVisible=true,
  116. CameraBaseOffset=(X=-20,Y=0,Z=10),
  117. SeatOffset=(X=-30,Y=0,Z=-5),
  118. WeaponEffects=((SocketName=Gun_Socket_01,Offset=(X=-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)),(SocketName=Gun_Socket_02,Offset=(X=-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)))
  119. )}
  120.  
  121.  
  122. // Sounds
  123. // Engine sound.
  124. Begin Object Class=AudioComponent Name=MantaEngineSound
  125. SoundCue=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_EngineLoop'
  126. End Object
  127. EngineSound=MantaEngineSound
  128. Components.Add(MantaEngineSound);
  129.  
  130. CollisionSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Collide'
  131. EnterVehicleSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Start'
  132. ExitVehicleSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Stop'
  133.  
  134. // Scrape sound.
  135. Begin Object Class=AudioComponent Name=BaseScrapeSound
  136. SoundCue=SoundCue'A_Gameplay.A_Gameplay_Onslaught_MetalScrape01Cue'
  137. End Object
  138. ScrapeSound=BaseScrapeSound
  139. Components.Add(BaseScrapeSound);
  140.  
  141. JumpSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicle_Manta_JumpCue'
  142. DuckSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicle_Manta_CrouchCue'
  143.  
  144. // Initialize sound parameters.
  145. EngineStartOffsetSecs=0.5
  146. EngineStopOffsetSecs=1.0
  147.  
  148. VehicleEffects(0)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Exhaust_Smoke',EffectSocket=Tailpipe_1)
  149. VehicleEffects(1)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Exhaust_Smoke',EffectSocket=Tailpipe_2)
  150.  
  151. VehicleEffects(2)=(EffectStartTag=BoostStart,EffectEndTag=BoostStop,EffectTemplate=ParticleSystem'VH_Manta.EffectS.PS_Manta_Up_Boost_Jump',EffectSocket=Wing_Lft_Socket)
  152. VehicleEffects(3)=(EffectStartTag=BoostStart,EffectEndTag=BoostStop,EffectTemplate=ParticleSystem'VH_Manta.EffectS.PS_Manta_Up_Boost_Jump',EffectSocket=Wing_Rt_Socket)
  153.  
  154. VehicleEffects(4)=(EffectStartTag=CrushStart,EffectEndTag=CrushStop,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Down_Boost',EffectSocket=Wing_Lft_Socket)
  155. VehicleEffects(5)=(EffectStartTag=CrushStart,EffectEndTag=CrushStop,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Down_Boost',EffectSocket=Wing_Rt_Socket)
  156.  
  157. VehicleEffects(6)=(EffectStartTag=MantaWeapon01,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Gun_MuzzleFlash',EffectSocket=Gun_Socket_02)
  158. VehicleEffects(7)=(EffectStartTag=MantaWeapon02,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Gun_MuzzleFlash',EffectSocket=Gun_Socket_01)
  159.  
  160. VehicleEffects(8)=(EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost',EffectSocket=Wing_Lft_Socket)
  161. VehicleEffects(9)=(EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost',EffectSocket=Wing_Rt_Socket)
  162.  
  163. VehicleEffects(10)=(EffectStartTag=DamageSmoke,EffectEndTag=NoDamageSmoke,bRestartRunning=false,EffectTemplate=ParticleSystem'Envy_Effects.Vehicle_Damage.P_Vehicle_Damage_1_Manta',EffectSocket=DamageSmoke01)
  164.  
  165. VehicleEffects(11)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.EffectS.P_FX_Manta_Blades_Blurred',EffectSocket=BladeSocket)
  166.  
  167. VehicleEffects(12)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.EffectS.PS_Manta_Ground_FX',EffectSocket=Wing_Lft_Socket)
  168. VehicleEffects(13)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.EffectS.PS_Manta_Ground_FX',EffectSocket=Wing_rt_socket)
  169.  
  170. // VehicleEffects(14)=(EffectStartTag=EngineStart,EffectEndTag=EngineStop,EffectTemplate=ParticleSystem'VH_Manta.Effects.P_VH_Manta_Exhaust',EffectSocket=ExhaustPort)
  171.  
  172. VehicleEffects(14)=(EffectStartTag=MantaOnFire,EffectEndTag=MantaNormal,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket=Wing_Lft_Socket)
  173. VehicleEffects(15)=(EffectStartTag=MantaOnFire,EffectEndTag=MantaNormal,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket=Wing_Rt_Socket)
  174. VehicleEffects(16)=(EffectStartTag=MantaOnFire,EffectEndTag=MantaNormal,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket=Gun_Socket_01)
  175. VehicleEffects(17)=(EffectStartTag=MantaOnFire,EffectEndTag=MantaNormal,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket=Gun_Socket_02)
  176. VehicleEffects(18)=(EffectStartTag=MantaOnFire,EffectEndTag=MantaNormal,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket=ExhaustPort)
  177.  
  178. //Viper..(Special Case)........................................VH_NecrisManta.Effects.PS_Viper_Ground_FX............(this effect is in but needs a param set. This will be the same effect for all surfaces except water which will use the same Param just swap PS to ...( Envy_Level_Effects_2.Vehicle_Water_Effects.PS_Viper_Water_Ground_FX ) (Param Name: Direction, MinINPUT: -5 MaxINPUT: 5) 0 is when the Vh is still, positive X=forward movemet 5 being max forward movement. -X is backwards. Y is same thing but side to side
  179.  
  180. // guess we can just have a water effect name here and then check for water and then then add and && to use only this named VehicleEffects index data
  181.  
  182.  
  183. FanEffectIndex=11
  184.  
  185. GroundEffectIndices=(12,13)
  186. WaterGroundEffect=ParticleSystem'Envy_Level_Effects_2.Vehicle_Water_Effects.PS_Manta_Water_Effects'
  187.  
  188. FanEffectParameterName=MantaFanSpin
  189. FlameJetEffectParameterName=Jet
  190.  
  191. IconCoords=(U=859,UL=36,V=0,VL=27)
  192.  
  193. BigExplosionTemplates[0]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P_VH_Death_SMALL_Far',MinDistance=350)
  194. BigExplosionTemplates[1]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P_VH_Death_SMALL_Near')
  195. BigExplosionSocket=VH_Death
  196. ExplosionSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Explode'
  197. HoverBoardAttachSockets=(HoverAttach00)
  198.  
  199. TeamMaterials[0]=MaterialInstanceConstant'VH_Manta.Materials.MI_VH_Manta_Red'
  200. TeamMaterials[1]=MaterialInstanceConstant'VH_Manta.Materials.MI_VH_Manta_Blue'
  201.  
  202. SpawnMaterialLists[0]=(Materials=(MaterialInterface'VH_Manta.Materials.MI_VH_Manta_Spawn_Red'))
  203. SpawnMaterialLists[1]=(Materials=(MaterialInterface'VH_Manta.Materials.MI_VH_Manta_Spawn_Blue'))
  204.  
  205. DrivingPhysicalMaterial=PhysicalMaterial'VH_Manta.physmat_mantadriving'
  206. DefaultPhysicalMaterial=PhysicalMaterial'VH_Manta.physmat_manta'
  207.  
  208. BurnOutMaterial[0]=MaterialInterface'VH_Manta.Materials.MITV_VH_Manta_Red_BO'
  209. BurnOutMaterial[1]=MaterialInterface'VH_Manta.Materials.MITV_VH_Manta_Blue_BO'
  210.  
  211. DamageMorphTargets(0)=(InfluenceBone=Damage_LtCanard,MorphNodeName=MorphNodeW_Front,LinkedMorphNodeName=none,Health=70,DamagePropNames=(Damage2))
  212. DamageMorphTargets(1)=(InfluenceBone=Damage_RtRotor,MorphNodeName=MorphNodeW_Right,LinkedMorphNodeName=none,Health=70,DamagePropNames=(Damage3))
  213. DamageMorphTargets(2)=(InfluenceBone=Damage_LtRotor,MorphNodeName=MorphNodeW_Left,LinkedMorphNodeName=none,Health=70,DamagePropNames=(Damage3))
  214. DamageMorphTargets(3)=(InfluenceBone=Hatch,MorphNodeName=MorphNodeW_Rear,LinkedMorphNodeName=none,Health=70,DamagePropNames=(Damage1))
  215.  
  216. DamageParamScaleLevels(0)=(DamageParamName=Damage1,Scale=1.0)
  217. DamageParamScaleLevels(1)=(DamageParamName=Damage2,Scale=1.5)
  218. DamageParamScaleLevels(2)=(DamageParamName=Damage3,Scale=1.5)
  219.  
  220. HudCoords=(U=228,V=143,UL=-119,VL=106)
  221.  
  222. bHasEnemyVehicleSound=true
  223. EnemyVehicleSound(0)=SoundNodeWave'A_Character_Reaper.BotStatus.A_BotStatus_Reaper_EnemyManta'
  224. EnemyVehicleSound(1)=SoundNodeWave'A_Character_Jester.BotStatus.A_BotStatus_Jester_EnemyManta'
  225. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement