animation using tables it's possible ?

oswaldev018oswaldev018 Member Posts: 34
edited January 2019 in Working with GS (Mac)

hi guys, i have an actor and this actor is a jewel it works using tables like a candy crush game but I would like this actor to be an animation rather of image but im using table so i do not know what to do .

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited January 2019

    I'm not sure what you're doing exactly using the tables but I'd think you could just add the animate behavior to your Jewel actor and put your frames of animation in there.

  • oswaldev018oswaldev018 Member Posts: 34
    edited January 2019

    @jamie_c said:
    I'm not sure what you're doing exactly using the tables but I'd think you could just add the animate behavior to your Jewel actor and put your frames of animation in there.

    but my jewel represents 5 kinds jewel so when i use animation behavior all the 5 jewel that working with tables are animated and i just want one of it animeted

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @oswaldev018 said:

    @jamie_c said:
    I'm not sure what you're doing exactly using the tables but I'd think you could just add the animate behavior to your Jewel actor and put your frames of animation in there.

    but my jewel represents 5 kinds jewel so when i use animation behavior all the 5 jewel are animated and i just want one of it animeted

    Then just have rules that say:

    When attribute self.Image is [whatever the animating jewel's starting image name is]
         Change attribute self.Animate to true

    When attribute self.Animate is true
         Animate

    When attribute self.Image is [the name of the last frame of the animation]
         Change attribute self.Animate to false

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    @oswaldev018 said:

    @jamie_c said:
    I'm not sure what you're doing exactly using the tables but I'd think you could just add the animate behavior to your Jewel actor and put your frames of animation in there.

    but my jewel represents 5 kinds jewel so when i use animation behavior all the 5 jewel that working with tables are animated and i just want one of it animeted

    There are ways to animate from a list of images in a table by using constrains, loops, and/or timers. They are not as easy to control tho and takes some set-up.

    But maybe you just need to rethink how the system is designed.

    Can you tell us how the tables are used exactly?

    Follow us: Twitter - Website

  • Two.ETwo.E Member Posts: 599

    Hello,

    If you are making a candy crush game, using tables. Then there is a very high chance that you have already given each jewel a unique ID number. Or a method to seperate each jewel from each other in the tables. (This way you can run logic to check if a match is made).

    You can, either work out what this ID is, or create a new id yourself.

    If ID is equal 1, than your jewel is a Ruby.

    If ID is equal 2, than your jewel is an emerald. etc etc

    This way, in your rule where it has the Jewel being removed. You can add in 5 extra rules.

    If ID =1, Then animate the Ruby Animation.

    IF ID = 2, Then animate the Emerald Animation.

    etc

  • rainwaterstudiosrainwaterstudios Member Posts: 198

    @oswaldev018
    Check out my sample project for using tables for animation: https://drive.google.com/open?id=17OyaSHVcMsk1PaqHPQCDgEAPHUDcdxoY

Sign In or Register to comment.