[Question]: How do i replace the pistol and the fists?
Moderator: wildweasel
- DuduKrazy
- Posts: 402
- Joined: Sun Dec 25, 2005 18:59
[Question]: How do i replace the pistol and the fists?
is there a way to replace the pistol and the fists with decorate weapons?
- wildweasel
- DRD Team Admin (Inactive)
- Posts: 2132
- Joined: Wed Jun 29, 2005 22:00
- Location: the Admincave!
- Contact:
If you're using GZDoom, you can use an FSGLOBAL lump, the contents of which would look somewhat like this:
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.
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);
There is currently no equivalent to this in ZDoom 96x.
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
- DuduKrazy
- Posts: 402
- Joined: Sun Dec 25, 2005 18:59
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
}
}
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
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
}
}