[Question]: How do i replace the pistol and the fists?

Do you have a question about making weapon mods, or do you just need some tutorials and resources? Ask about all of that here.

Moderator: wildweasel

Locked
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

[Question]: How do i replace the pistol and the fists?

Post by DuduKrazy »

is there a way to replace the pistol and the fists with decorate weapons?
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

If you're using GZDoom, you can use an FSGLOBAL lump, the contents of which would look somewhat like this:

Code: Select all

[scripts]

script 1
{
   if (!checkinventory(0, "QuestItem1",1))
   {
      takeinventory(0, "Pistol");
      takeinventory(0, "Fist");
      giveinventory(0, "MartialArts");
      giveinventory(0, "Glock");
      setweapon(0, "Glock");
      giveinventory(0, "QuestItem1");
   }
}
startscript(1);
This code first checks for the presence of a dummy item (you don't need to define it in Decorate), and if it's not found in the player's inventory (i.e. if he has just started the game) the game takes away the default Pistol and Fist so that the game does not autoselect them. Then it gives the player two different weapons and selects the new pistol. It finishes by giving the player the dummy item, so the script doesn't repeat every level.

There is currently no equivalent to this in ZDoom 96x.
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

thanks for the help.
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

oh yeah. one more thing. how do i do to make the decorate fists get affected by the Berzerk power-up?
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

A_JumpIfInventory and check for "PowerStrength" which makes a jump to alternate set of frames that are more powerful (Normal fists get powered-up 10x)
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

some like this? A_JumpIfInventory("PowerStrength",1,0)
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Yes.
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

i added the state to the first frame Punga0 but nothing changed. i tried to make this syntax check for Berserk but i've seen nothing different. i still don't know what does these numbers on the syntax do.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Post your DECORATE so I can have a look at it.
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

Code: Select all

//********W3@p0n$**********

ACTOR Fists2 : Weapon
{
   Weapon.Ammouse 0
   Weapon.SelectionOrder 180
   +MELEEWEAPON
   +NOALERT
   AttackSound "weapons/fist"
   States
   {
   Spawn:
      WHAT A -1
      LOOP
   Ready: 
      PUNG A 1 A_WeaponReady
      LOOP
   Deselect: 
      PUNG A 1 A_Lower
      LOOP
   Select:
      PUNG A 0 A_JumpIfInventory("PowerStrength",1,0)
      PUNG A 1 A_Raise
      LOOP
   Fire:
      PUNG BC 1
      PUNG DEF 1
      PUNG G 1 A_CustomPunch(3, 0, 1)
      PUNG H 1
      PUNG I 0 A_PlaySound("weapons/punchswing")
      PUNG I 1
      PUNG JKL 2
      PUNG MN 1
      PUNG O 1 A_CustomPunch(3, 0, 1)
      PUNG P 1
      PUNG Q 0 A_PlaySound("weapons/punchswing")
      PUNG Q 1      
      PUNG RS 2
      PUNG T 2
      PUNG A 2 A_ReFire
      Goto Ready
    Hold:
      PUNG DEF 1
      PUNG GH 1 A_CustomPunch(3, 0, 1)
      PUNG I 0 A_PlaySound("weapons/punchswing")
      PUNG I 1
      PUNG JKL 2
      PUNG MN 1
      PUNG O 1 A_CustomPunch(3, 0, 1)
      PUNG P 1
      PUNG Q 0 A_PlaySound("weapons/punchswing")
      PUNG Q 1
      PUNG RS 2
      PUNG T 2
      PUNG A 2 A_ReFire
      Goto Ready
   Altfire:
      KICK A 3
      KICK B 3
      KICK C 3 A_CustomPunch(6, 0, 1)
      KICK B 5
      KICK A 5 A_ReFire
      Goto Ready
   } 
} 
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Code: Select all

//********W3@p0n$**********

ACTOR Fists2 : Weapon
{
   Weapon.Ammouse 0
   Weapon.SelectionOrder 180
   +MELEEWEAPON
   +NOALERT
   AttackSound "weapons/fist"
   States
   {
   Spawn:
      WHAT A -1
      LOOP
   Ready: 
      PUNG A 1 A_WeaponReady
      LOOP
   Deselect: 
      PUNG A 1 A_Lower
      LOOP
   Select:
      PUNG A 1 A_Raise
      LOOP
   Fire:
      PUNG BC 1
   Hold:
      PUNG A 0 A_JumpIfInventory("PowerStrength",1,21)
      PUNG DEF 1
      PUNG G 1 A_CustomPunch(3, 0, 1)
      PUNG H 1
      PUNG I 0 A_PlaySound("weapons/punchswing")
      PUNG I 1
      PUNG JKL 2
      PUNG MN 1
      PUNG O 1 A_CustomPunch(3, 0, 1)
      PUNG P 1
      PUNG Q 0 A_PlaySound("weapons/punchswing")
      PUNG Q 1      
      PUNG RS 2
      PUNG T 2
      PUNG A 2 A_ReFire
      Goto Ready
      PUNG BC 1
      PUNG DEF 1
      PUNG G 1 A_CustomPunch(30, 0, 1)
      PUNG H 1
      PUNG I 0 A_PlaySound("weapons/punchswing")
      PUNG I 1
      PUNG JKL 2
      PUNG MN 1
      PUNG O 1 A_CustomPunch(30, 0, 1)
      PUNG P 1
      PUNG Q 0 A_PlaySound("weapons/punchswing")
      PUNG Q 1      
      PUNG RS 2
      PUNG T 2
      PUNG A 2 A_ReFire
      Goto Ready
   Altfire:
      KICK A 0 A_JumpIfInventory("PowerStrength",1,6)
      KICK A 3
      KICK B 3
      KICK C 3 A_CustomPunch(6, 0, 1)
      KICK B 5
      KICK A 5 A_ReFire
      Goto Ready
      KICK A 3
      KICK B 3
      KICK C 3 A_CustomPunch(60, 0, 1)
      KICK B 5
      KICK A 5 A_ReFire
      Goto Ready
   } 
} 
There you go.
User avatar
DuduKrazy
Posts: 402
Joined: Sun Dec 25, 2005 18:59

Post by DuduKrazy »

oh. thanks a lot for the help!
Locked

Return to “Weapon Modding Help & Resources”