Need Help about creating a sort of slower/faster animation button

  • #1, by nerdFriday, 19. October 2018, 16:57 6 years ago
    I got this nice code:
    Animations["anim1"].AnimationPause = 100

    Now instead of that "100" a need to put a value from "set value", I've attached a screenshot to clearify better. How I do that?

    Forum Fan

    147 Posts


  • #2, by sebastianFriday, 19. October 2018, 17:26 6 years ago
    this should do the trick :

    Animations["anim1"].AnimationPause = Values["name_of_VS_value"].Int
    

    Thread Captain

    2346 Posts

  • #3, by nerdFriday, 19. October 2018, 17:37 6 years ago
    this should do the trick :

    Animations["anim1"].AnimationPause = Values["name_of_VS_value"].Int
    
    It works. Thank you very much.

    Forum Fan

    147 Posts

  • #4, by afrlmeFriday, 19. October 2018, 17:59 6 years ago
    You should wrap it in an if query so that the value is only incremented/decremented if the value if less than max or greater than min.

    Imperator

    7285 Posts

  • #5, by nerdFriday, 19. October 2018, 18:58 6 years ago
    You should wrap it in an if query so that the value is only incremented/decremented if the value if less than max or greater than min.

    I'll put 3 buttons, slower, faster, and normal. The player will be able to play as slow as he want. But thank you anyway

    Forum Fan

    147 Posts

  • #6, by afrlmeFriday, 19. October 2018, 19:31 6 years ago
    fastest is 16ms (60fps), guess for slow you can do up to whatever you want.

    Imperator

    7285 Posts