Notice how the 2nd sentence has the same properties (color font etc) except the very last word which is in a different color
!!!Before you reply with “use richtext”!!! , I already know that exists but I feel like it won’t help me very much since you’re limited to just changing the colors and font, you can’t add custom code JUST for that specific word
In undertale, for example, you could have some sentences like:
“I went” “THERE” ← And this word would start shaking and be in a completely different color “already”, all in one sentence, so id rather have some way to split the textlabel into more than 1 so i can custom code that specific word if needed
I hope i explained myself well enough and didn’t go onto too much of a tangent, and also if there’s ways to achieve this other than literally splitting the textlabel into multiple ones i’d be open to hear those too
I think what people do is create a text label for each individual character and use some form of UI, like UI list or grid to lay them out, or some script math and then just apply the shake like you say, to the individual character.
I’ve never done it before tho, but from what I’ve heard and some working theory in my head I figure its probably something akin to this.
You cant customly SCRIPT* words in the sentence yourself
Mistyped that sentence my bad ill edit it
As in, yeah you can do that which I already know of but if i wanted to literally script the word “Wacky!” and make it shake or go transparent or whatever i want to code it im pretty sure that wont work since that only affects the string instance, not the textlabel itself which is the thing i want to code
This is relatively simple to achieve with a UIListLayout and UIAspectRatioConstraints, allowing for scaling with translation. You can ignore the Frame, which is literally named Frame, as it’s a set-size element I don’t want to scale dynamically with the text. Just generate the elements in order for each “word” and set their layout order to match that; you can even do specific letters if you wish or group them in the same frame and have it scale and change live!
I like this solution but the problem is that the words have different lengths, which makes each of the words look strange and not like they fit into a sentence together (unless i have to scale the textlabels myself according to each word’s length)