LiteTween And Pin Behaviour Problem

Get help using Construct 2

Post » Fri Nov 04, 2016 1:12 am

Hi Guys.
So i have been working around with the litetween behaviour for a while now and its an awesome plugin.
However while trying to create an effect for a menu with it i´ve run into an issue and i can´t seem to figure out how to solve it.
Basically whenever i reverse the tween my sprite kinda "shakes" a little and it kinda bothers me.
If someone can see the capx and maybe understand why i would be greatly appreciated.

Also i have been trying to use the pin behaviour for a while now and i cant seem to make it work so i have been forced to make the behaviour manually.
Maybe i just dont understand how to use it, so if someone could check the capx and tell me how to use it i would also appreciate.
Thanks in advance!
Capx:
https://www.dropbox.com/s/plwdbxse5isnh ... .capx?dl=0
B
26
S
14
G
8
Posts: 49
Reputation: 6,250

Post » Fri Nov 04, 2016 1:32 pm

http://www.blackhornettechnologies.com/Construct2Stuff/TweenBehavAngle_BHT.capx
Just keep track of the state, and after the first Start, use resume to ping pong Start and Reverse. I've fixed pin on Sprite7.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri Nov 04, 2016 7:15 pm

Thanks for the awesome answer blackhornet. Everything seems fine with the logic behind it. However after seeing how it works i noticed that the rotation of the angle is not fit for what i wanted to do. I must apologize for this as i made this topic without expressing myself correctly.
I realized that i what i wanted was for the sprite not to reverse to its original angle but to continue to "rotate" until it reached its original position.
I modified the capx to do this effect, however i required 2 litetween behaviours( don´t think this is optimal) and on top of that it when i touch the sprite a 2nd time the litetween doesnt go off but requires a 3rd touch to fire.
If you could help me out to understand where i failed i would be greatly appreciated
Also sorry once again for not expressing myself correctly on the first time.
Capx:
https://www.dropbox.com/s/lee1fo7uzcmxl ... .capx?dl=0
B
26
S
14
G
8
Posts: 49
Reputation: 6,250

Post » Fri Nov 04, 2016 8:54 pm

You don't need a second behaviour, just change the parameters to the current one.
http://www.blackhornettechnologies.com/Construct2Stuff/TweenBehavAngle_BHT_b.capx
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri Nov 04, 2016 9:28 pm

Damn your code is so much more simple and organized than mine, haha, i still have much to learn.
Thanks alot youre a lifesaver!!
B
26
S
14
G
8
Posts: 49
Reputation: 6,250


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests