Triggering an animation only while holding a key :D

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hihi folks!

    So Halloween is coming up and I'm building an app to use as a Digital Puppet of sorts in my costume. What I'm trying to setup is a looping animation of many different eyeballs looking around randomly, and when I press and hold the spacebar on my bluetooth mini-keyboard the eyes close and stay shut as long as I hold the key, then play the closing animation in reverse as they open and start looking about again.

    I see how to trigger an animation on a key press, and how to switch animations with different keys, I'm just a little new to the interface and am trying to figure out how to set it up as described above ^^

    Thanks for reading!

  • Sounds like a cool Halloween project XD

    Different ways to achieve that,

    a simple one:

    setup two different animations,
    stopped: eyelid opening animation + standard behaviour (look around)
    walking: eyelid closing + eyelid closed

    so, for both animations, make them always "loop",
    but instead of looping back to frame 1, loop back to the first frame after the eyelid has opened in stopped animation
    and loop from eyelid closed on walking animation

    then:

    repeat while key pressed
    >> change animation to "walking"

    (negate) repeat while key pressed
    >> change animation to "stopped"

    should do the trick

    a selection of my Fusion examples can be found Please login to see this link.

  • You could also pop in (negate)animation "walking" is playing on the repeat while key pressed event and (negate)animation "stopped" is playing on the other. That will ensure they only trigger once per state change as opposed to restarting the triggered animation every event cycle.

  • Hello,
    I am trying to do something similar, I am trying to follow what you guys are suggesting but it's not working for me. I have to hold down WASD together before the animation will change.
    Please let me know what I am doing wrong?
    Please login to see this attachment.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!