[Behavior] LiteTween

  • Hello lunarray !

    I'm developing a game based on your plugin where I have a wheel spinning either right or left depending on if I click right or left.

    So far so good, but sometimes I get a weird bug where it'll rotate more then the specified angle I determined. I figured by now the problem is that I need C2 to wait until the tween ends for it to accept another input, but the only wait conditions are for time and for a signal... How can I make this work?

    Could you perhaps check my .capx so you guys can test and tell me if you understand what's happening.How I coded it:

    I made a sprite rotate using relative angle tween with target 45 (for right spin) and -45 (left). I used enforce, linear and 1s duration. I really don't understand what the issue is. I believe it should work well according to the documentation.

    Edit: I can't post urls yet scirra.com/arcade/puzzle-games/beta-spinner-493

    Edit2: Ok, I managed to make it work on my machine but now when I upload it, it doesnt seem to work only on the first movement.

    Edit3: Made it!! Just in case you want to see how I did it check my .capx

    Thank you in advance,

    Quendera

  • Hi,

    I'm trying to code the movement of a wave, up from below screen, stop and back to initial position using this plugin.

    This is the code: prntscr. com / 7g5p9y

    Unfortunately i'm not able to reproduce the movement since it doesn't trigger the down move, I think there is some problem with the condition. I also tried to use "compare progress = 1" but it doesn't work either. I initially tried to use the relative target but the sprite starts from below and goes up above the upper limit of the screen. I prefer the relative condition but results are bad

    What i'm doing wrong?

    Ty

  • anmaz:

    I tried to understand the code but it is really easier if you could give me a simple capx demonstrating the problem. Could you please send me the link to the capx?

  • Hi Lunarray,

    thanks for your help. This is the file link: sendspace .com / file / xhhpvc

    I tried different solutions, using relative or absolute movements and using as condition to trigger the movement back down the Y coordinate or the compare progress = 1. I probably set up something wrong but I can't find my mistake.

  • anmaz

    Okay, been busy these two days. I just checked out your code. You use two tween that plays together.

    There are two tween which is Up, and Down; The problem is, the Up progress is still at 1.0 when Down finished playing, so Up won't be able to play since it's already at the end. You need to either use Reverse, or 'Seek 0' to place it back at the beginning.

    This is the corrected capx and the other one is just something i think would simplify it.

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

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

    PS: I changed the tween behaviour a bit to help with reversing control, please redownload it.

  • It seems C2 doesn't like your three digit version number. Opening a project made with 1.1 complains that the new version is older than the old one! Looking at the documentation, it only supports an x.y format. Setting the version to 1.2 in the edittime.js fixes the issue.

  • lunarray

    Thank you very much, it works really well now!

    I don't have words to express my gratitude. Thanks for the time dedicated to me!

  • this is awesome!

    thank you very much!

  • blackhornet

    Thank you for telling me, I just changed the 1.2.1 version to 1.3. It's not something big that warrant a minor version change, but I still change it from 1.2 to 1.3 to make sure people knew something was changed.

  • I don't know if this has already been addressed, but when I try to use this feature on mobile I can sometimes have issues with high performance costs (as compared to me making my own lerp function, etc).

    Is there any way around this or something i'm doing wrong?

    It can create lag on even some high end tablets X).

  • bhain7

    It shouldn't have that problem it should be light enough because i use lookup array. Can you show me your capx or at least explain which part is causing trouble?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure! It might take me some time but i'll try to see if I can remember where I had the capx with that issue.

  • I'm experiencing a weird behavior: if the object is moved by physics and it's size is tweened on top, the movement stops, than the tweening animation plays back, than movement continues.

    Looks like it's the issue with C2 physics, I tried animating it with another approach and get the same behavior.

    I tried using chipmunk physics by R0J0hound and it doesn't produce this behavior - nice!

  • I am having problems when I tween the scale and try to flip the sprite it won't flip.

    I noticed that you said you fixed it before but I am using the v1.3 and I am having the issue.

    FIX 5/7/2014: Fixed issue of scale tween with flipped or mirrored sprites

  • Bodhran:

    Can you give me simple capx demonstrating the problem? I will fix it.

    Edit: Uh, nevermind that one, I re-fixed it, it reverted back to some version some time when i got HDD failure and i started working from the wrong version afterward. Sorry for the late reply, was busy these days. Download on the first page as usual :>.

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