Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // WeaponInvStunBaton.uc
- // $Author: Sbrown $
- // $Date: 5/10/01 10:45p $
- // $Revision: 6 $
- //=============================================================================
- class WeaponInvStunBaton extends U2Weapon;
- #exec TEXTURE IMPORT FILE=Assets\StunBaton\SB_Icon.pcx GROUP=Icons MIPS=OFF //RSW
- #exec TEXTURE IMPORT FILE=Assets\StunBaton\SB_Skin.pcx GROUP=Skins LODSET=2 //RSW
- #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
- #exec MESH ORIGIN MESH=SB_FP X=0 Y=0 Z=0 ROLL=48 PITCH=-32 YAW=32
- #exec MESH SEQUENCE MESH=SB_FP SEQ=All STARTFRAME=0 NUMFRAMES=73
- #exec MESH SEQUENCE MESH=SB_FP SEQ=Ambient STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=Select STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=Idle STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=StabAttack STARTFRAME=0 NUMFRAMES=21 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=DoubleSwing STARTFRAME=21 NUMFRAMES=52 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=TurnOn STARTFRAME=0 NUMFRAMES=21 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=TurnOff STARTFRAME=0 NUMFRAMES=21 //RSW
- #exec MESH SEQUENCE MESH=SB_FP SEQ=Down STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESHMAP SCALE MESHMAP=SB_FP X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=SB_FP NUM=1 TEXTURE=P_LaserSpot //MWP
- #exec MESHMAP SETTEXTURE MESHMAP=SB_FP NUM=3 TEXTURE=SB_Skin //MWP
- #exec MESH NOTIFY MESH=SB_FP SEQ=StabAttack TIME=0.5 FUNCTION=MeleeAttack
- #exec MESH NOTIFY MESH=SB_FP SEQ=DoubleSwing TIME=0.25 FUNCTION=MeleeAttack
- #exec MESH NOTIFY MESH=SB_FP SEQ=DoubleSwing TIME=0.65 FUNCTION=MeleeAttack
- #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
- #exec MESH ORIGIN MESH=SB_TP X=0 Y=0 Z=0 YAW=-70
- #exec MESH SEQUENCE MESH=SB_TP SEQ=All STARTFRAME=0 NUMFRAMES=23
- #exec MESH SEQUENCE MESH=SB_TP SEQ=Fire STARTFRAME=0 NUMFRAMES=23 //RSW
- #exec MESH SEQUENCE MESH=SB_TP SEQ=AltFire STARTFRAME=0 NUMFRAMES=23 //RSW
- #exec MESHMAP SCALE MESHMAP=SB_TP X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=SB_TP NUM=1 TEXTURE=SB_Icon //MWP
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Pickup.wav GROUP=StunBaton //SBB
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Select.wav GROUP=StunBaton //SBB
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Fire.wav GROUP=StunBaton //SBB
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_TurnOn.wav GROUP=StunBaton //SBB: NEW
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_TurnOff.wav GROUP=StunBaton //SBB: NEW
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_Hit.wav GROUP=StunBaton //SBB: NEW
- #exec AUDIO IMPORT FILE=Assets\StunBaton\SB_ChargedHit.wav GROUP=StunBaton //SBB: NEW
- var() int ClubAttackDamage;
- var() int ChargedAttackDamage;
- var bool bCharged;
- simulated function PlayFiring()
- {
- if( bCharged )
- {
- PlayAnim( 'StabAttack' );
- }
- else
- {
- PlayAnim( 'DoubleSwing' );
- }
- Owner.PlaySound( FireSound, SLOT_None, Pawn(Owner).SoundDampening );
- }
- function float SuggestAttackStyle()
- {
- return 10.0;
- }
- state NormalFire
- {
- function ProcessTraceHitEx( vector HitDirection, CheckResult Hit, float EffectiveDamage )
- {
- if( !bCharged )
- {
- EffectiveDamage = ClubAttackDamage;
- }
- else
- {
- EffectiveDamage = ChargedAttackDamage;
- PlaySound( sound'SB_ChargedHit' );
- }
- global.ProcessTraceHitEx( HitDirection, Hit, EffectiveDamage );
- }
- Begin:
- //ARL -- suspend Fire() until SingleLineCheck() returns true (hit something) or Fire button is released
- FinishAnim();
- PlayAnim( 'Idle' );
- Finish();
- }
- simulated function bool ClientAltFire( float Value )
- {
- bCharged = !bCharged;
- PlayAltFiring();
- return true;
- }
- function AltFire( float Value )
- {
- ClientAltFire( Value );
- }
- simulated function PlayAltFiring()
- {
- if( bCharged )
- {
- PlayAnim( 'TurnOn' );
- AltFireSound = sound'SB_TurnOn';
- }
- else
- {
- PlayAnim( 'TurnOff' );
- AltFireSound = sound'SB_TurnOff';
- }
- Owner.PlaySound( AltFireSound, SLOT_Misc, Pawn(Owner).SoundDampening );
- }
- defaultproperties
- {
- ClubAttackDamage=45
- ChargedAttackDamage=80
- AnimationType=AT_SmallSwing
- ImpactHandlerClass=Class'U2Weapons.impactStunBaton'
- MomentumTransfer=32000.000000
- TraceRange=64.000000
- WeaponKickDirection=(X=8.000000,Y=1.000000)
- WeaponKickDuration=0.800000
- WeaponKickRecoveryDuration=1.000000
- AltWeaponKickDirection=(X=0.000000,Z=-1.000000)
- AltWeaponKickDuration=0.200000
- AltWeaponKickRecoveryDuration=0.200000
- AutoSwitchPriority=2
- bInstantHit=True
- MyDamageType=Class'U2.DamageTypeStunBaton'
- bMeleeWeapon=True
- AIRating=0.200000
- RefireRate=1.000000
- AltRefireRate=1.000000
- SelectSound=Sound'U2Weapons.StunBaton.SB_Select'
- PickupClass=Class'U2Weapons.weaponStunBaton'
- PlayerViewOffset=(X=55.500000,Y=-10.000000,Z=-14.000000)
- FirstPersonMesh=VertMesh'U2Weapons.SB_FP'
- StatusIcon=Texture'U2Weapons.Icons.SB_Icon'
- ItemName="Stun Baton"
- Mesh=VertMesh'U2Weapons.SB_TP'
- }
- @@//WEAPON PICKUP CODE STARTS HERE - GreatEmerald
- //=============================================================================
- // weaponStunBaton.uc
- // $Author: Mpoesch $
- // $Date: 4/20/01 12:05p $
- // $Revision: 4 $
- //=============================================================================
- class weaponStunBaton extends U2WeaponPickup;
- defaultproperties
- {
- InventoryType=Class'U2Weapons.weaponInvStunBaton'
- PickupMessage="You got a Stun Baton."
- PickupSound=Sound'U2Weapons.StunBaton.SB_Pickup'
- Mesh=VertMesh'U2Weapons.SB_TP'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement