Suggestions: Animations

0 favourites
  • 3 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • There should be an expression to get the amount of animations in a sprite, y'know? Like 'FrameCount' there should be one for 'AnimationCount' also animations should have indexes, so I can retrieve an animation name by using an index number to my advantage.

    These reasons are because I have like 100+ animations in my sprite, and during runtime I want to be able to loop 0 to AnimationCount. I'll make an example:

    -Start of Frame

    +For "getanimations" from 0 to Sprite.AnimationCount     

    =Text.SetText "Text.Text & newline & Sprite.GetAnimationNameFromIndex(loopindex("getanimations"))"

    also I have events that need to access certain animation names specified indexes during runtime.

    Thanks!

  • In the absolute, your pseudo code wouldn't give you the expected result.

    THe logic you're using there would make ALL the animations being set one after the other EACH TICK. (So each tick, set the sprite to an animation after the other to the end of the animations stack)

    In the end, you would only see the fixed first frame of the first animation. I guess this is not what you want.

    Also, you could use some workaround to use a number in the name of your animations.

    Ex:

    Run1

    Run2

    Run3 etc...

    Meaning that you can set Sprite animation to "Run" & loopindex("getanimations").

    But once again, you would have to spread the switching of animations through several ticks, not just in a for loop.

    Something more like :

    glob var animIndex

    Animations name setted as indicated earlier

    Sprite: On any animation finished

    -> System: Add 1 to animIndex

    -> Sprite: set animation to "Run" & animIndex

    (opt) -> Sprite: play animation

    This should do the trick and doesn't require new ACE.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ex:

    Run1

    Run2

    Run3 etc...

    Meaning that you can set Sprite animation to "Run" & loopindex("getanimations").

    But once again, you would have to spread the switching of animations through several ticks, not just in a for loop.

    Something more like :

    glob var animIndex

    Animations name setted as indicated earlier

    Sprite: On any animation finished

    -> System: Add 1 to animIndex

    -> Sprite: set animation to "Run" & animIndex

    (opt) -> Sprite: play animation

    This should do the trick and doesn't require new ACE.

    I have this already.

    You're clearly not understanding correctly, I WANT the animations to have proper names, not "a1" and "a2" etc what I have now. this I want so the user doesn't have to worry which animation is what etc in my game.

    for example: an m4a1 animation I want to have the name "M4A1 Assault Rifle" not "a87".

    I'm pretty sure it wouldn't be hard to add.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)