<
 
BdLiteWeapon
: DoomWeapon
 
BdLiteWeapons are extensions to the standard Doom weapon that allow for reloading and other special features (the global kick and grenade attacks). Weapons for BdLite should provide the following labels:

Spawn: Sprite sitting in the game world
Ready: Perform any animation/setup for unholstering the weapon, then fall through to ReadyLoop.
ReadyLoop: Display weapon sprite with A_ReadyWeapon. Loops back on to itself
Deselect: Perform animation for lowering the weapon, ending in Wait
Fire:
Check that the weapon has at least one shot in it. If not, go to Reload (or just NoAmmo if reload is unnecessary for this weapon)
Perform animation and firing, take the relevant ammunition manually.
Return to ReadyLoop.
Reload:
Check the weapon's loaded ammo using 0 (which means to check against the maximum capacity of that item). If it's already full, return to ReadyLoop
If the player has at least one ammo in reserve, jump to ReloadAnimate.
Otherwise, perform actions for no more ammo to reload.
ReloadAnimate:
Perform animation for reload then fall through to ReloadAmmo.
ReloadAmmo:
Loop, transferring ammo count from reserve to weapon, until the reserve is exhausted or the weapon is at capacity (use a check against 0, max capacity)

File

Flags

Properties

//$categoryWeapons
gameDoom
weapon.ammogive10
weapon.ammogive20
weapon.ammouse10
weapon.ammouse20

States

Ready: ReadyLoop: Deselect: Fire: Flash: Spawn: TNT1 A 0 A_Print("??? Weapon reached unimplemented state ???") Stop Select: TNT1 A 0 A_WeaponOffset(0.0, 32.0) TNT1 A 0 A_Raise(60) Wait AltFire: //Actually kick TNT1 A 0 A_PlaySound("weapons/melee/kick") TNT1 A 0 SetPlayerProperty(0, 1, PROP_FROZEN) //If the player has been punching, end the combo here TNT1 A 0 A_TakeInventory("PSeq1", 2) TNT1 A 0 A_TakeInventory("PSeq2", 1) TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick") STMP ABCDEF 1 TNT1 A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7) STMP G 4 STMP HIJK 2 TNT1 A 0 A_Jump(256, "FinishKick") BerserkerKick: KICK ABCDEFG 1 TNT1 A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7) KICK H 3 KICK IGFEDCBA 1 FinishKick: TNT1 A 0 SetPlayerProperty(0,0, PROP_FROZEN) TNT1 A 0 A_TakeInventory("KickHasHit", 1) TNT1 A 0 A_Jump(256, "ReadyLoop") Zoom: //Actually grenade TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1) Goto NoGrenade GRTH ABCD 1 TNT1 A 0 A_PlaySound("weapons/grenade/pin") GRTH EEFG 1 TNT1 A 0 A_PlaySound("weapons/grenade/toss") GRTH HI 1 TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1) TNT1 A 0 A_FireCustomMissile("BdGrenade", random(-2,2), 0, 0, 0, 0, 0) GRTH JKLM 1 TNT1 A 1 TNT1 A 0 A_Jump(256, "Ready") NoGrenade: TNT1 A 0 A_Print("No Grenades Left") TNT1 A 0 A_Jump(256, "ReadyLoop")

Class Hierarchy

Classes defined in \weapons\BDLITEWEAPON.txt