Jump to content

play a sound from the sfx


Swoorup

Recommended Posts

How would I be able to play the sound from the sfx.raw? I have referenced the original main.scm but I could not figure out how they are loaded. Simply I just found numbers!

Play sund ...

Link to comment
Share on other sites

i don't know about SFX,

but .wav file in audio folder can be played like this,

 

 

/////// Start ///////////:003CF: load_wav 'Name' as 1       // name of audio file without extension, & integer for reference:1wait 0if03D0:   wav 1 loadedjf @103D1: play_wav 1:2wait 0if03D2:   wav 1 endedjf @2040D: unload_wav 1/////// END ///////////

 

Link to comment
Share on other sites

Well actually I need to play the countdown sound.

The one that is used in race 3...

2...

1..

go

 

and

the one you'd hear when you need to do something but you'd have less than 10 sec.

Any idea abt this?

Link to comment
Share on other sites

The "321 countdown" sounds are id 7, 8, 9 and 10. The "low time remaining" sound might not have it's own sound id number.

 

Snipped from original VC mission "The Driver"

00BA: text_styled 'RACE2' 1500 ms 4  // ~g~3018C: play_sound 7 at 0.0 0.0 0.0 0001: wait 1500 ms 0395: clear_area 0 at 481.704 -155.509 range 10.9 1.0 015F: set_camera_position 481.704 -155.509 10.9 0.0 0.0 0.0 0160: point_camera 481.675 -154.522 10.741 2 00BA: text_styled 'RACE3' 1500 ms 4  // ~g~2018C: play_sound 8 at 0.0 0.0 0.0 0001: wait 1500 ms 0395: clear_area 0 at 487.907 -148.861 range 11.167 1.0 015F: set_camera_position 487.907 -148.861 11.167 0.0 0.0 0.0 0160: point_camera 486.924 -148.899 10.98 2 00BA: text_styled 'RACE4' 1500 ms 4  // ~g~1018C: play_sound 9 at 0.0 0.0 0.0 0001: wait 1500 ms 0373: set_camera_directly_behind_player 02EB: restore_camera_with_jumpcut 022F: set_actor $PLAYER_ACTOR stop_looking 00D6: if 8118:   not actor $4005 dead 004D: jump_if_false @BANKJO3_4220 022F: set_actor $4005 stop_looking 0002: jump @BANKJO3_4242 :BANKJO3_422000BC: text_highpriority 'BJM3_2' 5000 ms 1  // ~r~Hilary is dead!0002: jump @BANKJO3_7380 :BANKJO3_424200BA: text_styled 'RACE5' 800 ms 4  // ~g~GO!018C: play_sound 10 at 0.0 0.0 0.0 

 

Link to comment
Share on other sites

Yeah I was going through them but I couldn't find how they are loaded. Yonks!!!

 

Just noticed now:

Play_sound and play_wav are different opcodes biggrin.gif

 

There are around 9941 soundbanks in the sfx itself. Any ideas about finding ID's of each of them?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.