Jump to content
  • 0

Can't replace weapons with DECORATE


WatermelonPL

Question

Why when I try to replace BFG, with BFG that has old (Press release) behaviour, I can't? On 'give all' none of BFG's (Mine, or original) doesn't show up.

Or when I try to replace chainsaw with pistol, that has +WEAPON.NOALERT tag, doesn't work too. Tutorial I've read, that replaces chainsaw with auto-shotgun (Repeating) does work.

 

ACTOR OldBFG : Weapon replaces BFG9000
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.PickupMessage "Picked up BFG9000!"
  States
  {
  Ready:
    BFGG A 1 A_WeaponReady
    Loop
  Deselect:
    BFGG A 1 A_Lower
    Loop
  Select:
    BFGG A 1 A_Raise
    Loop
  OldFire:
    BFGG A 20 A_BFGSound
    BFGG B 10 A_GunFlash
    BFGG B 10 A_FireBFG
    BFGG B 20 A_ReFire
    Goto Ready
  Flash:
    BFGF A 11 Bright A_Light1
    BFGF B 6 Bright A_Light2
    Goto LightDone
  Spawn:
    BFUG A -1
    Stop
  Fire:
    BFGG A 10 A_BFGSound
    BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
    BFGG B 0 A_Light0
    BFGG B 20 A_ReFire
    Goto Ready
  }
}

 

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0

That code looks fine to me.  Try this, which inherits from the BFG9000 and only includes what is being changed.:

ACTOR YeOldeBFG : BFG9000 replaces BFG9000
{
  States
  {
  Fire:
    BFGG A 10 A_BFGSound
    BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
    BFGG B 0 A_Light0
    BFGG B 20 A_ReFire
    Goto Ready
  }
}

 

Share this post


Link to post
  • 0
1 hour ago, Pooh said:

make a player class that actually can yield any of your added guns, refer to these articles for everything you could need

https://zdoom.org/wiki/Creating_new_player_classes
https://zdoom.org/wiki/Classes:DoomPlayer
https://zdoom.org/wiki/Using_inheritance
 

Still doesn't work. From whatever reason code from that tutorial works.

ACTOR YeOldeBFG : BFG9000 replaces BFG9000
{
  States
  {
  Fire:
    BFGG A 10 A_BFGSound
    BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
    BFGG B 0 A_Light0
    BFGG B 20 A_ReFire
    Goto Ready
  }
}

Actor DoomPlayer2 : DoomPlayer replaces DoomPlayer
{
  Player.StartItem "Pistol"
  Player.StartItem "Fist"
  Player.StartItem "Clip", 40
  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, YeOldeBFG

}

 

Share this post


Link to post
  • 0
4 minutes ago, Pooh said:

Did you add your new player class to mapinfo?

no. how? and how code from that tutorial works without modifying mapinfo?

Share this post


Link to post
  • 0

There is nothing in that code that would work any better, or worse, than what Empyre posted. That's just how you make a gun. Did you assume it works better just from the text? That was first.

Second, i've send you a link to tutorials on how to add classes, which makes me think you've barelly read anything.

 

So heres a spoon:

1)Make a mapinfo lump inside your wad

2)Type in (and im going to copy it from the zdoom wiki because you probably wont read anything anyway):

GameInfo
{
   PlayerClasses = "MyPlayer"
}

3)thats it

 

Third, you've used inheritance, so

Actor DoomPlayer2 : DoomPlayer replaces DoomPlayer
{
  Player.WeaponSlot 7, YeOldeBFG
}

Should be enough

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
Answer this question...

×   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...