0 Favourites

How do I stop a sound

  • Every time I start my game a sound that I don't want to play goes off just once!

    The sound is the gun sound for the enemy. It also goes off when it supposed to.

    Any ideas anyone.

    Cheers

    Matthew

  • Does the enemy fire automatically during the game? Ie. is he scripted to begin shooting as soon as he is created?

    If so your problem is that the off-screen instance of the object is doing like its told to, game starts, I got to fire... pew,pew,pew...

    My off-screen explosion orbs were doing this in my space shooter (in my sig) since they are timed to explode after creation so they drift a little first. I used an audio tag on them called orb and then made a variable called canExplode, set it to 0 by default and then 1 after waves are >1 (my waves are currently 7 seconds).. they still explode but by then the enemies are on you and you never notice. Its all about what works for you. I still have a shot at start I have to hunt down, but I will get him next update when I add music volume slider..

    Your only other option I know of would be to trigger their start after game starts instead of making them active at start.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Make the sound play at the enemy position And on start of layout Set the listener to the player And change the Roll of factor value for the Audio plugin options.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,729
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
80 10,056
jonathanbencomo's avatar
jonathanbencomo