Animation frame from JSON/Array?

0 favourites
  • 6 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hi All - prob a noob question, is there a way to set animation frame from JSON id or from Array?

    tia

  • Set Animation Frame to Array.At(X)

    Make sure the content in Array.At(X) is an integer value. Alternatively you can add int(Array.At(X)) to ensure that the value is converted to an integer if possible.

  • Set Animation Frame to Array.At(X)

    Make sure the content in Array.At(X) is an integer value. Alternatively you can add int(Array.At(X)) to ensure that the value is converted to an integer if possible.

    Appreciate your help! thank you.

  • Set Animation Frame to Array.At(X)

    Make sure the content in Array.At(X) is an integer value. Alternatively you can add int(Array.At(X)) to ensure that the value is converted to an integer if possible.

    Do you think animation frames can be called from .txt files too?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there, it can but you'll have to design it in specifics ways, and there are a lot of methods, but a good start point is to use AJAX to retrieve the txt content from project files and "inject" it in a variable, then tokenat/tokecount can be used to localise the numbers in the text, with the help of another variable to change the selected token;

    What result are you looking for ideally? Do you have a gif or video example?

  • Hey there, it can but you'll have to design it in specifics ways, and there are a lot of methods, but a good start point is to use AJAX to retrieve the txt content from project files and "inject" it in a variable, then tokenat/tokecount can be used to localise the numbers in the text, with the help of another variable to change the selected token;

    What result are you looking for ideally? Do you have a gif or video example?

    Thanks Tom - currently experimenting with a quiz with sprite. I'm not versed with arrays and I have a template using .txt that's why I asked.

    So let me understand what you've just said - AJAX -> Variable (as an on/off switch?) -> tokenat/tokecount to localize the tag of the sprite frame?

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