
I have been trying to follow the tutorial on how to reload, but I can't seem to get it to work. For the first part of that tutorial, where exactly do I post this part and was I supposed to copy EVERYTHING from that first part of the code?
Code: Select all
ACTOR Action_Reload : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
States
{
Use:
PISR A 0 A_GiveInventory("IsReloading",1)
Fail
}
}
ACTOR Action_ReloadCancel : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
States
{
Use:
PISR A 0 A_TakeInventory("IsReloading",1)
Fail
}
}
ACTOR IsReloading : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
-INVBAR
}
Here's the second part of the coding.
Code: Select all
ACTOR .45Pistol : Weapon replaces Pistol
{
+NOAUTOFIRE
+AMMO_OPTIONAL
Obituary "%o was capped by %k's trusty ol' .45."
AttackSound "weapons/pistol"
Weapon.AmmoType1 ".45BULLETS" //The guns magazine
Weapon.AmmoType2 ".45MAG" //The real ammo
Weapon.AmmoGive 0
Weapon.AmmoGive2 1
Weapon.AmmoUse 1
Weapon.SelectionOrder 6000
States
{
Ready:
PISG A 1 A_WeaponReady
PISG A 0 A_JumpIfInventory("IsReloading",1,15)
Loop
Deselect:
PISG A 1 A_Lower
Loop
Select:
PISG A 1 A_Raise
Loop
Fire:
PISG B 2 A_JumpIfNoAmmo(8)
PISG C 2 A_GunFlash
PISG D 2
PISG E 2
PISG C 2
PISG B 1
PISG A 0
Goto Ready
PISR A 1 A_Playsound("weapons/click")
Flash:
PISF A 2 BRIGHT A_FireBullets(2,1,-1,10,0,1,0)
stop
//Reload:
PISR A 0 A_JumpIfInventory(".45BULLETS",8,2)
PISR A 0 A_JumpIfInventory(".45MAGS",1,2)
PISR A 0
Goto Ready
PISR A 0 A_TakeInventory(".45BULLETS",999)
PISR A 4
PISR B 3 A_PlaySound("weapons/pmagout")
PISR C 2
PISR B 1
PISR A 2
PISR D 1
PISR A 1 A_PlaySound("weapons/pmagin")
PISR A 0 A_TakeInventory(".45MAGS",1)
PISR A 0 A_GiveInventory(".45BULLETS",999)
PISG A 1
Goto Ready
}
}
As for the Katana's handle, I can't really think of a different color for it. The old color from ICD-LIZARD was kinda tacky.