ZELASTKILL Posted June 24, 2019 (edited) This keeps happening to me and I don't know how to fix it! PLEASE HELP ME!!! The Code: ACTOR REDNECKKILLINGMACHINE : DoomPlayer { Player.StartItem "Glock2065" Player.StartItem "Fist" Player.StartItem "Clip", 50 Player.WeaponSlot 2, Glock2065 Player.WeaponSlot 1, Fists } ACTOR Glock2065 : Weapon Replaces Pistol { Weapon.SelectionOrder 700 Weapon.AmmoUse 1 Weapon.AmmoGive 20 Weapon.AmmoType "Clip" Inventory.PickupMessage "You got the Pistol!" Obituary "%k fucked by %o Pistol." attacksound "Pistol/Fire" Decal "BulletChip" Weapon.SlotNumber 2 +WEAPON.NOAUTOFIRE States { Ready: D2RG A 1 A_WeaponReady Loop Deselect: D2RG A 1 A_Lower Loop Select: D2RG A 1 A_Raise Loop Fire: D2RF A 0 bright A_FireBullets (2, 2, -1, 9, "HitPuff") D2RF B 1 D2RF C 2 D2RF D 3 D2RF E 4 goto Ready Flash: TNT1 A 3 Bright A_Light1 Goto LightDone Spawn: DEGT A -1 Stop } } Edited June 24, 2019 by ZELASTKILL 0 Share this post Link to post
DynamiteKaitorn Posted June 24, 2019 (edited) Mind describing the error with a little more detail such as a log or a screenshot? I'm struggling to see the issue so far. EDIT: Also unless "Doomplayer" is an acceptable form of custom player stats, try using "playerpawn". 0 Share this post Link to post
Bryan T Posted June 24, 2019 The log will show exactly what line and what property is erroring out. 0 Share this post Link to post
RonnieJamesDiner Posted June 24, 2019 If I'm remembering correctly, I don't think you can use the "replaces" function to replace a weapon. I think just having the "Player.WeaponSlot 2, Glock2065" like you have is all you need. You'll also need a KEYCONF lump in your WAD for your custom player class to work, if you don't have one already. The KEYCONF lump should only need: clearplayerclasses addplayerclass "REDNECKKILLINGMACHINE" 0 Share this post Link to post
MFG38 Posted June 25, 2019 13 hours ago, RonnieJamesDiner said: If I'm remembering correctly, I don't think you can use the "replaces" function to replace a weapon. You can, actually. 13 hours ago, RonnieJamesDiner said: You'll also need a KEYCONF lump in your WAD for your custom player class to work, if you don't have one already. The KEYCONF lump should only need: clearplayerclasses addplayerclass "REDNECKKILLINGMACHINE" That method is deprecated. Player classes are defined in MAPINFO instead now - see this page at the ZDoom wiki. 0 Share this post Link to post
RonnieJamesDiner Posted June 25, 2019 4 hours ago, MFG38 said: That method is deprecated. Player classes are defined in MAPINFO instead now - see this page at the ZDoom wiki. Whoops! I didn't realize this, thank you! As far as using the Replaces function with weapons, I must be doing something wrong because I've never been able to get this to work. I always get an error message saying "Expected '{' but got identifier 'Replaces' instead." Weapons are the only actor types that give me this error when trying to use that function. 0 Share this post Link to post
MFG38 Posted June 25, 2019 1 hour ago, RonnieJamesDiner said: As far as using the Replaces function with weapons, I must be doing something wrong because I've never been able to get this to work. I always get an error message saying "Expected '{' but got identifier 'Replaces' instead." Weapons are the only actor types that give me this error when trying to use that function. Out of curiosity, which source port and version of it do you use? The only explanation I can think of is that you're using either an ancient version of ZDoom or a derivative port where the functionality hasn't been implemented. 0 Share this post Link to post
RonnieJamesDiner Posted June 25, 2019 @MFG38 I've been using GZDoom. I get that error with the latest build, and I've received that error with as many prior builds as I can remember. 0 Share this post Link to post
MFG38 Posted June 25, 2019 Well, that's odd... Sadly, though, I can't help. @Graf Zahl if anyone is likely to know what's going on. 0 Share this post Link to post
RonnieJamesDiner Posted June 26, 2019 This has been bugging the hell out of me, and after pulling my hair out trying to understand, I almost had a brain hemorrhage when I realized what I was doing wrong. I had never been adding the word Weapon. Every time I've tried to do it, I was writing ACTOR Glock2065 : Replaces Pistol, rather than Weapon replaces Pistol. Thank you for inciting me to figure this out, though. The learning never ends. 0 Share this post Link to post