Search Animation Names

0 favourites
  • 8 posts
From the Asset Store
Searching
$16 USD
Searching is a game where you are challenged to find all the images with the requested letter in 30 seconds.
  • Hi guys!

    I just want to know is there anyway that I can search the animation names of a sprite and if the animation name contains specific numbers or characters set that as a parameter (for example) for "Set Animation"

    for instance:

    Fluids_Sprite has these animations:

    12_Coffee

    13_Water

    14_Moonshine

    and I want an expression that search through these animation names and if one of them contains 13 set that as parameter for "Set Animation"

    I've tested this expression but it's not appropriate

    find(Fluids_Sprite.AnimationName,str(51))
    
  • AnimationName expression returns only the current animation. There is no way to retrieve the list of all sprite animations. (except for calling internal C3 methods from Javascript, which is not recommended)

  • A "Has Animation" condition for Sprites would be so useful!

  • You could use something like this

    This example would pick the dragonfly animation

  • A "Has Animation" condition for Sprites would be so useful!

    Although such condition would be useful, I would prefer if there was some way to get the whole list of animations. You can vote for this idea:

    construct3-21h2.ideas.aha.io/ideas/C321H2-I-319

  • You could use something like this

    This example would pick the dragonfly animation

    As far as I know the second parameter in tokenat must be number

    would you explain what is the second parameter(background) and how it would pick the dragonfly?

  • A "Has Animation" condition for Sprites would be so useful!

    exactly that's the condition I was looking for which seems construct 3 doesn't have it.

    I also vote dop2000 idea

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I know the second parameter in tokenat must be number

    would you explain what is the second parameter(background) and how it would pick the dragonfly?

    oops, I was in a hurry and forgot to change the variable, anyway I have updated it.

    Anyway what I was trying to point out, is that you can use a variable in tokenat to set the animation that you want, if they are referenced in numerical order.

    tokenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.

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