Forum rules - please read before posting.

Custom Action to change objective description-Speech Export problem!

edited June 18 in Technical Q&A

Hello everyone im writting a custom action in order to change the description of the set objectives dynamically within the action lists, currently the custom action is working as intended but i need to be able to export the new description text set in the node as the rest of dialogues, descriptions etc... are exported in order to translate, how can i do that with this new objective descriptions im creating?? Help!

This is my custom action code: https://docs.google.com/document/d/1jfz840_1u3C_ZoPXi4D4L4tF8f_tF4uMfzoVa_f371w/edit?usp=sharing

Comments

  • You would need to have your Action implement ITranslatable, which will inform AC that it should be included in the "Gather text" process, along with all the functions it needs to do so.

    First, change:

    public class ActionUpdateObjectiveDescription : Action
    

    to:

    public class ActionUpdateObjectiveDescription : Action, ITranslatable
    

    Then, create a new int variable to store the translation line's ID, with a default value of -1.

    Finally, add the interface's functions at the bottom of your script. For reference, check out ActionRename.cs, which has the same functions.

    It's worth mentioning, though, that you could alternatively set the original Description text to a text token, e.g. [var:X], to replace its contents with a Global variable that you can translate separately, avoiding the need for a custom script.

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.