Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Active Animation Framecount

  • #1, by sebastian 11 years ago Zitieren
    Hey Boys'n'Gurls,

    i want to count the frames of an active animation, but i get "nil" as a value .
    local framecount = getObject("ActiveAnimations["..game:getLink(VGameUsedItem):getName().."]"):getInt(VAnimationFrameCount)
    print(framecount) 
    


    Animation of the object has 2 Frames. I expected that i get this in return, but all i get is a "nil" when printing the int.

    Any ideas?

    EDIT:

    Meh... i know whats wrong. The AnimationFrameCount Value counts frames which are already passed. Not the total framecount. I'll do it otherwise then.... *_*

    thanks anyway

    ~Sebastian
  • #2, by constantin 8 years ago Zitieren
    how did you count the total amount of animation frames? 
  • #3, by sebastian 8 years ago Zitieren
    Not sure anymore for what i wanted to use it here, but the "AnimationLastFrame" field should contain the  number of frames of the animation by default (unless you changed it via lua):

    VS5: framecount = ActiveAnimations["nameofanimation"].LastFrame
  • #4, by constantin 8 years ago Zitieren
    okay thank you.