Sets the player's extra lighting level to 0.
Used to reset lighting after weapon fire. See A_Light1 and A_Light2.
Enables weapon ready checks for the calling player.
Listens for the calling player's weapon fire input flag for firing a weapon. If so, weapon enters the FIRE state.
Also sets the calling actor to S_PLAY (state 149) if the actor is in the S_PLAY_ATK1 or S_PLAY_ATK2 states (154 or 155).
Also if the current weapon is WP_CHAINSAW (slot 7) and it is called on state S_SAW (67), it will play sound "SAWIDL".
Also puts this weapon into the LOWER state if the player is NOT dead and has a pending weapon to switch to.
Also sets the weapon graphic offsets for bobbing animation by player speed.
Lowers the weapon by a specific offset amount.
The weapon is lowered by a certain offset amount (LOWERSPEED) until it is off the screen. If it is, the pending weapon is switched to and enters its RAISE state.
Can be called multiple times during one gametic to lower a weapon more quickly.
Since this is affected by graphic offset, you can use the offset parameters to influence this behavior.
Raises the weapon by a specific offset amount.
The weapon is raised by a certain offset amount (RAISESPEED) until it reaches a certain offset (WEAPONTOP). Once it does, it enters the READY state.
Can be called multiple times during one gametic to raise a weapon more quickly.
Since this is affected by graphic offset, you can use the offset parameters to influence this behavior.
Performs a punch hitscan attack from the calling player.
If it is in range of a shootable actor, it plays the "PUNCH" sound, deals 1d10 x2 damage to that actor, further multiplied by 10 if the calling player has the Berserk powerup.
If the attack deals damage, it will turn the player towards what it punched.
The range of the attack is 64 map units.
Performs weapon refire logic.
Checks if the player's weapon fire input flag is set, and if possible, the weapon is fired again.
On refire, the player's "refire" count is incremented, the ammo amount is checked/deducted, and the weapon enters the FIRE state if all conditions are good.
However, if the player is dead, is switching away from a weapon, or the weapon fire input flag is not set, the "refire" count on the player is set to 0, and ammo checks occur.
NOTE: The "refire" count influences things like certain hitscan attack accuracies and which firing state to use on the chaingun (see A_FireCGun, A_FirePistol).
Fires a pistol shot from the calling player.
Plays the sound "PISTOL", fires one hitscan attack, and subtracts 1 from the ammo type of this weapon.
The hitscan attack does 5 x 1d3 damage.
This also sets the calling player's state to S_PLAY_ATK2 (155), and displays the FLASH state for the weapon on the HUD.
If "refire" is 0, the hitscan is dead center, with no random angle.
Sets the player's extra lighting level to 1.
See A_Light0 to reset.
Fires a shotgun shot from the calling player.
Plays the sound "SHOTGN", fires 7 hitscan attacks, and subtracts 1 from the ammo type of this weapon.
Each hitscan attack does 5 x 1d3 damage.
This also sets the calling player's state to S_PLAY_ATK2 (155), and displays the FLASH state for the weapon on the HUD.
Sets the player's extra lighting level to 2.
See A_Light0 to reset.
Fires a super-shotgun shot from the calling player.
Plays the sound "DSHTGN", fires 20 hitscan attacks, and subtracts 2 from the ammo type of this weapon.
Each hitscan attack does 5 x 1d3 damage.
This also sets the calling player's state to S_PLAY_ATK2 (155), and displays the FLASH state for the weapon on the HUD.
Checks if the calling player has sufficient ammo to fire for this weapon.
* If the player does not have sufficient ammo, this starts a switch to the next preferred weapon.
* If the weapon is in slot 8 (Super Shotgun), it checks for 2 for the current weapon.
* If the weapon is in slot 6 (BFG), it checks for [BFGCells] for the current weapon.
* All other slots, it checks for 1 ammo.
Plays the sound "DBOPN" from the calling player.
Plays the sound "DBLOAD" from the calling player.
Plays the sound "DBCLS" from the calling player and calls A_ReFire.
Fires the chaingun from the calling player.
Plays the sound "PISTOL", fires one hitscan attack, and subtracts 1 from the ammo type of this weapon.
This also sets the calling player's state to S_PLAY_ATK2 (state 155).
If "refire" is 0, the hitscan is dead center.
NOTE: The FLASH state displayed for this firing is based on the offset from state S_CHAIN1 (52). If 52, FLASH. If 53, FLASH + 1.
Performs a gun flash for the calling player.
Sets the calling player's state to S_PLAY_ATK2 (state 155), and displays the FLASH state for the weapon on the HUD.
Fires a rocket from the calling player.
Subtracts 1 from the ammo type of this weapon and fires thing slot MT_ROCKET (34).
Performs a single chainsaw scan attack from the calling player.
If it is in range of a shootable actor, it plays the "SAWHIT" sound from the calling player, deals 1d10 x2 damage to that actor.
If the attack deals damage, it will turn the player towards what it punched.
If the attack misses, it plays the "SAWFUL" sound from the calling player.
The range of the attack is 64 map units.
Fires a plasma rifle projectile from the calling player.
Subtracts 1 from the ammo type of this weapon and fires thing slot MT_PLASMA (35).
Displays the FLASH or FLASH+1 state for the weapon on the HUD at random.
Plays the sound "BFG" from the calling player.
Fires a BFG shot from the calling player.
Subtracts [BFGCells] from the ammo type of this weapon and fires thing slot MT_BFG (36).
Fires the BFG tracer spray.
In the direction of this projectile's trajectory, a set of 40 hitscans are fired from the actor that shot the projectile that do 15d7 damage each.
If the tracers hit any shootable actor, it spawns thing MT_EXTRABFG (43) at their position.
Makes a splash damage check from the calling actor.
The splash check damages all shootable actors (including the caller) in a 128 map unit area for a maximum of 128 damage the closer they are to the center of the calling actor.
Contrary to expectation, no sound is played and no actors are spawned.
Plays the calling actor's PAIN sound, if defined.
Plays a player death sound from the calling actor.
The played sound is "PLDETH", unless the calling actor's health is lower than -50, then it plays "PDIEHI".
Unsets the calling actor's SOLID flag.
Plays the "SLOP" sound from the calling actor.
Looks for a valid target for the calling actor.
When a target is found, the calling actor's SIGHT sound is played, if defined, its target is set to the seen actor, and it enters its SEE state.
If the calling actor is in thing slot MT_SPIDER (20) or MT_CYBORG (22), the SIGHT sound is played at full volume (in MBF21 patches, this can be altered via the FULLVOLSOUNDS flag).
This MUST be called before A_Chase is called - A_Chase requires a target to pursue, or this actor jumps back to its SPAWN state.
This pointer, along with A_Chase, comprises the "AI" of Doom monsters.
Pursues the calling actor's current target.
If the target is in melee range, the calling actor jumps to its MELEE state, if defined, and also plays its ATTACK sound, if defined.
If the target is in missile range, the calling actor jumps to its MISSILE state, if defined.
If neither happen, the actor will randomly play its ACTIVE sound, if defined.
If the calling actor loses its target or its target is not flagged as SHOOTABLE, it jumps to its SPAWN state.
This pointer, along with A_Look, comprises the "AI" of Doom monsters.
Faces the calling actor towards its current target.
See also: A_Chase, A_Look.
Performs a zombieman attack from the calling actor.
Calls A_FaceTarget, plays sound "PISTOL" from the calling actor, and performs a single hitscan attack.
The hitscan attack does 5 x 1d3 damage.
If the calling actor does not have a target, this does nothing.
Plays the calling actor's DEATH sound, if defined.
This has some special behavior: if the DEATH sound is "PODTH1", "PODTH2", or "PODTH3", it will play one of those 3.
If the DEATH sound is "BGDTH1" or "BGDTH2" it will play one of those 2.
If the calling actor is in thing slot MT_SPIDER (20) or MT_CYBORG (22), the sound is played at full volume.
In MBF21 or higher patches, this "full volume" behavior can be overridden with the FULLVOLSOUNDS thing flag.
Does exactly what A_Chase does, with a few differences.
If a dead actor (CORPSE flag is set) with a defined RAISE state is in range, the dead actor is revived, and the calling actor will jump to state S_VILE_HEAL1 (266) and play sound "SLOP".
The revived actor has its health reset, its flags restored, and its target cleared, and it enters its RAISE state.
Note that this calling actor enters a hardcoded state (266) on "heal". This behavior cannot be changed via this pointer.
If you are making an MBF21 patch (or later), see A_HealChase for the non-hardcoded version.
Plays the sound "VILATK" from the calling actor.
Starts the archvile attack.
Calls A_FaceTarget and spawns thing MT_FIRE (slot 5) on the calling actor's target.
Also calls A_Fire on the spawned fire to put it in front of the player, if the caller has line-of-sight to the target.
The fire is set to the calling actor's tracer pointer, and the fire's target is the calling actor's target.
Performs the actual archvile attack.
If the calling actor has a line-of-sight to its target, play sound "BAREXP" and damage the target 20 points of damage.
The attack further makes a radius attack happen for 70 damage from the caller's tracer actor (the fire spawned via A_VileTarget).
If the calling actor does not have a target, this does nothing.
Calls A_Fire and plays sound "FLAMST" from the calling actor.
The archvile fire special.
Puts the calling actor in front of its "tracer" actor if line-of-sight is maintained with its "target".
If this actor has no tracer reference, this does nothing.
Calls A_Fire and plays sound "FLAME" from the calling actor.
Turns the trajectory of a missile with a tracer reference towards its target.
The angle adjustment only occurs on a gametic that is not a multiple of 4.
If the adjustment occurs, this also spawns a bullet puff (MT_PUFF, slot 38) AND rocket smoke (MT_SMOKE, slot 8) at the calling actor's position. A lot of source ports correct this behavior to remove the puff.
If the calling actor has no tracer target, this does no adjustment, but may still spawn puffs/smoke.
NOTE: Older versions of the Doom Engine will also align the "gametics" to a global ticker, potentially ruining demo playback through the title screen.
Calls A_FaceTarget and plays sound "SKESWG" from the calling actor.
If the calling actor has no target, this does nothing.
Calls A_FaceTarget and attempts a melee attack from the calling actor.
If the attack connects, this does 1d10 x 6 damage.
If the calling actor has no target, this does nothing.
Fires a tracer missile from the calling actor.
Calls A_FaceTarget, spawns a Revenant Rocket actor (MT_TRACER, slot 7) 16 map units higher than normal, and sets its "tracer" pointer to the caller's target.
If the calling actor has no target, this does nothing.
Calls A_FaceTarget and plays sound "MANATK" from the calling actor.
Fires two mancubus fireballs - one forward, one to the calling actor's left.
Calls A_FaceTarget and spawns two Mancubus fireballs (MT_FATSHOT, slot 10), one centered, one to the caller's left.
Fires two mancubus fireballs - one forward, one to the calling actor's right.
Calls A_FaceTarget and spawns two Mancubus fireballs (MT_FATSHOT, slot 10), one centered, one to the caller's right.
Fires two mancubus fireballs - one each side of calling actor, not centered.
Calls A_FaceTarget and spawns two Mancubus fireballs (MT_FATSHOT, slot 10) on each side of calling actor, not centered.
Triggers special map behavior.
Depending on the map it is called on and the actor that calls it, it may do something differently:
* If E1M8, checks if the caller is an MT_BRUISER (slot 16), then checks if all MT_BRUISER things are dead, and if so, lowers the sector tagged 666 to the lowest floor.
* If E2M8, checks if the caller is an MT_CYBORG (slot 22), then checks if all MT_CYBORG things are dead, and if so, exits the map.
* If E3M8, checks if the caller is an MT_SPIDER (slot 20), then checks if all MT_SPIDER things are dead, and if so, exits the map.
* If E4M6, checks if the caller is an MT_CYBORG (slot 22), then checks if all MT_CYBORG things are dead, and if so, opens the sector tagged 666 like a fast door.
* If E4M8, checks if the caller is an MT_SPIDER (slot 20), then checks if all MT_SPIDER things are dead, and if so, lowers the sector tagged 666 to the lowest floor.
* If MAP07, checks if the caller is an MT_FATSO (slot 9), then checks if all MT_FATSO things are dead, and if so, lowers the sector tagged 666 to the lowest floor.
* If MAP07, checks if the caller is an MT_BABY (slot 9), then checks if all MT_BABY things are dead, and if so, raises the sector tagged 667 by the amount of units of its highest lower texture.
This does nothing if no players are alive by the time this triggers.
Some engines allow you to change this function's behavior via MAPINFO or some other mechanism.
Performs a single chaingunner attack from the calling actor.
Calls A_FaceTarget, plays sound "SHOTGN" from the calling actor, and performs a single hitscan attack.
The hitscan attack does 5 x 1d3 damage.
If the calling actor does not have a target, this does nothing.
Checks if the calling actor has line of sight to its target, and if not, enters its SEE state.
The calling actor also enters its SEE state if its target is dead, or it doesn't have a target.
There is also a 15% chance that this does not happen.
Calls A_FaceTarget and performs an Imp attack from the calling actor.
If the calling actor's target is in melee range, the sound "CLAW" is played from the caller, and deals 1d8 x 3 damage to the target.
If the target is not in melee range, it fires an Imp Fireball (MT_TROOPSHOT, slot 32), instead.
If the calling actor does not have a target, this does nothing.
Calls A_FaceTarget and performs a Pinky demon attack from the calling actor.
If the calling actor's target is in melee range, it deals 1d10 x 4 damage to the target.
If the calling actor does not have a target, this does nothing.
Calls A_FaceTarget and performs a Cacodemon attack from the calling actor.
If the calling actor's target is in melee range, it deals 1d6 x 10 damage to the target.
If the target is not in melee range, it fires a Cacodemon Fireball (MT_HEADSHOT, slot 33), instead.
If the calling actor does not have a target, this does nothing.
Calls A_FaceTarget and performs a Baron/Hell Knight attack from the calling actor.
If the calling actor's target is in melee range, the sound "CLAW" is played from the caller, and deals 1d8 x 10 damage to the target.
If the target is not in melee range, it fires a Baron Fireball (MT_BRUISERSHOT, slot 17), instead.
If the calling actor does not have a target, this does nothing.
Performs a Lost Soul attack.
The calling actor sets the "SKULLFLY" flag, plays its ATTACK sound, calls A_FaceTarget, and sets its forward momentum to SKULLSPEED.
If the calling actor does not have a target, this does nothing.
Plays sound "METAL" from the calling actor and calls A_Chase.
Performs a shotgunner attack from the calling actor.
Calls A_FaceTarget, plays sound "SHOTGN" from the calling actor, and performs three hitscan attacks at once.
Each hitscan attack does 5 x 1d3 damage.
If the calling actor does not have a target, this does nothing.
Checks if the calling actor has line of sight to its target, and if not, enters its SEE state.
The calling actor also enters its SEE state if its target is dead, or it doesn't have a target.
There is also a 4% chance that this does not happen.
Plays sound "BSPWLK" from the calling actor and calls A_Chase.
Calls A_FaceTarget and performs an Arachnotron attack from the calling actor.
The calling actor fires an Arachnotron Bullet (MT_ARACHPLAZ, slot 37).
If the calling actor does not have a target, this does nothing.
Plays sound "HOOF" from the calling actor and calls A_Chase.
Calls A_FaceTarget and performs a Cyberdemon attack from the calling actor.
The calling actor fires a rocket (MT_ROCKET, slot 34).
If the calling actor does not have a target, this does nothing.
Calls A_FaceTarget and fires a Lost Soul (MT_SKULL, slot 19) from the calling actor at its target.
The spawned actor has A_SkullAttack immediately called on it, if it had room to move on spawn.
If it didn't have room to move, 10000 damage is dealt to it.
NOTE: In the original Doom (and some ports that enable this behavior), this first checks to see if there are 20 instances of MT_SKULL in the map, and if so, this does nothing.
Calls A_Fall and spawns 3 Lost Souls (MT_SKULL, slot 19).
The "Commander Keen" death special.
Calls A_Fall, and then checks to see if all actors of the calling actor's type are dead. If so, opens the sector tagged 666 like a door.
NOTE: Despite its name, this can be called from ANY actor, on ANY map, and this will still function.
Plays sound "BOSPN" from the calling actor at full volume.
Plays sound "BOSDTH" from the calling actor at full volume and starts the Brain Death explosions.
The calling actor spawns 65 MT_ROCKET (slot 34) objects immediately set to state S_BRAINEXPLODE1 (799) with their duration tics each randomized from 0 to 7.
Each object is placed 320 units south of the calling actor and anywhere from 196 units west to 320 units east of it, and an absolute height of 128 to 640, with a slight upward thrust.
Exits the level.
Starts the "Boss Brain" routine.
The calling actor searches for all MT_BOSSTARGET (slot 28) things, filling the target list for A_BrainSpit and plays sound "BOSSIT" at full volume.
If this is called more than once, it can affect the ordering in a call to A_BrainSpit since there is only one list maintained in memory.
If there are more than 32 MT_BOSSTARGET things or 0 MT_BOSSTARGET things in the map when this is called, this can crash Doom.
Performs the boss brain cube spit from the calling actor.
The calling actor fires a spawn cube (MT_SPAWNSHOT, slot 29) at the next MT_BOSSTARGET thing in the list prepared in a call to A_BrainAwake.
The calling actor also plays sound "BOSPIT" at full volume.
The spawned cube has its target set to the target spawn spot and its reaction time set to a value proportional to its distance from the target.
If the skill level is "EASY" (ITYTD or HNTR), this will do nothing every other call.
Plays sound "BOSCUB" from the calling actor and calls A_SpawnFly.
Performs the Spawn Cube Fly function.
The calling actor decrements its reaction time by one, and when it reaches zero: it removes itself, spawns MT_SPAWNFIRE (slot 30), plays sound "TELEPT" from its target, and spawns one of the following actors at its target's position (at some probablility):
* MT_TROOP (slot 12) at 19.53%.
* MT_SERGEANT (slot 13) at 15.63%.
* MT_SHADOWS (slot 14), MT_HEAD (slot 15), and MT_FATSO (slot 9) at 11.72%.
* MT_KNIGHT (slot 18) at 9.38%.
* MT_BABY (slot 21) at 7.81%.
* MT_BRUISER (slot 16), MT_UNDEAD (slot 6), and MT_PAIN (slot 23) at 3.91%.
* MT_VILE (slot 4) at 0.78%.
The spawned actor gets a teleport check that will telefrag the target position on MAP30.
Performs a re-explosion similar to what A_BrainScream starts.
The calling actor spawns an MT_ROCKET (slot 34) object immediately set to state S_BRAINEXPLODE1 (799) with their duration tics each randomized from 0 to 7.
The object preserves the calling actor's Y-position and its X-position slightly adjusted, and at a random absolute height of 128 to 640, with a slight upward thrust.
Performs a radius damage attack according to the actor's damage property.
Like A_Explode, except both the radius and potential damage are taken from the calling actor's damage property.
For example, if the actor's Damage is 100, this has a radius of 100 and a max damage of 100 at the center.
Calls A_Explode and then creates a mushroom-like explosion of Mancubus fireballs (MT_FATSHOT, slot 10) from the calling actor.
The Damage property of the calling actor controls how many fireballs are created.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The vertical angle of the launch (default 0.0).
The projectile speed (default 0.0).
Spawns an object in the same position as the calling actor.
Note that if both the caller and the spawned are SOLID, they can get stuck on each other.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The slot id/alias of the Thing to spawn (thing slot) (default 0).
The Z-position of the spawned object relative to the caller (default 0).
Adjusts the calling actor's angle by the desired angle.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The angle amount in degrees (default 0).
Sets the calling actor's angle to an absolute value.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The absolute angle in degrees (default 0).
Performs a melee attack from the calling actor, dealing a set amount of damage if it connects.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The amount of damage on hit (default 0).
The sound to play if the damage occurs (default "").
The sound is played from the calling actor.
Plays the desired sound from the calling actor.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The sound to play (default "").
If true (non-zero), the sound is played at full volume, otherwise (zero), it is played from the caller (default 0).
Jumps to the desired state if a random check succeeds.
If the check does not succeed, this will continue on instead of performing the jump.
It is recommended to NOT use this on a state with a duration less than 0 for it to work properly.
The RandomJump call may use a separate random seed, depending on implementation.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The state or state label to jump to.
It is recommended to use a state label.
A probability value from 0 to 256, 0 being "never" while 256 is "always."
Performs a specific line special event as though the calling actor activated one.
NOTE: Since this function uses the MISC fields for this state, the Offset directive cannot be used.
The line special to activate.
This value is the same as the line special numbers in map editors.
The tag of the sector to affect.
Kills the calling actor, as though it were dealt lethal damage.
Specifically, this damages the caller by its current health, with no source to the damage.
Since it is damaged by its remaining health, this will not put the caller in its "extreme" death state.
Performs the "beta" version attack of the Lost Soul.
Plays the calling actor's ATTACK sound (if defined), calls A_FaceTarget, and damages its target 1d8 x the caller's Damage property.
This does not cause monster infighting, and does not damage the same "species" of the calling actor.
Arrests the momentum of the calling actor.
Sets the X, Y, and Z momentum of the calling actor to 0.
Fires a "Beta BFG" shot from the calling player.
This does a bunch of stuff - fires MT_PLASMA1 (slot 141) and an MT_PLASMA2 (slot 142) shot, subtracts 1 of the weapon's ammo, and sets player extralight to 2 (equivalent to calling A_Light2).
Spawns a new actor relative to the position of the calling actor.
If the spawned actor is a projectile, its "target" and "tracer" references are copied from the calling actor.
If the spawned actor is NOT a projectile, its "target" is the calling actor and its "tracer" is set to the caller's target.
The thing to spawn.
The angle of the spawned actor, relative to the calling actor's angle.
The X-position relative to the calling actor's position (forward/back).
The Y-position relative to the calling actor's position (left/right).
The Z-position relative to the calling actor's position (up/down).
The initial X-velocity of the spawned actor (forward/back).
The initial Y-velocity of the spawned actor (left/right).
The initial Z-velocity of the spawned actor (up/down).
Fires a projectile from the calling actor.
The spawned projectile also has its "tracer" pointer set to the calling actor's target to enable tracing behavior.
The thing to spawn as the new projectile (must be flagged as MISSILE).
The angle of the spawned actor, relative to the calling actor's angle.
The pitch of the spawned actor, relative to the calling actor's pitch.
The horizontal position relative to the calling actor.
The vertical position relative to the calling actor's default projectile fire height.
Fires a multi-hitscan attack from the calling actor.
The damage formula is: (damagebase * random(1, damagedice)).
The damage parameter defaults are identical to Doom's monster bullet attack damage values.
The horizontal spread in degrees (default 0.0).
The vertical spread in degrees (default 0.0).
The number of hitscans to fire (default 1).
The attack base damage (default 3).
The attack damage random multiplier (default 5).
Performs a generic melee attack from the calling actor.
The damage formula is: (damagebase * random(1, damagedice)).
The attack base damage (default 3).
The attack damage random multiplier (default 8).
The sound to play if the damage occurs (default "").
The sound is played from the calling actor.
The distance check for the attack connecting.
If not provided, the actor's default melee range is used.
Performs a generic radius damage attack from the calling actor.
The damage is at its greatest at the actor's centerpoint.
The maximum damage.
The attack radius in map units.
Alerts monsters within sound-travel distance of the calling actor's target.
Does exactly what A_Chase does, with a few differences.
If a dead actor (CORPSE flag is set) with a defined RAISE state is in range, the dead actor is revived, and the calling actor will jump to the provided state and play the provided sound.
The revived actor has its health reset, its flags restored, and its target cleared, and it enters its RAISE state.
See A_VileChase for the inspiration. A_HealChase(S_VILE_HEAL1, slop) is the equivalent to A_VileChase.
The state or state label to jump to when this actor encounters a corpse.
It is recommended to use a state label.
The sound to play from the calling actor on revive.
Missile seeker function.
When called, this function will adjust the facing angle and velocity of this projectile towards its "tracer" reference.
The calling actor must have its "tracer" reference set, via A_MonsterProjectile or A_SpawnObject or A_FindTracer or potentially A_WeaponProjectile.
Note that when using this function, keep in mind that seek "strength" also depends on how often this function is called.
Calling A_SeekTracer every tic will result in a much more aggressive seek than calling it every 4 tics, even if the args are the same.
The inspiration for this function is based on Heretic's seeker missile logic, rather than Doom's, so there are some slight differences in behavior compared to A_Tracer (better z-axis seeking, for instance).
If the angle to "tracer" target is lower than this, missile will "snap" directly to face the target.
The maximum angle a missile will turn towards the target if the angle is above the threshold.
Searches for a valid actor to set as a "tracer" reference, but ONLY if the calling actor doesn't already have one.
This is best used on projectiles shot from a player's weapon.
Actors that are friendly to the calling actor are not included in the search.
See A_ClearTracer to clear this actor's "tracer" reference, if needed.
The field-of-view, relative to calling actor's angle, to search for targets.
If zero, the search will occur in all directions.
The distance to search, in map blocks (128 units) (default 10).
Do NOT set this to a high value - the larger the search, the more expensive the call.
Clears the calling actor's "tracer" reference.
May be necessary if you want A_FindTracer to seek a new target.
Jumps to the provided state if the calling actor's health is below the specified threshold.
The calling actor's health must be STRICTLY less than the provided value.
The state or state label to jump to.
It is recommended to use a state label.
The health value.
Jumps to the provided state if the calling actor's current target is in its line-of-sight.
The state or state label to jump to.
It is recommended to use a state label.
The field-of-view, relative to calling actor's angle, to search for its current target.
If zero, the search will occur in all directions.
Jumps to the provided state if the calling actor's current target is closer than the specified distance.
The target's distance must be STRICTLY less than the provided value.
The state or state label to jump to.
It is recommended to use a state label.
The distance in map units.
Jumps to the provided state if the calling actor's "tracer" reference is in its line-of-sight.
The state or state label to jump to.
It is recommended to use a state label.
The field-of-view, relative to calling actor's angle, to search for its current tracer reference.
If zero, the search will occur in all directions.
Jumps to the provided state if the calling actor's "tracer" reference is closer than the specified distance.
The tracer's distance must be STRICTLY less than the provided value.
The state or state label to jump to.
It is recommended to use a state label.
The distance in map units.
Jumps to the provided state if ALL of the calling actor's thing flags are set to the provided values.
This is an AND check, not an equality check - all of the provided BITS must be set.
The state or state label to jump to.
It is recommended to use a state label.
The Doom thing flag bits.
The MBF21 thing flag bits.
Sets the provided actor flag bits on the calling actor.
The Doom thing flag bits.
The MBF21 thing flag bits.
Clears the provided actor flag bits on the calling actor.
The Doom thing flag bits.
The MBF21 thing flag bits.
Fires a projectile from the calling player.
Unlike most of DOOM19's attack codepointers, this function will NOT consume ammo, trigger the weapon's FLASH state, nor play a sound.
The projectile spawned will have its "tracer" reference set to the actor found by Doom's autoaim, if any.
The thing to spawn as the new projectile (must be flagged as MISSILE).
The angle of the spawned actor, relative to the calling player's angle.
The pitch of the spawned actor, relative to the calling player's pitch.
The horizontal position relative to the calling player.
The vertical position relative to the calling player's default projectile fire height.
Fires a multi-hitscan attack from the calling player.
The damage formula is: (damageBase * random(1, damageDice)).
The damage parameter defaults are identical to Doom's monster bullet attack damage values.
Unlike most of DOOM19's attack codepointers, this function will NOT consume ammo, trigger the weapon's FLASH state, nor play a sound.
NOTE: The documentation is not incorrect - Doom actually reverses the base damage and dice for player attacks, compared to enemy hitscans.
The horizontal spread in degrees (default 0.0).
The vertical spread in degrees (default 0.0).
The number of hitscans to fire (default 1).
The attack base damage (default 5).
The attack damage random multiplier (default 3).
Performs a generic melee attack from the calling player.
The damage formula is: (damagebase * random(1, damagedice)).
If the calling player is Berserk, the damage is additionally multiplied by the berserk multiplier.
The attack base damage (default 2).
The attack damage random multiplier (default 10).
The berserk attack damage multiplier (default 1.0).
The sound to play if the damage occurs (default "").
The sound is played from the calling player.
The distance check for the attack connecting.
If not provided, the player's default melee range is used.
Plays the desired sound from the calling player.
NOTE: This does not affect alerting enemies!
The sound to play (default "").
If true (non-zero), the sound is played at full volume across the map, otherwise (zero), it is played from the caller (default 0).
Alerts monsters within sound-travel distance of the calling player.
Overrides the SILENT weapon flag.
Jumps to the desired state if a random check succeeds.
If the check does not succeed, this will continue on instead of performing the jump.
It is recommended to NOT use this on a state with a duration less than 0 for it to work properly.
The WeaponJump call may use a separate random seed, depending on implementation.
The state or state label to jump to.
It is recommended to use a state label.
A probability value from 0 to 256, 0 being "never" while 256 is "always."
Subtracts ammo from the currently-selected weapon's ammo pool on the calling player.
If the amount is 0, the current weapon's AmmoPerShot property is used.
If the amount is negative, ammo is added to inventory instead.
Ammo will never be reduced below 0.
The amount of ammo to subtract.
Jumps to the desired state if the calling player's ammo is STRICTLY less than the provided value.
If the amount is 0, the current weapon's AmmoPerShot property is used.
If the check does not succeed, this will continue on instead of performing the jump.
The state or state label to jump to.
It is recommended to use a state label.
The ammo value.
Jumps to the desired state if the calling player is holding FIRE and there is emough ammo for a re-fire.
If the check does not succeed, this will continue on instead of performing the jump.
The state or state label to jump to.
It is recommended to use a state label.
If true (non-zero), the ammo check is skipped.
Starts the desired state as a gun-flash overlay for the calling player.
The state or state label to jump to.
It is recommended to use a state label.
If true (non-zero), the calling player's actor state is NOT set to S_PLAY_ATK2 (155).