Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Colt_loaded = 7;
- Class Colt45 : TCTOAWeapon replaces Pistol
- {
- int Loaded;
- Default
- {
- Scale 0.2;
- Weapon.SelectionOrder 1900;
- Weapon.AmmoUse 1;
- Weapon.AmmoGive 7;
- Weapon.AmmoGive2 14;
- Weapon.AmmoType "ColtClipA";
- Weapon.AmmoType2 "ColtClip";
- AttackSound "Colt45/PrimFire";
- Weapon.SlotNumber 2;
- Obituary "%o was shot down by %k's Colt45.";
- Inventory.Pickupmessage "The Colt 45 is now in your hands!";
- +WEAPON.NOAUTOFIRE
- +WEAPON.AMMO_OPTIONAL
- +WEAPON.NOALERT
- //$Category "Weapons"
- }
- States
- {
- Ready:
- COLT A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM);
- Loop;
- Deselect:
- COLT A 1 A_Lower();
- Loop;
- Select:
- TNT1 A 0 A_SetInventory("ColtClipA",invoker.Loaded);
- COLT A 1 A_Raise();
- Loop;
- Fire:
- TNT1 A 0
- {
- if(invoker.Loaded<1)
- {
- player.setpsprite(PSP_WEAPON,invoker.findstate("No"));
- A_SetInventory("ColtClipA",invoker.Loaded);
- }
- }
- COLT B 2;
- COLT C 1
- {
- A_FireBullets(5.2,1,1,8);
- invoker.loaded--;
- A_AlertMonsters();
- A_GunFlash();
- }
- COLT C 2 A_Light2();
- COLT C 2 A_Light1();
- COLT D 3 A_Light0();
- COLT E 3;
- TNT1 A 0 A_ReFire();
- COLT E 3;
- Goto Ready;
- Reload:
- COLT A 1
- {
- int ToLoad = min
- (
- countinv("ColtClip"),
- Colt_loaded-invoker.Loaded
- );
- if(ToLoad<1)
- {
- A_StartSound("ColtFull", CHAN_WEAPON, CHANF_NOSTOP);
- player.setpsprite(PSP_WEAPON,invoker.findstate("No"));
- return;
- }
- }
- CLTR A 3
- {
- int ToLoad = min
- (
- countinv("ColtClip"),
- Colt_loaded-invoker.Loaded
- );
- invoker.Loaded+=ToLoad;
- A_TakeInventory("ColtClip",ToLoad,TIF_NOTAKEINFINITE);
- A_SetInventory("ColtClipA",invoker.Loaded);
- }
- CLTR B 4 A_StartSound("ColtClipOut", CHAN_WEAPON);
- CLTR C 3;
- CLTR D 3;
- CLTR E 3;
- CLTR F 4 A_StartSound("ColtClipIn", CHAN_WEAPON);
- CLTR G 3;
- CLTR H 3;
- goto Ready;
- No:
- COLT A 1 A_WeaponReady(WRF_NOFIRE);
- goto ready;
- Flash:
- COLT C 1 Bright A_Light1();
- COLT C 2 Bright A_Light2();
- COLT C 0 Bright A_Light0();
- Goto LightDone;
- Spawn:
- COLT Z -1;
- Stop;
- }
- }
- /*
- */
- Class ColtClipA : TCTOAAmmo //Don't change this, it's a dummy item to show the ammo count
- {
- Default
- {
- Inventory.MaxAmount Colt_loaded;
- Ammo.BackpackMaxAmount Colt_loaded;
- Ammo.BackpackAmount 0;
- }
- }
- Class ColtClip : Ammo replaces Clip
- {
- Default
- {
- Inventory.PickupMessage "Picked up a pistol magazine.";
- Inventory.Amount 7;
- Inventory.MaxAmount 105; //For a total of 15 Magazines
- Ammo.BackpackAmount 7;
- Ammo.BackpackMaxAmount 210; //For a total of 30 Magazines
- Inventory.Icon "CCLP1A0";
- Scale 0.1;
- //$Category "Ammunition"
- }
- States
- {
- Spawn:
- CCLP A -1;
- Stop;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement