How do I read a sprite sequence?

  • Hi,

    I would like make a game which displays 3 sprites.

    Each sprite has four frames.

    The first frame (0) is blank and frames 1, 2 and 3 display the colour yellow, green and blue at random.

    I also have audio files, each one second long, which say the colour name.

    The included capx has all of the above already setup.

    --------------------------------------------

    What I would like to achieve is:

    How do I play the sounds of all 3 four sprites in sequence (in a row) when the PLAY button is pressed?

    I don't want the audio to play when the sprites are touched.

    That's it.

    Thanks for any advise, tutorial link or suggestions,

    V

  • First you should insert the audio object plugin

    This plugin has a condition on audio ended..

    So on button clicked

    subevent

    system compare two values

    col1.animationframe = 1

    • audio play sound with tag "col1"

    Audio on "col1" ended

    bladibla etcetera etcetera..

    You should make sure player input is suspended during the playback of the sounds so no unexpected things happen..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • LittleStain

    thank you so much. I will try this tonight.

    Sorry about the sound object (i forgot).

    You last comment, about suspending player input during sound is brilliant! I didn't know that I can have the app and myself play audio at the same time.

    THIS opens up a whole new door to accompaniments and two-voice harmony and and and ...

    I am so excited and can't wait to mess with what you have suggested.

    Ciao for now,

    V

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)