Class PulseAmmo : Ammo { Default { Tag "Pulse Cell"; Inventory.PickupMessage "You picked up a Pulse Cell."; Inventory.Amount 25; Inventory.MaxAmount 200; Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 400; Ammo.DropAmount 25; } States { Spawn: PAMO A -1; Stop; } } Class PulseBall : Actor { Default { RenderStyle "Add"; PROJECTILE; Scale 0.2; Speed 30; } override void PostBeginPlay() { A_PlaySound("pulse/fly",CHAN_BODY,0.8,true,8.0); } action void A_BallExp() { A_SetScale(0.45); A_PlaySound("pulse/hit",CHAN_BODY); } States { Spawn: PBAL ABCDE 1 Bright; Loop; Death: TNT1 A 0 A_BallExp(); PBAL ABCDE 3 Bright; Stop; } } Class PulseBolt : Actor { } Class StarterBolt : PulseBolt { } Class PulseGun : UTWeapon { int clipcount; double sangle; StarterBolt beam; Property ClipCount : clipcount; action void A_Reloading() { Weapon weap = Weapon(invoker); if ( !weap ) return; invoker.clipcount = Min(50,weap.Ammo1.Amount); A_PlaySound("pulse/reload",CHAN_WEAPON); } action void A_DrainAmmo() { Weapon weap = Weapon(invoker); if ( !weap ) return; if ( weap.Ammo1.Amount <= 0 ) return; if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return; invoker.clipcount--; A_AlertMonsters(); Vector3 x, y, z; [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.5*y-2.4*z; int numpt = Random[Pulse](2,5); for ( int i=0; i 0) ) return A_Jump(255,"Reload"); A_WeaponReady(WRF_ALLOWRELOAD); return A_JumpIf(!Random[Pulse](0,300),1); } Wait; PGNI ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 { A_CheckReload(); A_WeaponReady(WRF_ALLOWRELOAD); } Goto Idle; Fire: PGNI A 0 A_PlaySound("pulse/fire",CHAN_WEAPON,1.0,true); Hold: PGNF A 1 A_PulseFire(); PGNF B 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF C 1 A_PulseFire(); PGNF D 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF E 1 A_PulseFire(); PGNF F 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF G 1 A_PulseFire(); PGNF H 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF I 1 A_PulseFire(); PGNF J 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF K 1 A_PulseFire(); PGNF L 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF M 1 A_PulseFire(); PGNF N 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF O 1 A_PulseFire(); PGNF P 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF Q 1 A_PulseFire(); PGNF R 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF S 1 A_PulseFire(); PGNF T 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF U 1 A_PulseFire(); PGNF V 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF W 1 A_PulseFire(); PGNF X 1; PGNF Y 0 A_PulseRefire(1); Goto Release; PGNF Y 1 A_PulseFire(); PGNF Z 1; PGF2 A 0 A_PulseRefire(1); Goto Release; PGF2 A 1 A_PulseFire(); PGF2 B 1; PGF2 C 0 A_PulseRefire(1); Goto Release; PGF2 C 1 A_PulseFire(); PGF2 D 1; PGF2 E 0 A_PulseRefire(1); Goto Release; PGF2 E 1 A_PulseFire(); PGF2 F 1; PGF2 G 0 A_PulseRefire(1); Goto Release; PGF2 G 1 A_PulseFire(); PGF2 H 1; PGF2 I 0 A_PulseRefire(1); Goto Release; PGF2 I 1 A_PulseFire(); PGF2 J 1; PGF2 K 0 A_PulseRefire(1); Goto Release; PGF2 K 1 A_PulseFire(); PGF2 L 1; PGF2 M 0 A_PulseRefire(1); Goto Release; PGF2 M 1 A_PulseFire(); PGF2 N 1; PGNF A 0 A_PulseRefire("Hold"); Release: PGNC A 0 A_PlaySound("pulse/down",CHAN_WEAPON); PGNC ABCDEFGHIJKLMNOPQRSTUVWXY 1; PGNI A 1; Goto Idle; AltFire: PGBS ABCDE 1; PGBL A 0 A_StartBeam(); AltHold: PGBL A 1 A_DrainAmmo(); PGBL B 1; PGBL C 0 A_PulseRefire(1); Goto AltRelease; PGBL C 1 A_DrainAmmo(); PGBL D 1; PGBL E 0 A_PulseRefire(1); Goto AltRelease; PGBL E 1 A_DrainAmmo(); PGBL F 1; PGBL G 0 A_PulseRefire(1); Goto AltRelease; PGBL G 1 A_DrainAmmo(); PGBL H 1; PGBL I 0 A_PulseRefire(1); Goto AltRelease; PGBL I 1 A_DrainAmmo(); PGBL J 1; PGBL A 0 A_PulseRefire("AltHold"); AltRelease: PGBE A 0 A_StopBeam(); PGBE ABCDE 1; Goto Idle; Reload: PGNI A 1 A_JumpIf(invoker.clipcount >= 50,"Idle"); PGNR A 1 A_Reloading(); PGNR BCDEFGHIJKLMNOPQRSTUVWXYZ 1; PGR2 ABCDEFGHIJKLMNOPQRSTUVWX 1; Goto Idle; Deselect: PGNS WVUTSRQPONMLKJIHGFEDCBA 1; PGNS A 1 A_Lower(int.max); Wait; Select: PGNS A 1 A_Raise(int.max); Wait; MuzzleFlash: PMUZ A 1 Bright; Stop; } }