MODSon[line.com] Wiki - Beta 1.0

World at War: MP Sound Effects

From MODSonline Wiki

Jump to: navigation, search

Contents

[edit] Playing Sounds From a single Location

(THIS IS DEPENDANT ON ACTUALLY HAVING THE SOUNDS EXTRACTED FROM THE FAST FILES)

Example:

Creating a looping fire sound. (useful for barrel fires etc)

[edit] Radiant

We use script_stuct to define where our sound plays:

script_sound small_02
script_looping 1
script_label looper
targetname looper_loop
classname script_struct

(small_02 is the name of the sound that we are calling from our sound alias, use whatever sound you are using)

[edit] Soundalias

raw/soundaliases/mp_yourmapname.csv

name,platform,file,sequence,vol_min,vol_max,dist_min,dist_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,volume_min_falloff_curve,volumefalloffcurve,reverb_send,dist_reverb_max,reverb_min_falloff_curve,reverb_falloff_curve,pitch_min,pitch_max,randomize_type,spatialized,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,chainaliasname,startdelay,speakermap,lfe percentage,center percentage,envelop_min,envelop_max,envelop percentage,occlusion_level,occlusion_wet_dry,real_delay,distance_lpf,move_type,move_time,min_priority,max_priority,min_priority_threshold,max_priority_threshold,,isbig
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
# Ambient,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
small_02,,SFX\Destruction\fires\small\small_02.wav,,1,1,50,500,,,,,ambience,,curve2,,,,,1,1,,3d,,,looping,,,,,,,,,,,,,,,,,,,,5,10,0.15,0.85,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,

This is the line that we add to our soundalias to define the sounds name and location of the sound file.

[edit] ClientSide Audio Activiation

This is what turns audio on in your level for each player, the below script goes in:

'codwaw/raw/clientscripts/mp'

Image:Note.pngNote: Some lines are commented out encase the user does not have said file

mp_yourmapname.csc:

// Test clientside script for mp_yourmapname

#include clientscripts\mp\_utility;

main()
{
	// If the team nationalites change in this level's gsc file,
	// you must update the team nationality here!
	level.allies_team = "russian";
	level.axis_team   = "german";


	clientscripts\mp\_load::main();

	//clientscripts\mp\mp_yourmapname_fx::main();

	//thread clientscripts\mp\_fx::fx_init(0);
	
	thread clientscripts\mp\_audio::audio_init(0);

	//thread clientscripts\mp\mp_yourmapname_amb::main();

	// This needs to be called after all systems have been registered.
	thread waitforclient(0);

	println("*** Client : mp_yourmapname running...");
}

[edit] Zone Source

In yourmapname.csv include:

sound,mp_yourmapname,mp_yourmapname,all_mp rawfile,clientscripts/mp/mp_yourmapname.csc rawfile,clientscripts/mp/mp_yourmapname_amb.csc

Personal tools