A_FaceMaster [(float angle[, float pitch])]
A_FaceMaster ([float max_turn[, float max_pitch[, float ang_offset[, float pitch_offset[, int flags]]]]]) (development version only)
A_FaceMaster ([float max_turn[, float max_pitch[, float ang_offset[, float pitch_offset[, int flags[, float z_add]]]]]])(development version 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 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. (deprecated) as of (development version only) -- no longer does anything.
- z_add: Offsets the z position distance of the master by this number. Unlike pitch_offset, this takes into account how far away the actor is at all times. (development version only)
This function can cause minions to face and heal their master using negative damage projectiles or other methods.
Missile: TROO EF 8 A_FaceMaster TROO G 6 A_CustomMissile("HealBall") goto See