Board Thread:Questions and Answers/@comment-1490123-20140719002944/@comment-5483792-20140719015929

You will need a current animation ID variable and a previous frame animation ID variable. compare the two to determine wether or not spanim should be called. It kind of goes like this:

animID = 0:oldanimID = 1

if animID != oldanimID then spanim(parameters):oldanimID = animID

And the animID variable determines the parameters of the spanim.