How do I scale text like css

Get help using Construct 2

Post » Fri Dec 02, 2016 5:14 pm

Hello,

I was working on a projet with an idea of animation in mind which is just to scale up the score text of my game each time its updating.
But I'm very worried to not find any solution for just scaling a bit the text (like in CSS with transform : scale).
I've looked on the forum and didn't found any similar subject. I've tried to set Width & Height but it's changing the text area.
Is there any solution ?

Thanks.
B
3
Posts: 3
Reputation: 181

Post » Sun Dec 04, 2016 11:33 am

Set Font size under appearance


:)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Mon Dec 05, 2016 10:46 am

Hi, thanks for the answer, however doing this each tick does just make my text disappear. I guess it doesn't support decimal numbers (tried with round, same result) or fast set. And I can't Get the font size, which is annoying, I need to put my value in the code like that. I also need to setup each tick to animate it.
I've done more research and found that sprite font has a scale properties, but I'm not sure how it will behave.
B
3
Posts: 3
Reputation: 181

Post » Tue Dec 06, 2016 6:57 am

there isnt really any need to scale the font every tick...thats 60 changes per second...no one can see that kind of changes..
I suggest only changing it when you need to..not every tick

also

The thing is with Font size is that the border box of the text object determines whether the text appears at whatever size..do you understand ?

so if your text object border size is too small when you enlarge the font it will not appear inside the box..

you would need to scale the box size with the font size

hope that clears things up
:geek:
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Wed Dec 07, 2016 11:22 am

Well, I need to set it every tick for animate it.
I noticed the border box thing with text size.
Anyway, I found my way with the sprite font, it's working quite well.
I just had to fix also the letter spacing each time I modify the scale because it's not linked or proportionnal (very annoying). Maybe I will retry with normal text.

Thanks for the help !
B
3
Posts: 3
Reputation: 181

Post » Wed Dec 07, 2016 11:48 am

maybe you can Display Score as Sprite...
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072


Return to How do I....?

Who is online

Users browsing this forum: PRIZZRAK, Yahoo [Bot] and 22 guests