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

[DECORATE] My pistol does not replace a standard pistol

Question

Spoiler

ACTOR Pistol1 : Pistol replaces Pistol
{
Weapon.SlotNumber 2
Weapon.AmmoType "Clip"
Weapon.AmmoGive 15
Decal "BulletChip"
States
{
  Ready:
    PISG A 0 A_WeaponReady
    Loop
  Deselect:
    PISG A 0 A_Lower  
    PISG A 0 A_lower  
    PISG A 1 A_Lower
  Loop
  Select:
    PISG A 0 A_Raise
    PISG A 0 A_Raise
    PISG A 1 A_Raise
  Loop
  Fire:
    PISG A 4
    PISG B 0 A_FireBullets (2, 4, 1, 7, "BulletPuff", FBF_USEAMMO)
    PISG B 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
    PISG B 4 A_GunFlash
    PISG C 3
    PISG B 4 A_ReFire
    Goto Ready
  Flash:
    PISF A 4 Bright A_Light1
    Goto LightDone
    PISF A 4 Bright A_Light1
    Goto LightDone
  }
}

 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 2

if you want your new pistol to appear in player's starting inventory, you have to create a new player class with a new inventory. see this and this. note that you only have to put "Player.StartItem" and "Player.WeaponSlot" there, but also note that inventory is not inherited (i.e. you have to put everything there, including fist and clips).

 

the reason is that decorate replacement is only working for map things, but not for player's inventory.

Share this post


Link to post
  • 0
7 hours ago, Armolitskiy said:
  Hide contents

ACTOR Pistol1 : Pistol replaces Pistol
{
Weapon.SlotNumber 2
Weapon.AmmoType "Clip"
Weapon.AmmoGive 15
Decal "BulletChip"
States
{
  Ready:
    PISG A 0 A_WeaponReady
    Loop
  Deselect:
    PISG A 0 A_Lower  
    PISG A 0 A_lower  
    PISG A 1 A_Lower
  Loop
  Select:
    PISG A 0 A_Raise
    PISG A 0 A_Raise
    PISG A 1 A_Raise
  Loop
  Fire:
    PISG A 4
    PISG B 0 A_FireBullets (2, 4, 1, 7, "BulletPuff", FBF_USEAMMO)
    PISG B 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
    PISG B 4 A_GunFlash
    PISG C 3
    PISG B 4 A_ReFire
    Goto Ready
  Flash:
    PISF A 4 Bright A_Light1
    Goto LightDone
    PISF A 4 Bright A_Light1
    Goto LightDone
  }
}

 

What about a DoomED number ?

 

See the answers by me and Gez in

 

Also

https://zdoom.org/wiki/Creating_new_weapons

http://gunlabs.blogspot.com/2011/01/tutorials.html

Share this post


Link to post
  • 0
4 hours ago, ketmar said:

if you want your new pistol to appear in player's starting inventory, you have to create a new player class with a new inventory. see this and this. note that you only have to put "Player.StartItem" and "Player.WeaponSlot" there, but also note that inventory is not inherited (i.e. you have to put everything there, including fist and clips).

 

the reason is that decorate replacement is only working for map things, but not for player's inventory.

okay, thanks

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
×