Page 1 of 3

DECORATE weapon replace

Posted: Fri Jun 03, 2005 4:05 pm
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
}
}

Posted: Fri Jun 03, 2005 4:06 pm
by TheDarkArchon
First of all get rid of Spawn, Ready, Deselect and Select. You will have overridden the normal ones with nulls.

Posted: Fri Jun 03, 2005 4:18 pm
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?

Posted: Fri Jun 03, 2005 4:21 pm
by TheDarkArchon
Pick it up and fire it.

Posted: Fri Jun 03, 2005 4:24 pm
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?

Posted: Fri Jun 03, 2005 4:29 pm
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.

Posted: Fri Jun 03, 2005 4:39 pm
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?

Posted: Fri Jun 03, 2005 5:02 pm
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

Posted: Fri Jun 03, 2005 5:49 pm
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
}
}

Posted: Fri Jun 03, 2005 5:51 pm
by TheDarkArchon
This line:

Code: Select all

actor BFG2704 : BFG9000
should read

Code: Select all

actor BFG2704 : BFG9000 2006

Posted: Fri Jun 03, 2005 5:58 pm
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

Posted: Fri Jun 03, 2005 6:42 pm
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.

Posted: Fri Jun 03, 2005 7:01 pm
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

Posted: Fri Jun 03, 2005 7:12 pm
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.

Posted: Fri Jun 03, 2005 7:17 pm
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.