[Behavior] LiteTween

  • Is it something like this?

    dl.dropbox.com/u/55358831/helping/problems-2.capx

  • This is basically it though I am wanting to have it loop infinitely with a defined pause between each Loop.

    Also I will be changing the easing so there is no bounce on the 2nd Tween.

    My problem has been trying to get it to loop correctly, I have had it do the motion as shown in the capx you uploaded, though when I try to make it loop... that's where it seems to cut out random parts of the script and does not simply repeat exactly what it did the first time around with a custom defined pause between each iteration.

    thanks again for all of your help, it's great to see that you offer this level of assistance with your behaviour.

  • It's ok, let's continue this via PM :)

  • Great plugin, thanks for sharing!

    I may have found a bug:

    Behavior version : 1.5.4.145

    Runtime.js, line 1505:

    Your code:

    "ret.set_text(this.target);"

    Proposed fix:           

    "ret.set_string(this.target);"

    Cheers!

  • Also:

    line 1515: "ret.set_boolean(this.isPaused);"

    set_boolean is not defined, you'll have to find a workaround (maybe return 1 or 0 intead of boolean value)

  • Is it possible to detect when all instance of a sprite have stopped tweening.

    Want to know when all tweens are finished.

    Example below shows a bunch of sprites tweening in but the progress for the sprite is set to 1 before the last one has finished.

    https://dl.dropbox.com/u/2175584/Construct2Examples/AllTweensFinished.capx

  • Is it possible to detect when all instance of a sprite have stopped tweening.

    Want to know when all tweens are finished.

    Example below shows a bunch of sprites tweening in but the progress for the sprite is set to 1 before the last one has finished.

    https://dl.dropbox.com/u/2175584/Construct2Examples/AllTweensFinished.capx

    You could do that by adding 'Is easetween active' below your every tick event. This would make the event run as long as there is any tweening going on with those objects.

    Or something more appropriate could be:

    on easetween end

    pick all tweenObjects

    is easeween active

    .. do stuff

    This would check at end of every tween if any other tweens are going on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • vee41 Thank you, that's perfect, still wish for a global one though, so every tick I don't need to test is active.

  • vee41 Thank you, that's perfect, still wish for a global one though, so every tick I don't need to test is active.

    The other solution I posted is more 'reactive' and doesn't involve constant checks. And I recall Ashley saying that using every tick is actually not such bad practise :)

  • JohnnySheffield: Thanks for pointing that up johnny, I incorporate the fix as per your suggestion :>

    vee41: thanks for your help in solving labithiotis problem :D

    labithiotis: I was too late, so I can't download the capx. But maybe you can try using group. Set all the property "Tween Group" to "mygroup" for all the sprite you want to check, then you can use "Compare Group Progress" expression to check if all of sprite in the same group has finished tweening.

  • lunarray: I'm sure I tried that but it didn't work and after seeing your post I tried again and it does. I think I was originally trying to do it with Compare two variables and couldn't find one for Group Progress(just individual instances). Any ways, after changing it to as you suggested that worked even better, so thank you :)

    Another question : is it possible to move and scale at the same time with same tween ease?

  • This plugin is hot

  • I am trying to tween several properties at the same time (position AND angle), however using two EaseTween behaviors at the same time seems to be glitchy at best. If I tween angle first with one behavior and tween position with other, the position doesn't change at all, even though I make sure to set initial and target positions.

    What am I doing wrong?

  • labithiotis: Yes, but you will need two easetween behaviour, one for the scale, the other for the position. Be careful with Size (Ratio) though, you need to experiment abit with it, it's a little tricky.

    Mipey: I just tried, and it worked. Can you post the simple capx which showed the problem? I post a simple capx to show a sprite with both position, size and angle tween.

    dl.dropbox.com/u/55358831/helping/pos_angle.capx

  • lunarray: well, I can't exactly reproduce this, but I'm tweening objects between fixed positions. The angle tweens properly, but not position - it doesn't move even though I set starting and target positions. Force starting it didn't work either.

    That reminds me - when tweening angles, it seems to rotate in one direction, often going full circle. Would it be possible to tween in the direction with smaller angle difference?

    E.g. tweening from 0 to 270 runs 270 degrees, rather than 90 as desired. Perhaps I should use -90 as target using relative mode, but then I'm using fixed angles.

    AMEND: Disregard the position tweening issue, I am an idiot. The object in question was pinned to another object's position, so of course it couldn't tween. The pin behavior kept it in place. Tweening the object it is pinned to solves the issue.

    Yes, I am a blonde. <img src="smileys/smiley5.gif" border="0" align="middle" />

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