lunarray's Forum Posts

  • 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?

  • Ok, I put the answer on the other thread.

  • Both Ashley and 99Instances2Go are true. The problem lies in the structure of the code and the use of trigger insides of the else clause which the trigger assumes it is a true condition. I am not even sure how to fix or even if it is fixable, so I will pass on that.

    If you just want to focus on finishing the job you can just use 'Compare Progress' = 1, which mean it has reached the end of the tween. Compare Progress is a condition, which is not a trigger like On End, so it will work

  • Nitro187

    It is a bug in the mirror/flip handling code in litetween, i think TrickyWidget mentioned about this as well before, but i didn't catch what he meant during that time.

    I fixed the bug once more, hopefully this time it will finish it once and for all. Mirror and Flip are always confusing to deal with due to the negative width etc.

    Please redownload the behavior in the first page.

  • Cipriux

    Sure it can do that. My wild guess for that problem is that you use Enforce instead of Compromise. Because of that, one of the tween won the enforced coordinate for the other. If you want the second graph which looked like a circleEaseOut to me, you need to tween linearly for X (Horizontal tween), and tween easeOutCircle for the Y (Vertical tween).

    I made a simple capx, I hope this is what you need.

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

  • Cipriux

    Thank you for noticing that bug, that's a simple typo, I just fixed it. The download link is on the first page like usual. Please tell me if it is still not working correctly.

    Ragevortex

    You should use Enforce mode > Enforce. Don't use compromise for this case.

  • krisnk

    I tested on chrome browser and it worked fine, can you be more specific about the steps to reproduce the problem? And also, this is a wild guess but it is a behaviour, not a plugin, so you should put it into behavior folder, not plugin folder, maybe that is why?

    UltimateArceus3

    It does work with expression to some extent; Though you need to know how to convert numerics into strings and vice versa.

    I don't really understand the problem you encounter, are you using Set Target X and Set Target Y? Or are you using create/initialize tween? Sometimes using Set Target X and Set Target Y would be more convenient, depending on the case. I could help more if you could provide me with a simple capx describing what you want.

    I am not sure either. If it is on the weaker device with less processing power, it might be because LiteTween is using precalculated array instead of having to calculate the lerp every tick, so it is lighter on the CPU. But if it is on an adequate PC/mobile, lerp/dt should have about the same smoothness with linear LiteTween.

  • powerof2

    I just checked and it is working fine, which link is not working?

  • justifun

    It is a string, if it is a position tween you can use "700,200" in the target to tween to x=700, y=200. If you want to use variable let's say MyTargetX and MyTargetY, you can turn those two variable into string by entering

    MyTargetX & "," & MyTargetY

    into the target field.

  • Divona

    Okay that was stupid of me >.< I fixed it, and put the zip file with wrong name at the dropbox so what you are downloading is the same version with error. This time it would work. Please try download it again.

  • Divona

    Okay, I fixed the minification thingies. The download is at the first page like usual.

  • Divona

    Hello, can you please try redownloading the zip from the first page for 1.7 and try again? Looked like you downloaded the first version of 1.7, which has a bug that got fixed in 24/6/2016. I tried downloading your capx here and exported it successfully without error.

    EDIT:

    I just tested it again with minification and it does break. I'll go check out if the fix is easy and fix it later.

  • sagispin

    I tested it here, and both 'Set Timescale' and 'Set Object Timescale' affect the tweens. Can you give me a simple capx that shows the case where it doesn't work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Zathan

    I made a quick example for it, hopefully this is what you needed.

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

  • https://dl.dropboxusercontent.com/u/553 ... ation.capx

    Before you read my long comment below, maybe you want to see this capx first, if this is roughly what you wanted, then the long comment below might interest you, but if it is not, then just ignore my rambling >.<

    The velocity of movement, whether it is angular or positional, is always the 1st derivative of displacement. In this case, we can either take the formula of the used tween's function, then get the derivative of it, multiply it with some value (in here, the duration), then we get the velocity of it.

    If you use linear tween, it is so easy to get velocity because the speed at any moment is the same everywhere. The derivative of a linear function is a constant, in this example it proportionally inverse with duration.

    • So, in this case, you can set timescale of the audio to 1 for 1 sec. I just use set playback rate in the audio object to correctly change pitch also.
    • When the duration is 0.5 then the speed at any given moment of time is always 2. So set timescale to 2 for duration of 0.5 sec.
    • When the duration is 0.75, then the speed at any given moment is 1/0.75, 1.33333. So set timescale to 1.3333 for duration of 0.75.
    • For other duration, just take 1/x as timescale.

    Now the worse part.

    For other tween's formula, like elastic ease, it would be hard or even impossible to take derivative, because its function is segmented. And I can't also set the audio timescale to alter the pitch. The speed at an any exact time is different. So, in these case, the previous example of how to calculate speed in every time moment would be useful. So, each tick i get the old position/angle and take the new position and angle, and then divide it by the delta time, it will make it a very roughly approximation of the current speed. If we divide this value with the linear speed of the tween, we can get the right timescale for it.

    In this capx I stop and play the audio at every tick and adjust the timescale at every deltatime. In this capx example though, it has a clicking noise, because it is stopping abruptly during a waveform play, the way to eliminate this will be to use very quick crossfading between the microsample.