Loop action problem

  • #1, by CrossMonday, 10. August 2015, 17:33 10 years ago
    Hi community!

    I need an actionpart to be executed in a loop as long as a key is pressed. When releasing the key it should stop.
    For this i used a "jump to actionpart #1"-action and added a condition to the "press-key-action", which is set false when releasing the key.
    Unfortunately the action doesn't stop, when the key is released. But if i set the condition to false when pressing another key, it works perfectly fine.
    Could anyone please explain to me what i'm doing wrong?

    Thank you kindly.

    Newbie

    92 Posts


  • #2, by sebastianMonday, 10. August 2015, 18:05 10 years ago
    A " quit action " part addressing the loop action when releasing the key should do the trick

    Thread Captain

    2346 Posts

  • #3, by CrossMonday, 10. August 2015, 19:09 10 years ago
    Unfortunately that's not working either. Are the "release-key-actions" probably working different then "press-key-actions"?

    Edit: It's working for keyboard-keys, thanks Sebastian.
    I didn't notice first, since i was using the D-Pad-Buttons for the gamepad, which will not work. They seem to work differently?

    Newbie

    92 Posts

  • #4, by afrlmeMonday, 10. August 2015, 19:33 10 years ago
    Hmm regular action keys loop through the action parts listed automatically while the key is pressed. To control the speed of the loops (as it acts like the turbo button of a control pad by default) add a pause action part to the end or beginning of the action list (as needed).

    Key (released) actions only execute the listed actions 1x on key release.

    Imperator

    7285 Posts

  • #5, by CrossMonday, 10. August 2015, 19:52 10 years ago
    I use the loop in fact as a turbo for the movement of the character with keys through the script in the arrow-key-movement-thread. It keeps the character successfully from stopping after he finishes the script the first time. Working great so far.
    The last problem i have, is that it's not working with the gamepad-buttons. They seem to cycle slower then the keyboard maybe?

    Newbie

    92 Posts

  • #6, by afrlmeMonday, 10. August 2015, 22:08 10 years ago
    The game pad support is not quite finished (as far as I remember - I think David mentioned it as staging on the changelog which I think means work in progress - yep just checked team changelog & it says work in progress).

    Imperator

    7285 Posts