Advertisement
Guest User

GreatEmerald

a guest
Apr 26th, 2008
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.58 KB | None | 0 0
  1. //=============================================================================
  2. // WeaponInvStunBaton.uc
  3. // $Author: Sbrown $
  4. // $Date: 5/10/01 10:45p $
  5. // $Revision: 6 $
  6. //=============================================================================
  7. class WeaponInvStunBaton extends U2Weapon;
  8.  
  9.  
  10. #exec TEXTURE IMPORT FILE=Assets\StunBaton\SB_Icon.pcx  GROUP=Icons MIPS=OFF //RSW
  11. #exec TEXTURE IMPORT FILE=Assets\StunBaton\SB_Skin.pcx  GROUP=Skins LODSET=2 //RSW
  12.  
  13. #exec MESH IMPORT MESH=SB_FP ANIVFILE=Assets\StunBaton\SB_FP_a.3d DATAFILE=Assets\StunBaton\SB_FP_d.3d X=0 Y=0 Z=0
  14. #exec MESH ORIGIN MESH=SB_FP X=0 Y=0 Z=0 ROLL=48 PITCH=-32 YAW=32
  15. #exec MESH SEQUENCE MESH=SB_FP SEQ=All          STARTFRAME=0  NUMFRAMES=73
  16. #exec MESH SEQUENCE MESH=SB_FP SEQ=Ambient      STARTFRAME=0  NUMFRAMES=1  //RSW
  17. #exec MESH SEQUENCE MESH=SB_FP SEQ=Select       STARTFRAME=0  NUMFRAMES=1  //RSW
  18. #exec MESH SEQUENCE MESH=SB_FP SEQ=Idle         STARTFRAME=0  NUMFRAMES=1  //RSW
  19. #exec MESH SEQUENCE MESH=SB_FP SEQ=StabAttack   STARTFRAME=0  NUMFRAMES=21 //RSW
  20. #exec MESH SEQUENCE MESH=SB_FP SEQ=DoubleSwing  STARTFRAME=21 NUMFRAMES=52 //RSW
  21. #exec MESH SEQUENCE MESH=SB_FP SEQ=TurnOn       STARTFRAME=0  NUMFRAMES=21 //RSW
  22. #exec MESH SEQUENCE MESH=SB_FP SEQ=TurnOff      STARTFRAME=0  NUMFRAMES=21 //RSW
  23. #exec MESH SEQUENCE MESH=SB_FP SEQ=Down         STARTFRAME=0  NUMFRAMES=1  //RSW
  24. #exec MESHMAP SCALE MESHMAP=SB_FP X=0.1 Y=0.1 Z=0.2
  25. #exec MESHMAP SETTEXTURE MESHMAP=SB_FP NUM=1 TEXTURE=P_LaserSpot //MWP
  26. #exec MESHMAP SETTEXTURE MESHMAP=SB_FP NUM=3 TEXTURE=SB_Skin //MWP
  27. #exec MESH NOTIFY MESH=SB_FP SEQ=StabAttack     TIME=0.5 FUNCTION=MeleeAttack
  28. #exec MESH NOTIFY MESH=SB_FP SEQ=DoubleSwing    TIME=0.25 FUNCTION=MeleeAttack
  29. #exec MESH NOTIFY MESH=SB_FP SEQ=DoubleSwing    TIME=0.65 FUNCTION=MeleeAttack
  30.  
  31. #exec MESH IMPORT MESH=SB_TP ANIVFILE=Assets\StunBaton\SB_TP_a.3d DATAFILE=Assets\StunBaton\SB_TP_d.3d X=0 Y=0 Z=0
  32. #exec MESH ORIGIN MESH=SB_TP X=0 Y=0 Z=0 YAW=-70
  33. #exec MESH SEQUENCE MESH=SB_TP SEQ=All      STARTFRAME=0 NUMFRAMES=23
  34. #exec MESH SEQUENCE MESH=SB_TP SEQ=Fire     STARTFRAME=0 NUMFRAMES=23 //RSW
  35. #exec MESH SEQUENCE MESH=SB_TP SEQ=AltFire  STARTFRAME=0 NUMFRAMES=23 //RSW
  36. #exec MESHMAP SCALE MESHMAP=SB_TP X=0.1 Y=0.1 Z=0.2
  37. #exec MESHMAP SETTEXTURE MESHMAP=SB_TP NUM=1 TEXTURE=SB_Icon //MWP
  38.  
  39. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Pickup.wav      GROUP=StunBaton //SBB
  40. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Select.wav      GROUP=StunBaton //SBB
  41. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Fire.wav        GROUP=StunBaton //SBB
  42. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_TurnOn.wav      GROUP=StunBaton //SBB: NEW
  43. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_TurnOff.wav     GROUP=StunBaton //SBB: NEW
  44. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Hit.wav         GROUP=StunBaton //SBB: NEW
  45. #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_ChargedHit.wav  GROUP=StunBaton //SBB: NEW
  46.  
  47.  
  48. var() int ClubAttackDamage;
  49. var() int ChargedAttackDamage;
  50.  
  51. var bool bCharged;
  52.  
  53.  
  54. simulated function PlayFiring()
  55. {
  56.     if( bCharged )
  57.     {
  58.         PlayAnim( 'StabAttack' );
  59.     }
  60.     else
  61.     {
  62.         PlayAnim( 'DoubleSwing' );
  63.     }
  64.     Owner.PlaySound( FireSound, SLOT_None, Pawn(Owner).SoundDampening );
  65. }
  66.  
  67.  
  68. function float SuggestAttackStyle()
  69. {
  70.     return 10.0;
  71. }
  72.  
  73.  
  74. state NormalFire
  75. {
  76.     function ProcessTraceHitEx( vector HitDirection, CheckResult Hit, float EffectiveDamage )
  77.     {
  78.         if( !bCharged )
  79.         {
  80.             EffectiveDamage = ClubAttackDamage;
  81.         }
  82.         else
  83.         {
  84.             EffectiveDamage = ChargedAttackDamage;
  85.             PlaySound( sound'SB_ChargedHit' );
  86.         }
  87.  
  88.         global.ProcessTraceHitEx( HitDirection, Hit, EffectiveDamage );
  89.     }
  90.  
  91. Begin:
  92.     //ARL -- suspend Fire() until SingleLineCheck() returns true (hit something) or Fire button is released
  93.     FinishAnim();
  94.     PlayAnim( 'Idle' );
  95.     Finish();
  96. }
  97.  
  98.  
  99. simulated function bool ClientAltFire( float Value )
  100. {
  101.     bCharged = !bCharged;
  102.  
  103.     PlayAltFiring();
  104.  
  105.     return true;
  106. }
  107.  
  108.  
  109. function AltFire( float Value )
  110. {
  111.     ClientAltFire( Value );
  112. }
  113.  
  114.  
  115. simulated function PlayAltFiring()
  116. {
  117.     if( bCharged )
  118.     {
  119.         PlayAnim( 'TurnOn' );
  120.         AltFireSound = sound'SB_TurnOn';
  121.     }
  122.     else
  123.     {
  124.         PlayAnim( 'TurnOff' );
  125.         AltFireSound = sound'SB_TurnOff';
  126.     }
  127.     Owner.PlaySound( AltFireSound, SLOT_Misc, Pawn(Owner).SoundDampening );
  128. }
  129.  
  130. defaultproperties
  131. {
  132.     ClubAttackDamage=45
  133.     ChargedAttackDamage=80
  134.     AnimationType=AT_SmallSwing
  135.     ImpactHandlerClass=Class'U2Weapons.impactStunBaton'
  136.     MomentumTransfer=32000.000000
  137.     TraceRange=64.000000
  138.     WeaponKickDirection=(X=8.000000,Y=1.000000)
  139.     WeaponKickDuration=0.800000
  140.     WeaponKickRecoveryDuration=1.000000
  141.     AltWeaponKickDirection=(X=0.000000,Z=-1.000000)
  142.     AltWeaponKickDuration=0.200000
  143.     AltWeaponKickRecoveryDuration=0.200000
  144.     AutoSwitchPriority=2
  145.     bInstantHit=True
  146.     MyDamageType=Class'U2.DamageTypeStunBaton'
  147.     bMeleeWeapon=True
  148.     AIRating=0.200000
  149.     RefireRate=1.000000
  150.     AltRefireRate=1.000000
  151.     SelectSound=Sound'U2Weapons.StunBaton.SB_Select'
  152.     PickupClass=Class'U2Weapons.weaponStunBaton'
  153.     PlayerViewOffset=(X=55.500000,Y=-10.000000,Z=-14.000000)
  154.     FirstPersonMesh=VertMesh'U2Weapons.SB_FP'
  155.     StatusIcon=Texture'U2Weapons.Icons.SB_Icon'
  156.     ItemName="Stun Baton"
  157.     Mesh=VertMesh'U2Weapons.SB_TP'
  158. }
  159.  
  160. @@//WEAPON PICKUP CODE STARTS HERE - GreatEmerald
  161.  
  162. //=============================================================================
  163. // weaponStunBaton.uc
  164. // $Author: Mpoesch $
  165. // $Date: 4/20/01 12:05p $
  166. // $Revision: 4 $
  167. //=============================================================================
  168. class weaponStunBaton extends U2WeaponPickup;
  169.  
  170. defaultproperties
  171. {
  172.     InventoryType=Class'U2Weapons.weaponInvStunBaton'
  173.     PickupMessage="You got a Stun Baton."
  174.     PickupSound=Sound'U2Weapons.StunBaton.SB_Pickup'
  175.     Mesh=VertMesh'U2Weapons.SB_TP'
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement