[Behavior] LiteTween

Post your completed addons to share with the community

Post » Fri Nov 02, 2012 7:47 pm

Cool that you like it and "Force Start" just works! Very nice.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Tue Nov 20, 2012 3:41 pm

Well somethings broke now.
What is expected when you use "Reverse Tween"?

In one of my old games I had the behavior set so that when you did a start tween it went to a relative position, and when you started a reverse tween it went back to its original position.
But it wouldn't do the reverse tween if it hadn't completed the initial start tween first.
Right now when I call for a reverse tween, all objects move.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Nov 21, 2012 1:48 am

@newt: Can you give me the capx? It will make debugging a lot easier for me :(
B
33
S
6
G
1
Posts: 180
Reputation: 3,630

Post » Wed Nov 21, 2012 2:41 am

The original might be a bit confusing without knowing what is supposed to happen so I made an example.

https://dl.dropbox.com/u/666516/reversetweenbug.capx

Also I added an extra event that is toggled. It shows how the way its working now could end up in a loop.

If you want to make changes, that would be great, but its up to you.
Just want to make sure that the usage is as expected.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Nov 21, 2012 4:25 am

Okay, I did change the behaviour alot back then. Sorry about that newt.
The explanation for the cause of the bug is something like this (also how I handled this special case)

The reverse action is no longer 'rewind' action since 1.5, that's why it broke.

To fix it, I added the rewind/reverse combo to set which action will be performed when we do Reverse. The default is 'Reverse' tho, so that it won't break up many other ppl who use this plugin since 1.5. But in your case or any other who came before 1.5, you can use 'Rewind'. It works quite the same with the previous version...

Very sorry for the inconvenience... :(

PS: I already uploaded the 1.5.3 version. Could you please test it and tell me if it work for you?
B
33
S
6
G
1
Posts: 180
Reputation: 3,630

Post » Wed Nov 21, 2012 4:49 am

Works here.
Nice idea for the work around btw.
Thanks.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Nov 21, 2012 11:23 pm

hi lunarray, is it possible to make the ease tween Initial and target to take another object's instance variable?
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Thu Nov 22, 2012 5:37 am

@Yung: Instance variable, why not use action SetTarget and enter Sprite.InstanceVariable in there?
B
33
S
6
G
1
Posts: 180
Reputation: 3,630

Post » Thu Nov 22, 2012 6:50 pm

I've tried it and it doesn't seem to work. Basically I plan to use EaseTween to do an energy regen bar thingy.

I have two variables on a sprite, lets say Enemy.currentEnergy and Enemy.maxEnergy. I want to be able to input this two variables into the initial and target, so that once I call this regen thing, it will tween the value to my Enemy.maxEnergy variable.

I was able to pipe in another variable to the Duration so I thought if it's possible to do that with initial and target. Then it would be easy to tweak the values by selecting the enemy sprites and not touch the event. Perhaps there's a better way to do it?
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Fri Nov 23, 2012 5:27 am

Is it something like this?

https://dl.dropbox.com/u/55358831/stormbox/progress_bar.capx

It use families tho, but i think families are not necessary in this regard.
B
33
S
6
G
1
Posts: 180
Reputation: 3,630

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest