Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
TheWolfman00001

How do I replace starting weapons?

Recommended Posts

Posted (edited)

I am trying to replace the pistol with a different variant that has buffed firing speed and damage, and it doesn't seem to be working. I have tried adding Weapon.SlotNumber 2 to my code but that only makes the edited pistol an extra weapon that I have to use "give all" to obtain. The replace command also doesn't seem to be working as whenever I use that command it has no effect. What am I doing wrong?

 

ACTOR PistolBuffed : pistol replaces pistol
{
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.AmmoGive 20
  Weapon.AmmoType "Clip"
  Obituary "$OB_MPPISTOL"
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
  Tag "$TAG_PISTOL"
  States
  {
  Ready:
    PISG A 1 A_WeaponReady
    Loop
  Deselect:
    PISG A 1 A_Lower
    Loop
  Select:
    PISG A 1 A_Raise
    Loop
  Fire:
    PISG A 4
    PISG B 0 A_FireBullets (0, 0, 1, 15, "BulletPuff", FBF_USEAMMO|FBF_NORANDOM)
    PISG B 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
    PISG B 3 A_GunFlash
    PISG C 4
    PISG B 3 A_ReFire
    Goto Ready
  Flash:
    PISF A 4 Bright A_Light1
    Goto LightDone
    PISF A 4 Bright A_Light1
    Goto LightDone
  Spawn:
    PIST A -1
    Stop
  }
}

 

I am putting my decorate code here, maybe you guys can find an error that I haven't?

Edited by TheWolfman00001

Share this post


Link to post

I don't have a lot of experience with DECORATE, but perhaps try:

 

ACTOR PistolBuffed : weapon replaces pistol

 

That might be all it takes, I don't know if you'll also need:

 

Player.StartItem "_PistolBuffed"

Player.WeaponSlot 2, _PistolBuffed

 

I hope this helps.

 

 

 

 

Share this post


Link to post
Posted (edited)

to replace player's initial inventory, you have to create a new player class, and tell the game that it should use it instead of default DoomPlayer. decorate replacements has any effect only on items spawned on the map.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×