How do I grab a word from a string?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
A grab of sounds and loops crafted with the Producer in mind.
  • Okay so basically I'm trying to make it so whenever a "[pause]" is found within a string it'll activate a timer to pause the typewriter. I've already been able to achieve this using periods and commas within the Animated Text addon... But I'm not exactly sure how to pull it off for phrases or words.

    This is what I've been able to do so far, not sure where to go from here.

    I should also mention while I'm at it that there was a separate issue I ran into where the timer wouldn't work with delta time for some reason...? Also when there were multiple periods next to each other it wouldn't pause for all of them.

  • It's difficult to pause the typewriter at exactly the right moment. As far as I know, there's no reliable way to detect the current typewriter position. And no way to tell it to skip parts of the text (the pause tag).

    You can split the text into multiple sub-strings, and type each sub-string separately. But there is another problem - the built-in typewriter clears the text if restarted..

    I would make my own typewriter, here is an example:

    dropbox.com/scl/fi/zf1tmjxl5deo6srrl4i3o/BBCode_Typewriter2.c3p

    I'd also suggest not using square brackets for tags, because Construct can mistake them for BBCode. I often use ^ symbol for breaks in the text.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, I see. Though I am confused, how did you hide the carrot in the text? When I try to do the same thing it shows up anyway, so I'm probably misreading the code or there's some expression I just don't understand yet. Either way, thanks.

  • Characters are appended to the text one by one, but I'm skipping * and ^

  • ahh... I see thank you!

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)