Playing multiple audio files in order

michaelRNLmichaelRNL Member Posts: 3

I have 4 audio files that I would like to play in a certain order. It is basically a sentence with each word broken out into an audio file for each word. I would like to play those audio files in order and highlight the background of the "Actor" that represents that word/audio file with the word as the "Actor". It is like the "Read to me" feature in some kids epubs on Apples iBook store. Is this at all possible in Gamesalad? I have been trying a few things but I can't get it to work.

Thanks

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I feel like this question has come up before but I don't recall the thread. It's definitely possible. Playing back audio files in order requires knowing the length of each file and building a table with those values that then gets used with a custom timer that resets after each file ends (i.e. after each duration elapses).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • michaelRNLmichaelRNL Member Posts: 3

    You can you put audio files in tables? Do you know a good Tables tutorial?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    No, you can't put audio files IN tables. You can store timing information like this:

       8
       53
       119
       26

    And then use a custom timer to play the next audio file when the number of seconds stored in the current table row has elapsed. So the algorithm would roughly look like this:

    Timer after table value at row: game.audioFileNum, column: 1
        Change game.audioFileNum to game.audioFileNum+1

    If game.audioFileNum=1
        Play sound [sound 1 name]

    If game.audioFileNum=2
    Play sound [sound 2 name]

    If game.audioFileNum=3
        Play sound [sound 3 name]

    etc.

    So sound 1 would play and then 8 seconds later sound 2 would play and then 53 seconds later sound 3 would play, etc.

    When I need a tutorial, I google gamesalad [term] and check videos. So I would start with gamesalad tables.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.