[Behavior] LiteTween

  • problem solved

    thank you

  • Sorry for the late reply guys,

    jomo

    That is the correct behavior of how EaseInBack, EaseInBounce etc works.

    I'll try to explain EaseInBack and EaseOutBack using ordinary words.

    So in height tween of EaseOutBack, it works by making its height bigger, then it will exceed 68 pixel, after that it will return to the 68 pixel with.

    In height tween of EaseInBack, it starts by making its height smaller, then grow its height bigger until it reach 68 pixel.

    But in the case of EaseInBack since it starts at zero, the height became negative, which cause it to turn upside down. This is how C2 behave, if you set height or width to negative value it will flip or mirror (actually that is how it is coded in javascript), so I can't do anything with it. Clamping it to zero in litetween using javascript would make other people who expect it to go negative unsatisfied. So if you still want that effect, you should clamp it to zero in C2 events.

    I made a simple example here:

    https://dl.dropboxusercontent.com/u/553 ... anged.capx

    Are you sure you don't want EaseOutBack instead?

    Thanks for the reply! But actually it seems we were not talking the same thing. I know negative height will cause flipped image so I use the tween combination intentionally. The problem is when I refresh about 10 times there will be about 4 times to see an upside-down (will see a flipped READY at tween end) image. But, now I changed to r239 and everything is good again. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Thanks for your support!

  • lunarray I have a question. I'm using "value" for this behavior.

    I need to know how to set start value and end value like from 12 to 35. This behavior currently calculates 35 to 0 in loop what I did not want.

  • Joannesalfa

    Oh, there is an action 'Set Value' to set the start Value.

    On mouse click

    > Litetween Set Value = 15

    > Litetween Start tween

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lunarray awesome, thanks.

  • I used this behavior recently and it worked perfectly and saved me a lot of time. Thank you.

  • awesome behavior, i use this behavior for my game, i very like it.

  • lunarray

    I am using this behavior for a few days now and is so useful. I was thinking of, I don't know if anyone suggested this, a "wait" action in the properties of the LiteTween will help if someone uses lots of objects with this behavior, and wants to delay a few seconds/miliseconds the starting of this behavior.

    Edit: I mean, for some of this objects, not for all of them.

  • Am I right in thinking that variable's can't be used as a tween value? If not I've been doing it wrong for a few years now!

  • anty21ro

    It is exactly what I am thinking also way back then when I made EaseTween, EaseTween has this functionality, adding a wait before starting tween and a delay of pause after a tween. It also has alot of control, like PingPong, Loop, etc. But LiteTween is designed to be controlled from the event sheet, it is not EaseTween. The right way to do it is simply add 'Wait X seconds' action before 'Start LiteTween'. If you really need that functionality, I suggest you download the EaseTween again and check if it will suit you more. Despite it is not being developed anymore, some of my old projects that is still running still use it heavily without problem.

    AlexFrancois

    Umm. The answer is both yes and no.

    For setting the starting value, you can do something like 'LiteTween > Set Value' then just put variable into it.

    For setting the target value, you can also do 'LiteTween > Set Target' then set 'str(x)' your variable into it.

    But yeah, you can't set variable as target value in the object property at design time.

  • I've found a bug. When using LiteTween for size on an object, it doesn't take into account if the object is mirrored, it will display it as an unmirrored object. If you want me to provide a capx showing this, I will.

  • LoneVox

    This is because the mirrored and flipped in construct is using negative size, I fixed it before once, but then it caused alot of problem to other people due to its inconsistent nature and it makes things awkward for several people who use it. So it might be a bug to some, but I really prefer to avoid the negative size checking for now.

    That thing aside, LiteTween is perfectly fine with mirrored or flipped object if you set the target to negative value.

    If you need to tween a mirrored or flipped object, please take into account these things.

    1. The target width could be negative for mirrored object

    2. The target height could be negative for flipped object

    3. If you tween starting from a non mirrored to a mirrored one, remember to set 'from current' or 'from last recorded' according to your need.

    There are alot of other people using this for mirrored objects, so if I changed how it worked, it might force them to change those events and breaks alot of project also.

  • Why I got error?

  • NgTrent

    Ah, could you explain to me what error you got? If I may guess wildly, the most common problem is that this is a behaviour, not a plugin, did you put it into the behaviour folder?

  • Works fine for me. Thanks man

Jump to:
Active Users
There are 3 visitors browsing this topic (0 users and 3 guests)