How do I loop audio n times?

0 favourites
  • 6 posts
From the Asset Store
For Adventure, Action, Heroes, Sci-fi and Action-RPG games.
  • Hi, I have 2 buttons which adds or subtracts value in variable.

    How can I play audio loop based on the var number.

    Like -

    On tap play button :

    play audio "tag" looping (var)number of times.

    Tagged:

  • 1. Remove Loop from the audio.

    2. Have two integer variables: "CurrentLoop" (static) & "MaxLoops" (also static)

    3. On Audio "tag" ended & "CurrentLoop" is less than "MaxLoops" - play again and add 1 to "CurrentLoop"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow XpMonster, that was quick! Thank you so much, that did the trick!

    1 more question, I struggle with math in consturct 3 can you suggest a good place to start learning it.

    I have no coding background.

  • My coding background is small.

    I hated math before Construct. Then I started coming up with my own formulas and figuring out what other developers used in their games. Helps me a lot!

    For most of the stuff in coding you don't really need any serious math.

    Get familiar with system math expression in Construct tho. Most importantly: abs, round, floor, ceil, lerp, unlerp, sin, cos, ln, log10, infinity, max, min, angle, anglediff, anglelerp, anglerotate, distance, exp

    That's something I find myself using all the time.

  • Thanks for the advice, much appreciated. Stay safe.

  • No problem. You too!

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