Forum rules - please read before posting.

ITranslatable questions

edited June 24 in Technical Q&A

I'm trying to integrate custom translations for my scripts using ITranslatable, and everything is mostly working, except that I can't assign the right owner to every line.

There are 2 functions used for that: GetOwner and OwnerIsPlayer. Unfortunately, they don't receive an index like the rest of the functions do, so I can only assign the same character to all the lines in my translatable, which is sadly not enough.

Is this an oversight, or am I missing something?

Thanks in advance.

Comments

  • The owner is assumed to be the same for all lines found in the iTranslatable instance. For separate characters, you would curretly need separate instances.

    What's the context here?

  • I'm replacing some ActionLists with scripts. My script has a scripted conversation, and every line is for a different character, which works except for what I mentioned before.

  • I would say it's fair to consider providing an index property for these functions, but because of the upgrades involved for those with existing implementations, it likely wouldn't be part of a minor update.

    However, you could be a little bit sneaky with your existing code - because GetOwner and OwnerIsPlayer are only both called immediately after HasExistingTranslation, which does include the index. Therefore, you could record the last-called index in this function, and use it in your implementations of the others.

  • Yeah, I understand there might be compatibility breaking problems to think about, but thanks for considering it. Again, maybe adding a parameter with a default value might help, which will be a binary breaking change but no source changes involved...

    In any case, I'll use that little hack you mention in the meantime, and I'll keep a look on future versions to see if you've been able to add said parameters.

    Thanks again, very helpful as usual!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.