Help! Replacing Starter weapons
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.
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.
Help! Replacing Starter weapons
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
thanks
Re: Help! Replacing Starter weapons
Were do I put the code?
- FuzzballFox
- Posts: 1905
- Joined: Thu Jan 24, 2008 10:19 am
- Location: Hampshire UK
Re: Help! Replacing Starter weapons
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
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
}
}
Re: Help! Replacing Starter weapons
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
- FuzzballFox
- Posts: 1905
- Joined: Thu Jan 24, 2008 10:19 am
- Location: Hampshire UK
Re: Help! Replacing Starter weapons
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.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
Re: Help! Replacing Starter weapons
Try this.
Then, for your first map:
That should work.
Code: Select all
setslot1 Fist
setslot2 PSRevolver
Code: Select all
script 1 open
{
clearinventory ();
giveinventory ("fist", 1);
giveinventory ("PSRevolver", 1);
}
That should work.
- 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
ClearInventory gives you the starting stuff, though; a playerclass is a much better way, anyway.
Re: Help! Replacing Starter weapons
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!
- 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
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!XutaWoo wrote:ClearInventory gives you the starting stuff, though; a playerclass is a much better way, anyway.