• Makes doodads in the vicinity of a point play an animation.

    Parameters

    • x: number

      x-coordinate (world units) of the point.

    • y: number

      y-coordinate (world units) of the point.

    • radius: number

      Maximum pick distance from the point.

    • doodadID: number

      The type of the doodad that should be affected.

    • nearestOnly: boolean

      If true, only the single doodad (of the given type) closest to the point will be affected, otherwise all in the vicinity (of the given type).

    • animName: string

      String identifier of the animation that should be played.

    • animRandom: boolean

      If true, the animation to be played will be picked from an extended set including different variations of the animName, e.g., if animName is "walk", it can also be "walk defend".

    Returns void

    Note

    Only doodads whose origin is within the radius distance of the point are considered.

    Note

    There are the special values "hide" and "show" for animName, which will hide respectively show the doodad. When a doodad is hidden this way, its animation will pause at the current time frame. Re-showing the doodad resumes the animation.

    Note

    If a target does not have an animation identified by animName (and it's not one of the special animation names either), it will play its first declared animation instead.

    Bug

    If animName is null and there is at least one target, the game will crash.

    Note

    If animRandom is true and the picked animation is looped, it will freshly re-pick from the set when an animation ends.

Generated using TypeDoc