Problem with pins, scale, and tweening

Discussion and feedback on Construct 2

Post » Sat Jul 05, 2014 4:24 pm

I'm trying to tween the scale of a compound sprite and it's giving me trouble.

I have the sub-sprites pinned to image points on the main sprite, and for the most part it works fine. But when I change the scale of all the various parts, they also change location relative to one another. I can re-orient them after the fact, except that I'm tweening the change of scale. Which means that all the parts smoothly scale into the wrong places and then suddenly leap to the right places at the end.

I've tried giving each part its own tween, but I'm also rotating the main sprite so trying to keep up with the destinations of all the various parts is nigh impossible.

Does anyone have any thoughts on how to work around this?

A simple illustration of the problem using LiteTween is attached.

Thanks! :)

Scale1.png
Scale2.png
You do not have the required permissions to view the files attached to this post.
B
8
S
2
Posts: 55
Reputation: 616

Post » Mon Jul 07, 2014 1:56 am

Well, I made a sort-of solution. I created an event group that repositions the sub-sprite to the main sprite's image point every tick. Then I turn it on at the beginning of the tween and off at the end of the tween. It's a total hack, but it works. :)

Example attached.

If anybody has any thoughts about a more elegant solution, I'd love to hear it!
You do not have the required permissions to view the files attached to this post.
B
8
S
2
Posts: 55
Reputation: 616


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests