Hello, this might be a bit of an edge case, but basically I have Dialogue - Play Speech actions within external action lists that use string variable as parameters for their Line Texts. The issue is that while text typed within this field can be gathered with other Speech texts at the bottom of the Speech Manager and have an audio file path assigned, variables don't have that audio path.
For the moment I can totally make do with that and just use the Sound - Play One Shot action to play audio clips (which can be Unity Object parameters), but I wanted to ask if this feature request could be accepted in the future, and if there were any pieces of advice to achieve that myself in a convenient way ? Thanks.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Speech audio/lipsync data etc has to be associated with a speech line. You can't use a String parameter, because its usage isn't strictly limited to speech text.
What you can do, however, is create an ActionList that basically has all your speech lines in one. This list wouldn't be run directly, but it would be included in the "Gather text" process so that each line can be given audio etc.
Instead of a String parameter, you can then switch to an Integer that represents the intended line's ID number. Using this Action on the wiki, you can then rely on that ID to play the associated speech:
https://adventure-creator.fandom.com/wiki/Playing_speech_from_ID
Hi, thank you so much for this answer ! I just have to disagree with how the ActionSpeechID sets the runtimeSpeaker to null and instead either gets the player or uses GetCharacterWithName - this only works if we've got one specific character with a unique name, not if we have duplicates of the same character, like a generic enemy for example.
Here's how I fixed it by commenting some stuff out in Assign Values and pasting in some stuff from the original ActionSpeech :
I also pasted that into ShowGUI :
I hope this change can be applied to the script on the wiki, I do think it would be justified.
In any case, thanks again as I was able to make it work with your direction ! I also thought it was about time I wrote a well deserved 5 star review on the UAS
https://assetstore.unity.com/packages/tools/game-toolkits/adventure-creator-11896#reviews
Very much appreciated, thank you.
Re the script: for the widest range of uses, a hybrid is probably best - where you can optionally assign a character, but otherwise it relies on the original name. I'll take a look, thanks for the feedback.
Done. You can now either rely on the original speaker by name, or assign an optional override.