DECORATE weapon replace

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

DECORATE weapon replace

Post by Doom A Holic »

I have this decorate lump and I want it to replace the bfg9000 instead of creating a new actor, what do I do?

Code: Select all

actor BFG2704 : BFG9000
{
Inventory.Pickupmessage "You got the BFG2704!  Oh, yes."
States
{
Spawn:

Ready:

Deselect:

Select:

Fire:
        BAL2 A 0 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        BAL2 A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0) 
        BAL1 A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0) 
        stop
}
}
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

First of all get rid of Spawn, Ready, Deselect and Select. You will have overridden the normal ones with nulls.
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

TheDarkArchon wrote:First of all get rid of Spawn, Ready, Deselect and Select. You will have overridden the normal ones with nulls.
Now when I summon it in the console, it actually looks like a bfg on the ground, now what?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Pick it up and fire it.
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

The BFG in my hand dissappears and it shoots the fireballs. Then I can't shoot anymore, or change weapons. lol

Shouldn't it be inheritaing all the frames from the bfg9000?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

It dissappears because of "Stop". The remedy is "Goto Ready".

The reason it dissappears is because you need to use the BFG's sprites (BFGG**, BFGF**), and not fireball ones.
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

TheDarkArchon wrote:It dissappears because of "Stop". The remedy is "Goto Ready".

The reason it dissappears is because you need to use the BFG's sprites (BFGG**, BFGF**), and not fireball ones.
Why can't I have it shoot imp and caco fireballs?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

You can. Replace your fire state with this

Code: Select all

Fire:
        BFGG A 0 A_GunFlash
        BFGG A 0 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("CacodemonBall", 32, 0, 0)
        BFGG A 5 A_FireCustomMissile("DoomImpBall", 32, 0, 0)
        stop 
And add this state:

Code: Select all

Flash:
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 3 A_Light2
    BFGF B 2 A_Light1
    BFGF A 0 A_Light0
    Stop
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

Thanks dude, you rock! Now I just need to know how to make it replace the orignal bfg, so I don't have to summon it all the time.

BTW, heres my improved decorate lump.

Code: Select all

actor BFG2704 : BFG9000
{
Inventory.Pickupmessage "You got the BFG2704!  Oh, yes."
States
{
Fire: 
    BFGG A 0 A_GunFlash 
    BFGG A 0 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("CacodemonBall", 0, 0, 0) 
    BFGG A 5 A_FireCustomMissile("DoomImpBall", 0, 0, 0) 
    Goto Ready
Flash: 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 3 A_Light2 
    BFGF B 2 A_Light1 
    BFGF A 0 A_Light0 
    Stop
}
}
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

This line:

Code: Select all

actor BFG2704 : BFG9000
should read

Code: Select all

actor BFG2704 : BFG9000 2006
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Post by chaoscentral »

dont forget the keyconf lump
make a new lump and add these lines

Code: Select all


weaponsection bfgwad

setslot 7 BFG2704

that'll make it so when you press 7 itll give you the weapon
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

Not to be a pest or anything but, it doesn't use any ammo. I added "Weapon.AmmoUse 40" but it still doesn't use any ammo.
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Post by chaoscentral »

thats because in the custom missile pointers you have to define how much it uses. It doesn't matter what you set the ammo use to. It matters in the code pointer
clarence144
Posts: 166
Joined: Sun Dec 26, 2004 5:02 pm
Contact:

Post by clarence144 »

I have a problem, I'm getting the error:

"Inventory.Pickupmessage is an unknown actor property"

Can anyone please tell me why? Thanks alot.
User avatar
Doom A Holic
Posts: 60
Joined: Fri Jun 03, 2005 4:03 pm

Post by Doom A Holic »

clarence144 wrote:I have a problem, I'm getting the error:

"Inventory.Pickupmessage is an unknown actor property"

Can anyone please tell me why? Thanks alot.
Make sure that you're using the unnofficial build of ZDoom. If you still get this error in the unofficial version, just remove the line that starts with Inventory.Pickupmessage.
Post Reply

Return to “General”