How to I get Positional Sound on, 50/100 Objects

0 favourites
  • 10 posts
From the Asset Store
100 high-quality cars / boats. This asset is perfect for a top-down game.
  • Hello my name is klaus, and I'm doing a simulation inside construct 2. I want to hear, if you can help me. (─‿─)

    #1──────────────────────

    So, I have about 100 objects, they moving around in the own sufficient AI, and I want to hear if, they all can have positional audio. And they are making different kinds of sounds, each.

    #2 ────────────────────────

    I'm also trying. If we say a target gets hit, or it's firing a bullet. I wanted to make different kinds of sounds, so it's just not repeats it's one audio.

    ────────────────────────

    Those are the two things I want to hear is possible, and what is the solution for it.

    And it will be wary very nice of you if you can make it in construct2, and post a link of the file.

    Most of the time when I'm reading questions or audit topics inside the forms, I don't really understand 100%. But every time they have a link to their simulation of it I understand it perfectly. that's just how I work, we all special.

    Anyway have a nice, and creative day (◠‿‿◠)

  • I think I know just a logic answer for your 2nd question..

    There is nothing that can stop us from naming files like this:

    fire1.wav, fire2.wav, fire3.wav etc. (for example, the last one will be 10th)

    For now all we need is to play them randomly. File name to play is: "fire" & random(10)+1 & ".wav"

  • That's awesome but, it doesn't work and my end. When I have put the text in and the name it doesn't work, Plus when I load in mice sound files it says ogg? m4a? Not wav, My files is wav. But when I put it in, in changed it. That a problem, or am I doing something incorrect NickRimer

    Oh and I try to change it in many different ways, The text but nothing happened

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ... when I load in mice sound files it says ogg? m4a?

    Not wav, My files is wav.

    But when I put it in, in changed it. That a problem, or am I doing something incorrect NickRimer

    "Browser makers have not been able to agree on a common audio format for the web. Internet Explorer and Safari use the proprietary MPEG-4 AAC (.m4a) format, and all other browsers (Firefox, Chrome and Opera) support the free Ogg Vorbis format."

    https://www.scirra.com/manual/52/import-audio

  • That's awesome but, it doesn't work and my end. When I have put the text in and the name it doesn't work, Plus when I load in mice sound files it says ogg? m4a? Not wav, My files is wav. But when I put it in, in changed it. That a problem, or am I doing something incorrect NickRimer

    Oh and I try to change it in many different ways, The text but nothing happened

    If memory serves using random() will give you decimal values as well try int(random(10)).

  • So they haven't decided, him... but it's still not working. Can some of you or someone else make a variation, that works and let me see it.

    I'm programming something else right now, but when I'm finished with that, then I need to fiddle with the audio again.

    By the way if you have 100 objects making a sound, is it normal it sounds like static.

    Or am I asking for too much

  • [quote:1gr24oyz]If memory serves using random() will give you decimal values as well try int(random(10)).

    of course I forget about this float form of javascript random.

    but it will be more correct to use this function: floor(random(a))

    it really works as I said higher

  • [quote:2tj9jkzq]If memory serves using random() will give you decimal values as well try int(random(10)).

    of course I forget about this float form of javascript random.

    but it will be more correct to use this function: floor(random(a))

    it really works as I said higher

    Interesting I didn't know you can do that, the sound still doesn't work, but now I have A Nother question, now we talking about random.

    Is there a way if we say, we have a cube that is driving around, and then suddenly died. Upon his death it's bonds random objects A few seconds around it. That will damage other cubes.

    So the question is if you type: floor(random(500))

    Can you add something, to that, so it's bonds randomly at a specific object.

    Or is there another way to do it.

  • floor(random(500)) will just return integer numbers from 0 to 499 (0, 1, 2, ..., 498, 499).. I can't understand what are you asking for, sorry..

  • Well scratch that, then that was maybe a little bit more specific. Let's Simplified it.

    Let's say if a enemy moves around. Then a object, much bigger than the enemy object, moves along at that enemy. With in that object Will spawn Random objects, the objects with deal damage to the player. If he's with in.

    The problem here for me is. How do you get something randomly spawning, inside that object

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