Skip to content

Instantly share code, notes, and snippets.

@GeorgeDettmer
Created November 20, 2016 17:43
Show Gist options
  • Save GeorgeDettmer/d125a639dbbb0dc0b9184e507b0d8d97 to your computer and use it in GitHub Desktop.
Save GeorgeDettmer/d125a639dbbb0dc0b9184e507b0d8d97 to your computer and use it in GitHub Desktop.
this setVariable ["anims",["anim1","anim2"]];
this setVariable ["loopEh",
this addEventHandler ["AnimDone",{
if (param[0] getVariable ["anims",[]] isEqualTo []) then {
param[0] removeEventHandler ["AnimDone",param[0] getVariable "loopEh"];
};
param[0] playMove (param[0] getVariable ["anims",[]] deleteAt 0);
}]
];
this playMove (this getVariable ["anims",[]] deleteAt 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment