pepperman35 Posted April 15, 2020 Share Posted April 15, 2020 When playing audio files from a script does one use the wav or xma file type? Also, can you play fuz files directly from a script, without having to extract the sound component? For example, I am using the V111RadScanner01 in a script, and I would like the play certain sounds depending on a conditional test (i.e., does the player have radiation). For example, play 0002a07f_1.fuz if there is no contamination, or play 0002a080_1.fuz if there is contamination present. 0002a07f_1.fuz = No Contamination Detected. Please exit the Clean Room. 0002a080_1.fuz = Contamination Detected. Initiating Decontamination Sequence. function fireTriggerEvent(); Take action when target enters/leaves triggerif (bTargetInTrigger == true) ; Activate Rad Scanner 01 Self.GetLinkedRef(LinkCustom01).PlayAnimation("PlayAnimation") ; Activate Rad Scanner 02 Self.GetLinkedRef(LinkCustom02).PlayAnimation("PlayAnimation") ; Check to see if the player is radiated or not int RadsToHeal = (game.GetPlayer().GetValue(pRads) as int) if (RadsToHeal > 0) pContaminated.play(0002a080_1) else pNoContamination.play(0002a07f_1) endifelseendifendFunction Link to comment Share on other sites More sharing options...
thousande Posted April 15, 2020 Share Posted April 15, 2020 You can use both. In short, wav does not compress the sound and should in theory output better sound quality. xma compresses the sound which makes the file size smaller at the cost of sound quality.There is no correct answer, I guess. Every sound has it's own thing.Usually xma is used, but if the sound quality gets too bad you may go with wav etc. As far as I know, only SoundDescriptor object(s) can be used from vanilla papyrus scripts. You could extract the sound, convert it to xma/wav and set up a sound descriptor.I think the conditional can be set up in the descriptor too, so you have one descriptor pointing to two sound files configured with condition in the descriptor and let the descriptor do the if/flow/control, but as long as there are only two sounds I think it is nice as it is. Link to comment Share on other sites More sharing options...
pepperman35 Posted April 15, 2020 Author Share Posted April 15, 2020 Thanks for the response. Looks like for the time being I'll go with the wav files; maybe swap them out for xma's when the mod gets closer to being completed. Link to comment Share on other sites More sharing options...
thousande Posted April 16, 2020 Share Posted April 16, 2020 Probably the way to go with a couple of sound files else you could try create a 'build - release' script/something that automates the steps. Link to comment Share on other sites More sharing options...
Recommended Posts