lunarray's Recent Forum Activity

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

  • Zathan

    Ah okay, you should make it a string first, so instead of "sprite.X,sprite.y", you should use

    str(sprite.x) & "," & str(sprite.y)

    or

    sprite.x & "," & sprite.y

  • Zathan

    It actually work, but you have to insert it inside a double quote. For example, if you want to set target to position 300, 300. You have to write "300,300", with quote and comma.

    Also if you want to enter target angle, you would still need to enter it inside a double quote "90".

    The reason for this is because C2 editor did not let me set different UI for target whenever user changed the tween target (position, angle, etc). If it is position, it will need two value, X and Y, but for angle it would need to accept single value. The only thing i could do then is to make it a string/text in double quote, and the tween will automatically sets the right target value from the text.

    Because back then I thought create/initialize tween would not be used by most average user, I choosed to implement it like this, and if I change it now to accept two value, it will break so many people project that already use it for the last two years, they would have to fix so many things.

    I know it is not convenient but there's not much i can do with it.

  • kantin

    Is this link working for you?

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

    I tried downloading it from the first post and it work, or maybe this is not the one you need?

    Just a reminder for this one you will need EaseTween behavior not the LiteTween. If you don't have it yet, download for that behavior is on my first post.

  • Maybe I understand it wrong, but is it something like this?

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

  • cedricvr

    Sorry is it possible to give me the capx to reproduce it? It is hard to really understand the circumstances of the bug without it

  • Sorry all for the late answer, got abit of things to do irl.

    Sorry for the late answer, could you please elaborate more about 'speed of movement that is running the tween'? I don't really understand, do you mean something like 'current velocity of the tween?' i assume you are trying to make some kind of doppler effect?

    Zathan

    I think it should be stable enough, I will put it on first page like usual. Thanks for the interest

    kantin

    I will check it out it looked like i already lost that file during my harddrive crash two years ago, and that demo is for EaseTween, not LiteTween. But I'll go check it out later and try to find it if you dont mind waiting.

lunarray's avatar

lunarray

Member since 12 Jun, 2012

Twitter
lunarray has 6 followers

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies