Forum rules - please read before posting.

Random Text String

I have a situation where I have a button and a label on the screen.

What I am wanting is for the player to click the button and the text sentence above will randomly display one of the set sentences I have set. I have about 30 sentences that I want it to randomly generate and display.

My question is, how do I achieve this? I'm guessing it's something to do with strings? I unfortunately have no idea but I'm presuming this can be done in AC?

Comments

  • I'm not sure if this is the best way to do this, but i have something similar. When examine an object i want different descriptions by random.

    Make an interaction/ActionList which you call by clicking the button:

    0: ActionType = Variable - check random number
    - # of possible values = 30
    - If result is 1 : skip to your dialog 01
    - if result is 2 : skip to your dialog 02

    1: Dialog PlaySpeech - After running : stop

    2. Dialog PlaySpeech - After running : stop
    ...

    This is like a switch case if you a familiar with programming.
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.