Call of Duty 4: Retrieval

From COD Modding & Mapping Wiki
Revision as of 09:14, 27 August 2009 by CoDEmanX (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

by Tally

This tutorial will explain how to add Retrieval gametype to a map you are creating yourself.
  • Firstly, please see this tutorial on how to get the models in the right postions, etc HERE
  • Secondly, you need to transfer the coordinates from your positioning test to the actual code used by the gametype.

In this example, Im using a made-up map called “mp_tally”. Just copy this code to your level GSC:

main()
{
	
	if(getDvar("g_gametype") == "re")
	{
		level.objective_vcr = [];
		level.objective_vcr[0] = spawn("script_model", (1565, 454, 262));
		level.objective_vcr[0].angles = (0, 0, 0);
		level.objective_vcr[1] = spawn("script_model", (426, 489, 198));
		level.objective_vcr[1].angles = (0, -90, 0);
		level.objective_vcr[2] = spawn("script_model", (-1272, -99, 258));
		level.objective_vcr[2].angles = (0, 0, 0);
	
		level.objective_vcrcase = [];
		level.objective_vcrcase[0] = spawn("script_model", (806, -1259, 105));
		level.objective_vcrcase[0].angles = (0, 180, 0);
		level.objective_vcrcase[1] = spawn("script_model", (513, -360, 124));
		level.objective_vcrcase[1].angles = (0, 0, 0);
		level.objective_vcrcase[2] = spawn("script_model", (962, 1415, 106));
		level.objective_vcrcase[2].angles = (0, 90, 0);
		
		addobj_base("objective_base", (-473, 1975, 64), (0, 0, 0));
	}
}

addobj_base(name, origin, angles)
{
   ent = spawn("trigger_radius", origin, 0, 40, 48);
   ent.targetname = name;
   ent.angles = angles;
}
  • Change all the relevant coordinates around to those from your setup test.
  • When finished, you level GSC will look something like this “mp_tally” dummy one:
 main()
{
	maps\mp\mp_tally_fx::main();
	maps\createart\mp_tally_art::main();
	maps\mp\_load::main();
	
	maps\mp\_compass::setupMiniMap("compass_map_mp_tally");

	ambientPlay("ambient_middleeast_ext");

	game["allies"] = "sas";
	game["axis"] = "russian";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "woodland";
	game["axis_soldiertype"] = "woodland";

	setdvar( "r_specularcolorscale", "1" );

	setdvar("compassmaxrange","2000");
	
	// raise up planes to avoid them flying through buildings
	level.airstrikeHeightScale = 1.8;
	
	if(getDvar("g_gametype") == "re")
	{
		level.objective_vcr = [];
		level.objective_vcr[0] = spawn("script_model", (1565, 454, 262));
		level.objective_vcr[0].angles = (0, 0, 0);
		level.objective_vcr[1] = spawn("script_model", (426, 489, 198));
		level.objective_vcr[1].angles = (0, -90, 0);
		level.objective_vcr[2] = spawn("script_model", (-1272, -99, 258));
		level.objective_vcr[2].angles = (0, 0, 0);
	
		level.objective_vcrcase = [];
		level.objective_vcrcase[0] = spawn("script_model", (806, -1259, 105));
		level.objective_vcrcase[0].angles = (0, 180, 0);
		level.objective_vcrcase[1] = spawn("script_model", (513, -360, 124));
		level.objective_vcrcase[1].angles = (0, 0, 0);
		level.objective_vcrcase[2] = spawn("script_model", (962, 1415, 106));
		level.objective_vcrcase[2].angles = (0, 90, 0);
		
		addobj_base("objective_base", (-473, 1975, 64), (0, 0, 0));
	}
}

addobj_base(name, origin, angles)
{
   ent = spawn("trigger_radius", origin, 0, 40, 48);
   ent.targetname = name;
   ent.angles = angles;
}