1. #1

    Problems activating a sound. (solved)

    I am trying to make a sound play when an object reaches a certain distance along it's path.
    What I have tried is attach the sound event to a filter so that when the comparison value of the object reaches a point, the impulse is sent to the sound event. This didn't work.
    So I tried setting up the sound with it's own interval trigger which is enabled with a state event after the filter reaches it's equals point.
    This worked but it never activated on the first impulse, only the second (few seconds later so the sound repeats) so by the time the sound should be finished it's only just starting.

    Any ideas?
    Share this post

  2. #2

    Re: Problems activating a sound.

    Is this a car honking it's horn by any chance?

    I've hardly messed with the Editor's comparison filters, to be honest (though I understand the logic, having dabbled with ActionScript a far bit), so I can't be of much use there... sorry!

    An alternative - is there no chance of setting up an Area Trigger that is activated when your object hits it to trigger the Play Sound On event?
    Share this post

  3. #3

    Re: Problems activating a sound.

    I thought objects moved with the object position event can't activate triggers. Maybe I just overlooked it.
    It still doesn't explain why why I can't get this to work. Sounds activate if you use area trigger of hit trigger, but trying to pass an impulse from a filter to activate it just won't happen.
    I figured out the animation thing yesterday, but I've been trying to fix this all day and it's got me truly stumped. Is it a bug?

    Edit: It is for a creaking noise, not a car horn
    Share this post

  4. #4

    Re: Problems activating a sound.

    Oh, good question... I've easily had objects with Physics enabled activate an Area Trigger, but I've not tried it for an object being moved with an Object Position Event.
    In theory it should work... other than breakable items becoming breakable/explosive, I can't think of any other special properties an object gains when Physics are enabled. All these objects still have a collision box, so why would a Physics-disabled object be unable to trigger an Area Trigger? Huh... something to test.

    I'll give this a test when I get home if you've yet to try and posted results yourself, and I'll also have a dabble with the comparison filters to see if I have any success.

    Man, I wish I had more time to play with the Editor... stupid work!
    Share this post

  5. #5

    Re: Problems activating a sound.

    Worked it out again.
    My rig was fine but I needed to use an impulse clamp to only send a single impulse with a splitter which went to the sound and to a delay to trigger the sound again after a few seconds and then it worked.

    Man I love figuring this stuff out!
    Share this post

  6. #6

    Re: Problems activating a sound. (solved)

    Nice

    I had a mess with getting an object being moved with Object Position to trigger an Area Trigger, but it didn't work... until I enabled Physics, then it worked fine and the object still moved on it's normal path. It'll even still pass through scenery and other objects.

    However, it becomes quite unstable for the player when colliding with it, so I don't recommend it unless you're just doing something for looks. Still, I think you're way is better and more efficient
    Share this post

  7. #7

    Re: Problems activating a sound. (solved)

    Object position is so much better than using physics when it comes to bits of the track moving.
    It's perfectly consistent and tweakable. I can see me rarely using physics unless it's for a falling object that needs to tumble.
    Share this post