[FEATURE REQUEST] UNIVERSAL TWEEN

Discussion and feedback on Construct 2

Post » Tue Nov 19, 2013 9:48 am

It would be great to have universal TWEEN function in expressions, perhaps with different options on easing in time.

output=tween(value1 to value 2, over amount of time in sec, type of easing)


Examples:

fake HDR:
walking from interior into exterior:
interior ->set brightness of interior TWEEN(100,60,2,0);
exterior ->set brightness of exterior TWEEN(180,100,2,0);

crossing the line between interior and exterior would result in dimming both - interior to very dark and exterior to normal in 2 seconds.

music:
switching between music themes with crossfade


More examples can be described (cameras, visibility of objects, objects moves etc.), but I think it's sufficient.
B
40
S
14
G
6
Posts: 154
Reputation: 5,521

Post » Tue Nov 19, 2013 10:37 am

You can already achieve a lot with the lerp function.
There is the plugin LiteTween, but it's a behaviour, I don't know if you can use it to do all the things you say.

But I think it would be really hard to implement a function which receives a parameter for duration, given that the event sheets are executed every tick.
B
12
S
5
G
2
Posts: 132
Reputation: 2,627

Post » Wed Nov 20, 2013 1:43 am

Yeah parameter for duration +100
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Wed Nov 20, 2013 1:58 am

+ Loads for me too. It is possible to code tweens with a bit of thought and research or you can use the Lite Tween plugin if you don't worry about future compatibility or access to the Scirra arcade. However, I think that having these built in would be great.
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Post » Wed Nov 20, 2013 9:57 am

Lite Tween is fine, but it works with behaviors. I would like to see something more universal, which works almost with anything.
B
40
S
14
G
6
Posts: 154
Reputation: 5,521

Post » Wed Nov 20, 2013 10:03 am

There are like 3 or 4 threads about that they want to have like official motion plug, but never got reply from Ashley.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Wed Nov 20, 2013 12:00 pm

Yann created a set of functions on this topic, I've reposted (hope thats ok) the links here as I have found them very useful :)

Topic:
http://www.scirra.com/forum/various-ease-in-ease-out-through-functions_topic66359.html

Yanns Demo

Yanns Capxarontwose2013-11-20 12:01:08
B
8
S
3
G
1
Posts: 34
Reputation: 1,395

Post » Thu Nov 21, 2013 9:22 am

@arontwose It is perfect and I understand the math behind it, still I'm not a programmer and I have difficulties in applying it to my needs...
B
40
S
14
G
6
Posts: 154
Reputation: 5,521


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 18 guests