From ZDoom Wiki
Jump to: navigation, search

A_FaceMaster [(float angle[, float pitch])]
A_FaceMaster (float max_turn, float max_pitch, float ang_offset, float pitch_offset, int flags) (development version 5a52c40 only)


Changes the calling actor's angle to face its current master. The master field can be set by spawning with A_SpawnItemEx.


  • angle: If specified, then the calling actor cannot turn by more than said angle. (A value of 0 is interpreted as unlimited angle.) However, the SHADOW flag has no effect in such case.
  • pitch: If specified to a value no greater than 180, then the calling actor's pitch is adjusted up to said value to face its current master. (A value of 0 is interpreted as unlimited angle; and technically a pitch change will never be greater than 180 degrees.) By default this is 270, which means its disabled. It will also aim at the actor's feet when set to 0.

The following is (development version 5a52c40 only):

  • ang_offset: Specifies the amount of degrees to offset the actor's angle. This is factored in after max_turn (otherwise known as angle) is performed. Note that it works just like A_SetAngle's parameter -- positive values will turn it left, negative values will turn it right. This does not factor in distance due to limitations.
  • pitch_offset: Adjusts pitch by this many degrees after max_pitch (also known as just pitch) has been taken into account.
  • flags: These may be combined by using the "|" character (without the quotes (")). Note that all of these flags are taken into account first before anything else.
    • FAF_BOTTOM - Aim for the bottom of the victim, otherwise known as the raw Z position. Whenever max pitch is taken into account, it will aim towards the actor's feet + 32 units above. This flag disables adding that 32 units.
    • FAF_MIDDLE - Aim for the middle of the victim (z position + height / 2).
    • FAF_TOP - Aim for the top of the victim (z position + height).
    • FAF_NODISTFACTOR - Don't take into account how far away the victim is when calculating pitch offset by distance. This is exactly like calling A_SetPitch after this function, where the raw value of pitch_offset is unfiltered by distance. Due to limitations, this flag only applies to offset_pitch as offset_angle does not filter distance.


This function can cause minions to face and heal their master using negative damage projectiles or other methods.

  TROO EF 8 A_FaceMaster
  TROO G 6 A_CustomMissile("HealBall")
  goto See

See also