feature request : retreiving sprite animtion name at a index

0 favourites
  • 5 posts
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • Problem Description

    my problem can have many solution, i'm not C2 js sdk developer or i would make the changes myself.

    i want to pick the sprite animation name using index and not only the current animation name. or let us at least set animation with index or let us name the animation frame with text and get the animation name in a given index.

    Expected Result

    get animation name at a given index.

  • If you want to do it with events you can give the animations number names like (1,2,3,...). Or even better numbers in combination with a word like (run1,run2,run3...). Then you can use the set animation action with the expression "run"&n where n is an index.

    If you want to do it in a plugin with the javascript sdk then look here:

    https://www.scirra.com/manual/29/object-type

    If the object has animations you can use something like type.animations[0] to get the name at index i. You can glean more info about it by looking at the sprite object's source.

  • Interesting, what's the use case?

    I had made a plugin which could load all frames of all animation in an action. I could try to make something to retrieve animations.

  • Here, I've made a behavior for the sprite plugin quickly.

    https://dl.dropboxusercontent.com/u/139 ... s/anId.zip

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hey, i already found a solution to my problem , the idea is complex but the code is very minimised and short , you wont beleive how easy it was. the goal of my request was , i have many instance of the same sprite each one will be showing a different animation , whene i press i butoon i want them all to show a specifique other animation for each sprite ,

    thank you guys ^^

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