Forum Overview
::
Gamerasutra
::
random sounds
[quote name="Ice Cream Jonsey"][quote name="Fussbett"][quote]You can assign multiple sounds to be picked randomly to in-game actions like in Road Girls if you're overloaded anyway.[/quote] Fuck, do you happen to have the script for that handy?[/quote] I *think* it might be something along the lines of this, adapted from Road Girls: <b>' I think the apostrophe means comments. I will also bold these comments.</b> <b>' seed the randomiser (rnd(1) function) ... I guess you do this at the beginning of the code</b> Randomize <b>' I think this means randomize between one and two, but maybe it is 0, 1 and 2? </b> randomFagVariable = int (rnd*2) <b>' Start the if statement</b> If randomFagVariable = 0 then <b>' play a sound</b> PlaySound "fx_buzzer" Else PlaySound "fx_buzzer2" <b>'End of the If block</b> End If ... OK, I'm back. Let me know if I can expand on this or whatnot. ICJ[/quote]