How do I do something similar to Sine size with text?

Get help using Construct 2

Post » Thu Jun 02, 2016 12:43 pm

I want something like the Sine behavior "size" movement, but with text. This behavior seems to resize the textbox, but not the font size. I can't use a graphic, as the text is dynamic and will change each time it is spawned.
B
12
S
3
Posts: 43
Reputation: 1,213

Post » Thu Jun 02, 2016 1:52 pm

This might help you , you will have to fine tune it to meet your needs , I have used this on "Game Over" text display's .

Since you are using sine behavior on text , add this action where it's appropriate for you .
Text >set font size to text.sine.value
It might not suit you but maybe give you an idea .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Thu Jun 02, 2016 2:42 pm

Oh cool. That ALMOST gets me where I want. Any idea how to stop the sine cycle from dropping negative? I have tried comparing the period and magnitude, and then setting the cycle at a certain point, but that doesn't seem to work.
B
12
S
3
Posts: 43
Reputation: 1,213

Post » Thu Jun 02, 2016 3:10 pm

set your period to 0.5 and your action to Text >set font size to clamp(text.sine.value,12,32)
I'm not sure of what you want exactly , hope it's close .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Thu Jun 02, 2016 6:40 pm

Now I feel dumb. I totally forgot clamp was an option. I think I can tweak it to my liking. Thank you so much! :D
B
12
S
3
Posts: 43
Reputation: 1,213


Return to How do I....?

Who is online

Users browsing this forum: MadSpy and 3 guests