Forum rules - please read before posting.

Request: Support for alternative text strings in dialogues

Hi

I think this was raised elsewhere but can't find it now. I'd like to see support for something like using || (double pipe) characters in dialogues to indicate text strings that can be used at random.

For example

Currently I have a dialogue where the player says hello to a dog. Each time you click the dog, the player says hello. Get's boring after a while but you need to try different things with the dog. What would be nice is if the player could say "Hi" or "Hello" or "Woof?!". I can do that but it seems that I would need to link that to a variable.

If I could use || then I could enter "Hi||Woof||Hello||Easy boy||What's your name?" and then AC would pick one at random (or go in a sequence). It would make variability more fluid.

Olly

Comments

  • Such behaviour wouldn't be compatible with other features of the speech system such as audio. However, it is possible with a custom script.

    I've added such a script to the AC wiki - you can find it here:
    https://adventure-creator.fandom.com/wiki/Random_dialogue

  • Thanks.

    What about a action node called something like ActionList:Random that allows you just to create a number of connections, and a connection will be chosen at random. That way I could have Random as the start, with three connections, each one goes to a Play Dialogue with a variation of "Hello", "Hi", "Yo!", and each can play the correct audio, before coming back to the main flow of the actionlist.

    Would that work? Could that be added?

    Olly

  • edited June 2023

    There is - it's named "Variable: Check random number".

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.