[Behavior] LiteTween

  • lunarray

    Hello!

    I have found a bug in the "Create/Initalize Tween" dialog box.

    (Parameters for ..... )

    The Target text box has wrong variable type attached to it. I tried to add target value: 100,100 but got to reply it is error, it needs to be STRING it said... So it is impossible to use. I even tried to add 100, 100 in quotes but it won't help much.

    Thank you. Love litetween otherwise.

  • rexrainbow

    Wow, that's such a nice behaviour/plugin, I didn't know that a behavior could be programmed to co-work with another behavior. It could open up to many possibilities. May I put the link to your behaviour's thread on the main post? I'll give proper credit and such :)

    helena

    I tried that action here, and it is working for me. Can you try downloading this simple example and tell me if this one works for you?

    Create-Initialize Tween capx

  • Try Construct 3

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

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

    This code could get instance of other behavior.

    This code could call set parameter of effect.

  • lunarray, your capx works. I see your have put the value in quotes. I will try again with that. Thanks.

  • It works, it was probably that particular event I tried to do that was faulty. It works now as I am using initialize tween for other purpose.

  • Thanks! :>

    helena

    Glad it works for you. :>

  • lunarray

    First, thanks for this Behavior, it's like iTween on unity !

    As I said on the TweenToEffect topic (LINK)

    If I put on LiteTween, "Active on Start" to "No", and then I try to start it from the beginning nothing happend.

    Any idea why ?

    Capx : CAPX

  • Joskin

    Done a quick fix to make it compatible with Tween2Effect. You should re-download the behavior. :>

    Long answer:

    As to why it happened, it's not a bug actually, but it has something to do with how tween.active variable was used differently in litetween and the previous version of tween. The tween2effect detects whether the tween is running based on this variable so it won't work. I fixed it now so that active properly stores tween running state.

    PS: Oh, and I think you should take how 'Compromise' works with Value tween into consideration, or just simply set it to 'Enforce' if you want simplicity.

  • lunarray

    Great, I had not compare all variables between tween and liteTween, thanks for this fix.

  • lunarray rexrainbow

    And the example capx provided in my post works for you ? Nothing happend for me ! :-D

    Edit :

    The condition LiteTweenActive is set to true, but box stay black.

  • Joskin

    EDIT: Silly me, I put the new litetween on the dropbox folder but forgot to sync it to the cloud :o, please redownload again :D

  • lunarray

    Silly you ! :-D

    Well, it works in my example, but not for what i'm trying to do, I'm trying to use it with the tint effect and the result is strange :

    CAPX TINT

    I want the tile to :

    white -> red

    and I have this :

    white -> black -> red -> black

  • Joskin

    Oops, sorry for all the inconvenience, but you just uncovered a bug. I have fixed it on my part, but I also need rex_rainbow to fix his behavior for this.

    EDIT: rex already fixed the behavior :o, you should redownload his behavior too

    While I'm waiting for rex's response, you can try redownloading the litetween behavior, once again...

    Oh, and I also made some modification to your capx, basically it's something like:

    1. Changing the star's sprite background from white to transparent

    2. Changing various value of the litetween on the stars

    3. Setting starting value on the event sheet before starting the tween

    Modified CAPX

    PS: To try running the modified capx, you have to wait till rex changed his Tween2Effects, or it won't run as intended.

    rexrainbow

    Rex, turns out I'm saving the value in the sprite's instance, so multiple litetween will use the same value. I should've stored the value in the behavior instead just like the old tween :(.

    Could you please change the Tween2Effect (at around line 69)

    var value = (this.tween_behavior_type == TYPE_LITETWEEN)? this.tween_behavior_inst.inst.value : this.tween_behavior_inst.value;

    to this?

    var value = this.tween_behavior_inst.value;

  • lunarray

    Done.

  • lunarray & rexrainbow,

    Thanks for this quick fix, you are awesome.

    It works perfectly for the tile tint, but since this patch I've some trouble with the tween position, instead of changing the position, the size is changed :-D

    Here is the capx just for this bug :

    CAPX (Notice I'm using a 9 patch)

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