Help! Replacing Starter weapons

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
ds9490
Posts: 48
Joined: Thu Jul 16, 2009 10:55 am
Location: E1M1 Wandering In The Hangar

Help! Replacing Starter weapons

Post by ds9490 »

I Need help replacing the starter weapons, I've got a replacement handgun and it works if you pick it up but you don't start with it please help!

thanks
User avatar
ds9490
Posts: 48
Joined: Thu Jul 16, 2009 10:55 am
Location: E1M1 Wandering In The Hangar

Re: Help! Replacing Starter weapons

Post by ds9490 »

Were do I put the code?
User avatar
FuzzballFox
Posts: 1905
Joined: Thu Jan 24, 2008 10:19 am
Location: Hampshire UK

Re: Help! Replacing Starter weapons

Post by FuzzballFox »

You need to make a decorate lump and insert it into your wad. You can then edit the original playerclass to suit your needs~
http://zdoom.org/wiki/Classes:DoomPlayer

Code: Select all

ACTOR DoomPlayer : PlayerPawn
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 100
  PainChance 255
  Player.ColorRange 112, 127
  Player.DisplayName "Marine"
  Player.CrouchSprite "PLYC"
  Player.StartItem "Pistol"
  Player.StartItem "Fist"
  Player.StartItem "Clip", 50
  Player.WeaponSlot 1, Fist, Chainsaw
  Player.WeaponSlot 2, Pistol
  Player.WeaponSlot 3, Shotgun, SuperShotgun
  Player.WeaponSlot 4, Chaingun
  Player.WeaponSlot 5, RocketLauncher
  Player.WeaponSlot 6, PlasmaRifle
  Player.WeaponSlot 7, BFG9000

  States
  {
  Spawn:
    PLAY A -1
    Loop
  See:
    PLAY ABCD 4 
    Loop
  Missile:
    PLAY E 12 
    Goto Spawn
  Melee:
    PLAY F 6 BRIGHT
    Goto Missile
  Pain:
    PLAY G 4 
    PLAY G 4 A_Pain
    Goto Spawn
  Death:
    PLAY H 0 A_PlayerSkinCheck("AltSkinDeath")
  Death1:
    PLAY H 10
    PLAY I 10 A_PlayerScream
    PLAY J 10 A_NoBlocking
    PLAY KLM 10
    PLAY N -1
    Stop
  XDeath:
    PLAY O 0 A_PlayerSkinCheck("AltSkinXDeath")
  XDeath1:
    PLAY O 5
    PLAY P 5 A_XScream
    PLAY Q 5 A_NoBlocking
    PLAY RSTUV 5
    PLAY W -1
    Stop
  AltSkinDeath:
    PLAY H 6
    PLAY I 6 A_PlayerScream
    PLAY JK 6
    PLAY L 6 A_NoBlocking
    PLAY MNO 6
    PLAY P -1
    Stop
  AltSkinXDeath:
    PLAY Q 5 A_PlayerScream
    PLAY R 0 A_NoBlocking
    PLAY R 5 A_SkullPop
    PLAY STUVWX 5
    PLAY Y -1
    Stop
  }
}
User avatar
ds9490
Posts: 48
Joined: Thu Jul 16, 2009 10:55 am
Location: E1M1 Wandering In The Hangar

Re: Help! Replacing Starter weapons

Post by ds9490 »

I have a Keyconf set up can i do it through this?

Code: Select all

clearplayerclasses
addplayerclass Playerz nomenu

weaponsection Zombieweapons

setslot 1 Chainsaw Fist
setslot 2 PSRevolver
setslot 3 AutomaticShotgun
setslot 4 PulseMachinegun
setslot 5 
setslot 6 
setslot 7 
User avatar
FuzzballFox
Posts: 1905
Joined: Thu Jan 24, 2008 10:19 am
Location: Hampshire UK

Re: Help! Replacing Starter weapons

Post by FuzzballFox »

ds9490 wrote:I have a Keyconf set up can i do it through this?

Code: Select all

clearplayerclasses
addplayerclass Playerz nomenu

weaponsection Zombieweapons

setslot 1 Chainsaw Fist
setslot 2 PSRevolver
setslot 3 AutomaticShotgun
setslot 4 PulseMachinegun
setslot 5 
setslot 6 
setslot 7 
Keyconf is used to setup the weapon slots, but doesn't actually set the starter weapons...read my post above and look at the code.
User avatar
Sonnyboy
Posts: 1156
Joined: Sun May 03, 2009 5:40 pm
Location: A pinch here, a dab there
Contact:

Re: Help! Replacing Starter weapons

Post by Sonnyboy »

Try this.

Code: Select all

setslot1 Fist
setslot2 PSRevolver
Then, for your first map:

Code: Select all

script 1 open
{
clearinventory ();
giveinventory ("fist", 1);
giveinventory ("PSRevolver", 1);
}

That should work.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Help! Replacing Starter weapons

Post by XutaWoo »

ClearInventory gives you the starting stuff, though; a playerclass is a much better way, anyway.
User avatar
ds9490
Posts: 48
Joined: Thu Jul 16, 2009 10:55 am
Location: E1M1 Wandering In The Hangar

Re: Help! Replacing Starter weapons

Post by ds9490 »

i don't think it would start of with the standard weapons because the psrevolver is programed to overide the standard pistol. i've tested this before by summoning it in game. once picked up the old one disapears!
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Help! Replacing Starter weapons

Post by wildweasel »

XutaWoo wrote:ClearInventory gives you the starting stuff, though; a playerclass is a much better way, anyway.
ClearInventory clears the ENTIRE inventory, dummy items and all. I know this after having tried to play a WAD that used said function with the present build of Hernandez - found not only my weapons missing, but upon cheating to get them back, I couldn't reload either!
Locked

Return to “Editing (Archive)”