A_VileAttack
From DoomWiki.org
A_VileAttack is a code pointer used in the attack animation for the arch-vile.
If the target of the arch-vile is in its line of sight at the moment A_VileAttack
is executed, the arch-vile emits the DSBAREXP sound (the same sound that is used for barrel and rocket explosions), while its target has 20 damage applied to it as well as a vertical thrust that results in an upward velocity of (1000 divided by the mass of the target) map units per tic. However, since the Doom engine also applies a downward acceleration of one map unit per tic per tic (one map unit per tic2) to every object that has a vertical momentum and is affected by gravity, the maximum height the target will be lifted off the floor is limited by how many tics it takes gravity to decrease the target's upward velocity back to zero. (For example, the player has a mass of 100, which results in an upward velocity of ten map units per tic on the first tic of the upwards thrust, which gravity then reduces to a velocity of nine map units per tic on the second tic, eight map units per tic on the third tic, and so on; this limits the maximum height the player is lifted off the floor by the vertical thrust to 55 map units, since gravity will have decreased the player's upward velocity to zero after ten tics (10+9+8+7+6+5+4+3+2+1=55).)
If the target also has the arch-vile's flame object attached to them (first set through the A_VileTarget
code pointer and then continuously updated in its position by the A_Fire
code pointer the flame object calls on each of its states), an explosion will be triggered at the position of the flame object—which is always positioned between the target and the arch-vile at 24 map units away from the target's origin—imparting horizontal momentum and 70 blast damage.
Uses[edit]
The A_VileAttack
code pointer appears in the following states in Doom's state table:
Frame number | Doom internal name | Use |
---|---|---|
264 | S_VILE_ATK10 | attack animation for the arch-vile |
Example[edit]
The following is an example of how to set the A_VileAttack
code pointer in a DeHackEd file:
Pointer 21 (Frame 34) Codep Frame = 264
Or using BEX syntax:
[CODEPTR] Frame 1234 = VileAttack
External links[edit]
- A_VileAttack in the Doom source code.
- A_VileAttack at the ZDoom wiki
- VileAttack at the Eternity Engine wiki