I am trying to make a simple function that will add an event, which triggered, causes a select few animations to repeat on themselves, however,
I'm struggling with finding a way to pass a variable from the function to the event itself. (The string of the animation to loop.)
I have searched a lot of forum posts, but I haven't found anyone with a similiar issue. Maybe there's an easier way to do what I'm trying to do?
Any help would be greatly appreciated.
fnc_loopAnim =
{
params ["_unit", "_loopedAnim"];
_unit addEventHandler [ "AnimDone",
{
params["_unit","_anim", ???];
if (_anim == _loopedAnim) then
{
_unit switchMove param _loopedAnim;
_unit playMoveNow param _loopedAnim;
};
}];
};