Call of Duty 4: Retrieval: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
mNo edit summary
 
No edit summary
 
Line 1: Line 1:
[[Category:Call of Duty 4]]
[[Category:Modding]]
[[Category:Radiant]]
[[Category:AWE]]
''by Tally''
''by Tally''


{{Note|This tutorial will explain how to add Retrieval gametype to '''a map you are creating yourself'''.}}


[[Image:Nutshell.png]]This tutorial will explain how to add Retrieval gametype to '''a map you are creating yourself'''.
[[Image:Tutorials.png|right]]


[[Image:Tutorials.png|right]]
*Firstly, please see this tutorial on how to get the models in the right postions, etc [http://forums.raidersmerciless.com/showthread.php?t=4362 HERE]
*Firstly, please see this tutorial on how to get the models in the right postions, etc [http://forums.raidersmerciless.com/showthread.php?t=4362 HERE]


*Secondly, you need to transfer the coordinates from your positioning test to the actual code used by the gametype.
*Secondly, you need to transfer the coordinates from your positioning test to the actual code used by the gametype.
Line 104: Line 99:
   ent.angles = angles;
   ent.angles = angles;
}</pre>
}</pre>
[[Category:Call of Duty 4]]
[[Category:Gametypes]]
[[Category:Modding]]
[[Category:AWE]]

Latest revision as of 09:14, 27 August 2009

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;
}