How do I compare play sound with globalnumber

  • can i compare play sound with global number???

    example:

    Global number name = "Move"

    Global number move = 0

    if

    move = 1 play sound Awesome not looping at volume 0 db (tag""))

    move = 2 play sound Cute not looping at volume 0 db (tag""))

    any suggestion to me?? its error with my logic..

    sorry for bad english

  • You play it every tick? Thats real fast... Your sound has a length smaller than 16ms?

    I think you need something like:

    if move = 1 and not playing currently - play

    if move = 2 and not playing currently - play other

    if move = 0 and currently playing - stop

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You play it every tick? Thats real fast... Your sound has a length smaller than 16ms?

    I think you need something like:

    if move = 1 and not playing currently - play

    if move = 2 and not playing currently - play other

    if move = 0 and currently playing - stop

    i use global number to move sprite set position to x,y. I made a button to add the global number +1 if tapped and every global number play different sound.. any solution??

    btw thanks for reply

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