Call of Duty 5: Sounds with Struct

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

This tutorial describe an alternative method to add Sound in a map using Radiant and a few scripts.

Chapter 1

The way I'm going to show you how to use script_structs is basically the same way they did it in mp_castle. Its actually very easy and straight forward, we are going to start by adding one sound to your map then we will move on to adding several sounds.

Make sure you replace any reference to mp_yourmapsname with the name of your map.

The very first thing we need to do, is to make sure that you have a mp_yourmapsname.csc in raw/clientscripts/mp, if you do not have one then you need to create one, once you have created one copy and paste these lines into it, you may need to change the team nationalities as well.

 #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 = "marines";
	level.axis_team   = "german";

	// _load!
	clientscripts\mp\_load::main();

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

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

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

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

	println("*** Client : mp_yourmapsname running...");

} 

Sub Chapter 1

  • line 1
  • line 2

Sub Chapter 2

  • BOLD
  • Italic

Chapter 2

And so it goes ....