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

my custom weapon wont work

Question

so this is all the code i wrote in DECORTE

 

 

 

ACTOR Tuck : DoomPlayer {
  Player.WeaponSlot 1, Fist, Chainsaw
  Player.WeaponSlot 2, TheTPistol
  Player.WeaponSlot 3, Shotgun, SuperShotgun
  Player.WeaponSlot 4, Chaingun
  Player.WeaponSlot 5, RocketLauncher
  Player.WeaponSlot 6, PlasmaRifle
  Player.WeaponSlot 7, BFG9000  
  
  Player.StartItem "TheTPistol"
  Player.StartItem "Fist"
}

ACTOR TheTPistol : Weapon 
{
  
  decal "bulletchip"

  weapon.ammouse 1
  weapon.ammogive 15
  weapon.ammotype "Clip"
  weapon.selectionorder 50

    States {
        Spawn:
        SKLL A -1
        Stop
        
        Select:
        HSKL A 1 A_Raise
        Loop
        
        Deselect:
        HSKL A 1 A_Lower
        Loop
        
        Ready:
        HSKL A 1 A_WeaponReady
        Loop
        
        Fire:
        HSKL BCD 4
        Goto SFire
        
        SFire:
        HSKL E 0 A_PlaySound("weapons/fireskull",CHAN_WEAPON,0.7)
        HSKL E 0 A_Recoil(4)
        HSKL E 5 A_FireBullets(5.6, 0, 1, 7, "BulletPuff")
        HSKL D 5
        HSKL D 0 A_Refire("SFire")
        Goto Ready
    }
}

 

 

 

 

yet only you use the fist cause zdoom fucking hates me

i used the hombre skullynazor sprites for that tutorial. but when i code. i dont get TheTPistol

 

i also used the code from the hombre skully nazor thing. 

Share this post


Link to post

18 answers to this question

Recommended Posts

  • 0

Did you give your weapon a doom id?

4help.PNG.15ab078665959bd2518f75bd054b120c.PNG

That number on the end is something you are missing. I believe if you don't have an id on it, it doesn't even exist.

 

EDIT: For more specificity, I was talking about adding the id here:

 

ACTOR TheTPistol : Weapon 

 

 

Share this post


Link to post
  • 0
Just now, Tuckymonster said:

shit. i forgot a number. CAN i use 15000?

Yes you can

Share this post


Link to post
  • 0

still dont work. i only have fist. 

 

 

 

ACTOR TheTPistol : Weapon 15000

{
  
  decal "bulletchip"

  weapon.ammouse 1
  weapon.ammogive 15
  weapon.ammotype "Clip"
  weapon.selectionorder 50

    States {
        Spawn:
        SKLL A -1
        Stop
        
        Select:
        HSKL A 1 A_Raise
        Loop
        
        Deselect:
        HSKL A 1 A_Lower
        Loop
        
        Ready:
        HSKL A 1 A_WeaponReady
        Loop
        
        Fire:
        HSKL BCD 4
        Goto SFire
        
        SFire:
        HSKL E 0 A_PlaySound("weapons/fireskull",CHAN_WEAPON,0.7)
        HSKL E 0 A_Recoil(4)
        HSKL E 5 A_FireBullets(5.6, 0, 1, 7, "BulletPuff")
        HSKL D 5
        HSKL D 0 A_Refire("SFire")
        Goto Ready
    }
}

Share this post


Link to post
  • 0

Just to make sure, are all those sprites present (in the correct place) in your wad file? If they are missing or not located in the right subfolder/markers, the actor doesn't appear.

Share this post


Link to post
  • 0

Is this in all one decorate file? I dont know but its possible that it might mess up something.

Share this post


Link to post
  • 0

Another potential thing to look at: ensure that the player's StartItems include ammo for the weapon.

Share this post


Link to post
  • 0
7 minutes ago, Tuckymonster said:

it is

Usually there is a different decorate file called PLAYERINFO. You can put this:

ACTOR Tuck : DoomPlayer {
  Player.WeaponSlot 1, Fist, Chainsaw
  Player.WeaponSlot 2, TheTPistol
  Player.WeaponSlot 3, Shotgun, SuperShotgun
  Player.WeaponSlot 4, Chaingun
  Player.WeaponSlot 5, RocketLauncher
  Player.WeaponSlot 6, PlasmaRifle
  Player.WeaponSlot 7, BFG9000  

In a PLAYERINFO file. I dont know if this makes a difference or not.

Share this post


Link to post
  • 0

oh wait. so i put it in a file called playerinfo with decote langue.

so i load the pk3.

I SAYS 

"no playerclass defined"

WHEN I HAVE PLAYERCLASS IN ZMAPINFO

 

Share this post


Link to post
  • 0

I've never had any luck with redefining DoomPlayer, but you don't need to if you just want to do a replacement.


 

Quote

 

ACTOR TheTPistol : Weapon replaces Pistol
{
 
    Decal "bulletchip"
    Weapon.SlotNumber 2            // This will make weapon selectable by itself.
    Weapon.SelectionOrder 50
    Weapon.AmmoUse 1
    Weapon.AmmoGive 20
    Weapon.AmmoType "Clip"
    Obituary "$OB_MPPISTOL"

 

    States {
        Spawn:
        SKLL A -1
        Stop
        
        Select:
        HSKL A 1 A_Raise
        Loop
        
        Deselect:
        HSKL A 1 A_Lower
        Loop
        
        Ready:
        HSKL A 1 A_WeaponReady
        Loop
        
        Fire:
        HSKL BCD 4
        Goto SFire
        
        SFire:
        HSKL E 0 A_PlaySound("weapons/fireskull",CHAN_WEAPON,0.7)
        HSKL E 0 A_Recoil(4)
        HSKL E 5 A_FireBullets(5.6, 0, 1, 7, "BulletPuff")
        HSKL D 5
        HSKL D 0 A_Refire("SFire")
        Goto Ready
    }
}

 

 

Share this post


Link to post
  • 0
2 hours ago, Tuckymonster said:

just take it. i cant do shit. when you finish. let me know what i did wrong

https://www.mediafire.com/file/bmecjyvwvg5j2gs/Tuck's_Quest.pk3/file

 

You have made a pk3, but you organized the files as if it were a wad.  You need Sprites, Sounds, Music, Graphics, and Maps folders.  I don't think the Menu folder is right either, but I have never made a menu, so that is outside my experience.

https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement

When I turned it into a proper pk3, the weapon appeared, but it still needs work.  You need to adjust the alignment of the sprites.  I don't think you can use a mp3 for sound effects.  There is no Name property for a map in MAPINFO.  The map E1M1 "Traning" line already gives it a name.

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
×