Comrades in Arms Discussion Board

Full Version: random music
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i was thinking about something like:

i put [for example] 2 songs into a mission and i want one of them to start at the beginning of each gameplay like a kind of intro song. the main point is that i want the mission to randomly select which one to play, so maybe at the briefing screen players can have bettings whether we'll hear some DUMDUMDUMDUM or something by pavarotti ;D [that's not my goal to make gambling out of ofp of course], so random music.

any idea?
Check out the RandomSelect function at Daddl's site, demo mission included:

http://daddldiddl.de/dl_scripts.html
i had an idea this morning

[Image: random.th.png]

i use the dummy's placement radius to either place him in the left or the right trigger, that starts different music. cheap idea but working  ;D

thanks anyway Lenin Smile
Excellent. I see you unleashed your creativity there. I like it  ;D
The "official method" to select random from an array is like this:
_myArr select ((random count _myArr)-0.5)


So for example to play music:
playMusic (["Track1", "Track2", "Track3"] select ((random 3)-0.5))


Using a randomly placed unit is okay for MP though, because it will be synced automatically. No need to publicVariable it to have same song on each client.

Chris Johnson

(05-23-2009, 11:38 PM)Ferenczi link Wrote:i was thinking about something like:

i put [for example] 2 songs into a mission and i want one of them to start at the beginning of each gameplay like a kind of intro song. the main point is that i want the mission to randomly select which one to play, so maybe at the briefing screen players can have bettings whether we'll hear some DUMDUMDUMDUM or something by pavarotti ;D [that's not my goal to make gambling out of ofp of course], so random music.

any idea?
Let me guess - You are going to put HEADUNTERZ there?  ;D
exactly

Chris Johnson

I read you like a book  Wink - well actually it's not that hard to guess, the only thing you say when I ask you about music is: "HEADHUNTERZZZZZZ"  Big Grin
that some new units in OFP?

Make

I hope you dont really stole L4D's hunter in OFP, it would be painfully  ;D

Chris Johnson

(06-07-2009, 05:55 AM)Overlord link Wrote:that some new units in OFP?
Actually Overlod that is Ferenczi's favorite muisic group - Headhunterz - - here you go, "enjoy"
it's not a music group it's just one guy
[Image: headhunterz.jpg]
the other quit a long-long time ago, but this guy kept the original name of the formation but blalal you don't care anyway  ;D

ps.: that's some fucked up version in the video :-\

Make

Oh noes is that some kind of rap  :'(

Chris Johnson

It's not Rap, it's House and I don't like it >Sad
it's not house this is http://en.wikipedia.org/wiki/Hardstyle,
i'm the one who hates house, hungarian clubs only play that, nooo.. :'(
Pages: 1 2