[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
38
S
13
G
6
Posts: 145
Reputation: 5,348

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
85
S
27
G
21
Posts: 1,969
Reputation: 19,167

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.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

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
38
S
13
G
6
Posts: 145
Reputation: 5,348

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
97
S
35
G
29
Posts: 3,139
Reputation: 28,361

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
38
S
13
G
6
Posts: 145
Reputation: 5,348


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests