We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Reset Sound whenever conditions are met?

Home Forums Puzzles Reset Sound whenever conditions are met?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #80586
    c4cc
    Participant

    I wanna activate sound effects each time a non-playable object comes into effect with a player. Yet sounds can only replay when it finishes. How can I restart sound effects each time player comes into contact with non playable objects?

    Think of video games where sound effects plays whenever items are picked up, notice if two or more of the same items are picked up, the latest item pickup will restart the sound effect in question

    main part of puzzle her:

    View post on imgur.com

    app
    https://drive.google.com/file/d/17rN615AO70eipMGFgFxIKzgyeuHk5HcX/view?usp=sharing

    • This topic was modified 22 hours, 26 minutes ago by c4cc.
    • This topic was modified 22 hours, 24 minutes ago by c4cc.
    #80594

    Just copy the sound three or four times (for example sound_1.wav, sound_2.wav) and then play them randomly with checking if the current sound is playing or not. You can find a working axample of this in Snowball_VR demo.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead graphics specialist at Soft8Soft.

    #80600
    c4cc
    Participant

    Thanks, I tried it but sadly sound did not restart while playing when player came into contact with other items. sounds only restarted when it finished.

    ntaak

    • This reply was modified 12 hours, 14 minutes ago by c4cc.
    • This reply was modified 11 hours, 59 minutes ago by c4cc.
    • This reply was modified 11 hours, 57 minutes ago by c4cc.
    #80604
    kdv
    Participant

    stop sound;
    play sound;

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #80605
    c4cc
    Participant

    Tried it, still doesn’t work.

    View post on imgur.com

    • This reply was modified 4 hours, 52 minutes ago by c4cc.
    Attachments:
    You must be logged in to view attached files.
    #80608
    kdv
    Participant

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #80610
    c4cc
    Participant

    This works kdv, thanks. Need to run a couple more tests though to be safe.

    :good:

    • This reply was modified 2 hours, 15 minutes ago by c4cc.
    #80611
    kdv
    Participant

    This works

    really? no sadly and no mistakes? it’s magic :yahoo:

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.