TheManGoesWild Posted May 14, 2016 Report Share Posted May 14, 2016 Hello, Could anyone help me with a simple script that just plays a sound file when pressed? want to use it to play an alarm tone at one of the fire stations when I press it Quote Link to comment Share on other sites More sharing options...
Wkboy714 Posted May 15, 2016 Report Share Posted May 15, 2016 You could just use the siren script, I can't see why it wouldn't work for objects if you manually turn it off/on. Quote Link to comment Share on other sites More sharing options...
bma Posted May 15, 2016 Report Share Posted May 15, 2016 It is actually really simple to do. either you can use the int PlaySample(const char *File_); or the int PlaySample3D(const char *File_, const Vector &Pos_, bool looping_ = false); The first one is the super simple, it just plays the sound on the entire map. The seconds only plays it in a specific area(Usally on an object) Quote Link to comment Share on other sites More sharing options...
TheManGoesWild Posted May 17, 2016 Author Report Share Posted May 17, 2016 Thanks guys for your help, I got it Quote Link to comment Share on other sites More sharing options...