Checks whether an animated mesh is currently playing animation.
Takes entity (animated mesh handle).
Returns 1 (True) if animation playing, 0 (False) if stopped/paused or invalid entity.
3D Graphics
Parameters & Returns
Parameters
entityInt
Returns
Int
Quick Summary
Checks whether an animated mesh is currently playing animation.
Takes entity (animated mesh handle).
Returns 1 (True) if animation playing, 0 (False) if stopped/paused or invalid entity.
Technical Exegesis...
Checks whether an animated mesh is currently playing animation. Takes entity (animated mesh handle). Returns 1 (True) if animation playing, 0 (False) if stopped/paused or invalid entity. Validates entity exists and type is ENTITY_ANIMATED_MESH. Checks animatedMesh pointer exists. Returns animMesh->playing flag as integer (1 or 0). Returns 0 if: invalid entity, entity not animated mesh, animatedMesh pointer null, animation stopped.
Checks whether an animated mesh is currently playing animation. Takes entity (animated mesh handle). Returns 1 (True) if animation playing, 0 (False) if stopped/paused or invalid entity. Validates entity exists and type is ENTITY_ANIMATED_MESH. Checks animatedMesh pointer exists. Returns animMesh->playing flag as integer (1 or 0). Returns 0 if: invalid entity, entity not animated mesh, animatedMesh pointer null, animation stopped. Playing flag set by b3dAnimate (starts animation), cleared by animation completion (if not looping) or explicit stop.
This function checks animation playback state for control flow. Playing flag distinct from animation existence - entity can have animation data but not be playing (stopped before completion, never started, paused). Use cases: (1) Detect animation completion for state transitions (If Not b3dAnimating(enemy) And b3dAnimSeq(enemy) = ANIM_ATTACK Then SwitchToIdle()), (2) Conditional animation start (If Not b3dAnimating(player) Then b3dAnimate(player, ...)), (3) Performance optimization (skip animation updates for stopped entities), (4) UI feedback (show play/pause icon based on state). Animation modes affect playing flag: ANIM_MODE_LOOP keeps playing=1 indefinitely, ANIM_MODE_ONCE sets playing=0 after reaching end, ANIM_MODE_PING_PONG alternates direction while keeping playing=1. Speed parameter in b3dAnimate affects playback rate but not playing status (speed=0 pauses but doesn't set playing=0 - check implementation). Common pattern: If b3dAnimating(entity) = 0 And userInput = KEY_SPACE Then b3dAnimate(entity, ANIM_MODE_ONCE, 1.0, 0, lastFrame, 0.0). Alternative: track animation state in your own variables for more complex state machines. Return value boolean-style (0 or 1) for easy conditional checks.