Play sound issue when actors collide

Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

Hi guys,
I've been stuck on this for hours now.

I have a game where you speed a car up to cross an intersection safely, and if it crashes into other cars, I want a sound to play. (A crash sound)

Here's the trouble. I have used the following rules:

(Inside the main car actor)
'Actor receives event: overlaps or collides with, actor with tag, All other cars (which are all the other actors moving around)
Play sound: Crash sound'

But no matter what I try, the crash sound simply will not play.

However, if I put a stationary actor, lets call it, "Brick wall" in front of the main actor and use the exact same rules, the sound plays no problem. Its like when my main actor collides with the other cars, they aren't actually colliding...but they have to be seeing as I have a rule that turns their pictures into fiery explosions and brings up the game over screen, and that all works perfectly. The ONLY thing that wont work is the sound.

Any ideas at all?
Thanks for your time.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    The cars are probably only colliding very very briefly at the monent of impact, so they only overlap for a tiny fraction of a second and are then instantly back to not overlapping, so your sound only plays for a tiny fraction of a second, not long enough to even hear, especially if the sound has a slight attack on it (even just a few samples), if this is the case and you've not already checked 'run to completion' then try switching that on.

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    That is a good point @Socks , unfortunately I have tried it with and without 'run to completion'. Nothing seems to work.

  • SocksSocks London, UK.Member Posts: 12,822

    Then try making an attribute that changes when the collision happens, then have rule that plays the sound when the attribute changes.

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    Ok cool. Would a Boolean be best to use in this situation?

  • SocksSocks London, UK.Member Posts: 12,822

    Yes.

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    Hey @Socks ,
    So I've tried with the Boolean attribute a bunch of different ways, but I think I must be setting it up wrong.
    If you have a moment, could you please show me how you'd set it up? This is really getting me!
    Thanks

  • SocksSocks London, UK.Member Posts: 12,822

    @Chr0nos said:
    could you please show me how you'd set it up?

    I would simply have:

    When actor A collides with actor B then play sound ('run to completion')

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    No luck @Socks

  • AJaymzAJaymz Member, PRO Posts: 164

    @Chr0nos try it with a different sound effect that you know works. Just to see if something is wrong with the sound you want.

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    Tried that too Ajaymz. Its so strange.
    I just cant get this particular scenario working.

Sign In or Register to comment.