wacked666 Posted August 31, 2015 How would I write the decorate so when I pick up a second pistol then it would turn into duel pistols? I really appreciate any help! Thanks in advance actor MAGNl : Pistol Replaces Pistol { obituary "%o was peppered by %k's DESERT EAGLE." radius 20 height 16 attacksound "DEAG/Fire" inventory.pickupmessage "You got the DESERT EAGLE!" weapon.kickback 100 weapon.ammotype "Clip" weapon.ammouse 1 weapon.ammogive 40 Decal "BulletChip" Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 states { Spawn: DEGP A -1 Ready: MAGN A 1 A_WeaponReady loop Deselect: MAGN A 1 A_Lower loop Select: MAGN A 1 A_Raise loop Fire: MAGN A 0 bright A_FireBullets (1, 1, -1, 12, "BulletPuff") MAGN B 2 BRIGHT A_GunFlash MAGN C 2 MAGN D 2 MAGN E 2 MAGN D 2 MAGN A 4 A_ReFire goto Ready Altfire: Zic4 ABC 3 zic4 D 3 A_CustomPunch (8,0,0,"KickPuff") zic4 CBA 3 Magn a 3 A_Refire goto ready Flash: TNT1 A 2 bright A_Light1 TNT1 A 2 bright A_Light2 TNT1 A 0 bright A_Light0 stop Spawn: DEGP A -1 stop Goto Ready } } Can anyone point me to a wad that gives you a dual weapon after picking up the first? I'd like to do this with out ACS please and thanks 0 Share this post Link to post
Fuzzball Posted August 31, 2015 Would it be possible to "take" the Pistol away once you pick up the new weaopon? 0 Share this post Link to post
wacked666 Posted August 31, 2015 I would like to have both weapons select-able if possible, I think i figured out a way if I use two different weapons (id rather not do it that way) with: Weapon Pieces 'WeaponPiece.Number number' 'WeaponPiece.Weapon weapontype' I don't know much about this function though, im just experimenting right now 0 Share this post Link to post
scifista42 Posted August 31, 2015 Change the "Select" state of your MAGNI weapon in this fashion: Select: MAGN A 0 A_SelectWeapon("MAGNI2") Select2: MAGN A 1 A_Raise loop"MAGNI2" represents the classname of the other weapon, dual pistols. Then define the "Select" state of the other weapon (MAGNI2) this way: Select: MAG2 A 0 A_TakeInventory("MAGNI",1) Select2: MAG2 A 1 A_Raise loopEDIT:wacked666 said:I would like to have both weapons select-able if possible Great, then it's even easier. Simply make them 2 separate weapons occupying the same weapon slot (like SG + SSG that are both in slot 3), let the double pistols have higher priority than single pistol. 0 Share this post Link to post
wacked666 Posted August 31, 2015 Thank you very much for the reply! *edit I'd like it so if you pick up one pistol it gives you one but when you pick up a second pistol then you can use duelies or still the single pistol. 0 Share this post Link to post
snapshot Posted August 31, 2015 FuzzballFox said:Would it be possible to "take" the Pistol away once you pick up the new weaopon? I've done that for a Custom Action Doom 2 weapon once : ACTOR PunchOfDuty : Weapon { . . . Inventory.PickupMessage "You're the kind of guy I could dig... a grave for!" . . . . SHVL I 0 A_Takeinventory ("PunchofDuty") SHVL I 1 A_Lower Goto Deselect + 4 . . . . } } 0 Share this post Link to post
wacked666 Posted August 31, 2015 Ok this is what ive got so far, in zandronum the pistol is unselectable with out cheats and in gzdoom when i pick up a pistol it goes invisible for a second then just gives me the regular pistol. actor MAGNI : Pistol Replaces Pistol { obituary "%o was peppered by %k's DESERT EAGLE." radius 20 height 16 attacksound "DEAG/Fire" inventory.pickupmessage "You got the DESERT EAGLE!" weapon.kickback 100 weapon.ammotype "Clip" weapon.ammouse 1 weapon.ammogive 40 Decal "BulletChip" Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 states { Spawn: DEGP A -1 Ready: MAGN A 1 A_WeaponReady loop Deselect: MAGN A 1 A_Lower loop Select: MAGN A 0 A_SelectWeapon("MAGNI2") Select2: MAGN A 1 A_Raise loop Fire: MAGN A 0 bright A_FireBullets (1, 1, -1, 12, "BulletPuff") MAGN B 2 BRIGHT A_GunFlash MAGN C 2 MAGN D 2 MAGN E 2 MAGN D 2 MAGN A 4 A_ReFire goto Ready Altfire: Zic4 ABC 3 zic4 D 3 A_CustomPunch (8,0,0,"KickPuff") zic4 CBA 3 Magn a 3 A_Refire goto ready Flash: TNT1 A 2 bright A_Light1 TNT1 A 2 bright A_Light2 TNT1 A 0 bright A_Light0 stop Spawn: DEGP A -1 stop Goto Ready } } actor MAGNI2 : DoomWeapon 20998 { obituary "%o was peppered by %k's DESERT EAGLE." radius 20 height 16 attacksound "DEAG/Fire" inventory.pickupmessage "You got the DESERT EAGLE!" weapon.kickback 100 weapon.ammotype "Clip" weapon.ammouse 1 weapon.ammogive 40 Decal "BulletChip" Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 states { Spawn: DEGP A -1 Ready: MAGN A 1 A_WeaponReady loop Deselect: MAGN A 1 A_Lower loop Select: MAG2 A 0 A_TakeInventory("MAGNI",1) Select2: MAG2 A 1 A_Raise loop Fire: MAGN A 0 bright A_FireBullets (1, 1, -1, 12, "BulletPuff") MAGN B 2 BRIGHT A_GunFlash MAGN C 2 MAGN D 2 MAGN E 2 MAGN D 2 MAGN A 4 A_ReFire goto Ready Altfire: Zic4 ABC 3 zic4 D 3 A_CustomPunch (8,0,0,"KickPuff") zic4 CBA 3 Magn a 3 A_Refire goto ready Flash: TNT1 A 2 bright A_Light1 TNT1 A 2 bright A_Light2 TNT1 A 0 bright A_Light0 stop Spawn: DEGP A -1 stop Goto Ready } } *i know im using the same sprite for both, i want the gun to work then ill draw up a working sprite **edit also in gzdoom if i select a different weapon when i have pistol equipped then i cant switch back to pistol. 0 Share this post Link to post
scifista42 Posted August 31, 2015 wacked666 said:*edit I'd like it so if you pick up one pistol it gives you one but when you pick up a second pistol then you can use duelies or still the single pistol. I have assumed that MAGNI would be the player's starting weapon, in that case he would always have at least one pistol, and any next one would already become his 2nd one, so that the pickup could already act like the double pistol pickup and it wouldn't matter. Okay. Here is a way: Use a dummy inventory item to "count" the pistols you have. Define it like this:actor dummy : inventory { inventory.maxamount 3 }Then you need to define the pistol pickup as a custom inventory:actor magnipickup : custominventory { Inventory.PickupMessage "You got the DESERT EAGLE!" Inventory.PickupSound "misc/w_pkup" States { Spawn: DEGP A -1 stop Pickup: TNT1 A 0 A_GiveInventory("dummy",1) TNT1 A 0 A_GiveInventory("MAGNI",1) stop } }Make it so that both pre-placed pistols and pistols dropped by enemies are actually this "magnipickup" actor, not "MAGNI" itself. Then change the "Select" state of MAGNI to be this: Select: MAGN A 0 A_JumpIfInventory("dummy",3,"Select2") MAGN A 0 A_JumpIfInventory("dummy",2,"BecomeDual") goto Select2 BecomeDual: MAGN A 0 A_GiveInventory("dummy",1) MAGN A 0 A_GiveInventory("MAGNI2",1) MAGN A 0 A_SelectWeapon("MAGNI2") Select2: MAGN A 1 A_Raise loopThis will make the 1st picked-up pistol do nothing special upon pickup. However, the 2nd picked-up pistol will give a new weapon "MAGNI2" to the player. Any further picked-up pistol won't do anything special anymore. Finally, define MAGNI2 (the dual pistols) as a separate weapon. 0 Share this post Link to post
wacked666 Posted August 31, 2015 Thanks again, sorry i didnt mention that the pistol is not the default weapon in my mod. so far i've got: actor dummy : inventory { inventory.maxamount 3 } actor magnipickup : custominventory { Inventory.PickupMessage "You got the DESERT EAGLE!" Inventory.PickupSound "misc/w_pkup" States { Spawn: DEGP A -1 stop Pickup: TNT1 A 0 A_GiveInventory("dummy",1) TNT1 A 0 A_GiveInventory("MAGNI",1) stop } } actor MAGNI : Doomweapon 16422 { obituary "%o was peppered by %k's DESERT EAGLE." radius 20 height 16 attacksound "DEAG/Fire" inventory.pickupmessage "You got the DESERT EAGLE!" weapon.kickback 100 weapon.ammotype "Clip" weapon.ammouse 1 weapon.ammogive 40 Decal "BulletChip" Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 states { Spawn: DEGP A -1 Ready: MAGN A 1 A_WeaponReady loop Deselect: MAGN A 1 A_Lower loop Select: MAGN A 0 A_JumpIfInventory("dummy",3,"Select2") MAGN A 0 A_JumpIfInventory("dummy",2,"BecomeDual") goto Select2 BecomeDual: MAGN A 0 A_GiveInventory("dummy",1) MAGN A 0 A_GiveInventory("MAGNI2",1) MAGN A 0 A_SelectWeapon("MAGNI2") Select2: MAGN A 1 A_Raise loop Fire: MAGN A 0 bright A_FireBullets (1, 1, -1, 12, "BulletPuff") MAGN B 2 BRIGHT A_GunFlash MAGN C 2 MAGN D 2 MAGN E 2 MAGN D 2 MAGN A 4 A_ReFire goto Ready Altfire: Zic4 ABC 3 zic4 D 3 A_CustomPunch (8,0,0,"KickPuff") zic4 CBA 3 Magn a 3 A_Refire goto ready Flash: TNT1 A 2 bright A_Light1 TNT1 A 2 bright A_Light2 TNT1 A 0 bright A_Light0 stop Spawn: DEGP A -1 stop Goto Ready } } actor MAGNI2 : DoomWeapon 20998 { obituary "%o was peppered by %k's DESERT EAGLE." radius 20 height 16 attacksound "DEAG/Fire" inventory.pickupmessage "You got the DESERT EAGLE!" weapon.kickback 100 weapon.ammotype "Clip" weapon.ammouse 1 weapon.ammogive 40 Decal "BulletChip" Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 states { Spawn: DEGP A -1 Ready: MAGN A 1 A_WeaponReady loop Deselect: MAGN A 1 A_Lower loop Select: MAG2 A 0 A_TakeInventory("MAGNI",1) Select2: MAG2 A 1 A_Raise loop Fire: MAGN A 0 bright A_FireBullets (1, 1, -1, 12, "BulletPuff") MAGN B 2 BRIGHT A_GunFlash MAGN C 2 MAGN D 2 MAGN E 2 MAGN D 2 MAGN A 4 A_ReFire goto Ready Altfire: Zic4 ABC 3 zic4 D 3 A_CustomPunch (8,0,0,"KickPuff") zic4 CBA 3 Magn a 3 A_Refire goto ready Flash: TNT1 A 2 bright A_Light1 TNT1 A 2 bright A_Light2 TNT1 A 0 bright A_Light0 stop Spawn: DEGP A -1 stop Goto Ready } } **weapon is totally unselectable in zandronum, i can pick up the pistol in gzdoom but can't switch weapons or the pistol becomes unselectable **EDIT I got it to work [sort of but,](was a problem with my keyconf), I first start with one pistol then pick up the other and get magni2, but magni1 is unselectable also it looks like it disappears for a second when the magni2 comes up Thanks again for your help i appreciate it! 0 Share this post Link to post
wacked666 Posted August 31, 2015 Ok i got it to work, i forgot to change magni2 to stop removing magni1 Thanks for your help! i really need this for my mod! 0 Share this post Link to post
scifista42 Posted August 31, 2015 You're welcome. One last note: Weapon.SelectionOrder number of MAGNI2 should be lesser than MAGNI1's, to make sure that MAGNI2 will take priority when you use another weapon, run out of the weapon's ammo and auto-select to a pistol. EDIT: Another note: Since you already use "Weapon.SlotNumber", you can ditch your KEYCONF completely. Player classes are also better to be defined via GameInfo than via KEYCONF. 0 Share this post Link to post