Merlandese's Recent Forum Activity

  • rexrainbow Thanks, man! Hours later I have some progress, and it looks like this handles a lot of the issues!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I mean some basic formatting within the text object like ...[\b] or

    ...

    [\size] or ...[\color] or even [shadow]...[\] would really add some coherence to the workflow (forward slash is inverted for displaying reasons)...

    I totally agree. Being able to italicize/bold/underline a single word within the text object would be, like, a +255 to Effectiveness.

    I have a pretty heavy draw on text objects in my project for a custom dialogue system that currently flows great, but can't do some of these simple formats. As it is right now, later in development, I may have to carve all of it out and replace it with Rex's (R)excellent plugin.

    It'd be great if a future update could incorporate these into the Text Object, so +1 to this Feature Request!

  • Hey, guys. I'm Merlandese!

    I've been lurking here and working with C2 for over a year now. I've already made a couple of posts (like, two) and figured I'm well overdue to say hello!

    ...

    Hello!

    ...

    I'm developing my next thing with C2, and it's been really great. My expertise is in RPG Maker XP (I worked on To the Moon, Last Word, Rakuen, Social Caterpillar, etc.) so it's been intense learning an engine much more powerful.

    I pop on now and again to search for answers to questions I have, and usually I find them, which is why I don't post much--any threads I'd normally make are often answered elsewhere.

    I'm a traveler of sorts. I'm from the US but I'm currently in Sao Paulo, Brazil, settling a bit to develop more intensely. If anyone wants to chat or grab a drink and they live in the area, hit me up!

    Thanks, Ashley + co. for the cool engine!

  • No worries! It all worked and I got good practice. The opacity trick is a good one, thanks!

  • EDIT:

    I figured it out! I'll write what the problem was and leave the previous post below here for posterity.

    My system used a lot of invisible text objects at first, then pulled data from those. This works out for a lot of things, but for some strange reason if an object has an invisible property it hides the TextHeight from the engine. So even if you have 30 lines of 12 point text in there, if you try to draw out the TextHeight you'll end up with a funky value based on the object's Line Height.

    Not sure if this is an actual feature of the engine or not, but if anyone has trouble finding TextHeight, try making the object visible!

    (Another problem is that if the object is off-screen it might not work. This is creating more problems for me than I had hoped...)

    Thanks for all the help, you guys.

    -------PREVIOUS POST--------

    Turn the negative into a positive with the expression abs, abs(x) Absolute value of x e.g. abs(-5) = 5, might work

    Thanks for the suggestion.

    The absolute value would be a good way to craft the final equation, but the issue isn't what number is being pulled out so much as that it doesn't correlate to the amount of text shown within the object. If I have nothing written in the text object, or if I have 500 characters, I still retrieve the same value when I call TextHeight. A static value won't help me dynamically alter the size of the box.

    This is extremely weird because as I keep trying to troubleshoot the problem it looks like I'm having it only within my own project. When I try to retrieve the TextHeight value in the example Korbaach gave, the return is exactly what I'd expect. Yet in my own project, the return is definitely based on the Line Height of the object rather than the content within the rectangle.

    Searching around the forum hasn't lead me to any answers so far. If anyone recalls a thread dealing with this issue I'd love to check it out.

  • Awesome, thanks a lot for this!

    I was avoiding using any height methods at first because I wasn't sure what font sizes I'd need, and I didn't want a system that would need some re-coding every time I altered my formats. But it's the next best thing.

    I'm having an issue, though. I've troubleshooted it as best I could with a friend for the last few hours and it seems to me that when I ask for the value TextHeight I get a negative version of the "Line Height" property of the Text Object.

    For example, if I have Variable=Text.TextHeight, no matter how much text is in the Text object, I'll get Variable=(-1 * "Line Height of Text"). If my Line Height for the Text Object is manually set to 12, TextHeight will return the number -12. If my Line Height is 4, I'll get -4. So there's a correlation between TextHeight and the Line Height property that is baffling me.

    It's possible I'm misunderstanding something key in the example you made for me. Any idea what I'm doing wrong?

  • Hello!

    I'm trying to detect line breaks in my text objects so I can dynamically alter dialogue box images.

    I looked here and got a great answer using RegexMatchCount on Newlines in the text object:

    How Do I Detect Line Breaks?

    However, I'm using Rex's CSV plugin to load a lot of dialogues from CSV files. I have everything working except that when the dialogue loads and wordwraps into the text object, the wrapping doesn't seem to create any sort of Newline indicator for the Regex to detect.

    Is there a way to count these automatic line breaks from the word wrap when the dialogue is drawn from a CSV file?

    Thanks!

  • Oh, excellent! I got stuck trying to approach the solution from the wrong angle. Factors! Psha! XD

    Thanks a lot, linkman! This certainly does the trick.

  • Is there a simple way to break apart a number into its factors? And possibly isolate them?

    For example, if I input the number 12, it'd output 1, 2, 3, 4, 6, or 12.

    What I'm trying to do is detect when a number is, say, divisible by 3. So I could crack the number into its factors and if the second or third factor is a 3 I'm golden. If there were a math expression like "factor(x, y)" where x = the number to deconstruct and y = the factor to pull out I'd be luckier than a box of breakfast cereal, but I couldn't find anything like it in the System Expressions section.

    Thanks in advance!

    (I dug through the manual and did some searches through the "How Do I...?" section and I couldn't find a solution, probably because of how often the word "factor" is used outside of math.)

Merlandese's avatar

Merlandese

Member since 11 Mar, 2014

None one is following Merlandese yet!

Connect with Merlandese

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies