How can I do it???

  • #1, by denis-Wednesday, 28. March 2018, 13:48 6 years ago
    Hi folks!
     I have a chracter on a eesaw.I need to increase the swing speed clicking alternately in a right and left area near the character  with mouse. 
    And I have a middle idea how  do it...but it's possible ensure if you are too slow to click, the animation of swing decrease until to stop?
    (I know it's hard but...do it without using Lua may be possible?)
     
    Waiting for all 2 possibility!
    Thanks a lot at all!

    Denis




    Newbie

    74 Posts


  • #2, by afrlmeWednesday, 28. March 2018, 14:41 6 years ago
    You can tween values mate, so you could in essence transition the global pause value between animation frames from current value to a high value over x time. Another thing you could do is insert a script into the final frame of each arc of the animation to increase current global pause value between frames by let's say 10 each time the frame is hit whereas clicking on the left or right areas you specified will reduce delay value by x amount down to a min of 16ms as that's the fastest you can go (60fps).

    I'm not sure about without using Lua script. Anyway, to adjust pause value...
    local pause = Animations["example"].AnimationPause
    
    if pause > 16 then pause = pause - 10 end
    if pause < 16 then pause = 16 end

    That example would be for reducing the pause value to make the animation faster.

    For slowing it down would be a bit more complicated as you would need to make it stop entirely, so you might want to force it to play a single specific frame once the speed gets to a certain delay value.

    *edit: thinking about it, there's something else you could do. If you created the animations as static images & assigned the same value to each one, you could use the value tween action part Simon added & transition through the values. That way it will update frames over x time. I don't know if it will look very smooth, but with a few if queries you should be able to create a fully non-Lua script method for it.

    Imperator

    7278 Posts

  • #3, by denis-Wednesday, 28. March 2018, 15:32 6 years ago
    Mmmm interesting approach...this evening i'll try! Thanks Lee!  
    (one day I will have to repay..he he!!)


    If someone has others Ideas...come forward ! ( I think is a good exercise)
     
    :-P

    Newbie

    74 Posts

  • #4, by denis-Wednesday, 28. March 2018, 16:54 6 years ago
    Lee you give me an idea...ACTION AREAS!!!
    Combined with your hint about last frame of anim....
    Mmmm...

    IT CAN BEEE  DONEEEE!!!

    (ND. Frankenstein Junior)

    In case could you help me? razz

    Thanks!!!


    Newbie

    74 Posts

  • #5, by afrlmeWednesday, 28. March 2018, 16:59 6 years ago
    Just see what you can manage yourself first mate. wink

    Imperator

    7278 Posts

  • #6, by denis-Wednesday, 28. March 2018, 17:44 6 years ago
    He he...Sure mate!

    ;D

    Newbie

    74 Posts