Forum rules - please read before posting.

Super Text Mesh / Adventure Creator script

I've been trying to figure out how to get Super Text Mesh and Adventure Creator to play nicely together, and I've made a script that does just that!


Essentially, it uses AC for audio, user input, etc., but lets STM handle all text-specific items, like scrolling speed, animated letters, and colors.

It does this by running AC's normal text system offscreen, while STM directly samples the dialogue being written from the Dialog manager.

I hope this helps anyone interested in using both tools. :)

Comments

  • Nice work, @jdag!  As there are quite a few such text-drawing assets out there, the principles involved would be quite transferrable.  This would be a great addition to the AC wiki, if you'd care to post it there.
  • Will do!  Thanks for the suggestion. :)
  • Hey great stuff! Kudos :)
  • Hey there! Sorry to resurrect this thread, but have a quick question about getting this awesome script to work.

    I've got it going 100% with the exception of one problem - STM cannot, of course, read from the Adventure Creator speech token system...! Accordingly, when I use the [wait] token that is supposed to pause the building of the text until the user hits a button, STM plows right through it and continues to build text on the screen past it regardless.

    Is there any way that this script can be told to honour the pauses and other instructions given by AC speech tokens, or is there a way that STM can be given an equivalent instruction, or...?

    Any help would be much appreciated! STM is a great asset, as it Text Mesh Pro, and I'm hoping that one of the two will be able to help me get this sorted...! Might be the case that neither can, tho. :|

    Thanks!


  • The AC.AdvGame.ConvertTokens function can be used by custom scripts to replace tokens in a string.
  • Hello. I am currently using the above script to implement Super Text Mesh with AC dialog.

    The issue I face is, when the dialog rolls, I wish to press the Interaction A button to Skip Speech with the "Skipping speech first displays current scrolling text" effect. But it seems the Interaction A button only affects the AC dialog system but not the STM text box. May I ask what options and code can I use to achieve the desired effect?
  • For user input made to the AC speech line to affect the STM line, you'd have to update the connection every frame.

    I didn't write the integration script, but it looks like it's caching it and only updating the connection once, with the check:

    if (speech != dialog.GetLatestSpeech())

    If you removed that check, it may update it continuously.

    Also, be aware that the latest AC release provides official Text Mesh Pro support, without the need for custom scripts.
  • edited October 2018
    I just updated AC to v1.65, but how to correctly use TextMesh Pro in the menus without extra scripts? Because it happened that I can't just drag the TextMesh Pro object into the Linked Text box of the menus right?
  • See the Manual's "Supported third-party assets" chapter.  Enabling TextMesh Pro support is a matter of entering "TextMeshProIsPresent" into your project's Scripting Define Symbols box.
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.