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

  • #1, by nerdFriday, 19. October 2018, 16:57 5 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 5 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 5 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 5 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

    7278 Posts

  • #5, by nerdFriday, 19. October 2018, 18:58 5 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 5 years ago
    fastest is 16ms (60fps), guess for slow you can do up to whatever you want.

    Imperator

    7278 Posts