# Wait for Animation

Grammar — Wait until identifier playback is offset seconds from the offsetType of the animation for actor actor
FlagsNative | Action

Waits until an animation is a specified amount of seconds from the offset type. Note that the animations and animation times may vary from player to player due to different game states or localities so this waits for all players to report that they have reached the specified point.

# Arguments

  • actor — Actor
  • string — Identifier
  • fixed — Offset
  • int<preset::AnimationOffset> — Offset Type

Returns — void

native void AnimWait(
	actor a,
	string animName,
	fixed offset,
	int offsetType,
);

Category: Animation / Advanced

# Examples

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:6325

    libNCMI_gf_SendTransmissionCampaign(gv_nova, "Mission_Nova09|Line00031", c_transmissionDurationAdd, 0.0, true, libNCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libNCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    libNCMI_gf_SendTransmissionCampaign(null, "Mission_Nova09|Line00032", c_transmissionDurationAdd, 0.0, true, libNCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libNCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    AnimWait(ActorFromDoodad(DoodadFromId(149909154)), "Cover", 0.0, c_animationOffsetEnd);
    Wait(0.5, c_timeGame);
    ActorSend(ActorFromDoodad(DoodadFromId(149909154)), "Signal DetachFromRamp");

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2mapMapScript.galaxy:6325

    libNCMI_gf_SendTransmissionCampaign(gv_nova, "Mission_Nova09|Line00031", c_transmissionDurationAdd, 0.0, true, libNCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libNCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    libNCMI_gf_SendTransmissionCampaign(null, "Mission_Nova09|Line00032", c_transmissionDurationAdd, 0.0, true, libNCMI_ge_MissionTransmissionPortraitOptioins_HidePortraitAfter, libNCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior);
    AnimWait(ActorFromDoodad(DoodadFromId(149909154)), "Cover", 0.0, c_animationOffsetEnd);
    Wait(0.5, c_timeGame);
    ActorSend(ActorFromDoodad(DoodadFromId(149909154)), "Signal DetachFromRamp");