How do I detect when SpriteFont text is over limit?

Get help using Construct 2

Post » Wed Jun 28, 2017 12:16 am

The title explains everything. The problem is that i have an dialog-box and the text can go greater than the dialog box. I need to detect when the text reaches the limit of text, to split it.

Hope you help me ;) this is my first post.
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Wed Jul 05, 2017 3:48 pm

Maybe use TextHeight? Although, I am not sure this will allow you to break the text at a specific point, it simply lets you resize the SpriteFont to fit the text.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Thu Jul 06, 2017 12:34 am

Thank you gumshoe2029! it kinda helped... the problem is that i need to detect the extra text,

i need to know when the text is over the limit of rows calculating the size of one row and then multiplying by the row limit (that i already did with the TextHeight), and then continue the dialog showing the extra text (that i can't detect) on another window... Like, if i wanted to input the text:

"Hello, i am a goblin
and i love fighting so
much that i could give
all my money...!"


the three first lines would fix on the dialog box, that is 3 rows tall...
but i need now show the extra text: "all my money...!" separated!
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233

Post » Fri Jul 07, 2017 8:07 am

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Aug 22, 2017 3:55 am

99Instances2Go! Very thank you~! It's a bit complicated p-p, but I'll get it right... ;P
Howdy, I'm HenryPK! I love helping people and making games... Hope we can be friends. (Also check my game: Blue)
B
10
S
2
G
1
Posts: 60
Reputation: 1,233


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 47 guests