Action functions: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
m (→‎Sound functions: add A_SoundPitch)
(→‎Status changes: Added links to all model functions (including undocumented) and moved them under a separate subheader)
 
(35 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The list below covers all functions available to the {{class|Actor}} class that were originally intended to be executed from [[Actor states]]. All of these functions are available in GZDoom both in [[ZScript]] and in [[DECORATE]] {{deprecated}}.
The following are all the code pointers supported by ZDoom's [[DECORATE]] lump as of the latest source code. These are placed at the end of an individual frame definition within the actor's [[Actor states|state]] block. You may also use any [[Action Specials|action special]] in place of an action function. See also [[:Category:Action functions|the category]] for a more exhaustive listing.


Note, however, that this list is not truly exhaustive:
Functions may have a return type (e.g. ''return'' '''A_FunctionName'''). See [[Actor_states#Anonymous_functions|anonymous functions]] for details.
:1. [[Action specials]] can be executed from states as well.
:2. In [[ZScript]], the absolute majority of [[ZScript actor functions]] can ''also'' be called in Actor states without any limitations.

{{note|The word "action" in the title if this page is largely here for historical reasons. In [[DECORATE]] all of these functions were action, but in [[ZScript]] <code>action</code> is a specific [[ZScript_functions#Function_types|'''function type''']] that in the majority of cases is only important for {{class|Weapon}} functions. Most of the functions listed below are, in fact, NOT action functions, but just regular functions without a type. [[ZScript_functions|Creating a new function]] that can be executed from an Actor state also doesn't require making it an action function.}}


__TOC__
__TOC__
Line 78: Line 82:


== Sound functions ==
== Sound functions ==
* [[A_PlaySound]]
* [[A_StartSound]]
* [[A_StartSoundIfNotSame]]
* [[A_PlaySound]] {{deprecated}}
* [[A_PlaySoundEx]] {{deprecated}}
* [[A_PlaySoundEx]] {{deprecated}}
* [[A_PlayWeaponSound]]
* [[A_PlayWeaponSound]] {{deprecated}}
* [[A_ActiveSound]]
* [[A_ActiveSound]]
* [[A_LoopActiveSound]]
* [[A_LoopActiveSound]]
* [[A_FLoopActiveSound]]
* [[A_FLoopActiveSound]]
* [[A_StopSound]]
* [[A_StopSound]]
* [[A_StopSounds]]
* [[A_StopAllSounds]]
* [[A_StopSoundEx]] {{deprecated}}
* [[A_StopSoundEx]] {{deprecated}}
* [[A_SoundPitch]] {{git|15eabfd}}
* [[A_SoundPitch]]
* [[A_SoundVolume]]
* [[A_SoundVolume]]
* [[A_Pain]]
* [[A_Pain]]
Line 121: Line 129:
* [[A_SetSpriteAngle]]
* [[A_SetSpriteAngle]]
* [[A_SetSpriteRotation]]
* [[A_SetSpriteRotation]]
* [[A_SpriteOffset]]


== Spawn functions ==
== Spawn functions ==
Line 128: Line 137:
* [[A_SpawnItemEx]]
* [[A_SpawnItemEx]]
* [[A_SpawnParticle]]
* [[A_SpawnParticle]]
* [[A_SpawnParticleEx]]


== State jumps ==
== State jumps ==
Line 133: Line 143:
* [[A_CheckCeiling]]
* [[A_CheckCeiling]]
* [[A_CheckFloor]]
* [[A_CheckFloor]]
* [[A_CheckFlag]]
* [[A_CheckFlag]] {{deprecated}}
* [[A_CheckLOF]]
* [[A_CheckLOF]]
* [[A_CheckProximity]]
* [[A_CheckProximity]]
Line 159: Line 169:
* [[A_ActiveAndUnblock]]
* [[A_ActiveAndUnblock]]
* [[A_ChangeCountFlags]]
* [[A_ChangeCountFlags]]
* [[A_ChangeFlag]]
* [[A_ChangeFlag]] {{deprecated}}
* [[A_ChangeVelocity]]
* [[A_ChangeVelocity]]
* [[A_ClearShadow]]
* [[A_ClearShadow]]
Line 189: Line 199:
* [[A_SetFloatBobPhase]]
* [[A_SetFloatBobPhase]]
* [[A_SetFloorClip]]
* [[A_SetFloorClip]]
* [[A_SetFriendly]]
* [[A_SetGravity]]
* [[A_SetGravity]]
* [[A_SetHealth]]
* [[A_SetHealth]]
Line 202: Line 213:
* [[A_SetRipMin]]
* [[A_SetRipMin]]
* [[A_SetRipMax]]
* [[A_SetRipMax]]
* [[A_SetRoll]] {{gzdoomfeaturesmall}}
* [[A_SetRoll]]
* [[A_SetScale]]
* [[A_SetScale]]
* [[A_SetShadow]]
* [[A_SetShadow]]
Line 218: Line 229:
* [[A_SetUserVar]]
* [[A_SetUserVar]]
* [[A_SetUserVarFloat]]
* [[A_SetUserVarFloat]]
* [[A_SetViewAngle]]
* [[A_SetViewPitch]]
* [[A_SetViewRoll]]
* [[A_SetTranslation]]
* [[A_SetTranslation]]
* [[A_SetVisibleRotation]]
* [[A_SetVisibleRotation]]
Line 230: Line 244:
* [[A_UnSetShootable]]
* [[A_UnSetShootable]]
* [[A_UnsetSolid]]
* [[A_UnsetSolid]]

== Model changes ==
* [[A_ChangeModel]]
* [[SetAnimation]]
* [[SetAnimationUI]]
* [[SetAnimationFrameRate]]
* [[SetAnimationFrameRateUI]]
* [[SetModelFlag]]
* [[ClearModelFlag]]
* [[ResetModelFlags]]

== Dynamic lights ==
* [[A_AttachLight]]
* [[A_AttachLightDef]]
* [[A_RemoveLight]]


== Missile movement ==
== Missile movement ==
Line 261: Line 290:


== Weapon functions ==
== Weapon functions ==
{{: Weapon functions}}
* [[A_WeaponReady]]
* [[A_WeaponOffset]]
* [[A_Lower]]
* [[A_Raise]]
* [[A_ReFire]]
* [[A_ClearReFire]]
* [[A_GunFlash]]
* [[A_CheckReload]]
* [[A_CheckForReload]]
* [[A_CheckRailReload]] {{STFeaturesmall}} {{deprecated}}
* [[A_ResetReloadCounter]]
* [[A_Light]]
* [[A_Light0]]
* [[A_Light1]]
* [[A_Light2]]
* [[A_LightInverse]]
* [[A_ClearOverlays]]
* [[A_Overlay]]
* [[A_OverlayFlags]]
* [[A_OverlayOffset]]
* [[A_OverlayRenderstyle]]
* [[A_OverlayAlpha]]
* [[A_Recoil]]
* [[A_ZoomFactor]]
* [[A_SetCrosshair]]


== Weapon attack functions ==
== Weapon attack functions ==

Latest revision as of 12:25, 14 April 2024

The list below covers all functions available to the Actor class that were originally intended to be executed from Actor states. All of these functions are available in GZDoom both in ZScript and in DECORATE (deprecated).

Note, however, that this list is not truly exhaustive:

1. Action specials can be executed from states as well.
2. In ZScript, the absolute majority of ZScript actor functions can also be called in Actor states without any limitations.
Note: The word "action" in the title if this page is largely here for historical reasons. In DECORATE all of these functions were action, but in ZScript action is a specific function type that in the majority of cases is only important for Weapon functions. Most of the functions listed below are, in fact, NOT action functions, but just regular functions without a type. Creating a new function that can be executed from an Actor state also doesn't require making it an action function.


Monster AI

Generic monster attacks

Freeze death functions

Sound functions

Print actions

Special actions

Spawn functions

State jumps

Status changes

Model changes

Dynamic lights

Missile movement

Inventory functions

Weapon functions

Weapon attack functions

Script functions

Original Doom/Strife monster attacks

Miscellaneous functions for Doom

See also