Jump to content

Can't select my custom weapon


Recommended Posts

I'm sorry if this site isn't for this porpose, if it is i will delete this Topic.

 

I'm having a problem with a custom weapon, doesn't appear when i summon it and can't select it when given by using the command give all.

 

Here is the code of the weapon created in DECORATE

 

ACTOR Minigun : weapon 3560
{
    Weapon.SelectionOrder 150
    Weapon.AmmoUse 1
    Weapon.AmmoGive 50
    Weapon.AmmoType "Clip"
    Weapon.SlotNumber 4
    
    Inventory.PickupSound "misc/w_pkup"
    Inventory.PickupMessage "You got the Minigun"
    Obituary "%o was splattered by %k's Minigun."
    Tag "Minigun"

    States
    {
        Spawn:
        MIGN C -1
        Loop
        
        Select:
        MIGN B 1 A_Raise
        Loop
        
        Deselect:
        MIGN B 1 A_Lower
        Loop
        
        Ready:
        MIGN B 1 A_WeaponReady
        Loop
        
        Fire:
        MIGN B 0
        Goto Minigunfire
        
        MinigunFire:
        MIGN D 0 A_Playsound ("weapons/chngun",CHAN_WEAPON, 0.7)
        MIGN D 1 A_FireBullets(2, 2, 2, 45, "7000Puff")
        MIGN E 0 A_Playsound ("weapons/chngun",CHAN_WEAPON, 0.7)
        MIGN E 1 A_FireBullets(2, 2, 2, 45, "7000Puff")
        MIGN D 0 A_Refire("Minigunfire")
        Goto Ready
    }

}

actor 7000Puff
{
    +NoBlockmap 
    +NoTeleport
    +NOGRAVITY
    states 
    {
        Spawn:
          IFOG AB 2
        Melee:
          IFOG CDE 4
          Stop
    }
}

Share this post


Link to post

Setting the weapon slot in its class it might be not sufficient, try to inherit from the chaingun for example and if that doesn't work, you have to create a custom player class and setting there the weapon slots for the player.

 

About the summon thing: first thing you don't have to loop the Spawn state, replace it with Stop. Then, did you properly set the offsets of the sprites?

Share this post


Link to post
12 hours ago, Kan3 said:

Setting the weapon slot in its class it might be not sufficient, try to inherit from the chaingun for example and if that doesn't work, you have to create a custom player class and setting there the weapon slots for the player.

 

About the summon thing: first thing you don't have to loop the Spawn state, replace it with Stop. Then, did you properly set the offsets of the sprites?

I tried all you said but nothing, still not working, the pickup doesn't have any visual and does have no collision to pickup the item, i alredy tried the stop instead of loop, still nothing, i tried using the "replaces chaingun", tried to create the following actor

ACTOR Doomguy: DoomPlayer {
    Player.WeaponSlot 1, Fist, Chainsaw
    Player.WeaponSlot 2, Pistol
    Player.WeaponSlot 3, Shotgun, SuperShotgun
    Player.WeaponSlot 4, Chaingun, Minigun
    Player.WeaponSlot 5, RocketLauncher
    Player.WeaponSlot 6, PlasmaRifle
    Player.WeaponSlot 7, BFG9000
}

and nothing, still skiping to the rocket launcher.

Share this post


Link to post
22 hours ago, ramon.dexter said:

Are the spries present in your wad? Are they in the correct namespace? Does the sprites have correct offsets?

Yes, every sprite is in the file, if this data is useful I used the Juancho's MRL video "Doom Weapon Tutorial Part 2 - Coding" tutorial to create my weapon

 

Share this post


Link to post

Time to share your wad then, cause everything seems alright from what you're saying

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
Reply to this topic...

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