How do I smoothly ramp an effect parameter value?

Get help using Construct 2

Post » Tue Oct 18, 2016 2:27 pm

@Donic Dawkins
So for my example a = BlurValue, b = time it takes to come to full value (?), and x = amount of blur to add (?).

If I understand correctly, this should be how it works:

a = Current Value

b = your target value

x = how big the steps are
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Tue Oct 18, 2016 11:02 pm

x is a increasing/decreasing number from 0 to 1 (or 1 to zero)

you have to increase/decrease x in some system

look at my example for 1 possibility
B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918

Post » Wed Oct 19, 2016 12:10 am

99Instances2Go wrote:x is a increasing/decreasing number from 0 to 1 (or 1 to zero)

you have to increase/decrease x in some system

look at my example for 1 possibility


True in the traditional lerp way, but not in the gradual decline effect where x is a constant (somewhere around 0.04) and the a is updated to the current location. This will move fast at first and slow as it goes but never reach the exact b, so much test for b-1, or somewhere really close.

Is there a way to save as an older version capx? Mine had both examples, think it would be helpful
ImageImageImage
B
39
S
22
G
11
Posts: 486
Reputation: 9,913

Post » Wed Oct 19, 2016 8:35 am

Ah, but that is why i used 'cube' in stead of 'lerp'. Cube is just a lerp with 4 points. The easy way to make a easyIn/easyOut lerp without plugins, when dealing with a static end and a static start.

Personal, for myself, i would use TweenLite, either to feed a lerpfactor to a lerp, or to use it as intended.
B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918

Post » Wed Oct 19, 2016 11:30 am

badmoodtaylor, I hear ya, all good.


99Instances2Go, lovely code, thanks for posting. Timer seems like a good way to go, still going through your code but think I get it...

cheers,
M
B
7
S
1
Posts: 23
Reputation: 421

Previous

Return to How do I....?

Who is online

Users browsing this forum: ladjuric, plinkie, Syazanie Amirin and 4 guests