Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@//LEECHGUN WEAPON PICKUP - GreatEmerald
- //=============================================================================
- // weaponLeechGun.uc
- // $Author: Mpoesch $
- // $Date: 4/20/01 12:05p $
- // $Revision: 3 $
- //=============================================================================
- class weaponLeechGun extends U2WeaponPickup;
- defaultproperties
- {
- InventoryType=Class'U2Weapons.weaponInvLeechGun'
- PickupMessage="You got a Leech Gun."
- PickupSound=Sound'U2Weapons.LeechGun.LG_Pickup'
- Mesh=VertMesh'U2Weapons.LG_TP'
- }
- @@//THE FULL WEAPON - GreatEmerald
- //=============================================================================
- // WeaponInvLeechGun.uc
- // $Author: Sbrown $
- // $Date: 5/10/01 10:43p $
- // $Revision: 5 $
- //=============================================================================
- class WeaponInvLeechGun extends U2Weapon;
- #exec TEXTURE IMPORT FILE=Assets\LeechGun\LG_Icon.pcx GROUP=Icons MIPS=OFF //RSW
- #exec TEXTURE IMPORT FILE=Assets\LeechGun\LG_Ammo.pcx GROUP=Skins LODSET=2 //RSW
- #exec TEXTURE IMPORT FILE=Assets\LeechGun\LG_Skin.pcx GROUP=Skins LODSET=2 //RSW
- #exec TEXTURE IMPORT FILE=Assets\LeechGun\LG_Leech.pcx GROUP=Skins LODSET=2 //RSW
- #exec MESH IMPORT MESH=LG_Ammo ANIVFILE=Assets\LeechGun\LG_Ammo_a.3d DATAFILE=Assets\LeechGun\LG_Ammo_d.3d X=0 Y=0 Z=0 //RSW
- #exec MESH ORIGIN MESH=LG_Ammo X=0 Y=0 Z=0
- #exec MESHMAP SCALE MESHMAP=LG_Ammo X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=LG_Ammo NUM=1 TEXTURE=LG_Ammo
- #exec MESH IMPORT MESH=LG_FP ANIVFILE=Assets\LeechGun\LG_FP_a.3d DATAFILE=Assets\LeechGun\LG_FP_d.3d X=0 Y=0 Z=0 //RSW
- #exec MESH ORIGIN MESH=LG_FP X=04 Y=-140 Z=-15 YAW=-64
- #exec MESH SEQUENCE MESH=LG_FP SEQ=All STARTFRAME=0 NUMFRAMES=8
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Ambient STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Select STARTFRAME=0 NUMFRAMES=8 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Reload STARTFRAME=0 NUMFRAMES=8 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Idle STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Fire STARTFRAME=0 NUMFRAMES=8 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=AltFire STARTFRAME=0 NUMFRAMES=8 //RSW
- #exec MESH SEQUENCE MESH=LG_FP SEQ=Down STARTFRAME=0 NUMFRAMES=1 //RSW
- #exec MESHMAP SCALE MESHMAP=LG_FP X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=LG_FP NUM=0 TEXTURE=LG_Skin
- #exec MESH IMPORT MESH=LG_TP ANIVFILE=Assets\LeechGun\LG_TP_a.3d DATAFILE=Assets\LeechGun\LG_TP_d.3d X=0 Y=0 Z=0 //RSW
- #exec MESH ORIGIN MESH=LG_TP X=04 Y=-140 Z=-15 YAW=-64
- #exec MESHMAP SCALE MESHMAP=LG_TP X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=LG_TP NUM=0 TEXTURE=LG_Skin
- #exec MESH IMPORT MESH=LG_Leech ANIVFILE=Assets\LeechGun\LG_Leech_a.3d DATAFILE=Assets\LeechGun\LG_Leech_d.3d X=0 Y=0 Z=0 //RSW
- #exec MESH ORIGIN MESH=LG_Leech X=0 Y=0 Z=0
- #exec MESHMAP SCALE MESHMAP=LG_Leech X=0.1 Y=0.1 Z=0.2
- #exec MESHMAP SETTEXTURE MESHMAP=LG_Leech NUM=1 TEXTURE=LG_Leech
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Pickup.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_PickupAmmo.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Select.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Reload.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Fire.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_AltFire.wav GROUP=LeechGun //SBB
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Bounce.wav GROUP=LeechGun //SBB: NEW
- #exec AUDIO IMPORT FILE=Assets\LeechGun\LG_Attack.wav GROUP=LeechGun //SBB: NEW
- defaultproperties
- {
- AnimationType=AT_Large
- FireAnimRate=0.900000
- AltFireAnimRate=0.700000
- AmmoName=Class'U2Weapons.AmmoInvLeechPod'
- PickupAmmoCount=21
- AutoSwitchPriority=5
- ProjectileClass=Class'U2Weapons.projectileLeech'
- AltProjectileClass=Class'U2Weapons.projectileStickyLeech'
- AIRating=0.600000
- RefireRate=0.900000
- AltRefireRate=0.700000
- FireSound=Sound'U2Weapons.LeechGun.LG_Fire'
- AltFireSound=Sound'U2Weapons.LeechGun.LG_AltFire'
- CockingSound=Sound'U2Weapons.LeechGun.LG_Reload'
- SelectSound=Sound'U2Weapons.LeechGun.LG_Select'
- InventoryGroup=3
- PickupClass=Class'U2Weapons.weaponLeechGun'
- PlayerViewOffset=(X=40.599998,Y=14.600000,Z=-16.600000)
- FirstPersonMesh=VertMesh'U2Weapons.LG_FP'
- StatusIcon=Texture'U2Weapons.Icons.LG_Icon'
- ItemName="Leech Gun"
- Mesh=VertMesh'U2Weapons.LG_TP'
- }
- @@//THE LEECH PROJECTILE - GreatEmerald
- //=============================================================================
- // projectileLeech.uc -- spawned by the weaponLeechGun Fire() and AltFire()
- // $Author: Mpoesch $
- // $Date: 4/18/01 7:58a $
- // $Revision: 3 $
- //=============================================================================
- class projectileLeech extends U2Projectile;
- var() float ForgetInstigatorTime;
- var() float AttackRange;
- var() float ChaseLifeSpan;
- var() float ChaseSpeed;
- var() vector JumpVect;
- var() float SpeedLeeched;
- var() float AttackLifeSpan;
- var() float AttackPeriod;
- var Pawn TargetPawn;
- function TakeDamage( int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType )
- {
- //SBB Leech carcass and/or death effect(s)
- Destroy();
- }
- function ProcessTouch( Actor Other, Vector HitLocation )
- {
- if( Other != Instigator && Other.IsA( 'Pawn' ) )
- {
- TargetPawn = Pawn(Other);
- GotoState( 'Attacking' );
- }
- }
- auto state Flying
- {
- function LandedEx( CheckResult Hit )
- {
- SetRotation( Rotator( Hit.Normal ) );
- GotoState( 'Waiting' );
- }
- }
- state Waiting
- {
- function BeginState()
- {
- Velocity = Vect(0,0,0);
- SetPhysics( PHYS_None );
- SetTimer( 0.4, true ); // look around periodically -- average latency of 2/10th of a second is equivalent to human reflexes
- ResetLifeSeconds();
- }
- function Timer()
- {
- local Pawn P;
- if( GetLifeSeconds() > ForgetInstigatorTime )
- {
- Instigator = None; // forget instigator (attack the Player)
- }
- foreach RadiusActors( class'Pawn', P, AttackRange )
- {
- if( P != Instigator && FastTrace( Location, P.Location ) )
- {
- TargetPawn = P;
- GotoState( 'Chasing' );
- break;
- }
- }
- }
- }
- state Chasing
- {
- function ChaseTarget( vector HitNormal )
- {
- local vector TargetDirection;
- local rotator FacingDirection;
- TargetDirection = Normal( TargetPawn.Location - Location );
- FacingDirection = rotator( HitNormal );
- FacingDirection.Yaw = rotator( TargetDirection ).Yaw;
- SetRotation( FacingDirection );
- //!!mwp bSimFall = true;
- Velocity = TargetDirection * ChaseSpeed + 5.0 * JumpVect;
- SetPhysics( PHYS_Falling );
- }
- function BeginState()
- {
- LifeSpan = ChaseLifeSpan;
- ChaseTarget( vect(0,0,1) );
- }
- function LandedEx( CheckResult Hit )
- {
- PlaySound( ImpactSound, SLOT_Misc );
- if( FastTrace( Location, TargetPawn.Location ) )
- {
- ChaseTarget( Hit.Normal );
- }
- else
- {
- TargetPawn = None;
- GotoState( 'Waiting' );
- }
- }
- }
- state Attacking
- {
- ignores TakeDamage;
- function BeginState()
- {
- SetCollision( false, false, false );
- bHidden = true;
- SetBase( TargetPawn );
- LifeSpan = AttackLifeSpan;
- SetTimer( AttackPeriod, true );
- TargetPawn.GroundSpeed = TargetPawn.Default.GroundSpeed * SpeedLeeched;
- }
- function Timer()
- {
- if( TargetPawn != None && TargetPawn.Health > 0 && !TargetPawn.bDeleteMe )
- {
- TargetPawn.PlaySound( Sound'LG_Attack', SLOT_Misc );
- TargetPawn.TakeDamage( Damage, Instigator, TargetPawn.Location, Vect(0,0,0), MyDamageType );
- }
- else
- {
- Destroy();
- }
- }
- function Destroyed()
- {
- if( TargetPawn != None )
- {
- TargetPawn.GroundSpeed = TargetPawn.Default.GroundSpeed;
- }
- }
- }
- defaultproperties
- {
- ForgetInstigatorTime=3.000000
- AttackRange=512.000000
- ChaseLifeSpan=10.000000
- ChaseSpeed=250.000000
- JumpVect=(Z=32.000000)
- SpeedLeeched=0.500000
- AttackLifeSpan=10.000000
- AttackPeriod=1.000000
- BounceDamping=0.200000
- speed=800.000000
- MaxSpeed=800.000000
- Damage=1.000000
- MyDamageType=Class'U2.DamageTypeLeechGun'
- ImpactSound=Sound'U2Weapons.LeechGun.LG_Bounce'
- Physics=PHYS_Falling
- Mesh=VertMesh'U2Weapons.LG_Leech'
- DrawScale=0.700000
- TransientSoundVolume=1.000000
- CollisionRadius=3.000000
- CollisionHeight=3.000000
- bBounce=True
- }
- @@//THE SECONDARY FIRE PROJECTILE - GreatEmerald
- //=============================================================================
- // projectileStickyLeech.uc -- spawned by the weaponLeechGun AltFire()
- // $Author: Aleiby $
- // $Date: 4/06/01 2:56a $
- // $Revision: 1 $
- //=============================================================================
- class projectileStickyLeech extends projectileLeech;
- auto state Flying
- {
- function HitWallEx( CheckResult Hit )
- {
- // override bounce behavior (stick to wall and wait for target)
- LandedEx( Hit );
- }
- }
- defaultproperties
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement