Forum rules - please read before posting.

Animation object play on character face down

Hi Chris,

How would I animate a scene object whenever the player faces down or left? and then reverts back when up and right?

Comments

  • Use a custom script to read the Player's GetSpriteDirectionInt function - this will return 0 when facing down, 1 when left, and 4 when down-left:

    int direction = AC.KickStarter.player.GetSpriteDirectionInt ();
    if (direction == 0 || direction == 1 || direction == 4)
    {
        // Animate one way
    }
    else
    {
        // Animate another
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.