**HELP WITH ANIMATING/CHANGING IMAGE**

I want to know if this is possible. So in 1 single actor, I want to be able to change the image (in an overhead view gameplay style) to make the character look in every direction. Let's say i press the left key, I need the actor to change direction (change the image), and if I make the actor that just changed direction (let's say he's looking now left when he was looking right) animate, then when the animation is done, it needs to stay facing left, instead of restoring the image to where it was (let's say it was facing right). So ultimately within 1 actor I want to be able to change the actor to face another direction, have the ability to animate the actor/new image facing a new direction, and when the animation is done or is mid-way through, the actor needs to stay facing the direction when the animation is queued. If this is not possible just let me know. Anything helps, Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Yes, you can do this. When key is pressed [left]... Animate [animation images in sequence with "Loop" and "Restore Actor Image When Done" unchecked].

    In this case, you would add images that begin with the right facing actor and end with the left facing actor.

    The tricky part is knowing when the animation is complete. But you can figure this out with some simple math based on the Speed (frames per second) and the number of frames. Once you know the duration in seconds, you can use an After timer to do something else.

    I'm doing this from memory, so if anything's not clear, let me know.

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

  • LumpAppsLumpApps Member Posts: 2,881
    You will have to know which way the actor is pointing and where it has to go. The animation has to go from the initial direction to the end direction which makes it difficult but not impossible. For example when the actor is facing right and up is pressed the animation hat to go from left to up but when the actor is facing down and up is pressed the animation goes from down to up.
  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2013
    The tricky part is knowing when the animation is complete. But you can figure this out with some simple math based on the Speed (frames per second) and the number of frames.

    The animate frame rates are very inaccurate, here's a guide to their claimed frame rate and actual frame rate.

    30 fps = 23.5 fps
    29 fps = 20.1 fps
    28 fps = 20.1 fps
    27 fps = 20.1 fps
    26 fps = 20.1 fps
    25 fps = 20.1 fps
    24 fps = 20.1 fps
    23 fps = 20.1 fps
    22 fps = 20.1 fps
    21 fps = 20.1 fps
    20 fps = 16.5 fps
    19 fps = 15.1 fps
    18 fps = 15.1 fps
    17 fps = 15.1 fps
    16 fps = 15.1 fps
    15 fps = 12.9 fps
    14 fps = 12.1 fps
    13 fps = 12.1 fps
    12 fps = 10.9 fps
    11 fps = 10.1 fps
    10 fps = 9.1 fps
    9 fps = 8.6 fps
    8 fps = 7.6 fps
    7 fps = 6.7 fps
    6 fps = 5.7 fps
    5 fps = 4.8 fps
    4 fps = 4 fps
    3 fps = 3 fps
    2 fps = 2 fps
    1 fps = 1 fps
  • K thanks. I'll let you know if I have any more questions
  • ChakkuChakku Member Posts: 1,513

    30 fps = 23.5 fps
    29 fps = 20.1 fps
    28 fps = 20.1 fps
    27 fps = 20.1 fps
    26 fps = 20.1 fps
    25 fps = 20.1 fps
    24 fps = 20.1 fps
    23 fps = 20.1 fps
    22 fps = 20.1 fps
    21 fps = 20.1 fps
    20 fps = 16.5 fps
    19 fps = 15.1 fps
    18 fps = 15.1 fps
    17 fps = 15.1 fps
    16 fps = 15.1 fps
    15 fps = 12.9 fps
    14 fps = 12.1 fps
    13 fps = 12.1 fps
    12 fps = 10.9 fps
    11 fps = 10.1 fps
    10 fps = 9.1 fps
    9 fps = 8.6 fps
    8 fps = 7.6 fps
    7 fps = 6.7 fps
    6 fps = 5.7 fps
    5 fps = 4.8 fps
    4 fps = 4 fps
    3 fps = 3 fps
    2 fps = 2 fps
    1 fps = 1 fps
    Whoa! How did you figure that out?

    @Socks


  • SocksSocks London, UK.Member Posts: 12,822
    Whoa! How did you figure that out?
    Time a thousand frames.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2013
    @Socks grrrrr

    Thanks for keeping us in check. ;)

    Well what about manually creating an animate behavior by changing the image and then using a timer (or timestamp) to change to the next image, etc.?

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

  • SocksSocks London, UK.Member Posts: 12,822
    @Socks grrrrr

    Thanks for keeping us in check. ;)

    Well what about manually creating an animate behavior by changing the image and then using a timer (or timestamp) to change to the next image, etc.?
    Does that remind you of anything you might have seen recently ? ;)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

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

  • SocksSocks London, UK.Member Posts: 12,822
    @Socks // Youtube
    Lol, I was thinking of a cube based game you helped someone out with recently.

    :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Socks haha! Ah yes, now I remember.

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

Sign In or Register to comment.