Alright, so since we've made a custom function and your project is expanding, you can expect to fall upon such problems. BUT, they are easy to fix. The solution is really simple.
But, to make you understand 'why' tags and UID were so important (and in fact, they're required to solve your issue there) let's intentionally bump into more problems (along with the two problems you mentioned), and then fix them one by one as I explain what we're doing. I want you to make the changes as you read this post (at least half way through) so you can follow along.
Problem 1
First, to fix the initial problem of moving layouts before the writing finishes, it is because it uses a global variable 'i' to track the position (index) of typeWrite, and it's when you change layout at (let's say) i = 10, then it resumes from 10th character. All you need to do is add this in the _global eventsheet, so every time on the start of every layout it types from the beginning:
Before continuing, do that above, try it out, make sure that works.
Problem 2
Alright, here's a new problem that you're most likely to face later. So let's face it now. I want you to place TWO (or more) Text boxes on Layout 2 for example. Ideally, you would want the first text box to finish writing, and then the next one starts. ALSO, in both, you have written different texts. But from the Function typeWriter there is no way you can tell which text box writes what. Try it out and see how the two textboxes behave.
This is where "tags" and "UID" are so important. The UID is an ID number unique for every object in C3. So you can 'pick' or refer to it from event-sheets. With the help of UIDs, you can tell which textbox you mean, rather than just saying Type ! Question is: type where?
So if you click on a text box, you can see it's UID on the left panel:
The function that I made had a place to include that UID, so that it writes exactly to that, and doesn't get confused.
Problem 3
How do I include 'On Finished' in different layouts?
Unfortunately, "On Function" events can only be used once. Yes they do get activated no where in which layout this is placed. So I highly suggest, place that 'On Finished' event in the _global layout.
The only way you can correspond to 'On Finished' on for each layout, is by knowing which textBox 'on finished' you're referring to. So you can add sub-events with UID's in one place like this:
Problem 4
What are tags then?
Optional, but very useful. As you can see above, when you have a large project and you need to change what happens after Layout 12 text finishes, it would be become so convenient that (in addition to UID's) you also label each typeWrite with your own "tag", so that you can identify them textually like this:
And lastly, you can even place the other functions of TypeWriting/SkipBB (that I had made, which are not to be changed) in the _global layout too. Will become more organised.
You can find a complete page-wise C3P here: https://drive.google.com/file/d/18nAVXIN5XEiyr2yVN4pgZESzt3dGJDPG/view?usp=sharing
Hope this clears everything.