From ZDoom Wiki
(Redirected from A SentinelRefire)
Jump to navigation Jump to search
For more information on this article, visit the A_CPosRefire and A_SpidRefire pages on the Doom Wiki.

state A_MonsterRefire (int chancecontinue, str "abortstate")

(no parameters)
(no parameters)
(no parameters)
(no parameters)

Calls A_FaceTarget and then checks whether the monster should abort its attack sequence and go back to abortstate. If the target is out of sight or dead, has a chancecontinue/256 chance to not jump to the abort state.

The monster-specific functions use the following parameters:

A_CPosRefire: 40, "See"
A_CrusaderRefire: 0, "See"
A_SpidRefire: 10, "See"
A_SentinelRefire: 30, "See"

All these functions jump to the “Seestate if the attack is to be aborted. The loop has to be explicitly coded in the actor definition. A_SentinelRefire also has a 10/256 chance of aborting the attack even if the target is still in sight. A_CrusaderRefire is restricted to Crusader and derived classes.


ACTOR SuperZombie : ZombieMan replaces ZombieMan
		POSS E 10 A_FaceTarget
		POSS FE 2 Bright A_PosAttack
		POSS F 1 A_MonsterRefire(130, "See") // About 50% chance to jump to "See" if target is out of sight.
		Goto Missile+1                       // Looping back to the attack state to allow the actual refire!