Stopping actor when firing

RondoRocketRondoRocket Member Posts: 411
edited November -1 in Working with GS (Mac)
I currently have my actor working correctly for the most part. The actor moves left and right and when I press and hold the fire button the actor stops moving. The problem I am having is if, for example, I press the left move button than I press and hold the fire button my actor stops. But if I release the left move button and press the right move button with the fire button still held down the actor begins to move again.

How can I completely stop my actor from moving no matter which move buttons are pressed while I still have the fire button pressed?

Thanks for any help.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Have a boolean attribute called 'no fire'.

    On the fire button
    When the fire button is pressed, set 'no fire' to 'false'.
    OTHERWISE
    Set 'no fire' to 'true'.

    On the arrows keys

    Add to your movement rule

    If 'no fire' is true

    make sure you change the condition from 'any' to 'all'

    So it might look like:

    ALL
    If button is pressed
    if 'no fire' is true

    then move

    Hope that makes sense,

    QS :D

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

  • RondoRocketRondoRocket Member Posts: 411
    Thanks QS! Yeah, I think I understand, I'll give it a shot when I get home.

    Not to get to ahead of myself... but using a boolean in this case (assuming I set it up correctly) should kill all move inputs until I release the fire button? Even if I was to keep tapping a move input while holding down the fire button? Also, if I was holding down a move key when I release the fire button would it immediately activate?

    Thanks again!
Sign In or Register to comment.