Jump to content

How do I replace starting weapons?


Recommended Posts

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

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.

Edited by ketmar

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...