A_Chase
From DoomWiki.org
A_Chase is a code pointer used in the normal animation for various monsters.
A_Chase is one of the most important code pointers implementing Doom's monster AI. After a target has been located by a monster (using A_Look), it transitions into its chase sequence, usually repeatedly looping through animation states that call A_Chase. The most basic thing that A_Chase does is to move the monster toward its target. Monsters always move in angles which are an exact multiple of 45 degrees relative to the map layout. A_Chase will move a monster in the same direction for several calls before sometimes picking a new direction.
A_Chase checks continually to determine whether it is possible to transition into one of its attack states. If the monster is sufficiently close to the player and has a melee attack, it will transition into its melee attack state. Otherwise, if the monster has a distance attack and can see the player, it may transition into its distance attack state (firing a weapon or launching a projectile).
In a network game, A_Chase may cause a monster to pick a new player as a target if it can no longer see its current target. Finally, it occasionally plays the monster's "active sound" if it has one - an example is the "imps nearby" sound periodically emitted by imps while they are roaming.
The following call graph shows some of the internals of the A_Chase code pointer:
Uses[edit]
The A_Chase code pointer appears in the following states in Doom's state table:
| Frame number | Doom internal name | Use |
|---|---|---|
| 176 | S_POSS_RUN1 | normal animation for the zombieman |
| 177 | S_POSS_RUN2 | normal animation for the zombieman |
| 178 | S_POSS_RUN3 | normal animation for the zombieman |
| 179 | S_POSS_RUN4 | normal animation for the zombieman |
| 180 | S_POSS_RUN5 | normal animation for the zombieman |
| 181 | S_POSS_RUN6 | normal animation for the zombieman |
| 182 | S_POSS_RUN7 | normal animation for the zombieman |
| 183 | S_POSS_RUN8 | normal animation for the zombieman |
| 209 | S_SPOS_RUN1 | normal animation for the shotgun guy |
| 210 | S_SPOS_RUN2 | normal animation for the shotgun guy |
| 211 | S_SPOS_RUN3 | normal animation for the shotgun guy |
| 212 | S_SPOS_RUN4 | normal animation for the shotgun guy |
| 213 | S_SPOS_RUN5 | normal animation for the shotgun guy |
| 214 | S_SPOS_RUN6 | normal animation for the shotgun guy |
| 215 | S_SPOS_RUN7 | normal animation for the shotgun guy |
| 216 | S_SPOS_RUN8 | normal animation for the shotgun guy |
| 323 | S_SKEL_RUN1 | normal animation for the revenant |
| 324 | S_SKEL_RUN2 | normal animation for the revenant |
| 325 | S_SKEL_RUN3 | normal animation for the revenant |
| 326 | S_SKEL_RUN4 | normal animation for the revenant |
| 327 | S_SKEL_RUN5 | normal animation for the revenant |
| 328 | S_SKEL_RUN6 | normal animation for the revenant |
| 329 | S_SKEL_RUN7 | normal animation for the revenant |
| 330 | S_SKEL_RUN8 | normal animation for the revenant |
| 331 | S_SKEL_RUN9 | normal animation for the revenant |
| 332 | S_SKEL_RUN10 | normal animation for the revenant |
| 333 | S_SKEL_RUN11 | normal animation for the revenant |
| 334 | S_SKEL_RUN12 | normal animation for the revenant |
| 364 | S_FATT_RUN1 | normal animation for the mancubus |
| 365 | S_FATT_RUN2 | normal animation for the mancubus |
| 366 | S_FATT_RUN3 | normal animation for the mancubus |
| 367 | S_FATT_RUN4 | normal animation for the mancubus |
| 368 | S_FATT_RUN5 | normal animation for the mancubus |
| 369 | S_FATT_RUN6 | normal animation for the mancubus |
| 370 | S_FATT_RUN7 | normal animation for the mancubus |
| 371 | S_FATT_RUN8 | normal animation for the mancubus |
| 372 | S_FATT_RUN9 | normal animation for the mancubus |
| 373 | S_FATT_RUN10 | normal animation for the mancubus |
| 374 | S_FATT_RUN11 | normal animation for the mancubus |
| 375 | S_FATT_RUN12 | normal animation for the mancubus |
| 408 | S_CPOS_RUN1 | normal animation for the heavy weapon dude |
| 409 | S_CPOS_RUN2 | normal animation for the heavy weapon dude |
| 410 | S_CPOS_RUN3 | normal animation for the heavy weapon dude |
| 411 | S_CPOS_RUN4 | normal animation for the heavy weapon dude |
| 412 | S_CPOS_RUN5 | normal animation for the heavy weapon dude |
| 413 | S_CPOS_RUN6 | normal animation for the heavy weapon dude |
| 414 | S_CPOS_RUN7 | normal animation for the heavy weapon dude |
| 415 | S_CPOS_RUN8 | normal animation for the heavy weapon dude |
| 444 | S_TROO_RUN1 | normal animation for the imp |
| 445 | S_TROO_RUN2 | normal animation for the imp |
| 446 | S_TROO_RUN3 | normal animation for the imp |
| 447 | S_TROO_RUN4 | normal animation for the imp |
| 448 | S_TROO_RUN5 | normal animation for the imp |
| 449 | S_TROO_RUN6 | normal animation for the imp |
| 450 | S_TROO_RUN7 | normal animation for the imp |
| 451 | S_TROO_RUN8 | normal animation for the imp |
| 477 | S_SARG_RUN1 | normal animation for the spectre and demon |
| 478 | S_SARG_RUN2 | normal animation for the spectre and demon |
| 479 | S_SARG_RUN3 | normal animation for the spectre and demon |
| 480 | S_SARG_RUN4 | normal animation for the spectre and demon |
| 481 | S_SARG_RUN5 | normal animation for the spectre and demon |
| 482 | S_SARG_RUN6 | normal animation for the spectre and demon |
| 483 | S_SARG_RUN7 | normal animation for the spectre and demon |
| 484 | S_SARG_RUN8 | normal animation for the spectre and demon |
| 503 | S_HEAD_RUN1 | normal animation for the cacodemon |
| 529 | S_BOSS_RUN1 | normal animation for the baron of Hell |
| 530 | S_BOSS_RUN2 | normal animation for the baron of Hell |
| 531 | S_BOSS_RUN3 | normal animation for the baron of Hell |
| 532 | S_BOSS_RUN4 | normal animation for the baron of Hell |
| 533 | S_BOSS_RUN5 | normal animation for the baron of Hell |
| 534 | S_BOSS_RUN6 | normal animation for the baron of Hell |
| 535 | S_BOSS_RUN7 | normal animation for the baron of Hell |
| 536 | S_BOSS_RUN8 | normal animation for the baron of Hell |
| 558 | S_BOS2_RUN1 | normal animation for the Hell knight |
| 559 | S_BOS2_RUN2 | normal animation for the Hell knight |
| 560 | S_BOS2_RUN3 | normal animation for the Hell knight |
| 561 | S_BOS2_RUN4 | normal animation for the Hell knight |
| 562 | S_BOS2_RUN5 | normal animation for the Hell knight |
| 563 | S_BOS2_RUN6 | normal animation for the Hell knight |
| 564 | S_BOS2_RUN7 | normal animation for the Hell knight |
| 565 | S_BOS2_RUN8 | normal animation for the Hell knight |
| 587 | S_SKULL_RUN1 | normal animation for the lost soul |
| 588 | S_SKULL_RUN2 | normal animation for the lost soul |
| 604 | S_SPID_RUN2 | normal animation for the spiderdemon |
| 605 | S_SPID_RUN3 | normal animation for the spiderdemon |
| 606 | S_SPID_RUN4 | normal animation for the spiderdemon |
| 608 | S_SPID_RUN6 | normal animation for the spiderdemon |
| 609 | S_SPID_RUN7 | normal animation for the spiderdemon |
| 610 | S_SPID_RUN8 | normal animation for the spiderdemon |
| 612 | S_SPID_RUN10 | normal animation for the spiderdemon |
| 613 | S_SPID_RUN11 | normal animation for the spiderdemon |
| 614 | S_SPID_RUN12 | normal animation for the spiderdemon |
| 636 | S_BSPI_RUN2 | normal animation for the arachnotron |
| 637 | S_BSPI_RUN3 | normal animation for the arachnotron |
| 638 | S_BSPI_RUN4 | normal animation for the arachnotron |
| 639 | S_BSPI_RUN5 | normal animation for the arachnotron |
| 640 | S_BSPI_RUN6 | normal animation for the arachnotron |
| 642 | S_BSPI_RUN8 | normal animation for the arachnotron |
| 643 | S_BSPI_RUN9 | normal animation for the arachnotron |
| 644 | S_BSPI_RUN10 | normal animation for the arachnotron |
| 645 | S_BSPI_RUN11 | normal animation for the arachnotron |
| 646 | S_BSPI_RUN12 | normal animation for the arachnotron |
| 677 | S_CYBER_RUN2 | normal animation for the cyberdemon |
| 678 | S_CYBER_RUN3 | normal animation for the cyberdemon |
| 679 | S_CYBER_RUN4 | normal animation for the cyberdemon |
| 680 | S_CYBER_RUN5 | normal animation for the cyberdemon |
| 681 | S_CYBER_RUN6 | normal animation for the cyberdemon |
| 683 | S_CYBER_RUN8 | normal animation for the cyberdemon |
| 702 | S_PAIN_RUN1 | normal animation for the pain elemental |
| 703 | S_PAIN_RUN2 | normal animation for the pain elemental |
| 704 | S_PAIN_RUN3 | normal animation for the pain elemental |
| 705 | S_PAIN_RUN4 | normal animation for the pain elemental |
| 706 | S_PAIN_RUN5 | normal animation for the pain elemental |
| 707 | S_PAIN_RUN6 | normal animation for the pain elemental |
| 728 | S_SSWV_RUN1 | normal animation for the Wolfenstein SS |
| 729 | S_SSWV_RUN2 | normal animation for the Wolfenstein SS |
| 730 | S_SSWV_RUN3 | normal animation for the Wolfenstein SS |
| 731 | S_SSWV_RUN4 | normal animation for the Wolfenstein SS |
| 732 | S_SSWV_RUN5 | normal animation for the Wolfenstein SS |
| 733 | S_SSWV_RUN6 | normal animation for the Wolfenstein SS |
| 734 | S_SSWV_RUN7 | normal animation for the Wolfenstein SS |
| 735 | S_SSWV_RUN8 | normal animation for the Wolfenstein SS |
Example[edit]
The following is an example of how to set the A_Chase code pointer in a DeHackEd file:
Pointer 21 (Frame 34) Codep Frame = 735
Or using BEX syntax:
[CODEPTR] Frame 1234 = Chase
