View previous topic :: View next topic |
Author |
Message |
SooperK
Junior Member


Joined: 10 Nov 2014 Posts: 52 Location: Jennewa, Airdenor 114 Bank Notes
Items
|
|
Trying to insert a sound file upon dying in freeride day using a wav. file. Any known way to do this in bscript? |
|
Back to top |
|
 |
mammix
Junior Member


Joined: 20 Sep 2014 Posts: 97 Location: Lublin, Poland 3526 Bank Notes
Items
|
|
14940032 and 14940033
I think these are the sounds Tommy makes when he dies. Replace them with your sounds in wav. |
|
Back to top |
|
 |
SooperK
Junior Member


Joined: 10 Nov 2014 Posts: 52 Location: Jennewa, Airdenor 114 Bank Notes
Items
|
|
I tried this last night:
Under EnergyMeter in bscript, I used this script below:
dim_act 1
dim_flt 1
findactor 0, "Tommy"
label 101
human_getproperty 0,0,Energy
if flt[0] = 0, -1,101
citymusic_off
stream_create 0, "sounds\music\fate.ogg"
stream_play 0
wait 10000
endofmission 0, 00980004
end
This is the end of the mission which in this case turns off the city music, and begins to play the music from Frank's funeral. (I decided to just go with the music .ogg files in the sounds folder). I searched through SomebodYs Improved Script reference and found the "stream_create". The ID, (in this case "0"), from my understanding must match the value in flt[]. The stream_create 0, locates the .ogg file to be played, and stream_play 0, indicates that the above file should be played unto its end. Whether or not the music laps, I do not know. |
|
Back to top |
|
 |
mammix
Junior Member


Joined: 20 Sep 2014 Posts: 97 Location: Lublin, Poland 3526 Bank Notes
Items
|
|
It looks fine. Does it work? |
|
Back to top |
|
 |
SooperK
Junior Member


Joined: 10 Nov 2014 Posts: 52 Location: Jennewa, Airdenor 114 Bank Notes
Items
|
|
Yes, this is tested and does work! Just wondering if it will work with any type of sound file like mp3 or wav and not just ogg. I'll test both of these and post back |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 793 Location: London, England 12026 Bank Notes
Items
|
|
Back to top |
|
 |
|
|