How can you move, stop, then continue moving w/o ever depressing the move key?

lordsprinkleslordsprinkles Member Posts: 19
edited November -1 in Working with GS (Mac)
What I want is to hold down the Right or Left arrow key hit space bar to shoot and have the character movement stop. After playing the shoot animation I want the character to then continue moving in said direction without ever having to repress the Right or Left arrow to move again.

My current set up calls up an animation when the spacebar is pressed and stops the player movement at the same time with ChangeVelocity behavior set to 'speed=0'. I have to press Right or Left arrow in the direction I was traveling to move again. I tried using ChangeAttribute self.Physics.Movable = 0 but the move commands override it and still allows the character to move during the move animation.

Any suggestions?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Hi lordsprinkles. Thanks for the question.

    I would try making a boolean attribute that changes when you shoot. And with the rule checking if the move button is pushed down, also add the condition if the shooting attribute is false.

    When the shooting is done, change the attribute back.(Timer behavior with an After X seconds, run to completion)

    I think that should work, though I can't test that right now. Hope that helps.
Sign In or Register to comment.