[Behavior] LiteTween

Post your completed addons to share with the community

Post » Sun Jan 19, 2014 8:49 am

@rex_rainbow

Thanks! :>

@helena

Glad it works for you. :>
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Tue Jan 21, 2014 3:35 pm

@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 : CAPXJoskin2014-01-21 15:36:08
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Wed Jan 22, 2014 2:39 am

@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.
lunarray2014-01-22 02:43:47
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Wed Jan 22, 2014 4:27 am

@lunarray

Great, I had not compare all variables between tween and liteTween, thanks for this fix.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Wed Jan 22, 2014 8:57 am

@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.Joskin2014-01-22 09:11:03
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Wed Jan 22, 2014 8:33 pm

@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 :Dlunarray2014-01-22 20:36:33
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Thu Jan 23, 2014 8:37 am

@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 Joskin2014-01-23 08:40:43
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Thu Jan 23, 2014 10:05 pm

@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;
lunarray2014-01-24 06:07:14
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Fri Jan 24, 2014 2:27 am

@lunarray

Done.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Fri Jan 24, 2014 9:31 am

@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)Joskin2014-01-24 09:32:21
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests