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

Can't replace weapons with DECORATE

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

Did you add your new player class to mapinfo?

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

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
×