Making a mod, and I wanted to make the starting pistol a bit better. I followed a guide on how to change the starting weapon, and it worked! Up until I picked up another weapon, in which it freezes and crashes. I can't find anything wrong with the syntax myself. Hoping some more experienced zdoomers can help?
Here's my code:
DECORATE:
//REPLACES PISTOL
Actor PistolPlus : Pistol replaces Pistol
{
Weapon.SlotNumber 2
Weapon.SelectionOrder 1900
States
{
Fire:
PISG A 4
PISG B 6
{
A_FireBullets (1,1,1,10, "BulletPuff");
A_StartSound("weapons/pistol", CHAN_WEAPON);
A_GunFlash;
}
PISG C 2
PISG B 2 A_ReFire
Goto Ready
Select:
PISG A 1 A_Raise(32)
Loop
Deselect:
PISG A 1 A_Raise(32)
Loop
}
}
//REPLACES DOOMPLAYER
Actor NewPlayer : DoomPlayer
{
Player.StartItem "PistolPlus"
Player.StartItem "Fist"
Player.StartItem "Clip", 50
}
MAPINFO
//GAMEINFO IN MAPINFO LUMP
GAMEINFO
{
PlayerClasses = "NewPlayer"
}
Question
WigglyStuf
Making a mod, and I wanted to make the starting pistol a bit better. I followed a guide on how to change the starting weapon, and it worked! Up until I picked up another weapon, in which it freezes and crashes. I can't find anything wrong with the syntax myself. Hoping some more experienced zdoomers can help?
Here's my code:
DECORATE:
//REPLACES PISTOL Actor PistolPlus : Pistol replaces Pistol { Weapon.SlotNumber 2 Weapon.SelectionOrder 1900 States { Fire: PISG A 4 PISG B 6 { A_FireBullets (1,1,1,10, "BulletPuff"); A_StartSound("weapons/pistol", CHAN_WEAPON); A_GunFlash; } PISG C 2 PISG B 2 A_ReFire Goto Ready Select: PISG A 1 A_Raise(32) Loop Deselect: PISG A 1 A_Raise(32) Loop } } //REPLACES DOOMPLAYER Actor NewPlayer : DoomPlayer { Player.StartItem "PistolPlus" Player.StartItem "Fist" Player.StartItem "Clip", 50 }
MAPINFO
//GAMEINFO IN MAPINFO LUMP GAMEINFO { PlayerClasses = "NewPlayer" }
Share this post
Link to post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.