Problem replacing the pistol

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Problem replacing the pistol

Post by Hidden Hands »

Everytime I try to replace the pistol with my own variant, I get an error in GZDOOMBuilder. It loads up my wad wrong, with all my custom resources invisible in the browser. For example, my zombies replace zombiemen... when i open a map in GZDOOM builder, they are in there to select and palce around the map. But after replacing the pistol then opening, they are gone and back to being zombiemen. All my custom stuff is not on the select when I place items. Help please?

Here is my PISTOL replacment code.

Code: Select all

ACTOR Duelling Gun replaces Pistol
{
//$Category Weapons
//$Title DuellingGun
//$Sprite NCGNA0
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 1
  Weapon.AmmoGive 8
  Weapon.AmmoType "Clip"
  Scale 0.7
  Obituary "$OB_MPPISTOL"
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "$A gun... better use it wisely."
  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 6 A_FirePistol
    PISG C 4
    PISG B 5 A_ReFire
    Goto Ready
  Flash:
    PISF A 7 Bright A_Light1
    Goto LightDone
    PISF A 7 Bright A_Light1
    Goto LightDone
  Spawn:
    NCGN A -1
    Stop
  }
}
What am I doing wrong?

Thanks in advance.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Problem replacing the pistol

Post by wildweasel »

Do not include spaces in your actor names.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Problem replacing the pistol

Post by Hidden Hands »

Ah. Can't believe I made a mistake like that. Thanks for that hopefully it will fix it.
Post Reply

Return to “Scripting”