Still having trouble with left and right still animation

butterbeanbutterbean Member Posts: 4,315
edited November -1 in Working with GS (Mac)
So I tried a couple of different things with the still animation.

First I created a rule that if left key is up, then animate "still animation facing left" with the frames in place

I also created a rule that if right key is up, then animate "still animation facing right"

The problem is, only one of them works.

When I've last moved right, she faces right and blinks and does the still animation, but when I've last faced left, she will keep turning right.

So these rules aren't working because they're conflicting.

How can I create rules so that when she has been moving left and stops, she does a still animation facing left, and vice versa?

Is this possible? OR will I have to create a "neutral still animation" and just have her facing the screen?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Make two boolean variables - MoveRight and MoveLeft.

    When you press the right button, make MoveRight = true and MoveLeft=False
    When you press the Left button, make MoveLeft = true and MoveRight =False

    On your actor, make a rule that says

    If MoveRight = True
    And right key is up
    then after 5 seconds
    Play right facing idle anim.

    Do the same for left:

    If MoveLeft = True
    And left key is up
    Then after 5 seconds
    Play Left facing idle anim.

    Not sure if it'll work, but give it a go ;)

    Hope that helps,

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • MillerEPMillerEP Member Posts: 22
    Quantum beat me, I was going to suggest the same thing. The answer is to just turn facing left to false whenever the Right-Key is pressed, and vise versa. This way when it runs its check for is facing left true, it'll pop up negative and then it should work.
  • butterbeanbutterbean Member Posts: 4,315
    Thanks Quantum! Should have known that solution, forgot to turn the facing left to false when right key is pressed and vice versa

    Also, could I use the same boolean attributes that I did to make the custom control pad, and just add the move left is false when move right is true and vice versa as well as the timer with the animation into the actor?

    Or would I have to add 2 more separate boolean attributes for move left and move right?
  • quantumsheepquantumsheep Member Posts: 8,188
    You probably could - indeed, it was the 'moveleft' solution to the buttons question that made me think of this solution ;)

    Give it a go and find out ;)

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • butterbeanbutterbean Member Posts: 4,315
    Make two boolean variables - MoveRight and MoveLeft.

    When you press the right button, make MoveRight = true and MoveLeft=False
    When you press the Left button, make MoveLeft = true and MoveRight =False

    So for now I put those rules above in an invisible actor controller and dragged it into the screen

    The other rules you told me to put in the player actor, I did, and it still didn't work :(

    I never have any problems with the facing right animation, but when she turns left, she keeps walking.

    I checked all the rules to make sure there was nothing missing, and it looks as everything is clean, so lemme know if you figure out a diff. solution?
  • butterbeanbutterbean Member Posts: 4,315
    Great! It finally worked! Was that solution already there in the Wiki or just created recently?

    Also, for the self.facing left in the walking left and right, I made it true and false, not 1 and 0, and it seems to work
Sign In or Register to comment.