Call of Duty 5: Sounds with Struct: Difference between revisions
Arachnofang (talk | contribs) |
Arachnofang (talk | contribs) |
||
Line 54: | Line 54: | ||
* line 2 | * line 2 | ||
=== | === Voiceovers === | ||
* '''BOLD''' | * '''BOLD''' |
Revision as of 16:45, 2 July 2010
This tutorial describe an alternative method to add Sound in a map using Radiant and a few scripts.
Playing a single sound using a script_struct
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..."); }
The next thing to check is you have these lines in your zone file, without these lines, especially the top one your sounds will not work.
rawfile,clientscripts/mp/mp_yourmapsname.csc sound,common,mp_yourmapsname,all_mp sound,generic,mp_yourmapsname,all_mp sound,voiceovers,mp_yourmapsname,all_mp sound,multiplayer,mp_yourmapsname,all_mp sound,mp_yourmapsname,mp_yourmapsname,all_mp
Custom sounds
- line 1
- line 2
Voiceovers
- BOLD
- Italic
Chapter 2
And so it goes ....