

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.zeroy.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ingram</id>
	<title>COD Modding &amp; Mapping Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zeroy.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ingram"/>
	<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Special:Contributions/Ingram"/>
	<updated>2026-04-30T08:04:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Minefields&amp;diff=16607</id>
		<title>Call of Duty 5: Minefields</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Minefields&amp;diff=16607"/>
		<updated>2012-02-23T13:28:04Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This tutorial will explain how to create/add Minefields to your maps.}}&lt;br /&gt;
&lt;br /&gt;
=Simple Minefield=&lt;br /&gt;
==In Radiant==&lt;br /&gt;
&lt;br /&gt;
*Choose the Trigger texture,&lt;br /&gt;
*Drag it where you want a minefield..&lt;br /&gt;
*Rightclick &amp;gt; Trigger &amp;gt; Multiple&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:minefield_1.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Bring up console (press N)&lt;br /&gt;
&lt;br /&gt;
Give it these values:&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: minefield&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:minefield_2.png|550px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GSC Scripts==&lt;br /&gt;
&lt;br /&gt;
Make sure the following is present in your maps/mp/mp_mapname.gsc&lt;br /&gt;
&lt;br /&gt;
 maps\mp\_load::main();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SoundAlias==&lt;br /&gt;
&lt;br /&gt;
*The two sound used by the stock script are missing from Soundaliases files and even the WAV files are missing, get them here:&lt;br /&gt;
{{Download|http://wiki.modsrepository.com/codww_files/codww_minefields_files.zip|DOWNLOAD MISSING MINEFIELD ASSETS}}&lt;br /&gt;
* In this Archive you will find the Soundalias required, distance and volume can be adjusted before compile to your liking;&lt;br /&gt;
*Simply unpack the archive in your CODWaW Root folder to add the missing assets;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zone Source==&lt;br /&gt;
&lt;br /&gt;
Add the following to your zone_source/mp_mapname.csv before compiling:&lt;br /&gt;
&lt;br /&gt;
 fx,explosions/grenadeExp_dirt&lt;br /&gt;
 sound,mines,mp_yourmap,all_mp&lt;br /&gt;
&lt;br /&gt;
You&#039;re done!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Alternate Idea=&lt;br /&gt;
&lt;br /&gt;
This great idea comes from &#039;&#039;HyBr!d&#039;&#039; and it is to replace the actual mine by a Sniper shoot at the player when he walk in the Trigger. Sound are replace:&amp;lt;br&amp;gt;&lt;br /&gt;
*Bullets whizzing by instead of the &#039;click&#039; &lt;br /&gt;
*Sniper rifle shot as the explosion sound&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The GSC Code for it:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
waterfields()&lt;br /&gt;
{&lt;br /&gt;
	waterfields = getentarray(&amp;quot;waterfield&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if (waterfields.size &amp;gt; 0)&lt;br /&gt;
		level._effect[&amp;quot;water_explosion&amp;quot;] = loadfx (&amp;quot;impacts/fx_water_hit_tracer_nite.efx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	for(i = 0; i &amp;lt; waterfields.size; i++)&lt;br /&gt;
		waterfields[i] thread waterfield_think();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
waterfield_think()&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill (&amp;quot;trigger&amp;quot;,other);&lt;br /&gt;
&lt;br /&gt;
		if(isPlayer(other))&lt;br /&gt;
			other thread waterfield_kill(self);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
waterfield_kill(trigger)&lt;br /&gt;
{&lt;br /&gt;
	if(isDefined(self.waterfield))&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	self.waterfield = true;&lt;br /&gt;
	self playsound (&amp;quot;shot_flyby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	wait .5;&lt;br /&gt;
	wait randomFloat(.5);&lt;br /&gt;
&lt;br /&gt;
	if(isdefined(self) &amp;amp;&amp;amp; self istouching(trigger))&lt;br /&gt;
	{&lt;br /&gt;
		origin = self getorigin();&lt;br /&gt;
		range = 50;&lt;br /&gt;
		maxdamage = 2000;&lt;br /&gt;
		mindamage = 50;&lt;br /&gt;
&lt;br /&gt;
		self playsound(&amp;quot;waterfield_shot&amp;quot;);&lt;br /&gt;
		playfx(&amp;quot;water_explosion&amp;quot;, origin);&lt;br /&gt;
		radiusDamage(origin, range, maxdamage, mindamage);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	self.waterfield = undefined;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Info|This code must be paste into the Stock file /raw/maps/mp/_minefields.gsc (Backup first!) and of course you must add this line to your Zone file:}}&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/_minefields.gsc&lt;br /&gt;
&lt;br /&gt;
*Soundalias to go with the new code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
name,sequence,file,platform,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,dist_reverb_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,priority,spatialized,type,probability,loop,masterslave,loadspec,reverb_falloff_curve,subtitle,compression,randomize_type,secondaryaliasname,chainaliasname,volumefalloffcurve,startdelay,speakermap,reverb_send,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage,move_type,move_time,occlusion_level,min_priority,max_priority,min_priority_threshold,max_priority_threshold&lt;br /&gt;
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;br /&gt;
# _waterfield SFX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;br /&gt;
shot_flyby,1,SFX\projectile\bullet\headshot\head\head_00.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,,all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1&lt;br /&gt;
shot_flyby,2,SFX\projectile\bullet\headshot\head\head_01.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1&lt;br /&gt;
shot_flyby,3,SFX\projectile\bullet\headshot\head\head_02.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1&lt;br /&gt;
waterfield_shot,,SFX/Weapon/Rifle/snpr_ring/snpr_mauser/snpr_mauser_02.wav,!wii,1,1,1,1,1,300,1500,,,,,ambience,,,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Again you must add a line the Zone File to add this soundalias (called waterfields.csv in this example):&lt;br /&gt;
&lt;br /&gt;
 sound,waterfields,mp_yourmap,all_mp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thanks to HyBr!d&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 10:56, 24 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 5]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Useful_Functions&amp;diff=16606</id>
		<title>Call of Duty 4: Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Useful_Functions&amp;diff=16606"/>
		<updated>2012-02-23T12:53:15Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Small optimizations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;NOTE: These scripts are only adding functionality into game. They do not add things such as mines, artillery, kaboom etc...&amp;lt;/font color&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Returns array of all players on the server. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
getAllPlayers()&lt;br /&gt;
{&lt;br /&gt;
	return getEntArray( &amp;quot;player&amp;quot;, &amp;quot;classname&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Play local sound on all players. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
playSoundOnAllPlayers( soundAlias )&lt;br /&gt;
{&lt;br /&gt;
	players = getAllPlayers();&lt;br /&gt;
	for( i = 0; i &amp;lt; players.size; i++ )&lt;br /&gt;
		players[i] playLocalSound( soundAlias );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removes all text messages from screen. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
cleanScreen()&lt;br /&gt;
{&lt;br /&gt;
	for( i = 0; i &amp;lt; 6; i++ )&lt;br /&gt;
	{&lt;br /&gt;
		iPrintlnBold( &amp;quot; &amp;quot; );&lt;br /&gt;
		iPrintln( &amp;quot; &amp;quot; );&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Delete object after time. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
deleteAfterTime( time )&lt;br /&gt;
{&lt;br /&gt;
	wait time;&lt;br /&gt;
	if( isDefined( self ) )&lt;br /&gt;
		self delete();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return BOOL (true of false) when player is really alive and playing.==&lt;br /&gt;
&lt;br /&gt;
Note: CoD&#039;s isAlive() function seems to be bugged. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
isReallyAlive()&lt;br /&gt;
{&lt;br /&gt;
	return self.sessionstate == &amp;quot;playing&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
isPlaying()&lt;br /&gt;
{&lt;br /&gt;
	return isReallyAlive();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Toggle third person camera. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
thirdPerson()&lt;br /&gt;
{&lt;br /&gt;
	if( isDefined( self.tp ) )&lt;br /&gt;
	{&lt;br /&gt;
		self.tp = undefined;&lt;br /&gt;
		self setClientDvar( &amp;quot;cg_thirdPerson&amp;quot;, 0 );&lt;br /&gt;
	}&lt;br /&gt;
	else&lt;br /&gt;
	{&lt;br /&gt;
		self.tp = true;&lt;br /&gt;
		self setClientDvar( &amp;quot;cg_thirdPerson&amp;quot;, 1 );&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Waits for enough players to start game. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// Use: waitForPlayers( 3 ); Code after this function call will be executed when there is required number of alive players.&lt;br /&gt;
waitForPlayers( requiredPlayersCount )&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		wait 0.5;&lt;br /&gt;
		count = 0;&lt;br /&gt;
		players = getAllPlayers();&lt;br /&gt;
		for( i = 0; i &amp;lt; players.size; i++ )&lt;br /&gt;
			if( players[i] isPlaying() )&lt;br /&gt;
				count++;&lt;br /&gt;
&lt;br /&gt;
		if( count &amp;gt;= requiredPlayersCount )&lt;br /&gt;
			break;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return player with that nick name or its part. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
getPlayerByName( nickname ) &lt;br /&gt;
{&lt;br /&gt;
	players = getAllPlayers();&lt;br /&gt;
	for ( i = 0; i &amp;lt; players.size; i++ )&lt;br /&gt;
		if ( isSubStr( toLower(players[i].name), toLower(nickname) ) ) &lt;br /&gt;
			return players[i];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return player with that slot number. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
getPlayerByNum( pNum ) &lt;br /&gt;
{&lt;br /&gt;
	players = getAllPlayers();&lt;br /&gt;
	for ( i = 0; i &amp;lt; players.size; i++ )&lt;br /&gt;
		if ( players[i] getEntityNumber() == pNum ) &lt;br /&gt;
			return players[i];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return true when victim was killed through world geometry. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
isWallBang( attacker, victim )&lt;br /&gt;
{&lt;br /&gt;
	return !bulletTracePassed( attacker getEye(), victim getEye(), false, attacker );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feel free to use these functions in your own mod. Just remember to put &amp;quot;Brax&amp;quot; in credits.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By Brax - [http://modsonline.com/Forums-top-140965-0.html#737400 Sources]&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy]] 12:36, 13 May 2011 (IST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Using_Animations&amp;diff=16605</id>
		<title>Call of Duty 4: SP - Using Animations</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Using_Animations&amp;diff=16605"/>
		<updated>2012-02-23T12:29:41Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;ve read a lot about peoples issues with animations, and how there was no concrete tutorial for how to use one. It took me a lot of code reading to finally figure out how to use animations, but once you&#039;ve figured it out, It can be a breeze. P.S: This is not the method IW uses. It is less concise then their&#039;s, but it works the same.&lt;br /&gt;
&lt;br /&gt;
*Ok first off, make a new map. Once you&#039;ve loaded it up, save at as whatever you like. Now, make a large block, then use the hollow tool to hollow that block into a room. Hollow tool is located on the command bar right under the &#039;brush&#039; menu. It looks like a box with a smaller segmented box inside it.&lt;br /&gt;
&lt;br /&gt;
*Once you have your room, (which should be rather large), you should  make some [[Call of Duty 4: Stock worldspawn settings|worldspawn settings]] for light.&lt;br /&gt;
&lt;br /&gt;
*Now, right click the 2D grid, then go to &#039;info&#039; then click &#039;player_start&#039; to create where the player will spawn in the world. Now place it in the room. Make sure it is not inside a block or you will not spawn. Now right click on the 2D grid agin, go down to &#039;node&#039;, then click &#039;scripted_node&#039;. A white box will appear in the map. This is where the animation will play from. Place it in the room, a few units off the ground. Click &#039;E&#039; on the node to enter the entity editor. Name the node like this:&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: anim_node&lt;br /&gt;
&lt;br /&gt;
*Now its time to get an actor to perform this animation.Right click the 2D grid, click &#039;actor&#039;, go to &#039;ally&#039;,( If the actor is an enemy he will shoot you) then choose any actor you want. For this example, I will use a marine with an m16. Again, place this actor in the room, near the anim node. Place a few pathnodes if the actor is farther away from the scripted node. Press E when you have the actor selected. Now name him:&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: guy&lt;br /&gt;
&lt;br /&gt;
*Now its time for scripting. Save your map as test. exit radiant. Now go to your CoD4 folder, go to raw/maps. Create two text documents. Name the first one &#039;test&#039;. Name the second one &#039;test_anim&#039;. Open up &#039;test&#039;, click save as, now do this:&lt;br /&gt;
&lt;br /&gt;
 name: test.gsc&lt;br /&gt;
 save as type: all files&lt;br /&gt;
&lt;br /&gt;
Make sure that the .gsc is being saved into the maps folder.&lt;br /&gt;
&lt;br /&gt;
Now go the test_anim file, and do the same thing:&lt;br /&gt;
&lt;br /&gt;
 name: test_anim.gsc&lt;br /&gt;
 save as type: all file&lt;br /&gt;
&lt;br /&gt;
Again, make sure that it is being saved into your maps folder. Now open up test.gsc. Put this code into it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include common_scripts\utility;&lt;br /&gt;
#include maps\_utility;&lt;br /&gt;
#include maps\_anim;&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
    maps\test_anim::main();&lt;br /&gt;
    maps\_load::main();&lt;br /&gt;
&lt;br /&gt;
    thread anim();  &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now save the file, and open up test_anim.gsc. Once thats open, place this code into it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include maps\_utility;&lt;br /&gt;
#include common_scripts\utility;&lt;br /&gt;
#include maps\_anim;&lt;br /&gt;
&lt;br /&gt;
#using_animtree (&amp;quot;generic_human&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
    level.scr_anim[ &amp;quot;guy&amp;quot; ][ &amp;quot;anim&amp;quot; ] = %combatwalk_f_spin //The important line!&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now ill explain this line to you guys. Basically, this line is calling this anim to be used. &amp;quot;guy&amp;quot; is the guy who will perform the anim, and &amp;quot;anim&amp;quot; is the alias we have given the actual anim; combatwalk_f_spin. &lt;br /&gt;
&lt;br /&gt;
Go back to your gsc and put this code in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include common_scripts\utility;&lt;br /&gt;
#include maps\_utility;&lt;br /&gt;
#include maps\_anim;&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
    maps\test_anim::main();&lt;br /&gt;
    maps\_load::main();&lt;br /&gt;
&lt;br /&gt;
    thread anim();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
anim()&lt;br /&gt;
{&lt;br /&gt;
    level.guy = getent( &amp;quot;guy&amp;quot;, &amp;quot;targetname&amp;quot; );&lt;br /&gt;
    level.guy.animname = &amp;quot;guy&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    anim_node = getnode( &amp;quot;anim_node&amp;quot;, &amp;quot;targetname&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    level.guy setgoalnode(anim_node);&lt;br /&gt;
    level.guy waittill( &amp;quot;goal&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
    anim_node anim_reach_solo( level.guy, &amp;quot;anim&amp;quot; );&lt;br /&gt;
    anim_node thread anim_single_solo( level.guy, &amp;quot;anim&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
anim()&lt;br /&gt;
{&lt;br /&gt;
    level.guy = getent( &amp;quot;guy&amp;quot;, &amp;quot;targetname&amp;quot; ); // Defines our actor for the ///script///&lt;br /&gt;
    level.guy.animname = &amp;quot;guy&amp;quot;; // Gives this guy a animation alias. Make ////sure this alias always matches the one in _anim .gsc. e.g = [ &amp;quot;guy&amp;quot; ].&lt;br /&gt;
&lt;br /&gt;
    anim_node = getnode( &amp;quot;anim_node&amp;quot;, &amp;quot;targetname&amp;quot; ); ///Defines the node ////that the actor will play the anim on///&lt;br /&gt;
&lt;br /&gt;
    level.guy setgoalnode(anim_node); ///Sets the actor&#039;s goal as the node//&lt;br /&gt;
    level.guy waittill( &amp;quot;goal&amp;quot; ); ///Nothing happens till &amp;quot;guy&amp;quot;s goal is reached&lt;br /&gt;
&lt;br /&gt;
    anim_node anim_reach_solo( level.guy, &amp;quot;anim&amp;quot; ); ///Once the goal is ////reached, the anim is played. Remember that the second parameter is calling the anim alias we gave back in the _anim script.////&lt;br /&gt;
    anim_node thread anim_single_solo( level.guy, &amp;quot;anim&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This combination will allow you to play any generic human animation you want. To find all the animations in the game find, the xanim folder, located in raw. Go to the raw/maps folder and look through other map&#039;s _anim file, like blackout_anim, or scoutsniper_anim, to find out the names of other anims the devs used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we have to wrap up some things. Go to compile tools, compile BSP, reflections, then fast file. Then go to your zone file and add this stuff to the right hand column.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xmodel,viewmodel_base_character&lt;br /&gt;
xmodel,viewmodel_base_viewhands&lt;br /&gt;
xmodel,weapon_m16basic_sp&lt;br /&gt;
xmodel,viewmodel_m16&lt;br /&gt;
weapon,sp/m16_basic&lt;br /&gt;
xanim,combatwalk_f_spin&lt;br /&gt;
weapon,sp/mp5&lt;br /&gt;
xmodel,weapon_mp5&lt;br /&gt;
xmodel,viewmodel_mp5&lt;br /&gt;
rawfile,maps/test.gsc&lt;br /&gt;
rawfile,maps/test_anim.gsc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now click save, build your fast file, and open up CoD4 SP. press the tilde key ~ , then type in: map test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now watch your animation play!&lt;br /&gt;
&lt;br /&gt;
Most errors will be due to problems with naming of entities. Also, don&#039;t forget your semicolons at the end of each line. &lt;br /&gt;
&lt;br /&gt;
Any issues with this tutorial send me a pm on my profile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Special thanks to Babycop, as their inclusion of source files in their SP maps have been of invaluable assistance.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;By Ediblemittens&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-606.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 02:32, 29 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Objective_Basics&amp;diff=16604</id>
		<title>Call of Duty 4: SP - Objective Basics</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Objective_Basics&amp;diff=16604"/>
		<updated>2012-02-23T12:25:06Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This guide will tell you how to create objectives in COD4 easily as well as infinite health for your teammates.}}&lt;br /&gt;
&lt;br /&gt;
*First create your world in radiant. Then create a trigger brush anywhere you like. This is where you would have to go to complete the objective. Make sure the trigger brush is trigger_multiple. &lt;br /&gt;
*Then fill in this:&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 value: obj1&lt;br /&gt;
&lt;br /&gt;
*If you want more objectives, create more triggers. Replace the value with obj2, obj3 and so on.&lt;br /&gt;
*To make an actor an objective, create the actor and give him the key of targetname and value of obj#.&lt;br /&gt;
*After you&#039;re done, finish your map and save!&lt;br /&gt;
*Complie your map!&lt;br /&gt;
&lt;br /&gt;
Now is the time for scripting. It&#039;s fairly simple. Copy and paste this in your gsc file. &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	maps\_load::main();&lt;br /&gt;
&lt;br /&gt;
	level.player takeallweapons();&lt;br /&gt;
	level.player giveWeapon (&amp;quot;m16_basic&amp;quot;); //use whatever gun you want&lt;br /&gt;
	level.player giveWeapon (&amp;quot;g36c&amp;quot;); //same&lt;br /&gt;
	level.player switchToWeapon (&amp;quot;g36c&amp;quot;); //pick the gun you want to hold&lt;br /&gt;
	level.player giveWeapon (&amp;quot;fraggrenade&amp;quot;);&lt;br /&gt;
	level.player giveWeapon (&amp;quot;flash_grenade&amp;quot;);&lt;br /&gt;
	thread obj1(); //call your objectives&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj1()&lt;br /&gt;
{&lt;br /&gt;
	obj1 = getent(&amp;quot;obj1&amp;quot;, &amp;quot;targetname&amp;quot;); //the game finds the trigger&lt;br /&gt;
	objective_add(1, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;mapname_OBJ1&amp;quot;,getent(&amp;quot;obj1&amp;quot;,&amp;quot;targetname&amp;quot;).origin); //add obj.&lt;br /&gt;
	objective_current(1); //current objective&lt;br /&gt;
&lt;br /&gt;
	obj1 waittill(&amp;quot;trigger&amp;quot;); //wait till the trigger is triggered&lt;br /&gt;
	objective_state(1, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj1 delete(); //deletes it&lt;br /&gt;
&lt;br /&gt;
	wait 2; //fill in however long you like (in seconds)&lt;br /&gt;
	thread obj2(); //thread next objectives.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj2()&lt;br /&gt;
{&lt;br /&gt;
	obj2 = getent(&amp;quot;obj2&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	objective_add(2, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;mapname_OBJ2&amp;quot;,getent(&amp;quot;obj2&amp;quot;,&amp;quot;targetname&amp;quot;).origin);&lt;br /&gt;
	objective_current(2);&lt;br /&gt;
&lt;br /&gt;
	obj2 waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
	objective_state(2, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj2 delete();&lt;br /&gt;
&lt;br /&gt;
	wait 2;&lt;br /&gt;
	thread obj3();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj3()&lt;br /&gt;
{&lt;br /&gt;
	obj3 = getent(&amp;quot;obj3&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	objective_add(3, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;mapname_OBJ3&amp;quot;,getent(&amp;quot;obj3&amp;quot;,&amp;quot;targetname&amp;quot;).origin);&lt;br /&gt;
	objective_current(3);&lt;br /&gt;
&lt;br /&gt;
	obj3 waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
	objective_state(3, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj3 delete();&lt;br /&gt;
&lt;br /&gt;
	wait 2;&lt;br /&gt;
	iprintlnbold (&amp;amp;&amp;quot;mapname_OBJ_COMPLETED&amp;quot;); //tells player obj finished&lt;br /&gt;
	missionSuccess (&amp;quot;fun&amp;quot;,false); //the mission ends&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script above is for trigger objectives. For actors replace&lt;br /&gt;
&lt;br /&gt;
 obj# waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
with&lt;br /&gt;
 obj# waittill(&amp;quot;death&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
*You can add more objectives if you like. Just repeat. &lt;br /&gt;
*You&#039;re done the gsc file but scripting is not done yet!&lt;br /&gt;
*create a mapname.str in your main/localizedstrings folder.&lt;br /&gt;
*Copy this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;F:\projects\mk\bin\StringEd\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
REFERENCE           OBJ1&lt;br /&gt;
LANG_ENGLISH        &amp;quot;Get to the centre of the road. Clear out the road block.&amp;quot; //change to whatever you want for your objective.&lt;br /&gt;
&lt;br /&gt;
REFERENCE           OBJ2&lt;br /&gt;
LANG_ENGLISH        &amp;quot;Get to your teammates!&amp;quot; //same&lt;br /&gt;
&lt;br /&gt;
REFERENCE           OBJ3&lt;br /&gt;
LANG_ENGLISH        &amp;quot;Get on the truck.&amp;quot; //same&lt;br /&gt;
&lt;br /&gt;
REFERENCE           OBJ_COMPLETED&lt;br /&gt;
LANG_ENGLISH        &amp;quot;All Objective Completed!&amp;quot;  //same&lt;br /&gt;
&lt;br /&gt;
REFERENCE           OBJECTIVES&lt;br /&gt;
LANG_ENGLISH        &amp;quot;Press ^3[{+scores}]^7 to check your Objectives&amp;quot; //reminder&lt;br /&gt;
&lt;br /&gt;
ENDMARKER&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add more references for more objectives. Just add OBJ4, OBJ5, etc.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
That&#039;s it you&#039;re done!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Time for infinite health. This is very simple. &lt;br /&gt;
&lt;br /&gt;
*In radiant, create some actors or just one. Give them a targetname of ally or whatever. You&#039;re done in radiant!&lt;br /&gt;
&lt;br /&gt;
Script time!&lt;br /&gt;
&lt;br /&gt;
I can&#039;t call the script from another gsc file because I don&#039;t know how to get it to work. Just copy and paste into your main gsc file. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
thread ally_nodamage(); //whatever value you like for thread&lt;br /&gt;
&lt;br /&gt;
ally_nodamage() //whatever you called above&lt;br /&gt;
{&lt;br /&gt;
	allyteam = getentarray (&amp;quot;ally&amp;quot;, &amp;quot;targetname&amp;quot;); //what you named&lt;br /&gt;
	for(i=0; i&amp;lt;allyteam.size; i++)&lt;br /&gt;
		allyteam[i] thread maps\_utility::magic_bullet_shield(); //infinite health&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;re done! The infinite health works great for heroes or any regular actors, but not you, the player, unfortunately. Also thanx to [http://www.modsonline.com/Forums-top-68372-30.html#59375 this post] and everyone who helped me on this topic.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Combine both tutorials together you get this. My map as an example.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.weaponClipModels = [];&lt;br /&gt;
	level.weaponClipModels[0] = &amp;quot;weapon_m16_clip&amp;quot;;&lt;br /&gt;
	level.weaponClipModels[1] = &amp;quot;weapon_ak47_clip&amp;quot;;&lt;br /&gt;
	level.weaponClipModels[2] = &amp;quot;weapon_g36_clip&amp;quot;;&lt;br /&gt;
	level.weaponClipModels[3] = &amp;quot;weapon_mp5_clip&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	maps\_load::main();&lt;br /&gt;
&lt;br /&gt;
	level.player takeallweapons();&lt;br /&gt;
	level.player giveWeapon (&amp;quot;m16_basic&amp;quot;);&lt;br /&gt;
	level.player giveWeapon (&amp;quot;g36c&amp;quot;);&lt;br /&gt;
	level.player switchToWeapon (&amp;quot;g36c&amp;quot;);&lt;br /&gt;
	level.player giveWeapon (&amp;quot;fraggrenade&amp;quot;);&lt;br /&gt;
	level.player giveWeapon (&amp;quot;flash_grenade&amp;quot;);&lt;br /&gt;
	thread ally_nodamage();   //  executes ally_nodamage() function&lt;br /&gt;
	thread obj1();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ally_nodamage()&lt;br /&gt;
{&lt;br /&gt;
	allyteam = getentarray (&amp;quot;ally&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	for(i=0; i&amp;lt;allyteam.size; i++)&lt;br /&gt;
		allyteam[i] thread maps\_utility::magic_bullet_shield();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj1()&lt;br /&gt;
{&lt;br /&gt;
	obj1 = getent(&amp;quot;obj1&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	objective_add(1, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;streetclearing2_OBJ1&amp;quot;,getent(&amp;quot;obj1&amp;quot;,&amp;quot;targetname&amp;quot;).origin);&lt;br /&gt;
	objective_current(1);&lt;br /&gt;
&lt;br /&gt;
	obj1 waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
	objective_state(1, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj1 delete();&lt;br /&gt;
&lt;br /&gt;
	wait 2;&lt;br /&gt;
	thread obj2();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj2()&lt;br /&gt;
{&lt;br /&gt;
	obj2 = getent(&amp;quot;obj2&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	objective_add(2, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;streetclearing2_OBJ2&amp;quot;,getent(&amp;quot;obj2&amp;quot;,&amp;quot;targetname&amp;quot;).origin);&lt;br /&gt;
	objective_current(2);&lt;br /&gt;
&lt;br /&gt;
	obj2 waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
	objective_state(2, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj2 delete();&lt;br /&gt;
&lt;br /&gt;
	wait 2;&lt;br /&gt;
	thread obj3();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
obj3()&lt;br /&gt;
{&lt;br /&gt;
	obj3 = getent(&amp;quot;obj3&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	objective_add(3, &amp;quot;active&amp;quot;, &amp;amp;&amp;quot;streetclearing2_OBJ3&amp;quot;,getent(&amp;quot;obj3&amp;quot;,&amp;quot;targetname&amp;quot;).origin);&lt;br /&gt;
	objective_current(3);&lt;br /&gt;
&lt;br /&gt;
	obj3 waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
	objective_state(3, &amp;quot;done&amp;quot;);&lt;br /&gt;
	obj3 delete();&lt;br /&gt;
&lt;br /&gt;
	wait 2;&lt;br /&gt;
	iprintlnbold (&amp;amp;&amp;quot;streetclearing2_OBJ_COMPLETED&amp;quot;); //Let player know he is done&lt;br /&gt;
	missionSuccess (&amp;quot;dawnville&amp;quot;,false);&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Thanx for reading, hope you make great Single Player maps!&lt;br /&gt;
&lt;br /&gt;
[http://www.modsonline.com/Downloads-full-5112.html Source files].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P.S. This Tutorial can be used for all COD games.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;By sam_fisher3000&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Links:==&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-616.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 02:43, 29 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Objectives]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Adding_Dogs&amp;diff=16603</id>
		<title>Call of Duty 4: SP - Adding Dogs</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Adding_Dogs&amp;diff=16603"/>
		<updated>2012-02-23T12:06:12Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|How to get dogs working in the Single player Game.}}&lt;br /&gt;
&#039;&#039;By Techno2sl&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need:&lt;br /&gt;
&lt;br /&gt;
#A playable map in radiant (preferrably a closed skybox with no leaks and worldspawn settings).&lt;br /&gt;
#An &amp;quot;info_player_start&amp;quot; (right click the 2d grid and slect info&amp;gt;player_start, place this spawn point a few units off the ground and not touching/passing through anything)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, so right click the 2d grid, select &amp;quot;actor&amp;gt;enemy&amp;gt;dog&amp;quot;. Place the dog anywhere you want so long as its not touching/passing through anything. (place as many as you want theres probably a limit on how many can be alive at once but I havent found that yet (32?))&lt;br /&gt;
&lt;br /&gt;
Place some path nodes down (right click the 2d grid and select &amp;quot;node&amp;gt;path_node&amp;quot;), space them out abit, you dont need to many in open areas but for doorways etc its best to place a node either side of the door and 1 inside the doorway (to help the dogs negotiate) make sure the nodes dont touch each other though).&lt;br /&gt;
&lt;br /&gt;
//Spawner//Skip this bit if your dont want your dog to be a spawner&lt;br /&gt;
&lt;br /&gt;
This is not nessaccary for a simple test, but if you want your dogs to spawn instead of being spawned as soon as the level starts: Make a trigger, using the trigger texture and make that trigger a trigger_multiple. Then select the trigger and make it a &amp;quot;trigger_spawner&amp;quot;. (highlight the trigger and press &amp;quot;N&amp;quot;) Select any dogs, and make them &amp;quot;spawners&amp;quot;. (highlight 1 dog at a time and select spawner)&lt;br /&gt;
&lt;br /&gt;
With 1 trigger selected, highlight a dog and press &amp;quot;W&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So the link is: |Trigger|&amp;gt;&amp;gt;|dog|&lt;br /&gt;
 &lt;br /&gt;
////&lt;br /&gt;
Spawners wont fucntion correctly sometimes//Always check the zone source and developer load your map and check the console &lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now compile your level, and edit your zone_source (&amp;quot;Update Zone_source&amp;quot;). If you dont have one yet, click &amp;quot;build fast file&amp;quot; to create a defualt one.&lt;br /&gt;
&lt;br /&gt;
Now in the zone file include this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ignore,code_post_gfx&lt;br /&gt;
ignore,common&lt;br /&gt;
col_map_sp,maps/MAPNAME.d3dbsp&lt;br /&gt;
rawfile,maps/MAPNAME.gsc&lt;br /&gt;
localize,test3&lt;br /&gt;
sound,common,MAPNAME,!all_sp&lt;br /&gt;
sound,generic,MAPNAME,!all_sp&lt;br /&gt;
sound,voiceovers,MAPNAME,!all_sp&lt;br /&gt;
sound,requests,MAPNAME,!all_sp&lt;br /&gt;
rawfile,animscripts/dog_combat.gsc&lt;br /&gt;
rawfile,animscripts/dog_death.gsc&lt;br /&gt;
rawfile,animscripts/dog_init.gsc&lt;br /&gt;
rawfile,animscripts/dog_pain.gsc&lt;br /&gt;
rawfile,animscripts/dog_move.gsc&lt;br /&gt;
rawfile,animscripts/dog_scripted.gsc&lt;br /&gt;
rawfile,animscripts/dog_stop.gsc&lt;br /&gt;
rawfile,animscripts/dog_flashed.gsc&lt;br /&gt;
xanim,ai_attacked_german_shepherd_05_death_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_04_getup_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_04_middle_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_03_shoot_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_03_push_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_02_getup_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_02_idle_a&lt;br /&gt;
xanim,ai_attacked_german_shepherd_01_start_a&lt;br /&gt;
xanim,german_shepherd_player_neck_miss&lt;br /&gt;
xanim,german_shepherd_player_neck_snap&lt;br /&gt;
xanim,german_shepherd_walk&lt;br /&gt;
xanim,german_shepherd_traverse_up_80&lt;br /&gt;
xanim,german_shepherd_traverse_up_40&lt;br /&gt;
xanim,german_shepherd_traverse_down_40&lt;br /&gt;
xanim,german_shepherd_attack_player_miss_turnl&lt;br /&gt;
xanim,german_shepherd_attack_player_miss_turnr&lt;br /&gt;
xanim,german_shepherd_attack_ai_05_kill_a&lt;br /&gt;
xanim,german_shepherd_attack_ai_04_middle_a&lt;br /&gt;
xanim,german_shepherd_attack_ai_03_shot_a&lt;br /&gt;
xanim,german_shepherd_attack_ai_03_pushed_a&lt;br /&gt;
xanim,german_shepherd_attack_ai_02_idle_a&lt;br /&gt;
xanim,german_shepherd_attack_ai_01_start_a&lt;br /&gt;
xanim,german_shepherd_run_flashbang&lt;br /&gt;
xanim,german_shepherd_run_stop&lt;br /&gt;
xanim,german_shepherd_run_pain&lt;br /&gt;
xanim,german_shepherd_run_jump_window_40&lt;br /&gt;
xanim,german_shepherd_run_jump_40&lt;br /&gt;
xanim,german_shepherd_run_attack&lt;br /&gt;
xanim,german_shepherd_attack_player_miss&lt;br /&gt;
xanim,german_shepherd_run_lean_r&lt;br /&gt;
xanim,german_shepherd_run_lean_l&lt;br /&gt;
xanim,german_shepherd_run&lt;br /&gt;
xanim,german_shepherd_run_start&lt;br /&gt;
xanim,german_shepherd_attackidle_growl&lt;br /&gt;
xanim,german_shepherd_attackidle_bark&lt;br /&gt;
xanim,german_shepherd_attackidle&lt;br /&gt;
xanim,german_shepherd_idle&lt;br /&gt;
xanim,german_shepherd_death_front&lt;br /&gt;
xanim,german_shepherd_attack_player_late&lt;br /&gt;
xanim,german_shepherd_attack_player&lt;br /&gt;
xanim,german_shepherd_attack_look_up&lt;br /&gt;
xanim,german_shepherd_look_up&lt;br /&gt;
xanim,german_shepherd_attack_look_left&lt;br /&gt;
xanim,german_shepherd_look_left&lt;br /&gt;
xanim,german_shepherd_attack_look_right&lt;br /&gt;
xanim,german_shepherd_look_right&lt;br /&gt;
xanim,german_shepherd_attack_look_down&lt;br /&gt;
xanim,german_shepherd_look_down&lt;br /&gt;
xanim,void_loop&lt;br /&gt;
xanim,player_view_dog_knockdown_neck_miss&lt;br /&gt;
xanim,player_view_dog_knockdown_neck_snap&lt;br /&gt;
xanim,player_view_dog_knockdown_saved&lt;br /&gt;
xanim,player_view_dog_knockdown_late&lt;br /&gt;
xanim,player_view_dog_knockdown&lt;br /&gt;
weapon,sp/mp5&lt;br /&gt;
xmodel,weapon_mp5&lt;br /&gt;
xmodel,viewmodel_mp5&lt;br /&gt;
sound,ru_battlechatter,mapname,all_sp&lt;br /&gt;
sound,uk_battlechatter,mapname,all_sp&lt;br /&gt;
xmodel,viewmodel_base_character&lt;br /&gt;
xmodel,viewmodel_base_viewhands&lt;br /&gt;
fx,impacts/deathfx_dogbite&lt;br /&gt;
fx,impacts/deathfx_bloodpool_view&lt;br /&gt;
material,hud_dog_melee&lt;br /&gt;
xmodel,viewhands_player_sas_woodland &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(rename the &amp;quot;MAPNAME&amp;quot; to your maps name)&lt;br /&gt;
&lt;br /&gt;
As you can see the zone file is loading an mp5 (weapon,sp/mp5) as its the default weapon when you dont have a weapons loadout. Its loading the animations for the dogs, and its loading the death/melee attack stuff (fx,impacts/deathfx_dogbite fx,impacts/deathfx_bloodpool_view) which is very important otherwise when the dog bites you and trys to throw you on the ground the game will freeze.&lt;br /&gt;
&lt;br /&gt;
You need a basic script file: (located in the &amp;quot;maps&amp;quot; folder this should be called: MAPNAME.gsc)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include maps_utility;&lt;br /&gt;
#include maps_anim;&lt;br /&gt;
#include common_scriptsutility;&lt;br /&gt;
#using_animtree( &amp;quot;generic_human&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
  maps\_load::main();&lt;br /&gt;
  maps\_load::set_player_viewhand_model(&amp;quot;viewhands_player_sas_woodland&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just one last step, if you havent done so before you need to add some SP scripts to your &amp;quot;raw&amp;quot; folder wich were left out by the devs:&lt;br /&gt;
&lt;br /&gt;
http://www.novemberdobby.com/files/rips/4rip.zip&lt;br /&gt;
&lt;br /&gt;
(Thanks to NovemberDobby)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install by unzipping the SP scripts (all of them) into your &amp;quot;raw&amp;quot; folder. Build the fast file for your map again and then Click run map.&lt;br /&gt;
 &lt;br /&gt;
Make sure to check the &#039;animscripts&#039; folder is successfully inside the faw folder, as animscripts contains the dog scripts. &lt;br /&gt;
&lt;br /&gt;
Errors// Run the map normally without developer and without any custom command lines added when first testing.&lt;br /&gt;
 &lt;br /&gt;
error// Script compile error #? utility? IF you get a compile error stating the utility script has a missing &amp;quot;#&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
Go to your raw/maps folder and locate the _colors.gsc&lt;br /&gt;
 &lt;br /&gt;
Change the begining line from &amp;quot;include maps_utility;&amp;quot; to &amp;quot;#include maps_utility;&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-544.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Dogs]]&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Color_Groups&amp;diff=16602</id>
		<title>Call of Duty 4: SP - Color Groups</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Color_Groups&amp;diff=16602"/>
		<updated>2012-02-23T12:00:12Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Simplify codes and make more readable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;By Bloodlust&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|Friendly Chains are obsolete! CoD4 includes a new way of moving your friendly AI which is very simple to setup, and infinitely more flexible. It&#039;s called Color Groups.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To use this:&lt;br /&gt;
&lt;br /&gt;
In Radiant, make a trigger_multiple. then lay down a line of cover nodes where you want them. you dont have to connect the cover nodes to eachother. now select all the cover nodes and the trigger_multiple and press Shift + G.&lt;br /&gt;
&lt;br /&gt;
A box will appear with 7 colors:&lt;br /&gt;
red, orange, yellow, green, teal, blue, and purple.&lt;br /&gt;
&lt;br /&gt;
Select a color for your group and click Add. just choose Red for now. then under that where it says Name: &amp;lt;code&amp;gt;script_color_allies&amp;lt;/code&amp;gt;&lt;br /&gt;
click OK.&lt;br /&gt;
&lt;br /&gt;
You have just setup your very first color group!&lt;br /&gt;
Keep repeating this step till you have your AI movement setup the way you want it.&lt;br /&gt;
&lt;br /&gt;
Sounds alot like friendly chains, doesn&#039;t it?&lt;br /&gt;
Why should you bother with this new way of moving your AI, you may ask...&lt;br /&gt;
I&#039;ll tell you why!&lt;br /&gt;
&lt;br /&gt;
Go back to your first group of color nodes that you made.&lt;br /&gt;
Make a new line of cover nodes, but dont make a new trigger.&lt;br /&gt;
Now select the new line of cover nodes and the first trigger_multiple that you made.&lt;br /&gt;
&lt;br /&gt;
if you look at the Enities properties for the trigger, you will see it has a key/value pair of:&lt;br /&gt;
&lt;br /&gt;
 script_color_allies&lt;br /&gt;
 r0&lt;br /&gt;
&lt;br /&gt;
Now hold Shift and press G, and select Green for your color, then click Add, then click OK by the Name box. deselect everything, then select only the trigger. you will see in the Entities box that its key of &amp;lt;code&amp;gt;script_color_allies&amp;lt;/code&amp;gt; now has a value of &amp;lt;code&amp;gt;r0 g0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
what this does is when this trigger is triggered, it will send any AI with a script_forceColor value of &amp;quot;r&amp;quot; to the red color group and any AI with a &amp;lt;code&amp;gt;script_forceColor&amp;lt;/code&amp;gt; value of &amp;quot;g&amp;quot; to the green color group.&lt;br /&gt;
&lt;br /&gt;
you can effectively have two seperate squads of AI use this one trigger to go to two seperate areas in your map and take cover. or you could just have two seperate triggers, one red and one green do the same thing.&lt;br /&gt;
&lt;br /&gt;
now to make this work, you have to assign these values to your AI in Radiant:&lt;br /&gt;
&lt;br /&gt;
 script_forceColor&lt;br /&gt;
 r (to use the red nodes)&lt;br /&gt;
&lt;br /&gt;
---OR---&lt;br /&gt;
&lt;br /&gt;
 script_forceColor&lt;br /&gt;
 g (to use the green nodes)&lt;br /&gt;
&lt;br /&gt;
Or you can just grab a group of AI and assign them to a color group manually through script as explained below.&lt;br /&gt;
&lt;br /&gt;
Lets take it another step:&lt;br /&gt;
&lt;br /&gt;
Say you just assigned everyone to the red color group in Radiant to start off with, but there&#039;s a crossroads you want to split your squad at, and have the two seperate groups move independantly of eachother, now using both the red AND the green color groups.&lt;br /&gt;
&lt;br /&gt;
In Radiant you will have to already have your cover nodes setup where you want them, assigned to the two seperate colors as described above. at the place you want to split the squad you can do this either way, assuming it took 12 movements to get to the crossroads:&lt;br /&gt;
&lt;br /&gt;
#Have one trigger_multiple with a key of script_color_allies and a value of r12 g12&lt;br /&gt;
#Have two seperate triggers one with script_color_allies / r12 and one with script_color_allies / g12&lt;br /&gt;
&lt;br /&gt;
Number 1 would be the easiest way to do it.&lt;br /&gt;
you can also make it to where the trigger lays in a choke point that will definetly be triggered or you can just trigger it manually through script, the choice is yours.&lt;br /&gt;
&lt;br /&gt;
Now at this point, all of your squad is still set to the red color group, even though you&#039;ve just activated the green color group. so now you have to manually assign the guys you want to split off and get on the green group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
split_squad()&lt;br /&gt;
{&lt;br /&gt;
	// assuming you do it manually and have given the split point trigger a targetname of &amp;quot;split_squad&amp;quot;&lt;br /&gt;
	trigger = getEnt(&amp;quot;split_squad&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	trigger notify(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// get all of your Allies in the squad&lt;br /&gt;
	guys = getAiArray(&amp;quot;allies&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// now split them up&lt;br /&gt;
	for(i = 0; i &amp;lt;= guys.size/2; i++)&lt;br /&gt;
		if(isAlive(guys[i])) // make sure the guy is still alive first!&lt;br /&gt;
			guys[i].script_forceColor = &amp;quot;g&amp;quot;; // set them to green&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now half of your AI will be set to red and continue on the red color group nodes, and the other half will start to follow the green color group nodes.&lt;br /&gt;
&lt;br /&gt;
Just a little bit more info, then we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
Lets say the purpose of splitting the squad was to intentionally kill off a few of them. if you are using reinforcements, you will need to stop the AI&#039;s reinforcements BEFORE you kill them, otherwise their reinforcement will take their place after they are dead, and when that reinforcement dies, another reinforcement will take their place, and so on. so just before you would want to kill, say, the green guys, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// you are now at this point in your level&#039;s script&lt;br /&gt;
guys = getAiArray(&amp;quot;allies&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
for(i = 0; i &amp;lt; guys.size; i++)&lt;br /&gt;
{&lt;br /&gt;
	if(isDefined(guys[i].script_forceColor) &amp;amp;&amp;amp; guys.script_forceColor == &amp;quot;g&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		guys[i] disable_ai_color();&lt;br /&gt;
		guys[i] disable_replace_on_death();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	waittillframeend; // be sure he completes the functions&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets say you have an AI you placed in your level to do a vignette, like opening a gate or something. if you dont want to just kill this guy off, but would rather he join the squad on whatever color group you want, all you have to do is this, assuming you gave him a targetname of &amp;quot;gate_keeper&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
guy = getEnt(&amp;quot;gate_keeper&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if(isSentient(guy)) // make sure you didnt grab the spawner instead of the guy&lt;br /&gt;
{&lt;br /&gt;
	guy enable_ai_color();&lt;br /&gt;
	guy.script_forceColor = &amp;quot;r&amp;quot;; // set them to red&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
be sure to include maps/_utilty.gsc to your script for all this to work. add this to the very top of your script:&lt;br /&gt;
&lt;br /&gt;
 #include maps\_utility;&lt;br /&gt;
&lt;br /&gt;
To set up color group reinforcements, place a friendly AI in your map where you would want the reinforcements to spawn from. on this AI, check the Spawner and Undeleteable boxes.&lt;br /&gt;
now make a trigger_multiple and give it a targetname of &amp;quot;friendly_respawn_trigger&amp;quot;. do NOT check the trigger_spawn box! now connect the trigger to the spawner by first selecting the trigger then the AI spawner and pressing W. do NOT target more than one AI with this trigger or it won&#039;t work.&lt;br /&gt;
&lt;br /&gt;
That&#039;s all there is to it. you can now copy the trigger and connected AI and paste it anywhere in the map you would want to be able to spawn in reinforcements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-456.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Basic_AI_Paths&amp;diff=16601</id>
		<title>Call of Duty 4: SP - Basic AI Paths</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Basic_AI_Paths&amp;diff=16601"/>
		<updated>2012-02-23T11:28:29Z</updated>

		<summary type="html">&lt;p&gt;Ingram: /* Map GSC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;By Ryokukitsune&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Preface==&lt;br /&gt;
Alrighty, so you want to start poking around in Radiant for COD 4 huh? Well so do I and as a point I like to keep notes which usually means sifting threw a lot of tutorials and figuring out how things work and clearing up a lot of things which may trip of my fellow newb so lets get started.&lt;br /&gt;
&lt;br /&gt;
First things you need to know to use this tutorial,&lt;br /&gt;
&lt;br /&gt;
How to use Radiant&lt;br /&gt;
How to Build, populate and export a playable map&lt;br /&gt;
&lt;br /&gt;
We need to figure out how to move our AIs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating AI Paths==&lt;br /&gt;
&lt;br /&gt;
For this tutorial you need a simple room and an objective, for the sake of this tutorial it will simply be to have an AI move a crossed the room and take cover. Simple enough rite? Well if you’re an absolute beginner this can be extremely annoying since its not as straight forward as you think it would be though the learning curve isn’t too great and once you do it then its easy to replicate.&lt;br /&gt;
&lt;br /&gt;
So aside from the room we need two more things: a player, that’s you, and an actor which is our AI. First anywhere in the room create an “info_playerstart” node and make sure its not penetrating the ground then create an actor by selecting actor&amp;gt;ally&amp;gt;marine&amp;gt;AR&amp;gt;m4grunt. Any actor will do though if you select the wrong one it might end up shooting at you during the course of the test. (don’t select axis if you don’t want to be fired on)&lt;br /&gt;
&lt;br /&gt;
NOTE: depending on which actor you chose you need to make sure to add in his weapon into the zone file or you will get an error an example would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmodel,weapon_mp5&amp;lt;/code&amp;gt; (the world model to see it)&lt;br /&gt;
&amp;lt;code&amp;gt;xmodel,viewmodel_mp5&amp;lt;/code&amp;gt; (the view model if he dies so you can pick it up)&lt;br /&gt;
&lt;br /&gt;
If you don’t add them first the map won’t load, second you will get a crashing error if you try to pick it up.&lt;br /&gt;
&lt;br /&gt;
Now in order for the AI to go a crossed the room you need to place a cover node somewhere by going to node&amp;gt;cover&amp;gt;crouch.&lt;br /&gt;
&lt;br /&gt;
Now for the AI to actually go places you need to trigger it, meaning that if you don’t do anything the game doesn’t do anything basically everything will be stuck in a loop until a set condition is met its a series of triggers till you achieve the end of the sequences IE beat the map.&lt;br /&gt;
&lt;br /&gt;
SO we need to create a trigger. Create a large brush and place it in front of the info_playerstart node make sure it covers the width of the room (so you can’t go around it) and right click and turn it into a trigger_multiple [trigger&amp;gt;multiple] now select your cover node and your trigger_multiple node and hit shift+G to bring up the “Script Group Name” editor.&lt;br /&gt;
&lt;br /&gt;
This is the window which assigns color groups to nodes and triggers which drive the AIs, creating a sequence of these all over the map not only moves your AIs but creates a series of events leading you to your conclusion, IE game over mission accomplished congradulations, you get a cookie… ahem…&lt;br /&gt;
&lt;br /&gt;
Select the red box and click the add button then down where it says&lt;br /&gt;
 name&lt;br /&gt;
 script_color_allies&lt;br /&gt;
&lt;br /&gt;
press OK. Congratulations you’ve made a color group. Though to get the AI to move. You need two more things.&lt;br /&gt;
&lt;br /&gt;
First you need to add a piece of script to your AI.&lt;br /&gt;
&lt;br /&gt;
Type exactly the fallowing two lines for key/value:&lt;br /&gt;
 script_forceColor&lt;br /&gt;
 r&lt;br /&gt;
&lt;br /&gt;
now if you look at your trigger/cover nodes you’ll see that you have a key/value that reads&lt;br /&gt;
&lt;br /&gt;
 script_color_allies&lt;br /&gt;
 r0&lt;br /&gt;
&lt;br /&gt;
this means that once triggered this is the first position your AI moves to and performs the action which in our case is to take cover.&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
The “script_color_allies” value of “r0” is the number in the sequence of triggers each AI[group] has if you want the AI to move again place another trigger and cover nodes with the same key/value and change “r0” to “r1” and so on and so on.&lt;br /&gt;
&lt;br /&gt;
Well this is where I got hung up in the tutorial on the subject since there was absolutely no mention of anything else beyond this other than more scripting which was over my head.&lt;br /&gt;
&lt;br /&gt;
If you load your map up now you have a retarded AI because things aren’t quite set up rite. You will have a world and an AI but he isn’t doing what you’ve set him up to do. He knows where to go its just he isn’t smart enough to get there on his own. Tisk tisk, stupid AIs…&lt;br /&gt;
&lt;br /&gt;
Well the final piece of this puzzle is Pathnodes. A pathnode is basically an independent node which is placed in the map to guide AIs around between other nodes nodes. It’s like a landmark.&lt;br /&gt;
&lt;br /&gt;
If you consider the biology of an ant colony they all move towards an objective though no one ant is smart enough to get there to do its job. Between points A and B are scent markers to guide them to their destination to do their job. Since pathnodes are something you cant see in game the concept is very similar however the process is much different.&lt;br /&gt;
&lt;br /&gt;
Back in Radiant you need to create a path node [node&amp;gt;pathnode] in front of your AI about 5-10 units. Then copy it {{Key|Spacebar}} a few dozen times every few units or so and be sure to spread them out.&lt;br /&gt;
&lt;br /&gt;
Thankfully an AI is smart enough not to just move from pathnode to pathnode but unless you have enough to populate an area between cover he will just kind of stop at the lat one he knew how to get to.&lt;br /&gt;
&lt;br /&gt;
If you want to specify a path for him to take create a narrow line of path nodes between him and the cover node though I recommend using at least 2 columns to get the job done or he might get lost and confused and turn around a few times. (this happened to me as I experimented with placement a bit)&lt;br /&gt;
&lt;br /&gt;
Now short of lights and light volumes the map is ready to save and load. Congratulations you’re on your way to being a pro!&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==Map GSC==&lt;br /&gt;
IMPORTANT EDIT:&lt;br /&gt;
&lt;br /&gt;
well apparently i forgot something that is essential to the process, hey I&#039;m human, if you don&#039;t have a valid GSC file in your raw/maps directory you can&#039;t trigger anything. you basically don&#039;t exist in the game past being a target and a camera.&lt;br /&gt;
&lt;br /&gt;
you cant activate triggers or spawners and you will have no weapons unless they are picked up.&lt;br /&gt;
&lt;br /&gt;
the most basic valid gsc file consists of the fallowing 3 lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	maps\_load::main();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-472.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:AI]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Beginner_Tutorial&amp;diff=16600</id>
		<title>Call of Duty 4: SP - Beginner Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_SP_-_Beginner_Tutorial&amp;diff=16600"/>
		<updated>2012-02-23T11:27:44Z</updated>

		<summary type="html">&lt;p&gt;Ingram: /* Compiling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Single Player Tutorial including Lighting, Compiling, Weapons and the Zone File.}}&lt;br /&gt;
&lt;br /&gt;
A SinglePlayer map should always be saved in Radiant as &amp;quot;sp_mapname&amp;quot; or &amp;quot;mapname&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will make sure the compile tools build the playable game file (.d3dbsp) in the correct directory.&lt;br /&gt;
&lt;br /&gt;
==Things you must have==&lt;br /&gt;
(this part used the Map Editor)&lt;br /&gt;
&lt;br /&gt;
Before starting any Singleplayer editting it is a must to have a working level:&lt;br /&gt;
&lt;br /&gt;
A working level: A closed in room with no leaks, or a Skybox with no leaks (a hollow cube with inside surfaces of a chosen &amp;quot;sky&amp;quot; texture and worldspawn values found on [[Call of Duty 4: Stock worldspawn settings|here]].&lt;br /&gt;
&lt;br /&gt;
==Lighting==&lt;br /&gt;
&lt;br /&gt;
If you have an indoor level its best to place a few lights: Right Click&amp;gt; Light. The light has defualt values set so that it will light anything inside of the radius (see the 2d grid when the light is selected). With a light selected you can press {{Key|N}} to change the values, radius increases the distance convered and intensity controls the brightness.&lt;br /&gt;
&lt;br /&gt;
==Player Spawn - Starting Location==&lt;br /&gt;
&lt;br /&gt;
*Player Spawn: Right Click the 2d Grid&amp;gt; Info&amp;gt; Player_start&lt;br /&gt;
&lt;br /&gt;
*This is where you the player will spawn, do no let it touch or overlap anything solid. Good practice is to place this spawn a few units off the floor. (The player will start feet on the ground)&lt;br /&gt;
&lt;br /&gt;
==Spawning AI==&lt;br /&gt;
&lt;br /&gt;
*AI Spawning: Make a brush, apply the Trigger texture to the entire brush. With the brush selected Right Click the 2d Grid &amp;gt; Trigger &amp;gt; Multiple. With the trigger still selected press &amp;quot;N&amp;quot;, now check the box marked &amp;quot;Trigger_Spawn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Now all you need is an actor (note this should work with all actors)&lt;br /&gt;
&lt;br /&gt;
*Right Click the 2d Grid&amp;gt; Actor&amp;gt; Enemy&amp;gt; Arab&amp;gt; AR&amp;gt; Ak47&lt;br /&gt;
(as you can see for the purpose of the tutorial I have used an Actor, who is an Enemy to the player, who has the outfit of a Arab, who is using an Assualt Rifle, and has the weapon AK47)&lt;br /&gt;
&lt;br /&gt;
*With the actor selected press &amp;quot;N&amp;quot; check the box: &amp;quot;SPAWNER&amp;quot; (note:: he will not spawn if the player can see him spawn)&lt;br /&gt;
&lt;br /&gt;
*You may now link the Trigger to the AI.&lt;br /&gt;
&lt;br /&gt;
*Select the Trigger, then select the AI Actor, press W. A visible line will connect them. The reason they are connected in this order is simple. The Trigger activates the Actor, not the other way around.&lt;br /&gt;
&lt;br /&gt;
==Weapons==&lt;br /&gt;
&lt;br /&gt;
*Weapon: As an extra, we want to kill the Enemy actor, so we&#039;ll place a Weapon. Right click&amp;gt; Weapon&amp;gt; USP&lt;br /&gt;
&lt;br /&gt;
*Now select the weapon and press {{Key|N}}, check the box &amp;quot;Suspend&amp;quot; so the weapon stays where it is.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Compiling==&lt;br /&gt;
&lt;br /&gt;
*Compiling and Creating nesaccary Script Files:&lt;br /&gt;
&lt;br /&gt;
*Create a text document inside of the directory: CoD4\raw\maps&lt;br /&gt;
&lt;br /&gt;
*Rename this file to: yourmapname.gsc&lt;br /&gt;
&lt;br /&gt;
*Inside the file type this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	maps\_load::main();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this part uses the Compile tools)&lt;br /&gt;
&lt;br /&gt;
#In the COD4 Compiling utility you need to compile the BSP with these options checked:&amp;lt;br&amp;gt;Compile BSP&amp;lt;br&amp;gt;Connect Paths&amp;lt;br&amp;gt;Compile Lighting&lt;br /&gt;
#Now compile your reflections (assuming you have reflection probes - If you don&#039;t the map should still work)&lt;br /&gt;
#Build Your Fast File.&lt;br /&gt;
#Update Zone File&lt;br /&gt;
&lt;br /&gt;
(Now I will assume only that you have included the USP pistol as an entity in this map)&lt;br /&gt;
&lt;br /&gt;
*You must add(to the list on the right):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sound,ru_battlechatter,mapname,all_sp&lt;br /&gt;
sound,uk_battlechatter,mapname,all_sp&lt;br /&gt;
xmodel,viewmodel_base_character&lt;br /&gt;
xmodel,viewmodel_base_viewhands&lt;br /&gt;
xmodel,viewmodel_usp&lt;br /&gt;
weapon,sp/usp&lt;br /&gt;
xmodel,weapon_usp&lt;br /&gt;
weapon,sp/ak47&lt;br /&gt;
xmodel,weapon_ak47&lt;br /&gt;
xmodel,viewmodel_ak47&lt;br /&gt;
weapon,sp/mp5&lt;br /&gt;
xmodel,weapon_mp5&lt;br /&gt;
xmodel.viewmodel_mp5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The sound files are for the AIs battle chatter and movement (thanks to Camo1018)&lt;br /&gt;
&lt;br /&gt;
*The MP5 is needed as its included in the defualt loadout (basic script)&lt;br /&gt;
&lt;br /&gt;
*Then click SAVE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*If you have used anyother assets in your map you must add them via this method- The Zone files left hand coloumn should tell you if you are missing anything, you may copy and paste from the the &amp;quot;missing Assets&amp;quot; list to the right hand column via {{Key|Ctrl+C}} then {{Key|Ctrl+V}}.&lt;br /&gt;
&lt;br /&gt;
*And as you can see I added the AK47 - This is because the Ai actor is using it and the player can pick it up. The Ai might pull out a pistol (the M9 usually) but I&#039;ve never added it to the assets and its always worked.&lt;br /&gt;
&lt;br /&gt;
*Now you can select the &amp;quot;Run Map option&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*If for some reason the button does not load the game&lt;br /&gt;
*Go to your COD4 Singleplayer&lt;br /&gt;
&lt;br /&gt;
*Drop the console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/developer 1&lt;br /&gt;
/g_connectpaths 1&lt;br /&gt;
/spdevmap mapname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extra==&lt;br /&gt;
&lt;br /&gt;
ADDING GUNS: Each gun needs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xmodel,viewmodel_gunname&lt;br /&gt;
xmodel,weapon_gunname&lt;br /&gt;
weapon,sp/gunname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
(The gun names can be found by right clicking the 2d grid in the editor and selecting &amp;quot;weapons&amp;quot; from the drop down list.&lt;br /&gt;
&lt;br /&gt;
camo1018: When any AI character initiates &amp;quot;reloading&amp;quot; sequence, their clips will not drop. In order to implement live clips, you must add corresponding parts to the zone file and to the main script.&lt;br /&gt;
&lt;br /&gt;
For example, on the zone file, you would add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fx,shellejects/clip_m16&lt;br /&gt;
fx,shellejects/clip_dragunov&lt;br /&gt;
fx,shellejects/clip_ak47&lt;br /&gt;
fx,shellejects/clip_g36&lt;br /&gt;
fx,shellejects/clip_ak74u&lt;br /&gt;
fx,shellejects/clip_mp5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in the script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
level.weaponClipModels = [];&lt;br /&gt;
level.weaponClipModels[0] = &amp;quot;weapon_m16_clip&amp;quot;;&lt;br /&gt;
level.weaponClipModels[1] = &amp;quot;weapon_dragunov_clip&amp;quot;;&lt;br /&gt;
level.weaponClipModels[2] = &amp;quot;weapon_ak47_clip&amp;quot;;&lt;br /&gt;
level.weaponClipModels[3] = &amp;quot;weapon_g36_clip&amp;quot;;&lt;br /&gt;
level.weaponClipModels[4] = &amp;quot;weapon_ak74u_clip&amp;quot;;&lt;br /&gt;
level.weaponClipModels[5] = &amp;quot;weapon_mp5_clip&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should be loaded before your script calls maps/_load:main();&lt;br /&gt;
&lt;br /&gt;
And, when it&#039;s done, your characters in your map should hold on to a correct clip when they reload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your map will be multi-coloured unless you make and edit a Grid File (click make grid in the compiler - then once you&#039;ve collected all the dots that a player would be able to reach in normal gameplay - shut down the game - recompiler your map - done)&lt;br /&gt;
&lt;br /&gt;
To use the functions of the bottom of the compile tools (assuming your in 1024*768 resolution and cant see them) you may need to increase your resolution.&lt;br /&gt;
&lt;br /&gt;
You may need to include extra sound assetes when getting AI to move (connecting them to a Action_node) with path nodes indicating the path to said action_node. For these, just Update your Zone file and copyi the missing assests, for the left colum to the right.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a quick guide for people who want to get going with the Single Player.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;By techno2sl&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonline.com/Tutorials-read-458.html Modsonline.com]&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 02:58, 29 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Radiant]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Gametypes&amp;diff=16599</id>
		<title>Call of Duty 4: Gametypes</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Gametypes&amp;diff=16599"/>
		<updated>2012-02-23T11:15:10Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Formatting, formatting, formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;by Tally&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|Adding CTF/CTFB to your new map is easy. The only level requirement is that you must have SAB spawn points. (if you dont have SAB spawns, it can still be done)}}&lt;br /&gt;
&lt;br /&gt;
Essentailly, I spawn a &#039;&#039;&#039;trigger_radius&#039;&#039;&#039; for each team&#039;s flag. I give each team&#039;s trigger_radius a &#039;&#039;&#039;targetname&#039;&#039;&#039; which the code in the CTF/CTFB gametypes looks for. It then dynamically spawns a flag model onto that trigger_radius.&lt;br /&gt;
&lt;br /&gt;
All you have to do is copy the level GSC template below and use it for your own map:&lt;br /&gt;
&lt;br /&gt;
*Here is the level GSC from mp_backlot used in AWE4 for CTF and CTFB:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;main()&lt;br /&gt;
{&lt;br /&gt;
	maps\mp\mp_backlot_fx::main();&lt;br /&gt;
	maps\createart\mp_backlot_art::main();&lt;br /&gt;
	maps\mp\_load::main();	&lt;br /&gt;
	&lt;br /&gt;
	maps\mp\_compass::setupMiniMap(&amp;quot;compass_map_mp_backlot&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);&lt;br /&gt;
	//VisionSetNaked( &amp;quot;mp_backlot&amp;quot; );&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_backlot_ext&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar( &amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.25&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.25&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.3&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;1800&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	// CTF/B code starts here&lt;br /&gt;
	if( getDvar(&amp;quot;g_gametype&amp;quot;) == &amp;quot;ctf&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		addobj(&amp;quot;allied_flag&amp;quot;, (-486, 1998, 64), (0, 0, 0));&lt;br /&gt;
		addobj(&amp;quot;axis_flag&amp;quot;, (630, -2067, 64), (0, 0, 0));&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(&amp;quot;g_gametype&amp;quot;) == &amp;quot;ctfb&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		addobj(&amp;quot;allied_flag&amp;quot;, (-486, 1998, 64), (0, 0, 0));&lt;br /&gt;
		addobj(&amp;quot;axis_flag&amp;quot;, (630, -2067, 64), (0, 0, 0));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addobj(name, origin, angles)&lt;br /&gt;
{&lt;br /&gt;
   ent = spawn(&amp;quot;trigger_radius&amp;quot;, origin, 0, 48, 148);&lt;br /&gt;
   ent.targetname = name;&lt;br /&gt;
   ent.angles = angles;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;U&amp;gt;Use the code above for CTF and CTFB&amp;lt;/U&amp;gt; (not all of the level code, of course - just the relevant CTF, and CTFB bits. You dont want mp_backlot code in your map), and copy/paste it into your own map&#039;s GSC file.&lt;br /&gt;
&lt;br /&gt;
*Notice the coordinates such as &#039;&#039;&#039;(-486, 1998, 64)&#039;&#039;&#039;? You have to change them to suit your map. &#039;&#039;&#039;Here&#039;s how:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Go into your map, and go to the point that you think the allied flag should go.&lt;br /&gt;
&lt;br /&gt;
*Drop down console and type:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;/viewpos&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Close&lt;br /&gt;
&lt;br /&gt;
*Go to the next place, you think the axis flag should go, and do the same viewpos.&lt;br /&gt;
&lt;br /&gt;
*Come out of your map.&lt;br /&gt;
&lt;br /&gt;
*Look in the fs_game mod folder for the mp_console.log file, and open it. &lt;br /&gt;
&lt;br /&gt;
*Find the viewpos coordinates you just did, and copy/paste them into the relevant teams code.&lt;br /&gt;
&lt;br /&gt;
*Once in your map GSC file, &#039;&#039;&#039;subtract 60&#039;&#039;&#039; from the &#039;z&#039; corodinate ( they are listed like this - (x, y, z)). This is because viewpos is taken from the players eye level, and floor level is 60 units less than the eye level.&lt;br /&gt;
&lt;br /&gt;
{{Warning|&#039;&#039;&#039; Make sure the right coordinates go with the right team - remember: allies have the &#039;&#039;&#039;&amp;quot;allied_flag&amp;quot;&#039;&#039;&#039; targetname; axis the &#039;&#039;&#039;&amp;quot;axis_flag&amp;quot;&#039;&#039;&#039; targetname.}}&lt;br /&gt;
&lt;br /&gt;
*You can now either compile your map&#039;s GSC file into your map&#039;s fast file, or simply include it in your map&#039;s IWD file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CTF/CTFB is now included in most mods, such as AWE4, ACE and X4.&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Gametypes]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:AWE]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Switches_Primary_Light&amp;diff=16598</id>
		<title>Call of Duty 4: Switches Primary Light</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Switches_Primary_Light&amp;diff=16598"/>
		<updated>2012-02-23T10:58:13Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning_advanced}}&lt;br /&gt;
{{Note|This tutorial explains how to create a switcheable Primary Light as seen in Steamlab}}&lt;br /&gt;
&lt;br /&gt;
The technique used below is to move a ShadowCaster Brush [[Image:Shadow 1.jpg|32px]] over the actual Light Entity.&lt;br /&gt;
&lt;br /&gt;
Create a new script called &#039;&#039;&#039;_lights.gsc&#039;&#039;&#039; in &amp;lt;code&amp;gt;/raw/maps/mp/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	precacheModel(&amp;quot;com_studiolight_hanging_off&amp;quot;); // precache selected model&lt;br /&gt;
	thread switch_start();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
switch_start()&lt;br /&gt;
{&lt;br /&gt;
	spotlight = getentarray( &amp;quot;switch&amp;quot;, &amp;quot;targetname&amp;quot; ); // get triggers&lt;br /&gt;
&lt;br /&gt;
	if ( isdefined(spotlight) )&lt;br /&gt;
		for ( i = 0 ; i &amp;lt; spotlight.size ; i++ )&lt;br /&gt;
			spotlight[i] thread lights_off();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
lights_off()&lt;br /&gt;
{&lt;br /&gt;
	while (1)&lt;br /&gt;
	{&lt;br /&gt;
		speed = .01; // speed for moving on Z axis&lt;br /&gt;
		height = -36; // high in units to move on Z axis&lt;br /&gt;
&lt;br /&gt;
		spotlight_hide = getent(&amp;quot;spotlight_hide&amp;quot;, &amp;quot;targetname&amp;quot;); // get script_brushmodel(s) in level&lt;br /&gt;
		spotlight_model = getent( &amp;quot;spotlight_model&amp;quot;, &amp;quot;targetname&amp;quot; ); // get xmodel _on&lt;br /&gt;
&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
		spotlight_hide movez (height, speed); // Move script_brushmodel(s) on Z axis&lt;br /&gt;
		spotlight_model setmodel( &amp;quot;com_studiolight_hanging_off&amp;quot; );       // swap xmodel by _off&lt;br /&gt;
		self playsound(&amp;quot;light_switch_off&amp;quot;);&lt;br /&gt;
		spotlight_hide waittill (&amp;quot;movedone&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;);&lt;br /&gt;
		spotlight_hide movez (height - (height * 2), speed);&lt;br /&gt;
		spotlight_model setmodel( &amp;quot;com_studiolight_hanging_on&amp;quot; ); // switch back to _on Xmodel&lt;br /&gt;
		self playsound(&amp;quot;light_switch_on&amp;quot;);&lt;br /&gt;
		spotlight_hide waittill (&amp;quot;movedone&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your Map GSC file (&amp;lt;code&amp;gt;/raw/maps/mp/mp_yourmap.gsc&amp;lt;/code&amp;gt;) add this after &amp;lt;code&amp;gt;maps\mp\_load::main();&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
maps\mp\_lights::main();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the _off model to your Zone File, in my example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;xmodel,com_studiolight_hanging_off&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Radiant (minus the com_studiolight_hanging_on model):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:light_switch.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;The trigger is a trigger_usetouch and has targetname = switch ;&lt;br /&gt;
The ShadowCaster script_brushmodel is solid and has targetname = spotlight_hide ;&lt;br /&gt;
Trigger is connected/link to ShawdowCaster script_brushmodel ;&lt;br /&gt;
spotlight model (not on pic) would be a script_model and have targetname = spotlight_model ;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sounds in the script are custom - you can use &amp;quot;metal_click&amp;quot; also (stock)&lt;br /&gt;
&lt;br /&gt;
{{Warning|The Light Switch will not work if the &#039;&#039;Shadow&#039;&#039; option is turned off in GFX settings of the Game!}}&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 19:40, 19 October 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Lighting]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16597</id>
		<title>Call of Duty 4: Vending Machine</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16597"/>
		<updated>2012-02-23T10:55:06Z</updated>

		<summary type="html">&lt;p&gt;Ingram: meh.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
&#039;&#039;By Kill3r&#039;&#039;&lt;br /&gt;
[[Image:rgn_warning.png|right]]&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial will show you how to add a vending machine that when used heals you and a bottle pops out of it like in (or will be in) the rat_house_v2 map.&lt;br /&gt;
&lt;br /&gt;
  [[Image:warning.png]] REMEMBER: Anywhere that says &amp;quot;yourmapname&amp;quot; change to what your map is called, like mp_funny_bunny&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic1.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding the vending machine model ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First off, open the map you want to add the vending machine to.&lt;br /&gt;
Add a vending machine prefab by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; prefab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic2.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go the the misc_models folder, and look for &amp;quot;com_vending_xxx.map&amp;quot; were xxx is which type you want,&lt;br /&gt;
but its best to use one that has an opening at the bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic3.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating the trigger ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need the trigger, create a brush surrounding the front of the vending machine and texture it with tools &amp;gt; trigger&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic4.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also create a small 8x8x8 brush, the center of this brush is where the bottles will spawn (the origin of the bottles is at the bottom)&lt;br /&gt;
to help position the smaller brush add a misc_model by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; model and navigate to your raw/xmodel folder&lt;br /&gt;
then insert com_bottle1. Also set the angles of the bottle so they lay flat as they would when coming out of the vending machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic5.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be needing the com_bottle1 model again later so dont delete it just yet :P&lt;br /&gt;
&lt;br /&gt;
Unselect everything then select the trigger brush and the small brush, right click in the 2D area of radiant &amp;gt; trigger &amp;gt; (type you want here)&lt;br /&gt;
&lt;br /&gt;
Types of triggers:&lt;br /&gt;
&lt;br /&gt;
*damage - Shoot the trigger to trigger it&lt;br /&gt;
*disk - a round trigger, cant change the height&lt;br /&gt;
*friendlychain - Used for SP only&lt;br /&gt;
*hurt - Hurts the player... dont use this one lol xD&lt;br /&gt;
*lookat - Look at the trigger to trigger it&lt;br /&gt;
*multiple - Triggered when touched by a player&lt;br /&gt;
*once - Triggered only once&lt;br /&gt;
*radius - like disk but can change the height&lt;br /&gt;
*use - Press the USE button to trigger&lt;br /&gt;
*use_touch - Player must be touching the trigger and press the USE button to trigger it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I recommended to use trigger_use_touch or trigger_use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic6.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unselect everything then texture the small brush with tools &amp;gt; origin.&lt;br /&gt;
Press N to open the entity box, and type the following in:&lt;br /&gt;
&lt;br /&gt;
 Key: hintstring&lt;br /&gt;
 Value: Press^3 [{+activate}] ^7to have a drink&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: heal&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic7.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding where the impact will come from ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to set where the impact is going to come from to force the bottle out of the vending machine (and also set the angle of the bottle when it spawns).&lt;br /&gt;
To do this we need to pace a script_origin by right clicking on the 2D area of Radiant &amp;gt; script &amp;gt; origin then a red box should appear.&lt;br /&gt;
Place this corresponding to where you what the impact to come from.&lt;br /&gt;
&lt;br /&gt;
Now use the com_bottle1 model that you used before when adding the trigger, make sure that the angles are as if it was coming out of the vending machine.&lt;br /&gt;
Now press N to open the entitys box for the bottle and look at the angles, then select the script_origin and set the same angles for that.&lt;br /&gt;
Now you can delete the com_bottle1 model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic8.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure nothing is selected by pressing Esc few times, now select the trigger THEN the script_origin and press W.&lt;br /&gt;
A red line should appear from the center of the large or smaller trigger brushes connecting to the script_origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic9.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The .csv files ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
(ff .csv and sound .csv)&lt;br /&gt;
&lt;br /&gt;
OK, thats the Radiant part done, now for the .csvs&lt;br /&gt;
&lt;br /&gt;
*Go to CoD4\zone_source and look for yourmapname.csv&lt;br /&gt;
Open that with notepad and add these lines somewhere (xmodel, lines only requierd if the model is not already used in your map)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xmodel,com_bottle1&lt;br /&gt;
xmodel,com_bottle2&lt;br /&gt;
xmodel,com_bottle3&lt;br /&gt;
xmodel,com_bottle4&lt;br /&gt;
sound,yourmapname,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Save and close&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Now go to CoD4\raw\soundaliases, make a new .csv called yourmapname.csv (a .txt renamed to .csv)&lt;br /&gt;
Open it with notepad and add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vender,,level/ac_unit_window_loop.wav,0.7,0.7,max,1,1,150,300,auto,streamed,,looping&lt;br /&gt;
vender_drop,1,yourmapname/vender_drop1.wav,0.7,0.8,max,0.9,1,150,300,auto,,,&lt;br /&gt;
vender_drop,2,yourmapname/vender_drop2.wav,0.7,0.8,max,0.9,1,150,300,auto,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and close again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to CoD4\raw\sound and make a new folder called yourmapname, in there place the 2 .wav sounds that can be downloaded (link at the bottom)&lt;br /&gt;
&lt;br /&gt;
== The Scripts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OK then, now the scripty part &lt;br /&gt;
&lt;br /&gt;
New commands that are added with these scripts are:&lt;br /&gt;
&lt;br /&gt;
 set yourmapname_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set yourmapname_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
yourmapname depends what your map is called, like if your map is mp_funny_bunny then the new commands would be:&lt;br /&gt;
&lt;br /&gt;
 set mp_funny_bunny_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set mp_funny_bunny_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add this part somewhere in the main() function of your map .gsc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;);    // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So it should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	maps\mp\_load::main();&lt;br /&gt;
	maps\mp\_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this code UNDER the main() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, with all the code it should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	maps\mp\_load::main();&lt;br /&gt;
	maps\mp\_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Data.png]] Prefabs, scripts, sounds and example map with .map can be downloaded [http://clanbfw.com/kill3rcreations/vending_tut.zip here]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16596</id>
		<title>Call of Duty 4: Vending Machine</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16596"/>
		<updated>2012-02-23T10:53:14Z</updated>

		<summary type="html">&lt;p&gt;Ingram: This is nicer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
&#039;&#039;By Kill3r&#039;&#039;&lt;br /&gt;
[[Image:rgn_warning.png|right]]&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial will show you how to add a vending machine that when used heals you and a bottle pops out of it like in (or will be in) the rat_house_v2 map.&lt;br /&gt;
&lt;br /&gt;
  [[Image:warning.png]] REMEMBER: Anywhere that says &amp;quot;yourmapname&amp;quot; change to what your map is called, like mp_funny_bunny&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic1.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding the vending machine model ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First off, open the map you want to add the vending machine to.&lt;br /&gt;
Add a vending machine prefab by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; prefab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic2.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go the the misc_models folder, and look for &amp;quot;com_vending_xxx.map&amp;quot; were xxx is which type you want,&lt;br /&gt;
but its best to use one that has an opening at the bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic3.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating the trigger ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need the trigger, create a brush surrounding the front of the vending machine and texture it with tools &amp;gt; trigger&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic4.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also create a small 8x8x8 brush, the center of this brush is where the bottles will spawn (the origin of the bottles is at the bottom)&lt;br /&gt;
to help position the smaller brush add a misc_model by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; model and navigate to your raw/xmodel folder&lt;br /&gt;
then insert com_bottle1. Also set the angles of the bottle so they lay flat as they would when coming out of the vending machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic5.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be needing the com_bottle1 model again later so dont delete it just yet :P&lt;br /&gt;
&lt;br /&gt;
Unselect everything then select the trigger brush and the small brush, right click in the 2D area of radiant &amp;gt; trigger &amp;gt; (type you want here)&lt;br /&gt;
&lt;br /&gt;
Types of triggers:&lt;br /&gt;
&lt;br /&gt;
*damage - Shoot the trigger to trigger it&lt;br /&gt;
*disk - a round trigger, cant change the height&lt;br /&gt;
*friendlychain - Used for SP only&lt;br /&gt;
*hurt - Hurts the player... dont use this one lol xD&lt;br /&gt;
*lookat - Look at the trigger to trigger it&lt;br /&gt;
*multiple - Triggered when touched by a player&lt;br /&gt;
*once - Triggered only once&lt;br /&gt;
*radius - like disk but can change the height&lt;br /&gt;
*use - Press the USE button to trigger&lt;br /&gt;
*use_touch - Player must be touching the trigger and press the USE button to trigger it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I recommended to use trigger_use_touch or trigger_use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic6.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unselect everything then texture the small brush with tools &amp;gt; origin.&lt;br /&gt;
Press N to open the entity box, and type the following in:&lt;br /&gt;
&lt;br /&gt;
 Key: hintstring&lt;br /&gt;
 Value: Press^3 [{+activate}] ^7to have a drink&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: heal&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic7.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding where the impact will come from ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to set where the impact is going to come from to force the bottle out of the vending machine (and also set the angle of the bottle when it spawns).&lt;br /&gt;
To do this we need to pace a script_origin by right clicking on the 2D area of Radiant &amp;gt; script &amp;gt; origin then a red box should appear.&lt;br /&gt;
Place this corresponding to where you what the impact to come from.&lt;br /&gt;
&lt;br /&gt;
Now use the com_bottle1 model that you used before when adding the trigger, make sure that the angles are as if it was coming out of the vending machine.&lt;br /&gt;
Now press N to open the entitys box for the bottle and look at the angles, then select the script_origin and set the same angles for that.&lt;br /&gt;
Now you can delete the com_bottle1 model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic8.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure nothing is selected by pressing Esc few times, now select the trigger THEN the script_origin and press W.&lt;br /&gt;
A red line should appear from the center of the large or smaller trigger brushes connecting to the script_origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic9.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The .csv files ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
(ff .csv and sound .csv)&lt;br /&gt;
&lt;br /&gt;
OK, thats the Radiant part done, now for the .csvs&lt;br /&gt;
&lt;br /&gt;
*Go to CoD4\zone_source and look for yourmapname.csv&lt;br /&gt;
Open that with notepad and add these lines somewhere (xmodel, lines only requierd if the model is not already used in your map)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xmodel,com_bottle1&lt;br /&gt;
xmodel,com_bottle2&lt;br /&gt;
xmodel,com_bottle3&lt;br /&gt;
xmodel,com_bottle4&lt;br /&gt;
sound,yourmapname,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Save and close&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Now go to CoD4\raw\soundaliases, make a new .csv called yourmapname.csv (a .txt renamed to .csv)&lt;br /&gt;
Open it with notepad and add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vender,,level/ac_unit_window_loop.wav,0.7,0.7,max,1,1,150,300,auto,streamed,,looping&lt;br /&gt;
vender_drop,1,yourmapname/vender_drop1.wav,0.7,0.8,max,0.9,1,150,300,auto,,,&lt;br /&gt;
vender_drop,2,yourmapname/vender_drop2.wav,0.7,0.8,max,0.9,1,150,300,auto,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and close again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to CoD4\raw\sound and make a new folder called yourmapname, in there place the 2 .wav sounds that can be downloaded (link at the bottom)&lt;br /&gt;
&lt;br /&gt;
== The Scripts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OK then, now the scripty part &lt;br /&gt;
&lt;br /&gt;
New commands that are added with these scripts are:&lt;br /&gt;
&lt;br /&gt;
 set yourmapname_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set yourmapname_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
yourmapname depends what your map is called, like if your map is mp_funny_bunny then the new commands would be:&lt;br /&gt;
&lt;br /&gt;
 set mp_funny_bunny_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set mp_funny_bunny_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add this part somewhere in the main() function of your map .gsc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;);    // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So it should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	mapsmp_load::main();&lt;br /&gt;
	mapsmp_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this code UNDER the main() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, with all the code it should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	mapsmp_load::main();&lt;br /&gt;
	mapsmp_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Data.png]] Prefabs, scripts, sounds and example map with .map can be downloaded [http://clanbfw.com/kill3rcreations/vending_tut.zip here]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16595</id>
		<title>Call of Duty 4: Vending Machine</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Vending_Machine&amp;diff=16595"/>
		<updated>2012-02-23T10:48:20Z</updated>

		<summary type="html">&lt;p&gt;Ingram: improvements and fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
&#039;&#039;By Kill3r&#039;&#039;&lt;br /&gt;
[[Image:rgn_warning.png|right]]&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial will show you how to add a vending machine that when used heals you and a bottle pops out of it like in (or will be in) the rat_house_v2 map.&lt;br /&gt;
&lt;br /&gt;
  [[Image:warning.png]] REMEMBER: Anywhere that says &amp;quot;yourmapname&amp;quot; change to what your map is called, like mp_funny_bunny&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic1.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding the vending machine model ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First off, open the map you want to add the vending machine to.&lt;br /&gt;
Add a vending machine prefab by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; prefab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic2.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go the the misc_models folder, and look for &amp;quot;com_vending_xxx.map&amp;quot; were xxx is which type you want,&lt;br /&gt;
but its best to use one that has an opening at the bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic3.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating the trigger ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need the trigger, create a brush surrounding the front of the vending machine and texture it with tools &amp;gt; trigger&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic4.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also create a small 8x8x8 brush, the center of this brush is where the bottles will spawn (the origin of the bottles is at the bottom)&lt;br /&gt;
to help position the smaller brush add a misc_model by right clicking on the 2D area of Radiant &amp;gt; misc &amp;gt; model and navigate to your raw/xmodel folder&lt;br /&gt;
then insert com_bottle1. Also set the angles of the bottle so they lay flat as they would when coming out of the vending machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic5.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be needing the com_bottle1 model again later so dont delete it just yet :P&lt;br /&gt;
&lt;br /&gt;
Unselect everything then select the trigger brush and the small brush, right click in the 2D area of radiant &amp;gt; trigger &amp;gt; (type you want here)&lt;br /&gt;
&lt;br /&gt;
Types of triggers:&lt;br /&gt;
&lt;br /&gt;
*damage - Shoot the trigger to trigger it&lt;br /&gt;
*disk - a round trigger, cant change the height&lt;br /&gt;
*friendlychain - Used for SP only&lt;br /&gt;
*hurt - Hurts the player... dont use this one lol xD&lt;br /&gt;
*lookat - Look at the trigger to trigger it&lt;br /&gt;
*multiple - Triggered when touched by a player&lt;br /&gt;
*once - Triggered only once&lt;br /&gt;
*radius - like disk but can change the height&lt;br /&gt;
*use - Press the USE button to trigger&lt;br /&gt;
*use_touch - Player must be touching the trigger and press the USE button to trigger it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I recommended to use trigger_use_touch or trigger_use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic6.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unselect everything then texture the small brush with tools &amp;gt; origin.&lt;br /&gt;
Press N to open the entity box, and type the following in:&lt;br /&gt;
&lt;br /&gt;
 Key: hintstring&lt;br /&gt;
 Value: Press [^3USE^7] to have a drink&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: heal&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic7.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding where the impact will come from ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to set where the impact is going to come from to force the bottle out of the vending machine (and also set the angle of the bottle when it spawns).&lt;br /&gt;
To do this we need to pace a script_origin by right clicking on the 2D area of Radiant &amp;gt; script &amp;gt; origin then a red box should appear.&lt;br /&gt;
Place this corresponding to where you what the impact to come from.&lt;br /&gt;
&lt;br /&gt;
Now use the com_bottle1 model that you used before when adding the trigger, make sure that the angles are as if it was coming out of the vending machine.&lt;br /&gt;
Now press N to open the entitys box for the bottle and look at the angles, then select the script_origin and set the same angles for that.&lt;br /&gt;
Now you can delete the com_bottle1 model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic8.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure nothing is selected by pressing Esc few times, now select the trigger THEN the script_origin and press W.&lt;br /&gt;
A red line should appear from the center of the large or smaller trigger brushes connecting to the script_origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:vending_pic9.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The .csv files ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
(ff .csv and sound .csv)&lt;br /&gt;
&lt;br /&gt;
OK, thats the Radiant part done, now for the .csvs&lt;br /&gt;
&lt;br /&gt;
*Go to CoD4\zone_source and look for yourmapname.csv&lt;br /&gt;
Open that with notepad and add these lines somewhere (xmodel, lines only requierd if the model is not already used in your map)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xmodel,com_bottle1&lt;br /&gt;
xmodel,com_bottle2&lt;br /&gt;
xmodel,com_bottle3&lt;br /&gt;
xmodel,com_bottle4&lt;br /&gt;
sound,yourmapname,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Save and close&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Now go to CoD4\raw\soundaliases, make a new .csv called yourmapname.csv (a .txt renamed to .csv)&lt;br /&gt;
Open it with notepad and add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vender,,level/ac_unit_window_loop.wav,0.7,0.7,max,1,1,150,300,auto,streamed,,looping&lt;br /&gt;
vender_drop,1,yourmapname/vender_drop1.wav,0.7,0.8,max,0.9,1,150,300,auto,,,&lt;br /&gt;
vender_drop,2,yourmapname/vender_drop2.wav,0.7,0.8,max,0.9,1,150,300,auto,,,  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and close again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to CoD4\raw\sound and make a new folder called yourmapname, in there place the 2 .wav sounds that can be downloaded (link at the bottom)&lt;br /&gt;
&lt;br /&gt;
== The Scripts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OK then, now the scripty part &lt;br /&gt;
&lt;br /&gt;
New commands that are added with these scripts are:&lt;br /&gt;
&lt;br /&gt;
 set yourmapname_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set yourmapname_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
yourmapname depends what your map is called, like if your map is mp_funny_bunny then the new commands would be:&lt;br /&gt;
&lt;br /&gt;
 set mp_funny_bunny_allow_vender &amp;quot;1&amp;quot;&lt;br /&gt;
 set mp_funny_bunny_health_wait &amp;quot;10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add this part somewhere in the main() function of your map .gsc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;);    // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So it should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	mapsmp_load::main();&lt;br /&gt;
	mapsmp_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this code UNDER the main() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, with all the code it should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.tweakfile = true;&lt;br /&gt;
	setdvar(&amp;quot;scr_fog_disable&amp;quot;, 0);&lt;br /&gt;
	VisionSetNaked(&amp;quot;mp_vending&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	mapsmp_load::main();&lt;br /&gt;
	mapsmp_compass::setupMiniMap(&amp;quot;compass_map_mp_vending&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	ambientPlay(&amp;quot;ambient_pipeline&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;marines&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;opfor&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;desert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowbloomintensity1&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
	setdvar(&amp;quot;r_glowskybleedintensity0&amp;quot;,&amp;quot;.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	setdvar(&amp;quot;compassmaxrange&amp;quot;,&amp;quot;2048&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	precache(); // Call the precache function&lt;br /&gt;
&lt;br /&gt;
	venders = getentarray(&amp;quot;heal&amp;quot;,&amp;quot;targetname&amp;quot;); // Get all the entitys that have &amp;quot;heal&amp;quot; for their &amp;quot;targetname&amp;quot;&lt;br /&gt;
	for(i=0;i&amp;lt;venders.size;i++)&lt;br /&gt;
		venders[i] thread vender();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
precache()&lt;br /&gt;
{&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;, 1); // This creates the dvar to enable the vending machines&lt;br /&gt;
&lt;br /&gt;
	if(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;) == &amp;quot;&amp;quot;)&lt;br /&gt;
		setDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;, 10); // This creates the dvar to set the time between being able to get health again&lt;br /&gt;
&lt;br /&gt;
	level.allow_vender = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_allow_vender&amp;quot;));&lt;br /&gt;
	level.vender_wait = int(getDvar(getDvar(&amp;quot;mapname&amp;quot;) + &amp;quot;_health_wait&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
	for(i=1;i&amp;lt;5;i++)&lt;br /&gt;
		precacheModel(&amp;quot;com_bottle&amp;quot; + i); // Precache (load) the com_bottle1, com_bottle2, com_bottle3 and com_bottle4 models&lt;br /&gt;
&lt;br /&gt;
	level.venderbottles = [];&lt;br /&gt;
	level.venderbottlescurrent = 0;&lt;br /&gt;
	level.venderbottlesmax = 24; // Max bottles in the map at one time, try not to have this too high as it can cause lag and somtimes crash the server&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vender()&lt;br /&gt;
{&lt;br /&gt;
	self.targetname = undefined;&lt;br /&gt;
	dir = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isDefined(dir))&lt;br /&gt;
	{&lt;br /&gt;
		temp = spawnStruct();&lt;br /&gt;
		temp.origin = dir.origin;&lt;br /&gt;
		temp.angles = dir.angles; // Spawn a struct which doesnt count as an entity, record the script_origin&#039;s origin and angles then delete the script_origin&lt;br /&gt;
		dir delete();&lt;br /&gt;
		dir = temp;&lt;br /&gt;
	}&lt;br /&gt;
	self.target = undefined;&lt;br /&gt;
&lt;br /&gt;
	randomMessages = []; // List of random messages when player has had a bottle recently, you can have as many of them as you want.&lt;br /&gt;
	randomMessages[0] = &amp;quot;^2When was the last time you saw a fat rat?&amp;quot;;&lt;br /&gt;
	randomMessages[1] = &amp;quot;^1Careful! You&#039;ll break it!&amp;quot;;&lt;br /&gt;
	randomMessages[2] = &amp;quot;^3Oh no! There&#039;s none left!&amp;quot;;&lt;br /&gt;
	randomMessages[3] = &amp;quot;^4You&#039;re hungry ain&#039;t ya?&amp;quot;;&lt;br /&gt;
	randomMessages[4] = &amp;quot;^5Woof&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self playLoopSound(&amp;quot;vender&amp;quot;); // Make the trigger play a loop sound&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill(&amp;quot;trigger&amp;quot;, player); // Wait until its triggered&lt;br /&gt;
		if(player.sessionstate != &amp;quot;playing&amp;quot;)// Make sure the player is playing&lt;br /&gt;
			continue;&lt;br /&gt;
&lt;br /&gt;
		if(!level.allow_vender)// If vending machines are not allowed then say a message&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2Sorry, fat rats are not allowed on this server&amp;quot;);&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(dir))// If the script_origin is placed correctly in the map, then make a bottle pop out&lt;br /&gt;
		{&lt;br /&gt;
			self playSound(&amp;quot;vender_drop&amp;quot;);// Play the bottle drop sound&lt;br /&gt;
&lt;br /&gt;
			if(isDefined(level.venderbottles[level.venderbottlescurrent]))&lt;br /&gt;
				level.venderbottles[level.venderbottlescurrent] delete();// If we have gone over the limit for max bottle in the map, delete the oldest one&lt;br /&gt;
&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] = spawn(&amp;quot;script_model&amp;quot;,self.origin);// Spawn the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent].angles = dir.angles; // Set the angles of the bottle&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] setModel(&amp;quot;com_bottle&amp;quot; + (randomInt(4) + 1));    // Set random bottle model&lt;br /&gt;
			point = dir.origin;&lt;br /&gt;
			origin = level.venderbottles[level.venderbottlescurrent].origin + maps\mp\_utility::vector_Scale(anglestoup(level.venderbottles[level.venderbottlescurrent].angles),4 + randomFloat(1));&lt;br /&gt;
			velocity = VectorNormalize(origin - point);// Calculate velocity and direction of the impact&lt;br /&gt;
			velocity = maps\mp\_utility::vector_Scale(velocity,10000 + randomInt(5000));&lt;br /&gt;
			level.venderbottles[level.venderbottlescurrent] physicsLaunch(point, velocity);            // Make the bottle fly!&lt;br /&gt;
&lt;br /&gt;
			level.venderbottlescurrent++;&lt;br /&gt;
&lt;br /&gt;
			if(level.venderbottlescurrent &amp;gt;= level.venderbottlesmax)&lt;br /&gt;
				level.venderbottlescurrent = 0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if(isDefined(player.healthwait))// If the player has already used the vending machine then...&lt;br /&gt;
		{&lt;br /&gt;
			player iPrintlnBold(randomMessages[randomInt(randomMessages.size)]); // display one of the rather insulting messages to the player.&lt;br /&gt;
			continue;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		player.healthwait = true;&lt;br /&gt;
		if(player.health &amp;lt; player.maxhealth)// If the players health is not at the max&lt;br /&gt;
		{&lt;br /&gt;
			player.health = player.maxhealth;// Set the players health to the max&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2mmm... ^1y^2u^3m^4m^5y^6!&amp;quot;);// Say these messages if the player was healed&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^1Health Restored!&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			player iPrintlnBold(&amp;quot;^2You already have full health, but ^1y^2u^3m^4m^5y^6! ^2anyway!&amp;quot;); // If the player already has full health then say this message&lt;br /&gt;
		player thread healthwait();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
healthwait()&lt;br /&gt;
{&lt;br /&gt;
	self endon(&amp;quot;disconnect&amp;quot;); // Kill the thread if the player disconnects&lt;br /&gt;
	wait level.vender_wait; // Wait how long level.vender_wait is&lt;br /&gt;
	self.healthwait = undefined; // Make self.healthwait undefined&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Data.png]] Prefabs, scripts, sounds and example map with .map can be downloaded [http://clanbfw.com/kill3rcreations/vending_tut.zip here]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Jumppads&amp;diff=16592</id>
		<title>Call of Duty 4: Jumppads</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Jumppads&amp;diff=16592"/>
		<updated>2012-02-22T20:30:32Z</updated>

		<summary type="html">&lt;p&gt;Ingram: /* Scripting GSC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
&#039;&#039;Marshall2006 show you how to make &#039;Quake III style&#039; jump pads&#039;&#039;&lt;br /&gt;
[[Image:rgn_warning.png|right]]&lt;br /&gt;
== Create your landing zone ==&lt;br /&gt;
&lt;br /&gt;
[[Image:jump1.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Create the trigger ==&lt;br /&gt;
&lt;br /&gt;
*Texture it with Trigger. Filter settings: Usage &amp;gt; Tools&lt;br /&gt;
*Right click your brush, Trigger &amp;gt; Multiple&lt;br /&gt;
*Press the N key twice and enter the following Values:&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: jump&lt;br /&gt;
&lt;br /&gt;
[[Image:jump2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Origins ==&lt;br /&gt;
&lt;br /&gt;
*Rightclick, script &amp;gt; origin&lt;br /&gt;
*Place it where you want to jump from.&lt;br /&gt;
&lt;br /&gt;
[[Image:jump3.jpg]]&lt;br /&gt;
&lt;br /&gt;
*Make sure it&#039;s 4 units off the ground. (effect purposes)&lt;br /&gt;
*Give it the following Values:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: glow&lt;br /&gt;
&lt;br /&gt;
*Copy and Paste the origin 4 times.&lt;br /&gt;
*Place them like below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:jump4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start adding Values to each origin, starting from the closest to the ..&lt;br /&gt;
&lt;br /&gt;
.. parent origin, moving to the furthest.&lt;br /&gt;
&lt;br /&gt;
Pasted Origin #1&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: air1&lt;br /&gt;
 Key: target&lt;br /&gt;
 Value: air2&lt;br /&gt;
&lt;br /&gt;
Pasted Origin #2&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: air2&lt;br /&gt;
 Key: target&lt;br /&gt;
 Value: air3&lt;br /&gt;
&lt;br /&gt;
Pasted Origin #3&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: air3&lt;br /&gt;
 Key: target&lt;br /&gt;
 Value: air4&lt;br /&gt;
&lt;br /&gt;
Pasted Origin #4&lt;br /&gt;
&lt;br /&gt;
 Key: targetname&lt;br /&gt;
 Value: air4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The origins with the values of, for example air1, represent the flight path.&lt;br /&gt;
The more you add, the smoother the flight is.&lt;br /&gt;
&lt;br /&gt;
 [[Image:warning.png]] Keep note of the height difference between the jumpad and the landing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting GSC ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the following into your .GSC file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	maps\mp\_load::main();&lt;br /&gt;
&lt;br /&gt;
	game[&amp;quot;allies&amp;quot;] = &amp;quot;sas&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis&amp;quot;] = &amp;quot;russian&amp;quot;;&lt;br /&gt;
	game[&amp;quot;attackers&amp;quot;] = &amp;quot;axis&amp;quot;;&lt;br /&gt;
	game[&amp;quot;defenders&amp;quot;] = &amp;quot;allies&amp;quot;;&lt;br /&gt;
	game[&amp;quot;allies_soldiertype&amp;quot;] = &amp;quot;woodland&amp;quot;;&lt;br /&gt;
	game[&amp;quot;axis_soldiertype&amp;quot;] = &amp;quot;woodland&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	setdvar( &amp;quot;r_specularcolorscale&amp;quot;, &amp;quot;1&amp;quot; );&lt;br /&gt;
	thread jumper();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
jumper()&lt;br /&gt;
{&lt;br /&gt;
	jumpx = getent (&amp;quot;jump&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	glow = getent (&amp;quot;glow&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	air1 = getent (&amp;quot;air1&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	air2 = getent (&amp;quot;air2&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	air3 = getent (&amp;quot;air3&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	air4 = getent (&amp;quot;air4&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	level._effect[ &amp;quot;beacon_glow&amp;quot; ] = loadfx( &amp;quot;misc/ui_pickup_available&amp;quot; );&lt;br /&gt;
	maps\mp\_fx::loopfx(&amp;quot;beacon_glow&amp;quot;, (glow.origin), 3, (glow.origin) + (0, 0, 90));&lt;br /&gt;
&lt;br /&gt;
	time = 1;&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		jumpx waittill (&amp;quot;trigger&amp;quot;,user);&lt;br /&gt;
		if (user istouching(jumpx))&lt;br /&gt;
		{&lt;br /&gt;
			//throw = user.origin + (100, 100, 0);&lt;br /&gt;
			air = spawn (&amp;quot;script_model&amp;quot;,(0,0,0));&lt;br /&gt;
			air.origin = user.origin;&lt;br /&gt;
			air.angles = user.angles;&lt;br /&gt;
			user linkto (air);&lt;br /&gt;
			air moveto (air1.origin, time);&lt;br /&gt;
			wait 1;&lt;br /&gt;
			air moveto (air2.origin, time);&lt;br /&gt;
			wait .5;&lt;br /&gt;
			air moveto (air3.origin, time);&lt;br /&gt;
			wait .5;&lt;br /&gt;
			air moveto (air4.origin, time);&lt;br /&gt;
			wait 1;&lt;br /&gt;
			user unlink();&lt;br /&gt;
			wait 1;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the finishing product:&lt;br /&gt;
&lt;br /&gt;
[[Image:jumpfinished.jpg]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Teleporter&amp;diff=16591</id>
		<title>Call of Duty 4: Teleporter</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Teleporter&amp;diff=16591"/>
		<updated>2012-02-22T20:21:29Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
&#039;&#039;By Col.Mac&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Nutshell.png]] How to make a player teleport.&lt;br /&gt;
&lt;br /&gt;
In the editor, go to your departure point, draw out a decent size brush and texture it trigger, right click in 2d view, go down and make it trigger_multiple.&lt;br /&gt;
with the trigger still selected press n and enter these values&lt;br /&gt;
&lt;br /&gt;
 Key = target Value = gohere &lt;br /&gt;
 Key = targetname Value = enter &lt;br /&gt;
&lt;br /&gt;
Press n again to close the entity box, thats it for the trigger, press Esc.&lt;br /&gt;
&lt;br /&gt;
Navigate your way in the editor to where you want to be teleported to.&lt;br /&gt;
Right click in the 2d view and create a script_origin (a red cube should appear)&lt;br /&gt;
With that still selected, press n and enter these values&lt;br /&gt;
Key = targetname Value = gohere&lt;br /&gt;
Press n again to close the entity box&lt;br /&gt;
You can rotate the red cube until the arrow faces the direction you wish to be facing when teleported.&lt;br /&gt;
have both selected and hit w to weld them &lt;br /&gt;
Press esc.&lt;br /&gt;
&lt;br /&gt;
If you have things correct you should now see a red line connecting trigger and red cube.&lt;br /&gt;
&lt;br /&gt;
Compile,&lt;br /&gt;
&lt;br /&gt;
Make a .gsc containing this script (just call it teleport)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	entTransporter = getentarray( &amp;quot;enter&amp;quot;, &amp;quot;targetname&amp;quot; );&lt;br /&gt;
	if(isdefined(entTransporter))&lt;br /&gt;
		for( i = 0; i &amp;lt; entTransporter.size; i++ )&lt;br /&gt;
			entTransporter[i] thread transporter();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
transporter()&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill( &amp;quot;trigger&amp;quot;, player );&lt;br /&gt;
		entTarget = getEnt( self.target, &amp;quot;targetname&amp;quot; );&lt;br /&gt;
		wait 0.1;&lt;br /&gt;
		player setOrigin( entTarget.origin );&lt;br /&gt;
		player setplayerangles( entTarget.angles );&lt;br /&gt;
		wait 0.1;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dont forget to call up this .gsc in your main .gsc &lt;br /&gt;
&lt;br /&gt;
 maps\mp\_teleport::main(); &lt;br /&gt;
&lt;br /&gt;
For your Zone File:&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/_teleport.gsc&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Greets dadofazz / Kill3r (who found it via azz.. who found it via unknown sources)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I Have added some Videos to Help:&lt;br /&gt;
&amp;lt;videoflash&amp;gt;gavmdAkmv1c&amp;lt;/videoflash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;videoflash&amp;gt;FTsmPuHVazY&amp;lt;/videoflash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Videos Added by Zebb)&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Breakable_Windows&amp;diff=16590</id>
		<title>Call of Duty 4: Breakable Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Breakable_Windows&amp;diff=16590"/>
		<updated>2012-02-22T20:20:09Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial will explain how to add breakable glass with a certain amount of damage in your maps (as in SP level Launch Facility).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;By -=FD=-&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==In Radiant==&lt;br /&gt;
&lt;br /&gt;
*Make a trigger_damage the same size as your window&lt;br /&gt;
*Give your trigger_damage the key/values:&lt;br /&gt;
&lt;br /&gt;
 targetname&lt;br /&gt;
 windtrig&lt;br /&gt;
&lt;br /&gt;
*Make your UNBROKEN window, convert it to a script_brushmodel&lt;br /&gt;
*Unselect everything, Select the trigger then the window and press W&lt;br /&gt;
*If you want to, make the broken bits of your window, convert them to a script_brushmodel&lt;br /&gt;
*Select all the broken bits and give them the targetname &#039;brokenwindow1&#039; (increment the number for each window)&lt;br /&gt;
*Save, and add the script into one of your .gsc files (preferrably mp_mapname_fx.gsc but I think it would work in mp_mapname.gsc)&lt;br /&gt;
*Add this line to your zone file:&lt;br /&gt;
&lt;br /&gt;
 fx,props/car_glass_large&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
*Create a new file under /raw/maps/mp/ called _breakglass.gsc and have the following in:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	windfx = loadfx (&amp;quot;props/car_glass_large&amp;quot;);&lt;br /&gt;
	windtrigs = getentarray(&amp;quot;windtrig&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	for(i=0;i&amp;lt;windtrigs.size;i++)&lt;br /&gt;
		windtrigs[i] thread dowindow(i,windfx);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
dowindow(windnumber,windfx)&lt;br /&gt;
{&lt;br /&gt;
	window = getent(self.target,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	totaldamage=0;&lt;br /&gt;
	targetdamage=100;&lt;br /&gt;
	windowbroken=0;&lt;br /&gt;
	broken = getentarray(&amp;quot;brokenwindow&amp;quot;+(windnumber+1),&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	for(j=0;j&amp;lt;broken.size;j++)&lt;br /&gt;
	{&lt;br /&gt;
		broken[j] notsolid();&lt;br /&gt;
		broken[j] hide();&lt;br /&gt;
	}&lt;br /&gt;
	window show();&lt;br /&gt;
	while(!windowbroken)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill (&amp;quot;damage&amp;quot;,amount);&lt;br /&gt;
		totaldamage+=amount;&lt;br /&gt;
		if(totaldamage&amp;gt;targetdamage)&lt;br /&gt;
			windowbroken=1;&lt;br /&gt;
	}&lt;br /&gt;
//        self playsound(&amp;quot;glass_break&amp;quot;);&lt;br /&gt;
	PlayFX(windfx, self.origin );&lt;br /&gt;
	for(j=0;j&amp;lt;broken.size;j++)&lt;br /&gt;
		broken[j] show();&lt;br /&gt;
	window delete();&lt;br /&gt;
	self delete();&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your main mp GSC, after &#039;&#039;maps\mp\_load::main();&#039;&#039; add this line:&lt;br /&gt;
&lt;br /&gt;
 maps\mp\_breakglass::main();&lt;br /&gt;
&lt;br /&gt;
Now, add this to your Zone File:&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/_breakglass.gsc&lt;br /&gt;
&lt;br /&gt;
== Optional ==&lt;br /&gt;
&lt;br /&gt;
Create a soundalias file for the sound, and uncomment / add your soundname to the self playsound line&lt;br /&gt;
&lt;br /&gt;
If you want to change how much damage it takes to break, change &#039;targetdamage&#039; in the &#039;dowindow&#039; routine to another number, at the moment it takes about 3 shots from most weapons.&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Elevator_Brushes&amp;diff=16589</id>
		<title>Call of Duty 4: Elevator Brushes</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Elevator_Brushes&amp;diff=16589"/>
		<updated>2012-02-22T20:16:55Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Shortened the code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning_forpro}}&lt;br /&gt;
&lt;br /&gt;
== Simple Elevator ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by nuthowz&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|Create the elevator as a script_brushmodel then assign the key/values}}&lt;br /&gt;
&lt;br /&gt;
 key   = targetname&lt;br /&gt;
 value = elevator&lt;br /&gt;
&lt;br /&gt;
Then create the triggers&lt;br /&gt;
go to triggers use_touch create 2 of these 1 for the beginning and 1 for the end&lt;br /&gt;
&lt;br /&gt;
assign key/values&lt;br /&gt;
&lt;br /&gt;
 key   = targetname&lt;br /&gt;
 value = switch &lt;br /&gt;
&lt;br /&gt;
Then connect them by selecting your &#039;&#039;&#039;brushmodel&#039;&#039;&#039; then &#039;&#039;&#039;trigger&#039;&#039;&#039; then hit the {{Key|W}} key to weld them. That&#039;s it for the map side&lt;br /&gt;
&lt;br /&gt;
Now create your script for the elevator to move.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	level.elevatorUp = 1;&lt;br /&gt;
	level.elevatorMoving = false;&lt;br /&gt;
	thread elevator_start();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
elevator_start()&lt;br /&gt;
{&lt;br /&gt;
	elevator = getentarray (&amp;quot;switch&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if ( isdefined(elevator) )&lt;br /&gt;
		for (i = 0; i &amp;lt; elevator.size; i++)&lt;br /&gt;
			elevator[i] thread elevator_think();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
elevator_think()&lt;br /&gt;
{&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		self waittill (&amp;quot;trigger&amp;quot;);&lt;br /&gt;
		if (!level.elevatorMoving)&lt;br /&gt;
			thread elevator_move();&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
elevator_move()&lt;br /&gt;
{&lt;br /&gt;
	elevatormodel = getent (&amp;quot;elevator&amp;quot;, &amp;quot;targetname&amp;quot;);&lt;br /&gt;
	level.elevatorMoving = true;&lt;br /&gt;
	speed = 10;&lt;br /&gt;
	height = 581;&lt;br /&gt;
&lt;br /&gt;
	elevatormodel playsound (&amp;quot;elevator&amp;quot;);&lt;br /&gt;
	elevatormodel movez (height - level.elevatorUp * 2 * height, speed); // When elevator is up, it will go down.&lt;br /&gt;
	elevatormodel waittill (&amp;quot;movedone&amp;quot;);&lt;br /&gt;
	level.elevatorUp ^= 1; // A smart trick, turns 1 to 0 and vice-versa.&lt;br /&gt;
	level.elevatorMoving = false;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Complex Elevator ==&lt;br /&gt;
Invalid Article.&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Bobbing_Models&amp;diff=16588</id>
		<title>Call of Duty 4: Bobbing Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Bobbing_Models&amp;diff=16588"/>
		<updated>2012-02-22T19:53:27Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{warning_forpro}}&lt;br /&gt;
[[Image:rgn_warning.png|right]]&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial shows how to create &#039;bobbing&#039; models in water to give a floating movement impression. I got the script from a COD2 tutorials by &#039;&#039;BR3NT&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;font color=&amp;quot;yellow&amp;quot;&amp;gt;2 models are animated in this example:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 com_bottle4&lt;br /&gt;
 me_plastic_crate1&lt;br /&gt;
&lt;br /&gt;
[[Image:bobbing_1.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== In Radiant ==&lt;br /&gt;
&lt;br /&gt;
Place the 2 models how we want them with their top surface slightly (2/3 units) over the water patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:bobbing_4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the first model, right clic in the 2D window and select &#039;&#039;Script&#039;&#039; then &#039;&#039;Script_model&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:bobbing_5.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then witht the first model still selected press &#039;n&#039; to bring up the entity window and enter the following key/values:&lt;br /&gt;
&lt;br /&gt;
 targetname bobbing_obj&lt;br /&gt;
&lt;br /&gt;
Do the same steps for the second model using those:&lt;br /&gt;
&lt;br /&gt;
 targetname bobbing_obj2&lt;br /&gt;
&lt;br /&gt;
The result should be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:bobbing_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:bobbing_3.png]]&lt;br /&gt;
&lt;br /&gt;
== In Script ==&lt;br /&gt;
&lt;br /&gt;
* Create a new file under /raw/maps/mp/ called _bobbing_obj.gsc and insert the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	thread bobbing_think();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bobbing_think()&lt;br /&gt;
{&lt;br /&gt;
	obj1 = getent(&amp;quot;bobbing_obj&amp;quot;,&amp;quot;targetname&amp;quot;); //get the script_model entity&lt;br /&gt;
	obj2 = getent(&amp;quot;bobbing_obj2&amp;quot;,&amp;quot;targetname&amp;quot;); //get the other script_model entity&lt;br /&gt;
	&lt;br /&gt;
	wait randomfloat(1.5); //generate a random number of seconds between bobs&lt;br /&gt;
	&lt;br /&gt;
	org1 = (-83, -895, 688); //define origin or location of your boat/script_model&lt;br /&gt;
	org2 = (29, -897.1, 683); //define origin or location of your boat/script_model&lt;br /&gt;
	timer = 1; //bobbing speed - higher number = slower bobbing&lt;br /&gt;
	&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		obj1 moveto (org1 + (0,0,2), timer, timer * 0.5, timer * 0.5); // 2 is num. of units to go over Orig.&lt;br /&gt;
		obj2 moveto (org2 + (0,0,-1), timer, timer * 0.5, timer * 0.5);&lt;br /&gt;
		wait timer;&lt;br /&gt;
		obj1 moveto (org1 + (0,0,-2), timer, timer * 0.5, timer * 0.5); // 2 is num. of units to go over Orig.&lt;br /&gt;
		obj2 moveto (org2 + (0,0,1), timer, timer * 0.5, timer * 0.5);&lt;br /&gt;
		wait timer;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;&#039;&#039;&#039;NOTE: For CODWAW the (0,0,2) can be highered to (0,0,5) for effect to show&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your main mp GSC, after &#039;&#039;maps\mp\_load::main();&#039;&#039; add this line:&lt;br /&gt;
&lt;br /&gt;
 maps\mp\_bobbing_obj::main();&lt;br /&gt;
&lt;br /&gt;
Now, add this to your Zone File:&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/_bobbing_obj.gsc&lt;br /&gt;
&lt;br /&gt;
Compile and test!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 14:18, 16 October 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Rotating_Models&amp;diff=16587</id>
		<title>Call of Duty 4: Rotating Models</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Rotating_Models&amp;diff=16587"/>
		<updated>2012-02-22T19:48:01Z</updated>

		<summary type="html">&lt;p&gt;Ingram: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
&#039;&#039;By FiremanPaul&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Nutshell.png]] This tutorial will show you how to rotate models or brushes around any axis and at any speed. One single script will allow multiple objects to be rotated and each can be on its own axis and rotating at its own speed. The following pictures show some of what is possible with rotating objects. Movement in a map can provide animation and “life” to a map.&lt;br /&gt;
&lt;br /&gt;
The lights on this lighthouse are models and rotate very slowly, looks awesome in game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:lighthouse1_1024.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The blades on this windmill are brushes and slowly rotate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:windmill2_1024.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This fan rotates at a nice brisk pace.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:fan3_1024.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Radiant ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotating brushes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Make the brushes into the object you want to rotate. &lt;br /&gt;
&lt;br /&gt;
*On the axis that you want to rotate around, make a small brush of 8x8 or 16x16 and texture it with the origin texture from the tools textures.&lt;br /&gt;
&lt;br /&gt;
*Select all the brushes that are to be rotated and select the origin brush.&lt;br /&gt;
&lt;br /&gt;
*With the brushes and origin selected, right click on the 2D screen and select script&amp;gt;brushmodel.&lt;br /&gt;
&lt;br /&gt;
*With the brushes and origin still selected, press N to bring up the Entity window and enter the following key/value entries.&lt;br /&gt;
&lt;br /&gt;
 Targetname/rotate&lt;br /&gt;
 Script_noteworthy/x,y or z for the desired axis&lt;br /&gt;
 Speed/ the number of seconds for object to make one revolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Example:&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Targetname rotate&lt;br /&gt;
 Script_noteworthy z&lt;br /&gt;
 Speed 5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:entity4_1024.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above example, the brush model will rotate around the x axis, making a complete revolution once every 10 seconds. Press Esc and that finishes the work in radiant for a brushmodel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotating models:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Place the model you wish to rotate. Models do not need an origin brush, and will rotate around their own origin.&lt;br /&gt;
&lt;br /&gt;
*With the model selected, right click the 2D screen and select script&amp;gt;model.&lt;br /&gt;
&lt;br /&gt;
*With the model still selected, press N and set the speed desired and script_noteworthy for the rotation axis. Press Esc and that finishes the radiant work for a model.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; prefabs can’t be rotated and this includes prefab models. If you want to rotate a vehicle for example, you would need to place the model and set it to rotate as shown above. Open the vehicle prefab and copy the clips to your map. Add an origin to the clips to match your model axis, and set it to rotate as a script_brushmodel as shown above. With the model and clips rotating in the same position on the same axis, at the same speed, they are still two separate entities, but in game will function as one.&lt;br /&gt;
&lt;br /&gt;
== In Script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;main()&lt;br /&gt;
{&lt;br /&gt;
	rotate_obj = getentarray(&amp;quot;rotate&amp;quot;,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if(isdefined(rotate_obj))&lt;br /&gt;
		for(i=0;i&amp;lt;rotate_obj.size;i++)&lt;br /&gt;
			rotate_obj[i] thread ra_rotate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ra_rotate()&lt;br /&gt;
{&lt;br /&gt;
	if (!isdefined(self.speed))&lt;br /&gt;
		self.speed = 10;&lt;br /&gt;
	if (!isdefined(self.script_noteworthy))&lt;br /&gt;
		self.script_noteworthy = &amp;quot;z&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	for(;;)&lt;br /&gt;
	{&lt;br /&gt;
		// rotateYaw(float rot, float time, &amp;lt;float acceleration_time&amp;gt;, &amp;lt;float deceleration_time&amp;gt;);&lt;br /&gt;
		if (self.script_noteworthy == &amp;quot;z&amp;quot;)&lt;br /&gt;
			self rotateYaw(360,self.speed);&lt;br /&gt;
		else if (self.script_noteworthy == &amp;quot;x&amp;quot;)&lt;br /&gt;
			self rotateRoll(360,self.speed);&lt;br /&gt;
		else if (self.script_noteworthy == &amp;quot;y&amp;quot;)&lt;br /&gt;
			self rotatePitch(360,self.speed);&lt;br /&gt;
		wait (self.speed-0.1); // removes the slight hesitation that waittill(&amp;quot;rotatedone&amp;quot;); gives.&lt;br /&gt;
		// self waittill(&amp;quot;rotatedone&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
The first part of the script collects all the entities with the target name of rotate. The second part checks the entity for speed, if none specified, it will be 10 as indicated in the script. This number can be changed. The last section checks the axis the entity is to rotate around. If no script noteworthy is specified, the Z axis will be assigned.&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above script goes in its own gsc called mp_mymapname_rotate.gsc and goes in the raw\maps\mp folder like the main gsc.&lt;br /&gt;
&lt;br /&gt;
Add the line to the main gsc:&lt;br /&gt;
&lt;br /&gt;
 maps\mp\mp_mymapname_rotate::main(); &lt;br /&gt;
&lt;br /&gt;
Add the line to the missing asset csv (step 4 of compile tools) - Zone File:&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/mp_mymapname_rotate.gsc &lt;br /&gt;
&lt;br /&gt;
This completes the script and files. Recompile the map from step 1 of the compile tools and enjoy!!!!&lt;br /&gt;
&lt;br /&gt;
Making a test map to test rotating objects is easy if you use the existing test map that came with radiant.&lt;br /&gt;
Open the mp_test.map that came with radiant. Add brushes and/or models as described above. Create the gsc mp_test_rotate.gsc and add the lines to the main mp_test.gsc and to the missing asset csv. This test map is a great way to test this tutorial or any other prefab that will fit the map. Wanna see how something looks, test it in a ready to go map!!&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_duty_4:_Import_models&amp;diff=16586</id>
		<title>Call of duty 4: Import models</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_duty_4:_Import_models&amp;diff=16586"/>
		<updated>2012-02-22T19:35:48Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 15873 by Randallphillips (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning_forpro}}&lt;br /&gt;
&#039;&#039;By NovemberDobby&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|This tutorial will show you the basics of importing a new weapon model into Cod4. Below is my example, which you will hopefully be able to use.}}&lt;br /&gt;
&lt;br /&gt;
[[Image:shot0097.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You will be needing:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Maya 7.0 or 8.5 (not the Personal Learning Edition)&lt;br /&gt;
*Maya 8.0 requires a little hack (see below)&lt;br /&gt;
*The Cod4\bin\maya folder from the mod tools&lt;br /&gt;
*Texture(s) for your model: The dimensions have to be a power of two. (256*256, 512*512, etc), and the file must be a .jpg, .tga, or .dds. TGA and DDS textures can both have alpha channels, and can both be natively edited using Paint.net. (www.getpaint.net)&lt;br /&gt;
*My example weapon model, from [http://www.modsonline.com/Downloads-full-4308.html HERE]&lt;br /&gt;
&lt;br /&gt;
*In this tutorial, I will assume you know Maya&#039;s basic controls. Firstly, I recommend you follow this tutorial, written by mdS [http://www.modsonline.com/Downloads-full-4254.html HERE]&lt;br /&gt;
&lt;br /&gt;
*It shows you how to export a rigid model from Maya, and get it into the game using Asset Manager. It also shows you the first two steps needed to set up Maya to use the plugins. As these two steps are necessary, I&#039;ll explain them here, courtesy of Infinity Ward&#039;s Wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maya 8.0 Fix ==&lt;br /&gt;
&lt;br /&gt;
You can use the Maya 8.5 plugins (xmodel, xanim) which come with the CoD4 Mod Tools, in Maya 8.0. Just open the two MLL files with a [http://mh-nexus.de/en/hxd/ hex-editor], do a text search for &#039;850&#039; and replace it with &#039;800&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Change  850 (hex 38 35 30 )&lt;br /&gt;
To --&amp;gt;  800 (hex 38 30 30 )&lt;br /&gt;
&lt;br /&gt;
Offsets:&lt;br /&gt;
XAnimExport.mll  - 0x2B10B&lt;br /&gt;
XModelExport.mll - 0x350EC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
850 is the version number v8.50, the Maya version the plugins are designed for. Maya v8.00 won&#039;t accept them, but if you change the version requirement like described above it will load the plugins. The Maya scripting engines probably didn&#039;t change a lot, thus you shouldn&#039;t experience any problems with the hacked plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MAYA Setup==&lt;br /&gt;
&lt;br /&gt;
Create a Maya.env file in: C:\Documents and Settings\My Documents\maya\&lt;br /&gt;
and add the two lines below into it.&lt;br /&gt;
&lt;br /&gt;
 MAYA_SCRIPT_PATH = C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\bin\maya\tools&lt;br /&gt;
 MAYA_PLUG_IN_PATH = C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\bin\maya\tools&lt;br /&gt;
&lt;br /&gt;
This folder location will be different if you have the Steam version, or have installed Cod4 somewhere else. You also need to make a file called usersetup.mel in C:\Documents and Settings\\My Documents\maya\\scripts\&lt;br /&gt;
and add the following three lines to it:&lt;br /&gt;
&lt;br /&gt;
 source CODToolsMenu;&lt;br /&gt;
 CODStartup;&lt;br /&gt;
 CODToolsMenu;&lt;br /&gt;
&lt;br /&gt;
Lastly, you need to extract the corret plugins for your version of Maya. Go to Cod4\bin\maya\tools, and open up either Maya7_plugins.zip or Maya8_plugins.zip. Extract the two files from that zip into the Cod4\bin\maya\tools folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==In MAYA==&lt;br /&gt;
&lt;br /&gt;
* Ok, start up Maya, and you should see a Call Of Duty 4 menu at the top. Open my example weapon, and then save it as a Maya file in a folder called Cod5\model_export\maya_ex. Maya_ex is the name of your model for now, it can be anything as long as there are no spaces in the name. You can save the actual Maya file under any filename. Also, copy the textures out of my example file into the same folder you saved this into.&lt;br /&gt;
&lt;br /&gt;
* To view and edit the texturing in this model, you need to use Hypershade. In Maya, go to {{Color|Window &amp;gt; Rendering Editors &amp;gt; Hypershade|yellow}}. You will be presented with a dialog box which shows you the textures in use along with some other stuff. In the top dark section, you should see four textures. The one called {{Color|&#039;demo_wep_skin&#039;|orange}} is the one we&#039;re interested in, the other three are there by default and you cannot remove them. You may have to re-locate the actual .tga texture which is being used, so double click on the demo_wep_skin, and you should see the main right hand side panel change in Maya. There should be a &#039;file1&#039; tab there now, click on it. About halfway down this new page, you should see &#039;Image name&#039;. Click on the folder icon to browse to the skin image, demo_weapon_skin.tga, and open it. &lt;br /&gt;
&lt;br /&gt;
* There is one step that you need to do for each model that you export, otherwise they will appear totally black in Radiant and the game. Go to {{Color|Edit &amp;gt; Select All|yellow}}, and then to {{Color|Color &amp;gt; Apply color|yellow}}, but don&#039;t click on the menu button; click the small box to the right of it. In the {{Color|&#039;Color Value&#039;|orange}} frame, click on the coloured box, and select a full white colour from the colour selector that comes up. Click {{Color|&#039;Apply color&#039;|orange}}, and you should see your model become marginally brighter in the 3D window. You need to do this for every new model, or again if you add geometry to an existing model.&lt;br /&gt;
&lt;br /&gt;
* This model has already been rigged with the correct joints needed to work as a weapon in Cod4, so, navigate to the Call Of Duty 4 menu, and click on Model Exporter. When the dialog box comes up, click on the &#039;Add new Entry&#039; button. Tick the checkbox called &#039;Entry1&#039;, and then choose where you will export your model. This should be in the same folder as your Maya model, and should have a similar (if not the same) name.&lt;br /&gt;
&lt;br /&gt;
* Next, in Maya&#039;s menus, go to Edit&amp;gt;Select All. Back in the Cod4 dialog, click on Set Exports in Entry1. This has set the polygons and joints that you want to export to the Cod4 model, and it&#039;s very rare that you won&#039;t want to export everything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MAYA: Convert==&lt;br /&gt;
&lt;br /&gt;
You&#039;re now ready to convert the model to a useable format. In the Cod5 Model Export Window, click &#039;Select Exports&#039;, and &#039;Export Selected Entries&#039;. If all goes well, a progress bar should pop up and reach 100%. It won&#039;t work unless you have clicked &#039;Select Exports&#039; (or selected everything in Maya). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You sould now have a .xmodel_export file in your model&#039;s folder in Cod5\model_export. If you do, continue to the steps below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Asset Manager== &lt;br /&gt;
&lt;br /&gt;
*Close Maya, and open up Cod4\bin\asset_manager.exe. You will see several buttons in the top left corner, along with a list. Scroll down to &#039;xmodel&#039;, and click &#039;New Entry&#039;. You now need to enter the name of the model that you will use to access it ingame, and in Radiant. It can&#039;t have any spaces, and try not to make it too generic, pick something which will definitely be unique, e.g. db_laser_cannon. You will see a list of options for your model appear on the right hand side now, select &#039;animated&#039; from the first drop-down menu. In the &#039;filename&#039; field, click the browse (three dots) button to the right. Use this to locate and open your xmodel_export file that you made before.&lt;br /&gt;
&lt;br /&gt;
*Save your Asset Manager file in Cod4\model_export. Anywhere else and it won&#039;t convert, but it won&#039;t have any errors.&lt;br /&gt;
&lt;br /&gt;
To convert the xmodel_export, you need to edit the export file. Go to Cod4\model_export\modelfolder\, and open up the .xmodel_export in a text editor like notepd. You will see &#039;VERSION 8&#039;, this needs changing to &#039;VERSION 6&#039;. Save and close it. &lt;br /&gt;
&lt;br /&gt;
*Go back to Asset Manager, and click on your entry in xmodel. Go to PC Convert&amp;gt;Current Asset Only, and if it works, you should see &#039;Conversion done, hit key to continue&#039;.&lt;br /&gt;
&lt;br /&gt;
In the left hand scroll list, go to &#039;material&#039;, and click new entry. This entry must be the same name as the weapon texture you used in Hypershade, in this example, &#039;demo_wep_skin&#039;. Change these properties of the material:&lt;br /&gt;
&lt;br /&gt;
 Materialtype = world phong&lt;br /&gt;
 surfacetype = none&lt;br /&gt;
 sort = default*&lt;br /&gt;
 usage = not in editor&lt;br /&gt;
&lt;br /&gt;
*Click the three dots symbol next to the &#039;Color map&#039; box, and navigate to your .tga skin. If you want the skins to have a specular map aswell, you have to create a texture for that and browse for it, using &#039;Specular color map&#039;. Do not use a Normal Map on your texture, because it&#039;ll stop the specular from working properly, on scopes and reflections.&lt;br /&gt;
&lt;br /&gt;
*Re-save the Asset Manager file, it will only convert entries that are in the saved version.&lt;br /&gt;
&lt;br /&gt;
*Select your material from the list on the left, and go to PC Convert&amp;gt;Current Asset Only. If all goes well, a black box should appear, and it&#039;ll eventually read &#039;Conversion done, hit key to continue&#039;. You&#039;ve now converted the texture for use with your model.&lt;br /&gt;
&lt;br /&gt;
*If both your texture and your model have converted properly, you can now package them in your mod. I&#039;m assuming you can use .csv files and know how to make a basic mod.ff. All of the textures must go in the mod&#039;s IWD, and if it doesn&#039;t have one, it needs one. The file structure is: IWD\images\, and the converted iwi images can be found in Cod4\raw\images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the weapon&#039;s file==&lt;br /&gt;
&lt;br /&gt;
For this example, we&#039;ll mod a stock weaponfile. (rpg_mp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WEAPONFILE \weaponType\projectile\weaponClass\rocketlauncher\impactType\rocket_explode\guidedMissileType\None\inventoryType\item\maxSteeringAccel\3000\displayName\Laser thingy\AIOverlayDescription\\modeName\\playerAnimType\rocketlauncher\gunModel\db_laser_cannon\gunModel2\\gunModel3\\gunModel4\\gunModel5\\gunModel6\\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\\handModel\viewmodel_base_viewhands\isHandModelOverridable\0\idleAnim\viewmodel_rpg_idle\emptyIdleAnim\viewmodel_rpg_idle_empty\fireAnim\viewmodel_rpg_fire\lastShotAnim\viewmodel_rpg_fire\meleeAnim\viewmodel_M4m203_knife_melee_1\meleeChargeAnim\viewmodel_M4m203_knife_melee_2\reloadAnim\viewmodel_rpg_reload\raiseAnim\viewmodel_rpg_pullout\dropAnim\viewmodel_rpg_putaway\firstRaiseAnim\viewmodel_rpg_pullout\altRaiseAnim\viewmodel_rpg_pullout\altDropAnim\viewmodel_rpg_putaway\quickRaiseAnim\viewmodel_rpg_pullout\quickDropAnim\viewmodel_rpg_putaway\emptyRaiseAnim\viewmodel_rpg_pullout\emptyDropAnim\viewmodel_rpg_putaway\sprintInAnim\viewmodel_rpg_sprint_in\sprintLoopAnim\viewmodel_rpg_sprint_loop\sprintOutAnim\viewmodel_rpg_sprint_out\nightVisionWearAnim\\nightVisionRemoveAnim\\adsFireAnim\viewmodel_rpg_fire\adsLastShotAnim\viewmodel_rpg_fire\adsUpAnim\viewmodel_rpg_ads_up\adsDownAnim\viewmodel_rpg_ads_down\moveSpeedScale\1\adsMoveSpeedScale\1\sprintDurationScale\1\lowAmmoWarningThreshold\0.33\damage\1000\meleeDamage\135\fireDelay\0\meleeDelay\0.13\meleeChargeDelay\0.16\fireTime\0.33\meleeTime\0.8\meleeChargeTime\1.16\reloadTime\3.292\reloadShowRocketTime\0.1\reloadAddTime\1.17\dropTime\0.467\raiseTime\0.73\altDropTime\0.467\altRaiseTime\0.733\quickDropTime\0.25\quickRaiseTime\0.75\firstRaiseTime\0.73\emptyDropTime\0.467\emptyRaiseTime\0.73\sprintInTime\0.3\sprintLoopTime\1\sprintOutTime\0.3\nightVisionWearTime\0\nightVisionWearTimeFadeOutEnd\0\nightVisionWearTimePowerUp\0\nightVisionRemoveTime\0\nightVisionRemoveTimePowerDown\0\nightVisionRemoveTimeFadeInStart\0\clipOnly\0\adsTransInTime\0.5\adsTransOutTime\0.5\adsZoomFov\55\adsZoomGunFov\40\adsZoomInFrac\0.5\adsZoomOutFrac\0.1\adsOverlayShader\\adsOverlayReticle\none\adsOverlayInterface\none\adsOverlayWidth\240\adsOverlayHeight\240\adsBobFactor\1\adsViewBobMult\0\hipSpreadStandMin\5\hipSpreadDuckedMin\3.5\hipSpreadProneMin\2\hipSpreadMax\6\hipSpreadDuckedMax\6\hipSpreadProneMax\6\hipSpreadDecayRate\2.5\hipSpreadFireAdd\0.4\hipSpreadTurnAdd\0\hipSpreadMoveAdd\2.3\hipSpreadDuckedDecay\1.375\hipSpreadProneDecay\1.6\hipReticleSidePos\0\adsSpread\1.7\adsIdleAmount\25\hipIdleAmount\80\hipIdleSpeed\1\adsIdleSpeed\1\idleCrouchFactor\0.5\idleProneFactor\0.15\gunMaxPitch\30\gunMaxYaw\30\adsAimPitch\0\adsCrosshairInFrac\1\adsCrosshairOutFrac\0.2\adsReloadTransTime\0.6\adsGunKickPitchMin\-30\adsGunKickPitchMax\-20\adsGunKickYawMin\-17\adsGunKickYawMax\17\adsGunKickAccel\250\adsGunKickSpeedMax\1000\adsGunKickSpeedDecay\10\adsGunKickStaticDecay\1\adsViewKickPitchMin\20\adsViewKickPitchMax\95\adsViewKickYawMin\-10\adsViewKickYawMax\30\adsViewKickCenterSpeed\2500\hipGunKickPitchMin\-5\hipGunKickPitchMax\-3\hipGunKickYawMin\-15\hipGunKickYawMax\15\hipGunKickAccel\250\hipGunKickSpeedMax\500\hipGunKickSpeedDecay\15\hipGunKickStaticDecay\1\hipViewKickPitchMin\100\hipViewKickPitchMax\150\hipViewKickYawMin\-50\hipViewKickYawMax\-80\hipViewKickCenterSpeed\1500\swayMaxAngle\30\swayLerpSpeed\6\swayPitchScale\0.1\swayYawScale\0.1\swayHorizScale\0.1\swayVertScale\0.1\swayShellShockScale\5\adsSwayMaxAngle\30\adsSwayLerpSpeed\6\adsSwayPitchScale\0.1\adsSwayYawScale\0.1\adsSwayHorizScale\0.1\adsSwayVertScale\0.1\hudIcon\hud_icon_rpg\killIcon\hud_icon_rpg\dpadIcon\hud_icon_rpg_dpad\ammoCounterIcon\hud_icon_rpg\hudIconRatio\4:1\killIconRatio\4:1\dpadIconRatio\1:1\ammoCounterIconRatio\4:1\ammoCounterClip\Rocket\flipKillIcon\1\worldModel\weapon_rpg7\worldModel2\\worldModel3\\worldModel4\\worldModel5\\worldModel6\\worldModel7\\worldModel8\\worldModel9\\worldModel10\\worldModel11\\worldModel12\\worldModel13\\worldModel14\\worldModel15\\worldModel16\\worldClipModel\\rocketModel\viewmodel_rpg7_rocket\knifeModel\viewmodel_knife\worldKnifeModel\weapon_parabolic_knife\ammoName\rpg\maxAmmo\2\startAmmo\2\clipName\rpg_mp\clipSize\1\dropAmmoMin\1\dropAmmoMax\2\viewFlashEffect\muzzleflashes/at4_flash\worldFlashEffect\muzzleflashes/at4_flash\shellEjectEffect\\lastShotEjectEffect\\worldClipDropEffect\\pickupSound\weap_pickup\pickupSoundPlayer\weap_pickup\ammoPickupSound\\ammoPickupSoundPlayer\\projectileSound\weap_rpg_loop\fireSound\weap_rpg_fire_npc\fireSoundPlayer\weap_rpg_fire_plr\lastShotSound\\lastShotSoundPlayer\\emptyFireSound\weap_dryfire_rifle_npc\emptyFireSoundPlayer\weap_dryfire_rifle_plr\meleeSwipeSound\melee_swing_ps_large\meleeSwipeSoundPlayer\melee_rpg_swing_plr\rechamberSound\\rechamberSoundPlayer\\reloadSound\\reloadSoundPlayer\\reloadEmptySound\\reloadEmptySoundPlayer\\reloadStartSound\\reloadStartSoundPlayer\\reloadEndSound\\reloadEndSoundPlayer\\altSwitchSound\\altSwitchSoundPlayer\\raiseSound\weap_rpg_raise_npc\raiseSoundPlayer\weap_rpg_raise_plr\firstRaiseSound\\firstRaiseSoundPlayer\\putawaySound\weap_rpg_drop_npc\putawaySoundPlayer\weap_rpg_drop_plr\bounceSound\\nightVisionWearSound\\nightVisionWearSoundPlayer\\nightVisionRemoveSound\\nightVisionRemoveSoundPlayer\\reticleCenter\reticle_flechette\reticleSide\\reticleCenterSize\32\reticleSideSize\24\reticleMinOfs\17\enemyCrosshairRange\1000\crosshairColorChange\1\altWeapon\\boltAction\0\aimDownSight\1\rechamberWhileAds\1\adsViewErrorMin\0\adsViewErrorMax\0\adsFire\1\noAdsWhenMagEmpty\0\avoidDropCleanup\0\cancelAutoHolsterWhenEmpty\0\suppressAmmoReserveDisplay\0\blocksProne\0\noPartialReload\0\reloadAmmoAdd\1\autoAimRange\0\aimAssistRange\1000\aimAssistRangeAds\1000\fightDist\720\maxDist\1400\aiVsAiAccuracyGraph\\aiVsPlayerAccuracyGraph\\standMoveF\0\standMoveR\0\standMoveU\-1.7\standRotP\0\standRotY\0\standRotR\0\duckedOfsF\-2\duckedOfsR\0.8\duckedOfsU\-0.2\duckedMoveF\-1\duckedMoveR\0\duckedMoveU\-1.7\duckedRotP\0\duckedRotY\0\duckedRotR\0\proneOfsF\-2\proneOfsR\1\proneOfsU\-1\proneMoveF\-160\proneMoveR\3\proneMoveU\-120\proneRotP\0\proneRotY\300\proneRotR\-300\posMoveRate\6\posProneMoveRate\25\standMoveMinSpeed\110\duckedMoveMinSpeed\60\proneMoveMinSpeed\0\posRotRate\6\posProneRotRate\30\standRotMinSpeed\110\duckedRotMinSpeed\60\proneRotMinSpeed\0\explosionRadius\300\explosionInnerDamage\160\explosionOuterDamage\30\damageConeAngle\180\projectileSpeed\1500\projectileSpeedUp\500\projectileActivateDist\0\projectileLifetime\5\projectileModel\projectile_rpg7\projExplosionType\rocket\projExplosionEffect\\projExplosionEffectForceNormalUp\0\projExplosionSound\\projDudEffect\\projDudSound\\projImpactExplode\1\projTrailEffect\smoke/smoke_geotrail_rpg\projectileDLight\200\projectileRed\0.75\projectileGreen\0.3\projectileBlue\1\projIgnitionDelay\0\projIgnitionEffect\\projIgnitionSound\\destabilizationRateTime\0.4\destabilizationCurvatureMax\10\destabilizeDistance\300\parallelDefaultBounce\0.5\parallelBarkBounce\0.5\parallelBrickBounce\0.5\parallelCarpetBounce\0.5\parallelClothBounce\0.5\parallelConcreteBounce\0.5\parallelDirtBounce\0.5\parallelFleshBounce\0.5\parallelFoliageBounce\0.5\parallelGlassBounce\0.5\parallelGrassBounce\0.5\parallelGravelBounce\0.5\parallelIceBounce\0.5\parallelMetalBounce\0.5\parallelMudBounce\0.5\parallelPaperBounce\0.5\parallelPlasterBounce\0.5\parallelRockBounce\0.5\parallelSandBounce\0.5\parallelSnowBounce\0.5\parallelWaterBounce\0.5\parallelWoodBounce\0.5\parallelAsphaltBounce\0.5\parallelCeramicBounce\0.5\parallelPlasticBounce\0.5\parallelRubberBounce\0.5\parallelCushionBounce\0.5\parallelFruitBounce\0.5\parallelPaintedMetalBounce\0.5\perpendicularDefaultBounce\0.5\perpendicularBarkBounce\0.5\perpendicularBrickBounce\0.5\perpendicularCarpetBounce\0.5\perpendicularClothBounce\0.5\perpendicularConcreteBounce\0.5\perpendicularDirtBounce\0.5\perpendicularFleshBounce\0.5\perpendicularFoliageBounce\0.5\perpendicularGlassBounce\0.5\perpendicularGrassBounce\0.5\perpendicularGravelBounce\0.5\perpendicularIceBounce\0.5\perpendicularMetalBounce\0.5\perpendicularMudBounce\0.5\perpendicularPaperBounce\0.5\perpendicularPlasterBounce\0.5\perpendicularRockBounce\0.5\perpendicularSandBounce\0.5\perpendicularSnowBounce\0.5\perpendicularWaterBounce\0.5\perpendicularWoodBounce\0.5\perpendicularAsphaltBounce\0.5\perpendicularCeramicBounce\0.5\perpendicularPlasticBounce\0.5\perpendicularRubberBounce\0.5\perpendicularCushionBounce\0.5\perpendicularFruitBounce\0.5\perpendicularPaintedMetalBounce\0.5\fireRumble\\meleeImpactRumble\\adsDofStart\0\adsDofEnd\0\requireLockonToFire\0\notetrackSoundMap\weap_rpg_raise_plr weap_rpg_raise_plr weap_rpg_drop_plr weap_rpg_drop_plr melee_knife_stab melee_knife_stab weap_rpg_lift_plr weap_rpg_lift_plr weap_rpg_insert_plr weap_rpg_insert_plr weap_rpg_twist_plr weap_rpg_twist_plr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*I have changed the display name of the weapon, and it&#039;s viewmodel. It will look like your model in first person view, but will still be an rpg in other people&#039;s hands and thirdperson. For more info on modding weaponfiles, Shadowlance194 wrote a tutorial here: http://www.modsonline.com/Tutorials-read-466.html&lt;br /&gt;
&lt;br /&gt;
*This weaponfile needs to go in the mod IWD\weapons\mp folder, and also needs to be referenced in the mod csv:&lt;br /&gt;
&lt;br /&gt;
 weapon,mp/rpg_mp&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outline of updating model process:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Save model in Maya&lt;br /&gt;
*Open Cod4 export plugin, tick &#039;entry1&#039; &amp;amp; Select Exports, Set Exports if the geometry has changed&lt;br /&gt;
*Edit version number in .xmodel_export&lt;br /&gt;
*Convert model &amp;amp; materials in Asset Manager&lt;br /&gt;
*Put textures in IWD, re-build fastfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|&#039;&#039;&#039;NOTES AND WARNINGS:&#039;&#039;&#039;}}&lt;br /&gt;
*This is quite complicated, with a lot of things that can go wrong.&lt;br /&gt;
*There is no way to reverse the conversion; you can&#039;t get an xmodel_export from an xmodel file. You also can&#039;t re-import the xmodel_export into Maya, like in old versions of Cod, so don&#039;t lose the source!&lt;br /&gt;
*You will find that the weapon model looks very small in thirdperson view, or if you are looking at someone else who has it. You need to create a separate worldmodel for it, because for some reason they are on different scales. On estimate, the worldmodel needs to be around twice as large.&lt;br /&gt;
*There are three joints on this model. The one at the front, tag_flash, defines where the muzzleflash effect will be.&lt;br /&gt;
*The actual position of the weapon in your hand is the position of the weapon model relative to 0,0,0 in Maya, none of the joints control it.&lt;br /&gt;
*If you only edit a stock weaponfile, you don&#039;t need to worry about precaching it. However, if it&#039;s not stock, you need to add a line in your mod scripts: PrecacheItem(&amp;quot;weaponfile_name&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Call of Duty 5]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Modelling]]&lt;br /&gt;
[[Category:Maya]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_duty_4:_Import_models&amp;diff=16585</id>
		<title>Call of duty 4: Import models</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_duty_4:_Import_models&amp;diff=16585"/>
		<updated>2012-02-22T19:35:26Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 15877 by Randallphillips (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning_forpro}}&lt;br /&gt;
&#039;&#039;By NovemberDobby&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|This tutorial will show you the basics of importing a new weapon model into Cod4. Below is my example, which you will hopefully be able to use.}}&lt;br /&gt;
&lt;br /&gt;
[[Image:shot0097.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You will be needing:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Maya 7.0 or 8.5 (not the Personal Learning Edition)&lt;br /&gt;
*Maya 8.0 requires a little hack (see below)&lt;br /&gt;
*The Cod4\bin\maya folder from the mod tools&lt;br /&gt;
*Texture(s) for your model: The dimensions have to be a power of two. (256*256, 512*512, etc), and the file must be a .jpg, .tga, or .dds. TGA and DDS textures can both have alpha channels, and can both be natively edited using Paint.net. (www.getpaint.net)&lt;br /&gt;
*My example weapon model, from [http://www.modsonline.com/Downloads-full-4308.html HERE]&lt;br /&gt;
&lt;br /&gt;
*In this tutorial, I will assume you know Maya&#039;s basic controls. Firstly, I recommend you follow this tutorial, written by mdS [http://www.modsonline.com/Downloads-full-4254.html HERE]&lt;br /&gt;
&lt;br /&gt;
*It shows you how to export a rigid model from Maya, and get it into the game using Asset Manager. It also shows you the first two steps needed to set up Maya to use the plugins. As these two steps are necessary, I&#039;ll explain them here, courtesy of Infinity Ward&#039;s Wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maya 8.0 Fix ==&lt;br /&gt;
&lt;br /&gt;
You can use the Maya 8.5 plugins (xmodel, xanim) which come with the CoD4 Mod Tools, in Maya 8.0. Just open the two MLL files with a [http://mh-nexus.de/en/hxd/ hex-editor], do a text search for &#039;850&#039; and replace it with &#039;800&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Change  850 (hex 38 35 30 )&lt;br /&gt;
To --&amp;gt;  800 (hex 38 30 30 )&lt;br /&gt;
&lt;br /&gt;
Offsets:&lt;br /&gt;
XAnimExport.mll  - 0x2B10B&lt;br /&gt;
XModelExport.mll - 0x350EC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
850 is the version number v8.50, the Maya version the plugins are designed for. Maya v8.00 won&#039;t accept them, but if you change the version requirement like described above it will load the plugins. The Maya scripting engines probably didn&#039;t change a lot, thus you shouldn&#039;t experience any problems with the hacked plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MAYA Setup==&lt;br /&gt;
&lt;br /&gt;
Create a Maya.env file in: C:\Documents and Settings\My Documents\maya\&lt;br /&gt;
and add the two lines below into it.&lt;br /&gt;
&lt;br /&gt;
 MAYA_SCRIPT_PATH = C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\bin\maya\tools&lt;br /&gt;
 MAYA_PLUG_IN_PATH = C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\bin\maya\tools&lt;br /&gt;
&lt;br /&gt;
This folder location will be different if you have the Steam version, or have installed Cod4 somewhere else. You also need to make a file called usersetup.mel in C:\Documents and Settings\\My Documents\maya\\scripts\&lt;br /&gt;
and add the following three lines to it:&lt;br /&gt;
&lt;br /&gt;
 source CODToolsMenu;&lt;br /&gt;
 CODStartup;&lt;br /&gt;
 CODToolsMenu;&lt;br /&gt;
&lt;br /&gt;
Lastly, you need to extract the corret plugins for your version of Maya. Go to Cod4\bin\maya\tools, and open up either Maya7_plugins.zip or Maya8_plugins.zip. Extract the two files from that zip into the Cod4\bin\maya\tools folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==In MAYA==&lt;br /&gt;
&lt;br /&gt;
* Ok, start up Maya, and you should see a Call Of Duty 4 menu at the top. Open my example weapon, and then save it as a Maya file in a folder called Cod5\model_export\maya_ex. Maya_ex is the name of your model for now, it can be anything as long as there are no spaces in the name. You can save the actual Maya file under any filename. Also, copy the textures out of my example file into the same folder you saved this into.&lt;br /&gt;
&lt;br /&gt;
* To view and edit the texturing in this model, you need to use Hypershade. In Maya, go to {{Color|Window &amp;gt; Rendering Editors &amp;gt; Hypershade|yellow}}. You will be presented with a dialog box which shows you the textures in use along with some other stuff. In the top dark section, you should see four textures. The one called {{Color|&#039;demo_wep_skin&#039;|orange}} is the one we&#039;re interested in, the other three are there by default and you cannot remove them. You may have to re-locate the actual .tga texture which is being used, so double click on the demo_wep_skin, and you should see the main right hand side panel change in Maya. There should be a &#039;file1&#039; tab there now, click on it. About halfway down this new page, you should see &#039;Image name&#039;. Click on the folder icon to browse to the skin image, demo_weapon_skin.tga, and open it. &lt;br /&gt;
&lt;br /&gt;
* There is one step that you need to do for each model that you export, otherwise they will appear totally black in Radiant and the game. Go to {{Color|Edit &amp;gt; Select All|yellow}}, and then to {{Color|Color &amp;gt; Apply color|yellow}}, but don&#039;t click on the menu button; click the small box to the right of it. In the {{Color|&#039;Color Value&#039;|orange}} frame, click on the coloured box, and select a full white colour from the colour selector that comes up. Click {{Color|&#039;Apply color&#039;|orange}}, and you should see your model become marginally brighter in the 3D window. You need to do this for every new model, or again if you add geometry to an existing model.&lt;br /&gt;
&lt;br /&gt;
* This model has already been rigged with the correct joints needed to work as a weapon in Cod4, so, navigate to the Call Of Duty 4 menu, and click on Model Exporter. When the dialog box comes up, click on the &#039;Add new Entry&#039; button. Tick the checkbox called &#039;Entry1&#039;, and then choose where you will export your model. This should be in the same folder as your Maya model, and should have a similar (if not the same) name.&lt;br /&gt;
&lt;br /&gt;
* Next, in Maya&#039;s menus, go to Edit&amp;gt;Select All. Back in the Cod4 dialog, click on Set Exports in Entry1. This has set the polygons and joints that you want to export to the Cod4 model, and it&#039;s very rare that you won&#039;t want to export everything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MAYA: Convert==&lt;br /&gt;
&lt;br /&gt;
You&#039;re now ready to convert the model to a useable format. In the Cod5 Model Export Window, click &#039;Select Exports&#039;, and &#039;Export Selected Entries&#039;. If all goes well, a progress bar should pop up and reach 100%. It won&#039;t work unless you have clicked &#039;Select Exports&#039; (or selected everything in Maya). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You sould now have a .xmodel_export file in your model&#039;s folder in Cod5\model_export. If you do, continue to the steps below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Asset Manager== &lt;br /&gt;
&lt;br /&gt;
*Close Maya, and open up Cod4\bin\asset_manager.exe. You will see several buttons in the top left corner, along with a list. Scroll down to &#039;xmodel&#039;, and click &#039;New Entry&#039;. You now need to enter the name of the model that you will use to access it ingame, and in Radiant. It can&#039;t have any spaces, and try not to make it too generic, pick something which will definitely be unique, e.g. db_laser_cannon. You will see a list of options for your model appear on the right hand side now, select &#039;animated&#039; from the first drop-down menu. In the &#039;filename&#039; field, click the browse (three dots) button to the right. Use this to locate and open your xmodel_export file that you made before.&lt;br /&gt;
&lt;br /&gt;
*Save your Asset Manager file in Cod4\model_export. Anywhere else and it won&#039;t convert, but it won&#039;t have any errors.&lt;br /&gt;
&lt;br /&gt;
To convert the xmodel_export, you need to edit the export file. Go to Cod4\model_export\modelfolder\, and open up the .xmodel_export in a text editor like notepd. You will see &#039;VERSION 8&#039;, this needs changing to &#039;VERSION 6&#039;. Save and close it. &lt;br /&gt;
&lt;br /&gt;
*Go back to Asset Manager, and click on your entry in xmodel. Go to PC Convert&amp;gt;Current Asset Only, and if it works, you should see &#039;Conversion done, hit key to continue&#039;.&lt;br /&gt;
&lt;br /&gt;
In the left hand scroll list, go to &#039;material&#039;, and click new entry. This entry must be the same name as the weapon texture you used in Hypershade, in this example, &#039;demo_wep_skin&#039;. Change these properties of the material:&lt;br /&gt;
&lt;br /&gt;
 Materialtype = world phong&lt;br /&gt;
 surfacetype = none&lt;br /&gt;
 sort = default*&lt;br /&gt;
 usage = not in editor&lt;br /&gt;
&lt;br /&gt;
*Click the three dots symbol next to the &#039;Color map&#039; box, and navigate to your .tga skin. If you want the skins to have a specular map aswell, you have to create a texture for that and browse for it, using &#039;Specular color map&#039;. Do not use a Normal Map on your texture, because it&#039;ll stop the specular from working properly, on scopes and reflections.&lt;br /&gt;
&lt;br /&gt;
*Re-save the Asset Manager file, it will only convert entries that are in the saved version.&lt;br /&gt;
&lt;br /&gt;
*Select your material from the list on the left, and go to PC Convert&amp;gt;Current Asset Only. If all goes well, a black box should appear, and it&#039;ll eventually read &#039;Conversion done, hit key to continue&#039;. You&#039;ve now converted the texture for use with your model.&lt;br /&gt;
&lt;br /&gt;
*If both your texture and your model have converted properly, you can now package them in your mod. I&#039;m assuming you can use .csv files and know how to make a basic mod.ff. All of the textures must go in the mod&#039;s IWD, and if it doesn&#039;t have one, it needs one. The file structure is: IWD\images\, and the converted iwi images can be found in Cod4\raw\images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the weapon&#039;s file==&lt;br /&gt;
&lt;br /&gt;
For this example, we&#039;ll mod a stock weaponfile. (rpg_mp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WEAPONFILE \weaponType\projectile\weaponClass\rocketlauncher\impactType\rocket_explode\guidedMissileType\None\inventoryType\item\maxSteeringAccel\3000\displayName\Laser thingy\AIOverlayDescription\\modeName\\playerAnimType\rocketlauncher\gunModel\db_laser_cannon\gunModel2\\gunModel3\\gunModel4\\gunModel5\\gunModel6\\gunModel7\\gunModel8\\gunModel9\\gunModel10\\gunModel11\\gunModel12\\gunModel13\\gunModel14\\gunModel15\\gunModel16\\handModel\viewmodel_base_viewhands\isHandModelOverridable\0\idleAnim\viewmodel_rpg_idle\emptyIdleAnim\viewmodel_rpg_idle_empty\fireAnim\viewmodel_rpg_fire\lastShotAnim\viewmodel_rpg_fire\meleeAnim\viewmodel_M4m203_knife_melee_1\meleeChargeAnim\viewmodel_M4m203_knife_melee_2\reloadAnim\viewmodel_rpg_reload\raiseAnim\viewmodel_rpg_pullout\dropAnim\viewmodel_rpg_putaway\firstRaiseAnim\viewmodel_rpg_pullout\altRaiseAnim\viewmodel_rpg_pullout\altDropAnim\viewmodel_rpg_putaway\quickRaiseAnim\viewmodel_rpg_pullout\quickDropAnim\viewmodel_rpg_putaway\emptyRaiseAnim\viewmodel_rpg_pullout\emptyDropAnim\viewmodel_rpg_putaway\sprintInAnim\viewmodel_rpg_sprint_in\sprintLoopAnim\viewmodel_rpg_sprint_loop\sprintOutAnim\viewmodel_rpg_sprint_out\nightVisionWearAnim\\nightVisionRemoveAnim\\adsFireAnim\viewmodel_rpg_fire\adsLastShotAnim\viewmodel_rpg_fire\adsUpAnim\viewmodel_rpg_ads_up\adsDownAnim\viewmodel_rpg_ads_down\moveSpeedScale\1\adsMoveSpeedScale\1\sprintDurationScale\1\lowAmmoWarningThreshold\0.33\damage\1000\meleeDamage\135\fireDelay\0\meleeDelay\0.13\meleeChargeDelay\0.16\fireTime\0.33\meleeTime\0.8\meleeChargeTime\1.16\reloadTime\3.292\reloadShowRocketTime\0.1\reloadAddTime\1.17\dropTime\0.467\raiseTime\0.73\altDropTime\0.467\altRaiseTime\0.733\quickDropTime\0.25\quickRaiseTime\0.75\firstRaiseTime\0.73\emptyDropTime\0.467\emptyRaiseTime\0.73\sprintInTime\0.3\sprintLoopTime\1\sprintOutTime\0.3\nightVisionWearTime\0\nightVisionWearTimeFadeOutEnd\0\nightVisionWearTimePowerUp\0\nightVisionRemoveTime\0\nightVisionRemoveTimePowerDown\0\nightVisionRemoveTimeFadeInStart\0\clipOnly\0\adsTransInTime\0.5\adsTransOutTime\0.5\adsZoomFov\55\adsZoomGunFov\40\adsZoomInFrac\0.5\adsZoomOutFrac\0.1\adsOverlayShader\\adsOverlayReticle\none\adsOverlayInterface\none\adsOverlayWidth\240\adsOverlayHeight\240\adsBobFactor\1\adsViewBobMult\0\hipSpreadStandMin\5\hipSpreadDuckedMin\3.5\hipSpreadProneMin\2\hipSpreadMax\6\hipSpreadDuckedMax\6\hipSpreadProneMax\6\hipSpreadDecayRate\2.5\hipSpreadFireAdd\0.4\hipSpreadTurnAdd\0\hipSpreadMoveAdd\2.3\hipSpreadDuckedDecay\1.375\hipSpreadProneDecay\1.6\hipReticleSidePos\0\adsSpread\1.7\adsIdleAmount\25\hipIdleAmount\80\hipIdleSpeed\1\adsIdleSpeed\1\idleCrouchFactor\0.5\idleProneFactor\0.15\gunMaxPitch\30\gunMaxYaw\30\adsAimPitch\0\adsCrosshairInFrac\1\adsCrosshairOutFrac\0.2\adsReloadTransTime\0.6\adsGunKickPitchMin\-30\adsGunKickPitchMax\-20\adsGunKickYawMin\-17\adsGunKickYawMax\17\adsGunKickAccel\250\adsGunKickSpeedMax\1000\adsGunKickSpeedDecay\10\adsGunKickStaticDecay\1\adsViewKickPitchMin\20\adsViewKickPitchMax\95\adsViewKickYawMin\-10\adsViewKickYawMax\30\adsViewKickCenterSpeed\2500\hipGunKickPitchMin\-5\hipGunKickPitchMax\-3\hipGunKickYawMin\-15\hipGunKickYawMax\15\hipGunKickAccel\250\hipGunKickSpeedMax\500\hipGunKickSpeedDecay\15\hipGunKickStaticDecay\1\hipViewKickPitchMin\100\hipViewKickPitchMax\150\hipViewKickYawMin\-50\hipViewKickYawMax\-80\hipViewKickCenterSpeed\1500\swayMaxAngle\30\swayLerpSpeed\6\swayPitchScale\0.1\swayYawScale\0.1\swayHorizScale\0.1\swayVertScale\0.1\swayShellShockScale\5\adsSwayMaxAngle\30\adsSwayLerpSpeed\6\adsSwayPitchScale\0.1\adsSwayYawScale\0.1\adsSwayHorizScale\0.1\adsSwayVertScale\0.1\hudIcon\hud_icon_rpg\killIcon\hud_icon_rpg\dpadIcon\hud_icon_rpg_dpad\ammoCounterIcon\hud_icon_rpg\hudIconRatio\4:1\killIconRatio\4:1\dpadIconRatio\1:1\ammoCounterIconRatio\4:1\ammoCounterClip\Rocket\flipKillIcon\1\worldModel\weapon_rpg7\worldModel2\\worldModel3\\worldModel4\\worldModel5\\worldModel6\\worldModel7\\worldModel8\\worldModel9\\worldModel10\\worldModel11\\worldModel12\\worldModel13\\worldModel14\\worldModel15\\worldModel16\\worldClipModel\\rocketModel\viewmodel_rpg7_rocket\knifeModel\viewmodel_knife\worldKnifeModel\weapon_parabolic_knife\ammoName\rpg\maxAmmo\2\startAmmo\2\clipName\rpg_mp\clipSize\1\dropAmmoMin\1\dropAmmoMax\2\viewFlashEffect\muzzleflashes/at4_flash\worldFlashEffect\muzzleflashes/at4_flash\shellEjectEffect\\lastShotEjectEffect\\worldClipDropEffect\\pickupSound\weap_pickup\pickupSoundPlayer\weap_pickup\ammoPickupSound\\ammoPickupSoundPlayer\\projectileSound\weap_rpg_loop\fireSound\weap_rpg_fire_npc\fireSoundPlayer\weap_rpg_fire_plr\lastShotSound\\lastShotSoundPlayer\\emptyFireSound\weap_dryfire_rifle_npc\emptyFireSoundPlayer\weap_dryfire_rifle_plr\meleeSwipeSound\melee_swing_ps_large\meleeSwipeSoundPlayer\melee_rpg_swing_plr\rechamberSound\\rechamberSoundPlayer\\reloadSound\\reloadSoundPlayer\\reloadEmptySound\\reloadEmptySoundPlayer\\reloadStartSound\\reloadStartSoundPlayer\\reloadEndSound\\reloadEndSoundPlayer\\altSwitchSound\\altSwitchSoundPlayer\\raiseSound\weap_rpg_raise_npc\raiseSoundPlayer\weap_rpg_raise_plr\firstRaiseSound\\firstRaiseSoundPlayer\\putawaySound\weap_rpg_drop_npc\putawaySoundPlayer\weap_rpg_drop_plr\bounceSound\\nightVisionWearSound\\nightVisionWearSoundPlayer\\nightVisionRemoveSound\\nightVisionRemoveSoundPlayer\\reticleCenter\reticle_flechette\reticleSide\\reticleCenterSize\32\reticleSideSize\24\reticleMinOfs\17\enemyCrosshairRange\1000\crosshairColorChange\1\altWeapon\\boltAction\0\aimDownSight\1\rechamberWhileAds\1\adsViewErrorMin\0\adsViewErrorMax\0\adsFire\1\noAdsWhenMagEmpty\0\avoidDropCleanup\0\cancelAutoHolsterWhenEmpty\0\suppressAmmoReserveDisplay\0\blocksProne\0\noPartialReload\0\reloadAmmoAdd\1\autoAimRange\0\aimAssistRange\1000\aimAssistRangeAds\1000\fightDist\720\maxDist\1400\aiVsAiAccuracyGraph\\aiVsPlayerAccuracyGraph\\standMoveF\0\standMoveR\0\standMoveU\-1.7\standRotP\0\standRotY\0\standRotR\0\duckedOfsF\-2\duckedOfsR\0.8\duckedOfsU\-0.2\duckedMoveF\-1\duckedMoveR\0\duckedMoveU\-1.7\duckedRotP\0\duckedRotY\0\duckedRotR\0\proneOfsF\-2\proneOfsR\1\proneOfsU\-1\proneMoveF\-160\proneMoveR\3\proneMoveU\-120\proneRotP\0\proneRotY\300\proneRotR\-300\posMoveRate\6\posProneMoveRate\25\standMoveMinSpeed\110\duckedMoveMinSpeed\60\proneMoveMinSpeed\0\posRotRate\6\posProneRotRate\30\standRotMinSpeed\110\duckedRotMinSpeed\60\proneRotMinSpeed\0\explosionRadius\300\explosionInnerDamage\160\explosionOuterDamage\30\damageConeAngle\180\projectileSpeed\1500\projectileSpeedUp\500\projectileActivateDist\0\projectileLifetime\5\projectileModel\projectile_rpg7\projExplosionType\rocket\projExplosionEffect\\projExplosionEffectForceNormalUp\0\projExplosionSound\\projDudEffect\\projDudSound\\projImpactExplode\1\projTrailEffect\smoke/smoke_geotrail_rpg\projectileDLight\200\projectileRed\0.75\projectileGreen\0.3\projectileBlue\1\projIgnitionDelay\0\projIgnitionEffect\\projIgnitionSound\\destabilizationRateTime\0.4\destabilizationCurvatureMax\10\destabilizeDistance\300\parallelDefaultBounce\0.5\parallelBarkBounce\0.5\parallelBrickBounce\0.5\parallelCarpetBounce\0.5\parallelClothBounce\0.5\parallelConcreteBounce\0.5\parallelDirtBounce\0.5\parallelFleshBounce\0.5\parallelFoliageBounce\0.5\parallelGlassBounce\0.5\parallelGrassBounce\0.5\parallelGravelBounce\0.5\parallelIceBounce\0.5\parallelMetalBounce\0.5\parallelMudBounce\0.5\parallelPaperBounce\0.5\parallelPlasterBounce\0.5\parallelRockBounce\0.5\parallelSandBounce\0.5\parallelSnowBounce\0.5\parallelWaterBounce\0.5\parallelWoodBounce\0.5\parallelAsphaltBounce\0.5\parallelCeramicBounce\0.5\parallelPlasticBounce\0.5\parallelRubberBounce\0.5\parallelCushionBounce\0.5\parallelFruitBounce\0.5\parallelPaintedMetalBounce\0.5\perpendicularDefaultBounce\0.5\perpendicularBarkBounce\0.5\perpendicularBrickBounce\0.5\perpendicularCarpetBounce\0.5\perpendicularClothBounce\0.5\perpendicularConcreteBounce\0.5\perpendicularDirtBounce\0.5\perpendicularFleshBounce\0.5\perpendicularFoliageBounce\0.5\perpendicularGlassBounce\0.5\perpendicularGrassBounce\0.5\perpendicularGravelBounce\0.5\perpendicularIceBounce\0.5\perpendicularMetalBounce\0.5\perpendicularMudBounce\0.5\perpendicularPaperBounce\0.5\perpendicularPlasterBounce\0.5\perpendicularRockBounce\0.5\perpendicularSandBounce\0.5\perpendicularSnowBounce\0.5\perpendicularWaterBounce\0.5\perpendicularWoodBounce\0.5\perpendicularAsphaltBounce\0.5\perpendicularCeramicBounce\0.5\perpendicularPlasticBounce\0.5\perpendicularRubberBounce\0.5\perpendicularCushionBounce\0.5\perpendicularFruitBounce\0.5\perpendicularPaintedMetalBounce\0.5\fireRumble\\meleeImpactRumble\\adsDofStart\0\adsDofEnd\0\requireLockonToFire\0\notetrackSoundMap\weap_rpg_raise_plr weap_rpg_raise_plr weap_rpg_drop_plr weap_rpg_drop_plr melee_knife_stab melee_knife_stab weap_rpg_lift_plr weap_rpg_lift_plr weap_rpg_insert_plr weap_rpg_insert_plr weap_rpg_twist_plr weap_rpg_twist_plr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*I have changed the display name of the weapon, and it&#039;s viewmodel. It will look like your model in first person view, but will still be an rpg in other people&#039;s hands and thirdperson. For more info on modding weaponfiles, Shadowlance194 wrote a tutorial here: http://www.modsonline.com/Tutorials-read-466.html&lt;br /&gt;
&lt;br /&gt;
*This weaponfile needs to go in the mod IWD\weapons\mp folder, and also needs to be referenced in the mod csv:&lt;br /&gt;
&lt;br /&gt;
 weapon,mp/rpg_mp&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Outline of updating model process:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Save model in Maya&lt;br /&gt;
*Open Cod4 export plugin, tick &#039;entry1&#039; &amp;amp; Select Exports, Set Exports if the geometry has changed&lt;br /&gt;
*Edit version number in .xmodel_export&lt;br /&gt;
*Convert model &amp;amp; materials in Asset Manager&lt;br /&gt;
*Put textures in IWD, re-build fastfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|&#039;&#039;&#039;NOTES AND WARNINGS:&#039;&#039;&#039;}}&lt;br /&gt;
*This is quite complicated, with a lot of things that can go wrong.&lt;br /&gt;
*There is no way to reverse the conversion; you can&#039;t get an xmodel_export from an xmodel file. You also can&#039;t re-import the xmodel_export into Maya, like in old versions of Cod, so don&#039;t lose the source!&lt;br /&gt;
*You will find that the weapon model looks very small in thirdperson view, or if you are looking at someone else who has it. You need to create a separate worldmodel for it, because for some reason they are on different scales. On estimate, the worldmodel needs to be around twice as large.&lt;br /&gt;
*There are three joints on this model. The one at the front, tag_flash, defines where the muzzleflash effect will be.&lt;br /&gt;
*The actual position of the weapon in your hand is the position of the weapon model relative to 0,0,0 in Maya, none of the joints control it.&lt;br /&gt;
*If you only edit a stock weaponfile, you don&#039;t need to worry about precaching it. However, if it&#039;s not stock, you need to add a line in your mod scripts: PrecacheItem(&amp;quot;weaponfile_name&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Call of Duty 5]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Modelling]]&lt;br /&gt;
[[Category:Maya]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://customcollegeessays.com/index.php college essay]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_RainFX&amp;diff=16584</id>
		<title>Call of Duty 4: RainFX</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_RainFX&amp;diff=16584"/>
		<updated>2012-02-22T19:33:45Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:FXs]]&lt;br /&gt;
[[Category:Rain]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Nutshell.png]] Create a Rain effect on your MP map using this tutorial.&lt;br /&gt;
&lt;br /&gt;
In your mp_yourmap.gsc add the following. You will find your GSC file here (C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp), right after &#039;&#039;maps\mp\_load::main();&#039;&#039; add the following:&lt;br /&gt;
&lt;br /&gt;
 maps\mp\mp_yourmap_fx::main();&lt;br /&gt;
&lt;br /&gt;
Open Notepad and make a new file called mp_yourmap_fx and add the following infomations then save it &lt;br /&gt;
to the same folder as your GSC Files.(C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
   level._effect[ &amp;quot;rain_heavy_mist&amp;quot; ]       = loadfx( &amp;quot;weather/rain_mp_farm&amp;quot; );&lt;br /&gt;
   level._effect[ &amp;quot;lightning&amp;quot; ]          = loadfx( &amp;quot;weather/lightning_mp_farm&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
   //ambient runners&lt;br /&gt;
   level._effect[ &amp;quot;water_noise_ud&amp;quot; ]       = loadfx( &amp;quot;ambient_runners/mp_farm_water_noise_ud01&amp;quot; );&lt;br /&gt;
   level._effect[ &amp;quot;water_noise&amp;quot; ]          = loadfx( &amp;quot;ambient_runners/mp_farm_water_noise01&amp;quot; );&lt;br /&gt;
   &lt;br /&gt;
/#&lt;br /&gt;
   if ( getdvar( &amp;quot;clientSideEffects&amp;quot; ) != &amp;quot;1&amp;quot; )&lt;br /&gt;
      maps\createfx\mp_yourmap_fx::main();&lt;br /&gt;
#/      &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go in the directory &amp;quot;C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\&amp;quot;&lt;br /&gt;
make a new Folder called: [b][i]createfx [/i] [/b],then inside that folder open notepad and make a file called &lt;br /&gt;
&lt;br /&gt;
 mp_yourmap_fx.gsc &lt;br /&gt;
&lt;br /&gt;
Put the following into the created file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;rain_heavy_mist&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( X, Y, Z );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;rain_heavy_mist&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;lightning&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( X, Y, Z );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;lightning&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;water_noise_ud&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( 0, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;water_noise_ud&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;water_noise&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( 0, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;water_noise&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that X, Y, Z corresponds to the coordinate of the origin of the rain FX, the radius of this FX is about 2500*2000 so you might need to add more at different points to cover the entire map.&lt;br /&gt;
&lt;br /&gt;
- Save and close file, in the CreateFX folder.&lt;br /&gt;
&lt;br /&gt;
In your Compiler. open up you update zone-file button and add the following to your ZoneFile&lt;br /&gt;
&lt;br /&gt;
 fx,weather/rain_mp_farm&lt;br /&gt;
 fx,weather/lightning_mp_farm&lt;br /&gt;
&lt;br /&gt;
Note that some FX like ambient_runners are in the /main/xxx.iwd and do not need to be loaded in your CSV Zone File.&lt;br /&gt;
&lt;br /&gt;
 Note that the technique described [[Call of Duty 4: Using Script Struct in Radiant|Here]] can be also used and might be easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 23:52, 15 October 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_RainFX&amp;diff=16583</id>
		<title>Call of Duty 4: RainFX</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_RainFX&amp;diff=16583"/>
		<updated>2012-02-22T19:31:47Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:FXs]]&lt;br /&gt;
[[Category:Rain]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Nutshell.png]] Create a Rain effect on your MP map using this tutorial.&lt;br /&gt;
&lt;br /&gt;
In your mp_yourmap.gsc add the following. You will find your GSC file here (C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp), right after &#039;&#039;maps\mp\_load::main();&#039;&#039; add the following:&lt;br /&gt;
&lt;br /&gt;
 maps\mp\mp_yourmap_fx::main();&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
Open Notepad and make a new file called mp_yourmap_fx and add the following infomations then save it &lt;br /&gt;
to the same folder as your GSC Files.(C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\mp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
   level._effect[ &amp;quot;rain_heavy_mist&amp;quot; ]       = loadfx( &amp;quot;weather/rain_mp_farm&amp;quot; );&lt;br /&gt;
   level._effect[ &amp;quot;lightning&amp;quot; ]          = loadfx( &amp;quot;weather/lightning_mp_farm&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
   //ambient runners&lt;br /&gt;
   level._effect[ &amp;quot;water_noise_ud&amp;quot; ]       = loadfx( &amp;quot;ambient_runners/mp_farm_water_noise_ud01&amp;quot; );&lt;br /&gt;
   level._effect[ &amp;quot;water_noise&amp;quot; ]          = loadfx( &amp;quot;ambient_runners/mp_farm_water_noise01&amp;quot; );&lt;br /&gt;
   &lt;br /&gt;
/#&lt;br /&gt;
   if ( getdvar( &amp;quot;clientSideEffects&amp;quot; ) != &amp;quot;1&amp;quot; )&lt;br /&gt;
      maps\createfx\mp_yourmap_fx::main();&lt;br /&gt;
#/      &lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go in the directory &amp;quot;C:\Program Files\Activision\Call of Duty 4 - Modern Warfare\raw\maps\&amp;quot;&lt;br /&gt;
make a new Folder called: [b][i]createfx [/i] [/b],then inside that folder open notepad and make a file called &lt;br /&gt;
&lt;br /&gt;
 mp_yourmap_fx.gsc &lt;br /&gt;
&lt;br /&gt;
Put the following into the created file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;rain_heavy_mist&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( X, Y, Z );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;rain_heavy_mist&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;lightning&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( X, Y, Z );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;lightning&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;water_noise_ud&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( 0, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;water_noise_ud&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
&lt;br /&gt;
	ent = maps\mp\_utility::createOneshotEffect( &amp;quot;water_noise&amp;quot; );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( 0, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( 270, 0, 0 );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = &amp;quot;water_noise&amp;quot;;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = -15;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that X, Y, Z corresponds to the coordinate of the origin of the rain FX, the radius of this FX is about 2500*2000 so you might need to add more at different points to cover the entire map.&lt;br /&gt;
&lt;br /&gt;
- Save and close file, in the CreateFX folder.&lt;br /&gt;
&lt;br /&gt;
In your Compiler. open up you update zone-file button and add the following to your ZoneFile&lt;br /&gt;
&lt;br /&gt;
 fx,weather/rain_mp_farm&lt;br /&gt;
 fx,weather/lightning_mp_farm&lt;br /&gt;
&lt;br /&gt;
Note that some FX like ambient_runners are in the /main/xxx.iwd and do not need to be loaded in your CSV Zone File.&lt;br /&gt;
&lt;br /&gt;
 Note that the technique described [[Call of Duty 4: Using Script Struct in Radiant|Here]] can be also used and might be easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 23:52, 15 October 2008 (UTC)&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Animated_LCD&amp;diff=16582</id>
		<title>Call of Duty 4: Animated LCD</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Animated_LCD&amp;diff=16582"/>
		<updated>2012-02-22T19:28:38Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:rgn_warning.png|right]]&lt;br /&gt;
This tutorial will help you add an Modern Animated LCD in your COD4 Levels&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Files needed =&lt;br /&gt;
&lt;br /&gt;
*You can grab the file [http://wiki.modsrepository.com/cod4_files/cod4_animated_LCD.zip  HERE][[Image:Data.png]]&lt;br /&gt;
*Once downloaded, extract the folder RAW in &#039;&#039;&#039;Your_COD_root/raw&#039;&#039;&#039; folder, and extract the folder PREFABS inside  &#039;&#039;&#039;Your_COD_root/map_source&#039;&#039;&#039; folder&lt;br /&gt;
&lt;br /&gt;
= In Radiant =&lt;br /&gt;
&lt;br /&gt;
*Open Radiant and your level, then add the new prefab from &#039;&#039;map_source/prefabs/animmodels&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= In GSC Files =&lt;br /&gt;
&lt;br /&gt;
*In your main map&#039;s GSC add this line right after &#039;&#039;&#039;maps\mp\_load::main();&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;maps\mp\mp_yourmap_struct::main();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*In folder raw/maps/mp make new GSC fila and name it &#039;&#039;&#039;mp_yourmap_struct.gsc&#039;&#039;&#039;&lt;br /&gt;
*Copy/paste this inside:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include common_scripts\utility;&lt;br /&gt;
#include maps\mp\_utility;&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	randomStartDelay = randomfloatrange( -20, -15);&lt;br /&gt;
	global_FX( &amp;quot;lcd_animated&amp;quot;, &amp;quot;lcd_animated&amp;quot;, &amp;quot;animated/lcd_animated&amp;quot;, randomStartDelay );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global_FX( targetname, fxName, fxFile, delay, soundalias )&lt;br /&gt;
{&lt;br /&gt;
	// script_structs&lt;br /&gt;
	ents = getstructarray(targetname,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if ( isdefined( ents ) )&lt;br /&gt;
		for ( i = 0 ; i &amp;lt; ents.size ; i++ )&lt;br /&gt;
			ents[i] global_FX_create( fxName, fxFile, delay, soundalias );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global_FX_create( fxName, fxFile, delay, soundalias )&lt;br /&gt;
{&lt;br /&gt;
	if ( !isdefined( level._effect ) )&lt;br /&gt;
		level._effect = [];&lt;br /&gt;
	if ( !isdefined( level._effect[ fxName ] ) )&lt;br /&gt;
		level._effect[ fxName ]	= loadfx( fxFile );&lt;br /&gt;
&lt;br /&gt;
	// default effect angles if they dont exist&lt;br /&gt;
	if ( !isdefined( self.angles ) )&lt;br /&gt;
		self.angles = ( 0, 0, 0 );&lt;br /&gt;
&lt;br /&gt;
	ent = createOneshotEffect( fxName );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( self.origin );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( self.angles );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = fxName;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = delay;&lt;br /&gt;
	if ( isdefined( soundalias ) )&lt;br /&gt;
		ent.v[ &amp;quot;soundalias&amp;quot; ] = soundalias;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= In Zone File =&lt;br /&gt;
&lt;br /&gt;
*In your map&#039;s zone fila add this two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fx,animated/lcd_animated&lt;br /&gt;
rawfile,maps/mp/mp_yourmap_struct.gsc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Change &#039;&#039;&#039;yourmap&#039;&#039;&#039; name with your map name.}}&lt;br /&gt;
&lt;br /&gt;
= Credits = &lt;br /&gt;
&lt;br /&gt;
*Prefab and tutorial by &#039;&#039;&#039;Miregrobar&#039;&#039;&#039;&lt;br /&gt;
*Custom models by &#039;&#039;&#039;Red Beret&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Zeroy&#039;&#039;&#039; for help on Fx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 09:49, 22 June 2010 (UTC)&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:FXs]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Animated_LCD&amp;diff=16581</id>
		<title>Call of Duty 4: Animated LCD</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Animated_LCD&amp;diff=16581"/>
		<updated>2012-02-22T19:23:27Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:rgn_warning.png|right]]&lt;br /&gt;
This tutorial will help you add an Modern Animated LCD in your COD4 Levels&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Files needed =&lt;br /&gt;
&lt;br /&gt;
*You can grab the file [http://wiki.modsrepository.com/cod4_files/cod4_animated_LCD.zip  HERE][[Image:Data.png]]&lt;br /&gt;
*Once downloaded, extract the folder RAW in &#039;&#039;&#039;Your_COD_root/raw&#039;&#039;&#039; folder, and extract the folder PREFABS inside  &#039;&#039;&#039;Your_COD_root/map_source&#039;&#039;&#039; folder&lt;br /&gt;
&lt;br /&gt;
= In Radiant =&lt;br /&gt;
&lt;br /&gt;
*Open Radiant and your level, then add the new prefab from &#039;&#039;map_source/prefabs/animmodels&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= In GSC Files =&lt;br /&gt;
&lt;br /&gt;
*In your main map&#039;s GSC add this line right after &#039;&#039;&#039;maps\mp\_load::main();&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;maps\mp\mp_yourmap_struct::main();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*In folder raw/maps/mp make new GSC fila and name it &#039;&#039;&#039;mp_yourmap_struct.gsc&#039;&#039;&#039;&lt;br /&gt;
*Copy/paste this inside:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include common_scripts\utility;&lt;br /&gt;
#include maps\mp\_utility;&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	randomStartDelay = randomfloatrange( -20, -15);&lt;br /&gt;
	global_FX( &amp;quot;lcd_animated&amp;quot;, &amp;quot;lcd_animated&amp;quot;, &amp;quot;animated/lcd_animated&amp;quot;, randomStartDelay );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global_FX( targetname, fxName, fxFile, delay, soundalias )&lt;br /&gt;
{&lt;br /&gt;
	// script_structs&lt;br /&gt;
	ents = getstructarray(targetname,&amp;quot;targetname&amp;quot;);&lt;br /&gt;
	if ( isdefined( ents ) &amp;amp;&amp;amp; ents.size &amp;gt; 0 )&lt;br /&gt;
		for ( i = 0 ; i &amp;lt; ents.size ; i++ )&lt;br /&gt;
			ents[i] global_FX_create( fxName, fxFile, delay, soundalias );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global_FX_create( fxName, fxFile, delay, soundalias )&lt;br /&gt;
{&lt;br /&gt;
	if ( !isdefined( level._effect ) )&lt;br /&gt;
		level._effect = [];&lt;br /&gt;
	if ( !isdefined( level._effect[ fxName ] ) )&lt;br /&gt;
		level._effect[ fxName ]	= loadfx( fxFile );&lt;br /&gt;
&lt;br /&gt;
	// default effect angles if they dont exist&lt;br /&gt;
	if ( !isdefined( self.angles ) )&lt;br /&gt;
		self.angles = ( 0, 0, 0 );&lt;br /&gt;
&lt;br /&gt;
	ent = createOneshotEffect( fxName );&lt;br /&gt;
	ent.v[ &amp;quot;origin&amp;quot; ] = ( self.origin );&lt;br /&gt;
	ent.v[ &amp;quot;angles&amp;quot; ] = ( self.angles );&lt;br /&gt;
	ent.v[ &amp;quot;fxid&amp;quot; ] = fxName;&lt;br /&gt;
	ent.v[ &amp;quot;delay&amp;quot; ] = delay;&lt;br /&gt;
	if ( isdefined( soundalias ) )&lt;br /&gt;
		ent.v[ &amp;quot;soundalias&amp;quot; ] = soundalias;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= In Zone File =&lt;br /&gt;
&lt;br /&gt;
*In your map&#039;s zone fila add this two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fx,animated/lcd_animated&lt;br /&gt;
rawfile,maps/mp/mp_yourmap_struct.gsc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Change &#039;&#039;&#039;yourmap&#039;&#039;&#039; name with your map name.}}&lt;br /&gt;
&lt;br /&gt;
= Credits = &lt;br /&gt;
&lt;br /&gt;
*Prefab and tutorial by &#039;&#039;&#039;Miregrobar&#039;&#039;&#039;&lt;br /&gt;
*Custom models by &#039;&#039;&#039;Red Beret&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Zeroy&#039;&#039;&#039; for help on Fx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 09:49, 22 June 2010 (UTC)&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:FXs]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_destruct_model&amp;diff=16580</id>
		<title>Call of Duty 4: destruct model</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_destruct_model&amp;diff=16580"/>
		<updated>2012-02-22T19:10:58Z</updated>

		<summary type="html">&lt;p&gt;Ingram: /* Scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This tutorial uses an adaptation of the IW SP script &#039;&#039;_interactive_objects.gsc&#039;&#039;&lt;br /&gt;
This will work on any stock models for which you have a normal state model and a destroyed state model available and an FX for the destruction effect.}}&lt;br /&gt;
&lt;br /&gt;
 Example will use the security camera model ( com_security_camera &amp;amp; com_security_camera_destroyed ).&lt;br /&gt;
&lt;br /&gt;
==Radiant==&lt;br /&gt;
&lt;br /&gt;
Place the normal state (not destroyed) model where you want it in your level&lt;br /&gt;
&lt;br /&gt;
[[Image:cam1.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
With the model selected enter the entity property window (n) and enter the following keys/values:&lt;br /&gt;
&lt;br /&gt;
 Key: Classname&lt;br /&gt;
 Value: script_model&lt;br /&gt;
&lt;br /&gt;
 Key: Targetname&lt;br /&gt;
 Value: destroyable_security_camera&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
Create a new file &amp;lt;code&amp;gt;_destructables_obj.gsc&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;/raw/maps/mp/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
	precachemodel( &amp;quot;com_security_camera&amp;quot; );&lt;br /&gt;
	precachemodel( &amp;quot;com_security_camera_destroyed&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
	thread arrays();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
arrays()&lt;br /&gt;
{&lt;br /&gt;
	security_camera = getentarray(&amp;quot;destroyable_security_camera&amp;quot;, &amp;quot;targetname&amp;quot; );&lt;br /&gt;
	level.breakables_fx[ &amp;quot;security_camera_explode&amp;quot; ] = loadfx( &amp;quot;props/securitycamera_explosion&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
	for(i=0;i &amp;lt; security_camera.size;i++)&lt;br /&gt;
		security_camera[i] thread security_camera_logic();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
security_camera_logic()&lt;br /&gt;
{&lt;br /&gt;
	self setcandamage( true );&lt;br /&gt;
	damagemodel = undefined;&lt;br /&gt;
&lt;br /&gt;
	if(self.model == &amp;quot;com_security_camera&amp;quot;)&lt;br /&gt;
		damagemodel = &amp;quot;com_security_camera_destroyed&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	self waittill( &amp;quot;damage&amp;quot;, damage, other, direction_vec, P, type );&lt;br /&gt;
&lt;br /&gt;
	self setmodel( damagemodel );&lt;br /&gt;
	playfxontag( level.breakables_fx[ &amp;quot;security_camera_explode&amp;quot; ], self, &amp;quot;tag_deathfx&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Note that in the example above the destroyed model is &#039;&#039;com_security_camera_destroyed&#039;&#039; and the FX is &lt;br /&gt;
 &#039;&#039;props/securitycamera_explosion&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
In your Level/Map GSC add the following after &amp;lt;code&amp;gt;maps/mp/_load::main();&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 maps\mp\_destructables_obj::main();&lt;br /&gt;
&lt;br /&gt;
Finally in your Level/Map Zone File add the following&lt;br /&gt;
&lt;br /&gt;
 rawfile,maps/mp/_destructables_obj.gsc&lt;br /&gt;
 xmodel,com_security_camera_destroyed&lt;br /&gt;
 fx,props/securityCamera_explosion&lt;br /&gt;
&lt;br /&gt;
In the map the model will be destroyed on bullet/c4/grenade/RL/GL and replaced with destroyed model with a nice FX&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Zeroy|Zeroy.]] 20:59, 15 October 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:FXs]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Create_a_mp_burg_like_map&amp;diff=16579</id>
		<title>Call of Duty 4: Create a mp burg like map</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Create_a_mp_burg_like_map&amp;diff=16579"/>
		<updated>2012-02-22T19:04:23Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 15768 by Rafaelcarter (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Warning_advanced}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Foreword by Deavius&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I believe the mp_burg map is an absolute masterpiece. It looks very wonderful and balanced, when I play it it still amazes me. Credits go to Mapicted, the author of this map. You can download the map here: {{Download|http://files.filefront.com/mp+burgzip/;972145;/fileinfo.html}}&lt;br /&gt;
&lt;br /&gt;
I made this tutorial so other people can make such maps as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparations==&lt;br /&gt;
Firstly, CoD4 lacks a good medieval stone texture, so we&#039;ll want to make one. I believe the texture used in mp_burg comes from an old CoD (namely, CoDUO), I&#039;m not sure, but it looks rather familiar to me.&lt;br /&gt;
&lt;br /&gt;
Download the following texture:&lt;br /&gt;
{{Download|http://www.daevius.com/files/walldirt.zip}}&lt;br /&gt;
&lt;br /&gt;
It contains a colour map (the texture), a normal map (creates a depth field of the texture for realistic shadows) and a specular colour map (used to make it shine, as if water is on the texture). Open the [[Call_of_Duty_4:_Assets_Manager|assets manager]], open levels.gdt, create a new material and call it &#039;walldirt&#039;. Now use the following settings:&lt;br /&gt;
&lt;br /&gt;
[[Image:walldirt.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Save &amp;lt;code&amp;gt;levels.gdt&amp;lt;/code&amp;gt;, and click PC Convert -&amp;gt; This Asset Only.&lt;br /&gt;
3 textures (.iwi files) will appear in &amp;lt;code&amp;gt;[root]/raw/images/&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;walldirt_col.iwi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;walldirt_nrm.iwi&amp;lt;/code&amp;gt; and something similar named as &amp;lt;code&amp;gt;~walldirt_spec-r-25g-25b-25&amp;amp;$~ae6da276.iwi&amp;lt;/code&amp;gt;.&lt;br /&gt;
These files should be put in your [[Call_of_Duty_4:_.IWD_file|.iwd file]], in the images directory, if you want to play your map with the custom texture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Making a tunnel==&lt;br /&gt;
[[Image:tunnel.png|right]]&lt;br /&gt;
Making a tunnel can be quite tricky. You want to get the textures right and don&#039;t want any lightmap errors. I found my method for doing this, which I will explain here.&lt;br /&gt;
&lt;br /&gt;
We will make a tunnel part. This is a straight piece of tunnel which we can use multiple times by connecting the ends of 2 parts. Decide what length you want it to have. I choose it to be &#039;384&#039; worlds units occupied by 7 vertexes, but choose what fits best for you.&lt;br /&gt;
&lt;br /&gt;
[[Image:tunnel_grid.png|left]]&lt;br /&gt;
Create a terrain mesh which is 9 (or more, if you want to make it more detailed / rounded) in width and 7 (more or less, depends on your choice), press Ctrl + I to switch the normal direction and start bending the vertex columns (so you keep pressing Ctrl + Tab till you see the side of the mesh which has 9 vertexes) by selecting the column and moving it downwards. The picture on the right is token with a grid of 16x16, I used a grid of 2x2 for making it. Make it more or less how the picture displays it (don&#039;t mind the selected parts, these are for later on). Apply the walldirt texture to it.&lt;br /&gt;
&lt;br /&gt;
Now create another texture mesh, with the same height as the previous one, but now with 4 vertexes in width (or more for more detail). This will be the ground. Make it a bit deeper in the middle using the [[Call of Duty 4: Advanced Patch Editing Options|advanced patch editing options window]]. Be sure that the ground MUST touch the wall, if you accidentally unattached them, then deselect everything, then select the wall, then the ground and [[Call of Duty 4: Connect vertexes|reattach the vertexes]]. Apply texture &#039;me_ground_mud1&#039;.&lt;br /&gt;
&lt;br /&gt;
Select the ground mesh, press Ctrl + C, Ctrl + V and apply the &amp;lt;code&amp;gt;ch_ground_mud02_decal&amp;lt;/code&amp;gt; texture. Press &#039;v&#039;, select the rows in the middle of the path, the [[Call of Duty 4: gVertex Color / Alpha Editing|press &#039;g&#039; and make it transparent]].&lt;br /&gt;
&lt;br /&gt;
[[Image:tunnel_dirt.png|right]]&lt;br /&gt;
Select the stone-texture mesh and press Space, go to the front view of your tunnel part and select the first or the second vertex (column) above the vertex (column) that touches the ground. Press Ctrl + Shift + X, deselect both and do the same for the other side. Now delete the top part (the ceiling), and assign the texture &amp;lt;code&amp;gt;ch_ground_mud02_decal&amp;lt;/code&amp;gt; to both sides. Make the top vertex columns transparent (and any vertex in between should be given a shade of transparency). Now move it to the same position the stone texture mesh is (the Space bar copies and moves, we move it back onto place).&lt;br /&gt;
&lt;br /&gt;
Select the non-ground meshes (the ceiling / wall and the dirt we applied), press &#039;s&#039; and select Natural. For the 2 ground meshes we select CAP. Now press Shift + L, select all meshes and select Natural (this is important to get rid of those lightmap errors).&lt;br /&gt;
&lt;br /&gt;
We can now copy-paste the tunnel part, connect two parts and changing directions. Be sure that whenever you connect two part, you&#039;ll have to [[Call of Duty 4: Connect vertexes|reconnect the vertexes]] so it looks like one tunnel.&lt;br /&gt;
&lt;br /&gt;
[[Image:tunnel_turn.png|left]]&lt;br /&gt;
Changing direction is fairly easy, you go to top-view and select a row of the tunnel part. The go to Selection -&amp;gt; Rotate -&amp;gt; Arbitrary Direction, in the Z field you add a value like 10 (soft turning) or 20 (quick turning). I usually use 15. The next row would then get the value 30, the 45, 60, etc. You move each row so you get a nice turn.&lt;br /&gt;
&lt;br /&gt;
Now we have one final step to do, and that is adding light. First we want to have a light source, the &#039;com_utility_light_on&#039; model is the one we&#039;ll use. Place it in the middle of the tunnel, up to the ceiling. Now add a light object (right click in the grid -&amp;gt; light), just beneath the model, about 8 units beneath. I changed the following key / value pairs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;_color&amp;quot; &amp;quot;.9 .7 .5&amp;quot;&lt;br /&gt;
&amp;quot;radius&amp;quot; &amp;quot;200&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gives a bit of an orange light source, which simply looks better then plain white :P&lt;br /&gt;
&lt;br /&gt;
You should now have the ability to make some awesome tunnel network ;-), good luck!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Made by Daevius&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Create_Panoramic_shots&amp;diff=16578</id>
		<title>Call of Duty: Create Panoramic shots</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Create_Panoramic_shots&amp;diff=16578"/>
		<updated>2012-02-22T18:41:52Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Formatting does not work in preformatted text tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note|This tutorial should work on COD/CODUO/COD2/COD4/COD5 - It will explained how to create some great paroramic shots for your Levels}}&lt;br /&gt;
&lt;br /&gt;
= What you will get =&lt;br /&gt;
&lt;br /&gt;
[[File:cw_pan4yr.jpg|center|1000px]]&lt;br /&gt;
&lt;br /&gt;
= Steps In game =&lt;br /&gt;
&lt;br /&gt;
* Load your level with the usual dev options and in the console, type in, in turn:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/cg_draw2d 0 (to hide all hud elements)&lt;br /&gt;
/cg_drawgun 0 (to hide first person hands &amp;amp; weapon)&lt;br /&gt;
/cg_thirdperson 1 (to emulate spectator mode with better controls)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Find a good spot to start &amp;amp; use &#039;&#039;&#039;/viewpos 1&#039;&#039;&#039; in console. That&#039;ll give you the x y z yaw of your current location.&lt;br /&gt;
* Now use &#039;&#039;&#039;/setviewpos&#039;&#039;&#039; in console &amp;amp; the &#039;&#039;x y z&#039;&#039; from &#039;&#039;&#039;/viewpos 1&#039;&#039;&#039;, change the yaw to 0, take the first screenshot.&lt;br /&gt;
* Next just spun a bit to the right with the mouse &amp;amp; took another screenshot. Do that 4 or 5 times, &lt;br /&gt;
&lt;br /&gt;
= Photoshop =&lt;br /&gt;
&lt;br /&gt;
* Opened all the created screens in photoshop, put them all in the same document in different layers&lt;br /&gt;
* Go to File &amp;gt; Automate &amp;gt; Photomerge. &lt;br /&gt;
&lt;br /&gt;
In most cases this will stitch your photos together, you just need to crop out the transparency left due to CoD 4&#039;s &amp;quot;fish eye lens&amp;quot; effect. &#039;&#039;&amp;quot;in most cases&amp;quot;&#039;&#039; because sometimes there&#039;s a bad screen in the bunch that throws off the Photomerge and you won&#039;t end up with anything that resembles a panoramic screenshot.&lt;br /&gt;
&lt;br /&gt;
== Photomerge help ==&lt;br /&gt;
&lt;br /&gt;
* There&#039;s a nice writeup on using Photomerge [http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-75e8a.html HERE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By [https://twitter.com/#!/Cornrow_Wallace CornrowWallace]&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty]]&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Call of Duty 2]]&lt;br /&gt;
[[Category:Call of Duty 5]]&lt;br /&gt;
[[Category:Tools]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Tools_for_Modding/Mapping&amp;diff=16577</id>
		<title>Call of Duty: Tools for Modding/Mapping</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Tools_for_Modding/Mapping&amp;diff=16577"/>
		<updated>2012-02-22T18:33:54Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This page is a holder for recommended tools used around moding and mapping for the windows platform. The following are free unless stated otherwise.}}&lt;br /&gt;
&lt;br /&gt;
=Text Editor=&lt;br /&gt;
&lt;br /&gt;
==Notepad==&lt;br /&gt;
default windows text editor&lt;br /&gt;
&lt;br /&gt;
==[http://notepad-plus.sourceforge.net/fr/site.htm Notepad++]==&lt;br /&gt;
Advanced features such as per language highlighter and regular expression search&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Based on a powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API&lt;br /&gt;
and STL which ensures a higher execution speed and smaller program size. By optimizing as many&lt;br /&gt;
routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon&lt;br /&gt;
dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption,&lt;br /&gt;
resulting in a greener environment.&lt;br /&gt;
&lt;br /&gt;
This project is mature. However, there may be still some bugs and missing features that are being&lt;br /&gt;
worked on. If you have any questions or suggestions about this project, please post them in the&lt;br /&gt;
forums. Also, if you wish to make a feature request, you can post it there as well. But there&#039;s no&lt;br /&gt;
guarantee that I&#039;ll implement your request.&lt;br /&gt;
&lt;br /&gt;
You&#039;re encouraged to translate Notepad++ into your native tongue if there&#039;s not already a translation&lt;br /&gt;
present in the Download Section. And if you want, help translating Notepad++ official site into your&lt;br /&gt;
native tongue would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
I hope you enjoy Notepad++ as much as I enjoy coding it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the features of Notepad++ :&lt;br /&gt;
&lt;br /&gt;
	 Syntax Highlighting and Syntax Folding&lt;br /&gt;
	 WYSIWYG&lt;br /&gt;
	 User Defined Syntax Highlighting&lt;br /&gt;
	 Auto-completion&lt;br /&gt;
	 Multi-Document&lt;br /&gt;
	 Multi-View&lt;br /&gt;
	 Regular Expression Search/Replace supported&lt;br /&gt;
	 Full Drag ‘N&#039; Drop supported&lt;br /&gt;
	 Dynamic position of Views&lt;br /&gt;
	 File Status Auto-detection&lt;br /&gt;
	 Zoom in and zoom out&lt;br /&gt;
	 Multi-Language environment supported&lt;br /&gt;
	 Bookmark&lt;br /&gt;
	 Brace and Indent guideline Highlighting&lt;br /&gt;
	 Macro recording and playback&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.flos-freeware.ch/notepad2.html Notepad2]==&lt;br /&gt;
Alternative to the above.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
  Notepad2 is a light-weight, free and open source Notepad-like text&lt;br /&gt;
  editor with syntax highlighting for a few commonly used languages.&lt;br /&gt;
  It&#039;s based on the Scintilla source code editing component and works&lt;br /&gt;
  on NT-based versions of Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Features&lt;br /&gt;
&lt;br /&gt;
  - Syntax highlighting: HTML, XML, PHP, ASP (JS, VBS), CSS,&lt;br /&gt;
    JavaScript, VBScript, C/C++, C#, Resource Script, Makefiles, Java,&lt;br /&gt;
    Visual Basic, Pascal, Assembly, SQL, Perl, Python, Configuration&lt;br /&gt;
    Files, Apache Config Files, Batch Files, Diff Files&lt;br /&gt;
  - Drag &amp;amp; drop text editing inside and outside Notepad2&lt;br /&gt;
  - Basic regular expression search and replace&lt;br /&gt;
  - Useful word, line and block editing shortcuts&lt;br /&gt;
  - Rectangular selection (Alt+Mouse)&lt;br /&gt;
  - Brace matching, auto indent, long line marker, zoom functions&lt;br /&gt;
  - Support for Unicode, UTF-8, Unix and Mac text files&lt;br /&gt;
  - Open shell links&lt;br /&gt;
  - Mostly adjustable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.pnotepad.org/ Programmer&#039;s Notepad]==&lt;br /&gt;
Another text editor with advanced features.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These is not an exhaustive feature list, but gives some idea of the features present in Programmer’s Notepad.&lt;br /&gt;
&lt;br /&gt;
Please Note: Programmer’s Notepad 2 currently does not have a hex editor built in.&lt;br /&gt;
&lt;br /&gt;
Bookmarks (both numbered and plain)&lt;br /&gt;
Code Folding/Outlining&lt;br /&gt;
Docking tool windows - much better than those in version 1&lt;br /&gt;
Excellent external tool support with user-configurable&lt;br /&gt;
output matching - click on errors and warnings to jump right to&lt;br /&gt;
the place in the file where they were generated&lt;br /&gt;
Export to HTML (using CSS) and RTF&lt;br /&gt;
File association manager&lt;br /&gt;
In-file method/definition navigation (using Ctags)&lt;br /&gt;
No limit on file size (although large files may take a while&lt;br /&gt;
to load)&lt;br /&gt;
Non fixed-width font support&lt;br /&gt;
Projects and Project Groups with multi-level folders and&lt;br /&gt;
file system mirroring&lt;br /&gt;
Quick Search toolbar with links to Google and Google Groups&lt;br /&gt;
Regular expression search and replace&lt;br /&gt;
Support for unicode files&lt;br /&gt;
Support for windows, unix and macintosh file formats&lt;br /&gt;
Syntax highlighting for many languages through “schemes”.&lt;br /&gt;
Tabbed MDI interface&lt;br /&gt;
Text Clips&lt;br /&gt;
Unlimited number of schemes supported, powerful syntax&lt;br /&gt;
highlighting supporting both user-defined and built-in schemes&lt;br /&gt;
User-defined schemes (XML)&lt;br /&gt;
Word-wrapping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Compression Utility=&lt;br /&gt;
&lt;br /&gt;
==[http://www.7-zip.org/ 7-zip]==&lt;br /&gt;
Free compression decompression software&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
High compression ratio in new 7z format with LZMA compression&lt;br /&gt;
Supported formats:&lt;br /&gt;
Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR&lt;br /&gt;
Unpacking only: ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.&lt;br /&gt;
For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip&lt;br /&gt;
Strong AES-256 encryption in 7z and ZIP formats&lt;br /&gt;
Self-extracting capability for 7z format&lt;br /&gt;
Integration with Windows Shell&lt;br /&gt;
Powerful File Manager&lt;br /&gt;
Powerful command line version&lt;br /&gt;
Plugin for FAR Manager&lt;br /&gt;
Localizations for 74 languages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.izarc.fr/ Irzac]==&lt;br /&gt;
Free compression decompression software (I can&#039;t find the english version of the website so pardon me the foreign link) the following description is a google translation from french to english.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IZArc is a compression / decompression and french free (freeware) similar to Winzip and winrar.&lt;br /&gt;
&lt;br /&gt;
How simply zipper files? This small utility created by Ivan Zahariev can handle many different archive&lt;br /&gt;
formats (7-ZIP, ACE, ARC, BZ2, CAB, GZ, JAR, RAR, TAR, TBZ, TZ, UUE, XXE, YZ1, ZIP, ZOO , etc ...)&lt;br /&gt;
&lt;br /&gt;
You can, through its clear interface and customizable, compress and decompress your files at their&lt;br /&gt;
leisure, but also convert from one format to another, send them by e-mail, etc..&lt;br /&gt;
&lt;br /&gt;
Features of this very interesting freeware:&lt;br /&gt;
&lt;br /&gt;
Support of multivolume archives and self-extracting&lt;br /&gt;
reading and converting images CD / DVD (ISO, BIN, MDF, NRG, IMG, C2D, PDI, CDI).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Disc Usage=&lt;br /&gt;
&lt;br /&gt;
==[http://www.hdgraph.com/ HDGraph]==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
It&#039;s a free tool allowing to graphically display the hard disk space usage : it shows all the&lt;br /&gt;
directories and subdirectories of the hard drive on a single graph, allowing to see the largest&lt;br /&gt;
directories at a glance.&lt;br /&gt;
 &lt;br /&gt;
It is compatible with all storage visible in the Windows explorer : folder of hard disk drive, USB key, network folder, CD, DVD, etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://windirstat.info/ WinDirStat]==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WinDirStat reads the whole directory tree once and then presents it in three useful views:&lt;br /&gt;
&lt;br /&gt;
The directory list, which resembles the tree view of the Windows Explorer but is sorted by file/subtree size,&lt;br /&gt;
The treemap, which shows the whole contents of the directory tree straight away,&lt;br /&gt;
The extension list, which serves as a legend and shows statistics about the file types.&lt;br /&gt;
   &lt;br /&gt;
  			   &lt;br /&gt;
  &lt;br /&gt;
Setup Wizard	Drive Selection	Main Window (93 kiB)	Options&lt;br /&gt;
Coupling. Select an item in the directory list: The treemap highlights it; and vice versa.&lt;br /&gt;
Zooming.&lt;br /&gt;
Built-in cleanup actions including Open, Show Properties, Delete.&lt;br /&gt;
User-defined cleanups (command line based).&lt;br /&gt;
Works with network drives and UNC paths.&lt;br /&gt;
&#039;Create disk usage report&#039; option.&lt;br /&gt;
&#039;Submit bug report/Feedback&#039; option.&lt;br /&gt;
Online help.&lt;br /&gt;
setup.exe.&lt;br /&gt;
Language can be set to Czech, Dutch, Estonian, Finnish, German, English, Spanish, French, Hungarian, Italian, Polish and Russian.&lt;br /&gt;
Just have a look at the Translation website if you want to help or if you want to know more.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Misc=&lt;br /&gt;
&lt;br /&gt;
==[http://www.ultrapico.com/Expresso.htm Expresso]==&lt;br /&gt;
Regular Expression Editor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here are some of the features:&lt;br /&gt;
&lt;br /&gt;
Still free of charge!&lt;br /&gt;
&lt;br /&gt;
Build complex regular expressions by selecting components from a palette&lt;br /&gt;
Test expressions against real or sample input data&lt;br /&gt;
Display all matches in a tree structure, showing captured groups, and all captures within a group&lt;br /&gt;
Build replacement strings and test the match and replace functionality&lt;br /&gt;
Highlight matched text in the input data&lt;br /&gt;
Test automatically for syntax errors&lt;br /&gt;
Generate Visual Basic, C#, or C++ code&lt;br /&gt;
Save and restore data in a project file&lt;br /&gt;
Maintain and expand a library of frequently used regular expressions&lt;br /&gt;
Dramatically enhanced Analyzer&lt;br /&gt;
Analyzes and describes your regular expression in a tree structure&lt;br /&gt;
Updated continuously in a separate thread&lt;br /&gt;
Edit portions of your regular expression by selecting nodes in the Analyzer view&lt;br /&gt;
Immediate feedback on syntax errors&lt;br /&gt;
Highlight portions of your expression for partial matching&lt;br /&gt;
Rich new Builder and editing features&lt;br /&gt;
Easier to use Builder&lt;br /&gt;
Support for .NET 2.0 features like character class subtraction and new Unicode classes&lt;br /&gt;
Extensive editing capabilities via context menus in both text view and Analyzer view&lt;br /&gt;
Builder can be docked or undocked from the Main Expresso window&lt;br /&gt;
Full Undo/Redo capability&lt;br /&gt;
Additional New features&lt;br /&gt;
Line by line validation testing&lt;br /&gt;
Test the Regex.Split() method&lt;br /&gt;
Export match results to Excel, XML, etc.&lt;br /&gt;
Carriage return, line feed, and other invisible characters are visible in the search results&lt;br /&gt;
Drag and drop files and text&lt;br /&gt;
Insert arbitrary Unicode characters in sample text or regular expression&lt;br /&gt;
Code generation for the new C++/CLI syntax in addition to the old MC++&lt;br /&gt;
Code generation for Replacement String and templates for Replace(), Split(), Match() and other regex methods&lt;br /&gt;
Turn Tooltips on or off&lt;br /&gt;
Support for very long data files&lt;br /&gt;
Startup tips to guide new users&lt;br /&gt;
Improvements and additions to the Regex Library&lt;br /&gt;
Improvements to threading to allow reliable interruption of slow expressions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://winmerge.org/ WinMerge]==&lt;br /&gt;
Text file comparer, very useful to have the difference highlighted&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n addition, WinMerge has many helpful supporting features that make comparing, synchronising, and merging as easy and useful as possible:&lt;br /&gt;
&lt;br /&gt;
General&lt;br /&gt;
Supports Microsoft Windows 98/2000/XP/2003/Vista/2008&lt;br /&gt;
Handles Windows, Unix and Mac text file formats&lt;br /&gt;
Unicode support&lt;br /&gt;
Tabbed interface&lt;br /&gt;
File Compare&lt;br /&gt;
Visual differencing and merging of text files&lt;br /&gt;
Flexible editor with syntax highlighting, line numbers and word-wrap&lt;br /&gt;
Highlights differences inside lines&lt;br /&gt;
Difference pane shows current difference in two vertical panes&lt;br /&gt;
Location pane shows map of files compared&lt;br /&gt;
Moved lines detection&lt;br /&gt;
Folder Compare&lt;br /&gt;
Regular Expression based file filters allow excluding and including items&lt;br /&gt;
Fast compare using file sizes and dates&lt;br /&gt;
Compares one folder or includes all subfolders&lt;br /&gt;
Can show folder compare results in a tree-style view&lt;br /&gt;
Version Control&lt;br /&gt;
Creates patch files&lt;br /&gt;
Resolve conflict files&lt;br /&gt;
Rudimentary Visual SourceSafe and Rational ClearCase integration&lt;br /&gt;
Other&lt;br /&gt;
Shell Integration (supports 64-bit Windows versions)&lt;br /&gt;
Archive file support using 7-Zip&lt;br /&gt;
Plugin support&lt;br /&gt;
Localizable interface&lt;br /&gt;
Online manual and installed HTML Help manual&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.cygwin.com/ CygWin]===&lt;br /&gt;
For the one among us that are used to have all those linux utilities as grep, this is a must have for&lt;br /&gt;
the windows platform.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cygwin is a Linux-like environment for Windows. It consists of two parts:&lt;br /&gt;
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API&lt;br /&gt;
functionality.&lt;br /&gt;
A collection of tools which provide Linux look and feel.&lt;br /&gt;
The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions&lt;br /&gt;
of Windows, with the exception of Windows CE.&lt;br /&gt;
&lt;br /&gt;
Note that the official support for Windows 95, Windows 98, and Windows Me will be discontinued with&lt;br /&gt;
the next major version (1.7.0) of Cygwin, which is in beta testing right now.&lt;br /&gt;
&lt;br /&gt;
What Isn&#039;t Cygwin?&lt;br /&gt;
Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from&lt;br /&gt;
source if you want it to run on Windows.&lt;br /&gt;
Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like&lt;br /&gt;
signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of&lt;br /&gt;
Cygwin functionality.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Source Control=&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Better be safe than sorry.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==[http://subversion.tigris.org/ SVN]==&lt;br /&gt;
This open source version control software is cross platform and have a plethora of client for most main stream OS. I highly recommend [http://tortoisesvn.tigris.org/ tortoise] as a primary windows client. &lt;br /&gt;
&lt;br /&gt;
==[http://bazaar-vcs.org/ Bazaar]==&lt;br /&gt;
Similar to turtoiseSVN (see above) for the client.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Bazaar runs on Windows, GNU/Linux, UNIX and Mac OS, and requires only Python 2.4. If you can run&lt;br /&gt;
Python, you can run Bazaar! It is an official GNU project, licensed under the GPLv2 or later, at your&lt;br /&gt;
option.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonwiki.com/index.php/Tools Modsonline&#039;s Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category: Scripting]]&lt;br /&gt;
[[Category: Modding]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Tools_for_Modding/Mapping&amp;diff=16576</id>
		<title>Call of Duty: Tools for Modding/Mapping</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty:_Tools_for_Modding/Mapping&amp;diff=16576"/>
		<updated>2012-02-22T18:32:52Z</updated>

		<summary type="html">&lt;p&gt;Ingram: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This page is a holder for recommended tools used around moding and mapping for the windows platform. The following are free unless stated otherwise.}}&lt;br /&gt;
&lt;br /&gt;
=Text Editor=&lt;br /&gt;
&lt;br /&gt;
==Notepad==&lt;br /&gt;
default windows text editor&lt;br /&gt;
&lt;br /&gt;
==[http://notepad-plus.sourceforge.net/fr/site.htm Notepad++]==&lt;br /&gt;
Advanced features such as per language highlighter and regular expression search&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Based on a powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API&lt;br /&gt;
and STL which ensures a higher execution speed and smaller program size. By optimizing as many&lt;br /&gt;
routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon&lt;br /&gt;
dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption,&lt;br /&gt;
resulting in a greener environment.&lt;br /&gt;
&lt;br /&gt;
This project is mature. However, there may be still some bugs and missing features that are being&lt;br /&gt;
worked on. If you have any questions or suggestions about this project, please post them in the&lt;br /&gt;
forums. Also, if you wish to make a feature request, you can post it there as well. But there&#039;s no&lt;br /&gt;
guarantee that I&#039;ll implement your request.&lt;br /&gt;
&lt;br /&gt;
You&#039;re encouraged to translate Notepad++ into your native tongue if there&#039;s not already a translation&lt;br /&gt;
present in the Download Section. And if you want, help translating Notepad++ official site into your&lt;br /&gt;
native tongue would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
I hope you enjoy Notepad++ as much as I enjoy coding it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the features of Notepad++ :&lt;br /&gt;
&lt;br /&gt;
	 Syntax Highlighting and Syntax Folding&lt;br /&gt;
	 WYSIWYG&lt;br /&gt;
	 User Defined Syntax Highlighting&lt;br /&gt;
	 Auto-completion&lt;br /&gt;
	 Multi-Document&lt;br /&gt;
	 Multi-View&lt;br /&gt;
	 Regular Expression Search/Replace supported&lt;br /&gt;
	 Full Drag ‘N&#039; Drop supported&lt;br /&gt;
	 Dynamic position of Views&lt;br /&gt;
	 File Status Auto-detection&lt;br /&gt;
	 Zoom in and zoom out&lt;br /&gt;
	 Multi-Language environment supported&lt;br /&gt;
	 Bookmark&lt;br /&gt;
	 Brace and Indent guideline Highlighting&lt;br /&gt;
	 Macro recording and playback&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.flos-freeware.ch/notepad2.html Notepad2]==&lt;br /&gt;
Alternative to the above.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
  Notepad2 is a light-weight, free and open source Notepad-like text&lt;br /&gt;
  editor with syntax highlighting for a few commonly used languages.&lt;br /&gt;
  It&#039;s based on the Scintilla source code editing component and works&lt;br /&gt;
  on NT-based versions of Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Features&lt;br /&gt;
&lt;br /&gt;
  - Syntax highlighting: HTML, XML, PHP, ASP (JS, VBS), CSS,&lt;br /&gt;
    JavaScript, VBScript, C/C++, C#, Resource Script, Makefiles, Java,&lt;br /&gt;
    Visual Basic, Pascal, Assembly, SQL, Perl, Python, Configuration&lt;br /&gt;
    Files, Apache Config Files, Batch Files, Diff Files&lt;br /&gt;
  - Drag &amp;amp; drop text editing inside and outside Notepad2&lt;br /&gt;
  - Basic regular expression search and replace&lt;br /&gt;
  - Useful word, line and block editing shortcuts&lt;br /&gt;
  - Rectangular selection (Alt+Mouse)&lt;br /&gt;
  - Brace matching, auto indent, long line marker, zoom functions&lt;br /&gt;
  - Support for Unicode, UTF-8, Unix and Mac text files&lt;br /&gt;
  - Open shell links&lt;br /&gt;
  - Mostly adjustable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.pnotepad.org/ Programmer&#039;s Notepad]==&lt;br /&gt;
Another text editor with advanced features.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These is not an exhaustive feature list, but gives some idea of the features present in Programmer’s Notepad.&lt;br /&gt;
&lt;br /&gt;
Please Note: Programmer’s Notepad 2 currently does not have a hex editor built in.&lt;br /&gt;
&lt;br /&gt;
Bookmarks (both numbered and plain)&lt;br /&gt;
Code Folding/Outlining&lt;br /&gt;
Docking tool windows - much better than those in version 1&lt;br /&gt;
Excellent external tool support with user-configurable&lt;br /&gt;
output matching - click on errors and warnings to jump right to&lt;br /&gt;
the place in the file where they were generated&lt;br /&gt;
Export to HTML (using CSS) and RTF&lt;br /&gt;
File association manager&lt;br /&gt;
In-file method/definition navigation (using Ctags)&lt;br /&gt;
No limit on file size (although large files may take a while&lt;br /&gt;
to load)&lt;br /&gt;
Non fixed-width font support&lt;br /&gt;
Projects and Project Groups with multi-level folders and&lt;br /&gt;
file system mirroring&lt;br /&gt;
Quick Search toolbar with links to Google and Google Groups&lt;br /&gt;
Regular expression search and replace&lt;br /&gt;
Support for unicode files&lt;br /&gt;
Support for windows, unix and macintosh file formats&lt;br /&gt;
Syntax highlighting for many languages through “schemes”.&lt;br /&gt;
Tabbed MDI interface&lt;br /&gt;
Text Clips&lt;br /&gt;
Unlimited number of schemes supported, powerful syntax&lt;br /&gt;
highlighting supporting both user-defined and built-in schemes&lt;br /&gt;
User-defined schemes (XML)&lt;br /&gt;
Word-wrapping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Compression Utility=&lt;br /&gt;
&lt;br /&gt;
==[http://www.7-zip.org/ 7-zip]==&lt;br /&gt;
Free compression decompression software&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
High compression ratio in new 7z format with LZMA compression&lt;br /&gt;
Supported formats:&lt;br /&gt;
Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR&lt;br /&gt;
Unpacking only: ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.&lt;br /&gt;
For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip&lt;br /&gt;
Strong AES-256 encryption in 7z and ZIP formats&lt;br /&gt;
Self-extracting capability for 7z format&lt;br /&gt;
Integration with Windows Shell&lt;br /&gt;
Powerful File Manager&lt;br /&gt;
Powerful command line version&lt;br /&gt;
Plugin for FAR Manager&lt;br /&gt;
Localizations for 74 languages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.izarc.fr/ Irzac]==&lt;br /&gt;
Free compression decompression software (I can&#039;t find the english version of the website so pardon me the foreign link) the following description is a google translation from french to english.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IZArc is a compression / decompression and french free (freeware) similar to Winzip and winrar.&lt;br /&gt;
&lt;br /&gt;
How simply zipper files? This small utility created by Ivan Zahariev can handle many different archive&lt;br /&gt;
formats (7-ZIP, ACE, ARC, BZ2, CAB, GZ, JAR, RAR, TAR, TBZ, TZ, UUE, XXE, YZ1, ZIP, ZOO , etc ...)&lt;br /&gt;
&lt;br /&gt;
You can, through its clear interface and customizable, compress and decompress your files at their&lt;br /&gt;
leisure, but also convert from one format to another, send them by e-mail, etc..&lt;br /&gt;
&lt;br /&gt;
Features of this very interesting freeware:&lt;br /&gt;
&lt;br /&gt;
Support of multivolume archives and self-extracting&lt;br /&gt;
reading and converting images CD / DVD (ISO, BIN, MDF, NRG, IMG, C2D, PDI, CDI).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Disc Usage=&lt;br /&gt;
&lt;br /&gt;
==[http://www.hdgraph.com/ HDGraph]==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
It&#039;s a free tool allowing to graphically display the hard disk space usage : it shows all the&lt;br /&gt;
directories and subdirectories of the hard drive on a single graph, allowing to see the largest&lt;br /&gt;
directories at a glance.&lt;br /&gt;
 &lt;br /&gt;
It is compatible with all storage visible in the Windows explorer : folder of hard disk drive, USB key, network folder, CD, DVD, etc...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://windirstat.info/ WinDirStat]==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WinDirStat reads the whole directory tree once and then presents it in three useful views:&lt;br /&gt;
&lt;br /&gt;
The directory list, which resembles the tree view of the Windows Explorer but is sorted by file/subtree size,&lt;br /&gt;
The treemap, which shows the whole contents of the directory tree straight away,&lt;br /&gt;
The extension list, which serves as a legend and shows statistics about the file types.&lt;br /&gt;
   &lt;br /&gt;
  			   &lt;br /&gt;
  &lt;br /&gt;
Setup Wizard	Drive Selection	Main Window (93 kiB)	Options&lt;br /&gt;
Coupling. Select an item in the directory list: The treemap highlights it; and vice versa.&lt;br /&gt;
Zooming.&lt;br /&gt;
Built-in cleanup actions including Open, Show Properties, Delete.&lt;br /&gt;
User-defined cleanups (command line based).&lt;br /&gt;
Works with network drives and UNC paths.&lt;br /&gt;
&#039;Create disk usage report&#039; option.&lt;br /&gt;
&#039;Submit bug report/Feedback&#039; option.&lt;br /&gt;
Online help.&lt;br /&gt;
setup.exe.&lt;br /&gt;
Language can be set to Czech, Dutch, Estonian, Finnish, German, English, Spanish, French, Hungarian, Italian, Polish and Russian.&lt;br /&gt;
Just have a look at the Translation website if you want to help or if you want to know more.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Misc=&lt;br /&gt;
&lt;br /&gt;
==[http://www.ultrapico.com/Expresso.htm Expresso]==&lt;br /&gt;
Regular Expression Editor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here are some of the features:&lt;br /&gt;
&lt;br /&gt;
Still free of charge!&lt;br /&gt;
&lt;br /&gt;
Build complex regular expressions by selecting components from a palette&lt;br /&gt;
Test expressions against real or sample input data&lt;br /&gt;
Display all matches in a tree structure, showing captured groups, and all captures within a group&lt;br /&gt;
Build replacement strings and test the match and replace functionality&lt;br /&gt;
Highlight matched text in the input data&lt;br /&gt;
Test automatically for syntax errors&lt;br /&gt;
Generate Visual Basic, C#, or C++ code&lt;br /&gt;
Save and restore data in a project file&lt;br /&gt;
Maintain and expand a library of frequently used regular expressions&lt;br /&gt;
Dramatically enhanced Analyzer&lt;br /&gt;
Analyzes and describes your regular expression in a tree structure&lt;br /&gt;
Updated continuously in a separate thread&lt;br /&gt;
Edit portions of your regular expression by selecting nodes in the Analyzer view&lt;br /&gt;
Immediate feedback on syntax errors&lt;br /&gt;
Highlight portions of your expression for partial matching&lt;br /&gt;
Rich new Builder and editing features&lt;br /&gt;
Easier to use Builder&lt;br /&gt;
Support for .NET 2.0 features like character class subtraction and new Unicode classes&lt;br /&gt;
Extensive editing capabilities via context menus in both text view and Analyzer view&lt;br /&gt;
Builder can be docked or undocked from the Main Expresso window&lt;br /&gt;
Full Undo/Redo capability&lt;br /&gt;
Additional New features&lt;br /&gt;
Line by line validation testing&lt;br /&gt;
Test the Regex.Split() method&lt;br /&gt;
Export match results to Excel, XML, etc.&lt;br /&gt;
Carriage return, line feed, and other invisible characters are visible in the search results&lt;br /&gt;
Drag and drop files and text&lt;br /&gt;
Insert arbitrary Unicode characters in sample text or regular expression&lt;br /&gt;
Code generation for the new C++/CLI syntax in addition to the old MC++&lt;br /&gt;
Code generation for Replacement String and templates for Replace(), Split(), Match() and other regex methods&lt;br /&gt;
Turn Tooltips on or off&lt;br /&gt;
Support for very long data files&lt;br /&gt;
Startup tips to guide new users&lt;br /&gt;
Improvements and additions to the Regex Library&lt;br /&gt;
Improvements to threading to allow reliable interruption of slow expressions.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://winmerge.org/ WinMerge]==&lt;br /&gt;
Text file comparer, very useful to have the difference highlighted&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
n addition, WinMerge has many helpful supporting features that make comparing, synchronising, and merging as easy and useful as possible:&lt;br /&gt;
&lt;br /&gt;
General&lt;br /&gt;
Supports Microsoft Windows 98/2000/XP/2003/Vista/2008&lt;br /&gt;
Handles Windows, Unix and Mac text file formats&lt;br /&gt;
Unicode support&lt;br /&gt;
Tabbed interface&lt;br /&gt;
File Compare&lt;br /&gt;
Visual differencing and merging of text files&lt;br /&gt;
Flexible editor with syntax highlighting, line numbers and word-wrap&lt;br /&gt;
Highlights differences inside lines&lt;br /&gt;
Difference pane shows current difference in two vertical panes&lt;br /&gt;
Location pane shows map of files compared&lt;br /&gt;
Moved lines detection&lt;br /&gt;
Folder Compare&lt;br /&gt;
Regular Expression based file filters allow excluding and including items&lt;br /&gt;
Fast compare using file sizes and dates&lt;br /&gt;
Compares one folder or includes all subfolders&lt;br /&gt;
Can show folder compare results in a tree-style view&lt;br /&gt;
Version Control&lt;br /&gt;
Creates patch files&lt;br /&gt;
Resolve conflict files&lt;br /&gt;
Rudimentary Visual SourceSafe and Rational ClearCase integration&lt;br /&gt;
Other&lt;br /&gt;
Shell Integration (supports 64-bit Windows versions)&lt;br /&gt;
Archive file support using 7-Zip&lt;br /&gt;
Plugin support&lt;br /&gt;
Localizable interface&lt;br /&gt;
Online manual and installed HTML Help manual&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://www.cygwin.com/ CygWin]===&lt;br /&gt;
For the one among us that are used to have all those linux utilities as grep, this is a must have for&lt;br /&gt;
the windows platform.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cygwin is a Linux-like environment for Windows. It consists of two parts:&lt;br /&gt;
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API&lt;br /&gt;
functionality.&lt;br /&gt;
A collection of tools which provide Linux look and feel.&lt;br /&gt;
The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions&lt;br /&gt;
of Windows, with the exception of Windows CE.&lt;br /&gt;
&lt;br /&gt;
Note that the official support for Windows 95, Windows 98, and Windows Me will be discontinued with&lt;br /&gt;
the next major version (1.7.0) of Cygwin, which is in beta testing right now.&lt;br /&gt;
&lt;br /&gt;
What Isn&#039;t Cygwin?&lt;br /&gt;
Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from&lt;br /&gt;
source if you want it to run on Windows.&lt;br /&gt;
Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like&lt;br /&gt;
signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of&lt;br /&gt;
Cygwin functionality.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Source Control=&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Better be safe than sorry.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==[http://subversion.tigris.org/ SVN]==&lt;br /&gt;
This open source version control software is cross platform and have a plethora of client for most main stream OS. I highly recommend [http://tortoisesvn.tigris.org/ tortoise] as a primary windows client. &lt;br /&gt;
&lt;br /&gt;
==[http://bazaar-vcs.org/ Bazzar]==&lt;br /&gt;
Similar to turtoiseSVN (see above) for the client.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Bazaar runs on Windows, GNU/Linux, UNIX and Mac OS, and requires only Python 2.4. If you can run&lt;br /&gt;
Python, you can run Bazaar! It is an official GNU project, licensed under the GPLv2 or later, at your&lt;br /&gt;
option.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: [http://www.modsonwiki.com/index.php/Tools Modsonline&#039;s Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category: Scripting]]&lt;br /&gt;
[[Category: Modding]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_2:_Compile_Tools_Documentation&amp;diff=16575</id>
		<title>Call of Duty 2: Compile Tools Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_2:_Compile_Tools_Documentation&amp;diff=16575"/>
		<updated>2012-02-22T18:29:02Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 15748 by Pranavwright (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Nutshell.png]] CoD2 Compile Tools is your user interface for easy compiling, lighting, paths, vis, vclogs, and loading levels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first time you start CoD2CompileTools you may have to specify where your CoD2 is installed.&lt;br /&gt;
&lt;br /&gt;
The default path is &amp;quot;&amp;lt;code&amp;gt;C:\Program Files\Activision\Call of Duty 2\&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To specify where CoD2 is installed click the &amp;quot;Browse...&amp;quot; button located near the upper left corner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have told CoD2CompileTools where your game is installed you should then see a list of map files under the &amp;quot;All Maps&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cod2compiletools_firstload.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you are ready to compile BSPs, compile Lighting, calculate vis for multiplayer maps, and connect paths for single player maps. This tool will also allow you to easily create a grid file for the selected level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cod2compiletools compilemap.jpg]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==BSP Options==&lt;br /&gt;
 &lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| -onlyEnts &lt;br /&gt;
|Only recompiled the entities within you map. Doesn&#039;t touch brush triggers, geometry, or lighting. This is useful if you want to quickly recompile a map that you only moved an entity in. (Note that if you move a model that casts a shadow, the lighting will not be recompiled by doing onlyEnts, so your shadow will still be in it&#039;s old position, not where you moved that model to.)&lt;br /&gt;
|-&lt;br /&gt;
| -blockSize &lt;br /&gt;
|Grid size for regular BSP splits; 0 uses largest possible&lt;br /&gt;
|-&lt;br /&gt;
| -sampleScale &lt;br /&gt;
|Scales all lightmaps; 2 doubles pixel size, 0.5 halves it&lt;br /&gt;
|-&lt;br /&gt;
| -v &lt;br /&gt;
|Verbose; enables extra compilation messages&lt;br /&gt;
|-&lt;br /&gt;
| -verboseEntities &lt;br /&gt;
|Includes verbose messages for submodels if &#039;-v&#039; is given&lt;br /&gt;
|-&lt;br /&gt;
| -subdivisions &lt;br /&gt;
|Divides all geometry on a grid; only works for small maps&lt;br /&gt;
|-&lt;br /&gt;
| -noSubdivide &lt;br /&gt;
|Ignores the &#039;tessSize&#039; setting in all materials&lt;br /&gt;
|-&lt;br /&gt;
| -brushSmoothAngle &lt;br /&gt;
|Smooth lighting at brush edges at angles less than this&lt;br /&gt;
|-&lt;br /&gt;
| -curveSmoothAngle &lt;br /&gt;
|Smooth lighting at curve edges at angles less than this&lt;br /&gt;
|-&lt;br /&gt;
| -terrainSmoothAngle &lt;br /&gt;
|Smooth lighting at terrain edges at angles less than this&lt;br /&gt;
|-&lt;br /&gt;
| -noWater &lt;br /&gt;
|Ignores all water brushes&lt;br /&gt;
|-&lt;br /&gt;
| -noCurves &lt;br /&gt;
|Ignores all patch and terrain geometry&lt;br /&gt;
|-&lt;br /&gt;
| -noDetail &lt;br /&gt;
|Ignores all detail brushes&lt;br /&gt;
|-&lt;br /&gt;
| -fullDetail &lt;br /&gt;
|Turns all detail brushes into structural brushes&lt;br /&gt;
|-&lt;br /&gt;
| -leakTest &lt;br /&gt;
|Quits immediately if the map leaked&lt;br /&gt;
|-&lt;br /&gt;
| -expandPlayer &lt;br /&gt;
|Writes a map for Radiant to see player-to-brush collision&lt;br /&gt;
|-&lt;br /&gt;
| -expandBullet &lt;br /&gt;
|Writes a map for Radiant to see bullet-to-brush collision&lt;br /&gt;
|-&lt;br /&gt;
| -debugPortals &lt;br /&gt;
|Writes a _portals.map showing portal/structural geometry&lt;br /&gt;
|-&lt;br /&gt;
| -noReorderTris &lt;br /&gt;
|Disables reordering of optimized triangles for T&amp;amp;L cache&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Light Options==&lt;br /&gt;
 &lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| -Verbose &lt;br /&gt;
|Turns on verbose prints&lt;br /&gt;
|-&lt;br /&gt;
| -Quiet &lt;br /&gt;
|Turns off progress counters (can be used with -Verbose)&lt;br /&gt;
|-&lt;br /&gt;
| -Warn &lt;br /&gt;
|Sets the warning level&lt;br /&gt;
|-&lt;br /&gt;
| -Fast &lt;br /&gt;
|Use fast presets for several options (generates lower quality lighting but is much faster)&lt;br /&gt;
|-&lt;br /&gt;
| -Extra &lt;br /&gt;
|Use high-quality presets for several options (generates high quality lighting but takes longer)&lt;br /&gt;
|-&lt;br /&gt;
| -ModelShadow &lt;br /&gt;
|Allows model surfaces to cast shadows&lt;br /&gt;
|-&lt;br /&gt;
| -NoModelShadow &lt;br /&gt;
|Prevents model surfaces from casting shadows&lt;br /&gt;
|-&lt;br /&gt;
| -Traces &lt;br /&gt;
|Number of traces to do from each sample point&lt;br /&gt;
|-&lt;br /&gt;
| -Jitter &lt;br /&gt;
|Breaks up aliasing from trace pattern (0 none, 1 max)&lt;br /&gt;
|-&lt;br /&gt;
| -SuperSample &lt;br /&gt;
|Turns each sample into NxN samples instead&lt;br /&gt;
|-&lt;br /&gt;
| -BounceFraction &lt;br /&gt;
|Higher values are more washed out, lower values darker&lt;br /&gt;
|-&lt;br /&gt;
| -Gamma &lt;br /&gt;
|Gamma value assumed to be implicitly stored in textures&lt;br /&gt;
|-&lt;br /&gt;
| -ContrastGain &lt;br /&gt;
|Increase lighting contrast (0 no change, 1 max)&lt;br /&gt;
|-&lt;br /&gt;
| -Threads &lt;br /&gt;
|Allows using more or fewer threads than processors&lt;br /&gt;
|-&lt;br /&gt;
| -DumpOptions &lt;br /&gt;
|Displays current settings of most parameters&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What is a Grid?==&lt;br /&gt;
&lt;br /&gt;
Entities (models, players, AI) in a map are lit by the lights in the map. In complex maps (as opposed to small test maps) calculating which lights affect which entities takes a lot of work.&lt;br /&gt;
&lt;br /&gt;
To prevent the engine from having to do this in real-time, this information can be written into the bsp using a mapname.grid file.&lt;br /&gt;
&lt;br /&gt;
If a map doesn’t have a grid, you will experience harsh hitches when entering new areas where entities are now visible. These hitches feel like texture thrashing. Grids are needed for both single player and multiplayer maps. A map must be recompiled after creating or modifying a grid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources: Infinity Ward Docs&lt;br /&gt;
[[Category:Call of Duty 2]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Map_Editor_Setup&amp;diff=16574</id>
		<title>Call of Duty : Map Editor Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Map_Editor_Setup&amp;diff=16574"/>
		<updated>2012-02-22T18:24:52Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 16246 by Tn9w5Be45g (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This tutorial assumes that you have no knowledge of mapping, or no knowledge of using any version of Radiant.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;A tutorial by Surgeon courtesy of .Map&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Radiant Setup =&lt;br /&gt;
&lt;br /&gt;
The first thing you will need, if you havn&#039;t got it already is a copy of Call of Duty Radiant (CoD Rad for short). You can get the Tools [http://wiki.modsrepository.com/cod_files/COD_Tools_v1.zip here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Installing CoD Radiant ==&lt;br /&gt;
&lt;br /&gt;
To install CoD Radiant:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Open up CoDTools.exe&lt;br /&gt;
*Click next&lt;br /&gt;
*Read the License agreement and agree with it.&lt;br /&gt;
*Read the system Requirements and make sure you have what it takes to run CoD Rad.&lt;br /&gt;
*Make sure that the directory is pointing to where Call of Duty is installed.&lt;br /&gt;
*Install.&lt;br /&gt;
*Create a shortcut on your desktop.&lt;br /&gt;
*Exit.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Go to your callofduty/main/maps folder and create a new folder. Rename it mp.You should now be ready to run CoD Radiant for the first time.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 If you have any problems runnning CoD Radiant, Open Regedit and delete the HKEY_CURRENT_USERSoftwareCoDRadiant folder. You do so at your own risk.&lt;br /&gt;
&lt;br /&gt;
== Setting CoD Radiant up ==&lt;br /&gt;
&lt;br /&gt;
This section is going to tell you how to set your editor up with some of the more common preferences.&amp;lt;br&amp;gt;&lt;br /&gt;
Open up your editor. You should be asked to locate the cod.qe4 file. This should be located in toolsbin.&amp;lt;br&amp;gt;&lt;br /&gt;
The Editor will then open up and you will see something similar to this :&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_1b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ok, now that you know what CoD Rad looks like, we have to go and set up some preferences.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Click on File-&amp;gt;Project Settings:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_2b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_3b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The editor should have detected where everything is. &#039;&#039;The important lines to check are:&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*basepath (.EXE Location) - Should point to the folder where codsp.exe &amp;amp; codmp.exe are.&lt;br /&gt;
*mapspath (.MAP location) - Should point to the mainmaps folder.&lt;br /&gt;
*entitypath - Should point to the cod.def file located in the toolsbin folder.&lt;br /&gt;
&lt;br /&gt;
= Radiant Preferences =&lt;br /&gt;
&lt;br /&gt;
Next we have to set up CoD Rad&#039;s preferences (edit-&amp;gt;preferences). This will bring up the Preference Options :&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_4b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ll take it in stages. Note: I&#039;m only going to cover the points I consider important.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Views/Rendering==&lt;br /&gt;
&lt;br /&gt;
The 4 little pictures offer you a small choice in the layout of CoD Rad. Try them all out and see which one suits you the best.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solid Selection Boxes&#039;&#039;&#039; - When ticked, any brush/entity selected will be shown with solid bold lines. With it unticked, the lines will be dashed.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ents use &#039;_color&#039; value&#039;&#039;&#039; - ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Brushes in 2D&#039;&#039;&#039; - This shows the textures on brushes in the 2D window, useful for building geometry from a 2D image&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Camera==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slider&#039;&#039;&#039; - The slider controls the speed of camera movement in the 3D Window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Update XY views&#039;&#039;&#039; -&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;QE4 Update Model&#039;&#039;&#039; -&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Farplane&#039;&#039;&#039; - The maximum farplane distance (controls how far the in editor cubic clipping can go).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Texturing==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Toolbar&#039;&#039;&#039; - Unticking this box gives you a handy texture toolbar at the bottom of the screen. Ticking it hides the toolbar.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Scrollbar&#039;&#039;&#039; - Gives you a handy scrollbar to scroll through the textures in the texture window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Subset&#039;&#039;&#039; - Gives you a method of selecting textures within a texture set.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==New Functionality==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Right click to drop entities&#039;&#039;&#039; - With this ticked you can bring up the entity list by right clicking on the 2D Window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Rotation Inc&#039;&#039;&#039; - ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Vehicle Arrow Time&#039;&#039;&#039; - A chain of vehicle nodes draws a spline in editor when set up correctly. This control sets how far apart the arrows are by time the vehicle would take to get from one arrow to the next.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Vehicle Arrow Size&#039;&#039;&#039; - Sets the size of the arrows in the 2D Window ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Patch Toolbar&#039;&#039;&#039; - Adds a selection of buttons to the toolbar at the top, that allow the manipulation of Patch Meshes.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Light Drawing&#039;&#039;&#039; - With this selected, the editor draws a light entity as a diamond shape. Unselected the light entity is drawn as a common box.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Paint Sizing Info&#039;&#039;&#039; - When creating a brush, the unit length/width (dependant on view plane) is visable.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Drop Height&#039;&#039;&#039; - Ctrl-Alt-left click copies a currently selected entity to the location clicked. Ctrl-Alt-middle click moves the selected entity. Drop height controls how far above or below the surface you clicked on the entity will be placed. Useful for making the base of trees be below the terrain when they are placed on non flat surfaces.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Scale Base&#039;&#039;&#039; - See Toggle &amp;quot;tree/grass placement mode&amp;quot;. Scale base defines the default model scale for this mode (100 = normal).&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Scale Range&#039;&#039;&#039; - Like scale base, but controls the amount of scale variation.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tolerent Wield&#039;&#039;&#039; - The distance at which the editor will do tolerant welding.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Startup Shaders - ??&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Splay Distance&#039;&#039;&#039; - Select some vertices in a terrain patch and press Alt-W . This will make these vertices separate apart along their current direction by the distance set in this box. Useful for keeping the texture a consistent scale on a patch which uses Set for its texturing (for example roads).&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Game Path / Tool Settings / Misc&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Load last project on open&#039;&#039;&#039; - With this ticked, CoD Rad will open your last project when started&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Load last map on open&#039;&#039;&#039; - With this ticked, CoD Rad will open your last map when started&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Auto save every&#039;&#039;&#039; - With this ticked CoD Rad will autosave your map every # of mins that you specify. Handy way of making sure that you don&#039;t loose much work to a hang / crash.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
So thats the basics covered. Now you can begin to learn the basics of mapping with CoD Rad!&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;by Surgeon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://callofduty.filefront.com/info/Tut_Map_1_Surgeon Sources]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Setup]]&lt;br /&gt;
[[Category:Call of Duty]]&lt;br /&gt;
[[Category:Call of Duty UO]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Map_Editor_Setup&amp;diff=16573</id>
		<title>Call of Duty : Map Editor Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Map_Editor_Setup&amp;diff=16573"/>
		<updated>2012-02-22T18:24:34Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Undo revision 16247 by Tn9w5Be45g (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|This tutoria [http://www.diamondlinks.net link building]l assumes that you have no knowledge of mapping, or no knowledge of using any version of Radiant.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;A tutorial by Surgeon courtesy of .Map&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Radiant Setup =&lt;br /&gt;
&lt;br /&gt;
The first thing you will need, if you havn&#039;t got it already is a copy of Call of Duty Radiant (CoD Rad for short). You can get the Tools [http://wiki.modsrepository.com/cod_files/COD_Tools_v1.zip here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Installing CoD Radiant ==&lt;br /&gt;
&lt;br /&gt;
To install CoD Radiant:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Open up CoDTools.exe&lt;br /&gt;
*Click next&lt;br /&gt;
*Read the License agreement and agree with it.&lt;br /&gt;
*Read the system Requirements and make sure you have what it takes to run CoD Rad.&lt;br /&gt;
*Make sure that the directory is pointing to where Call of Duty is installed.&lt;br /&gt;
*Install.&lt;br /&gt;
*Create a shortcut on your desktop.&lt;br /&gt;
*Exit.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Go to your callofduty/main/maps folder and create a new folder. Rename it mp.You should now be ready to run CoD Radiant for the first time.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 If you have any problems runnning CoD Radiant, Open Regedit and delete the HKEY_CURRENT_USERSoftwareCoDRadiant folder. You do so at your own risk.&lt;br /&gt;
&lt;br /&gt;
== Setting CoD Radiant up ==&lt;br /&gt;
&lt;br /&gt;
This section is going to tell you how to set your editor up with some of the more common preferences.&amp;lt;br&amp;gt;&lt;br /&gt;
Open up your editor. You should be asked to locate the cod.qe4 file. This should be located in toolsbin.&amp;lt;br&amp;gt;&lt;br /&gt;
The Editor will then open up and you will see something similar to this :&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_1b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ok, now that you know what CoD Rad looks like, we have to go and set up some preferences.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Click on File-&amp;gt;Project Settings:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_2b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_3b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The editor should have detected where everything is. &#039;&#039;The important lines to check are:&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*basepath (.EXE Location) - Should point to the folder where codsp.exe &amp;amp; codmp.exe are.&lt;br /&gt;
*mapspath (.MAP location) - Should point to the mainmaps folder.&lt;br /&gt;
*entitypath - Should point to the cod.def file located in the toolsbin folder.&lt;br /&gt;
&lt;br /&gt;
= Radiant Preferences =&lt;br /&gt;
&lt;br /&gt;
Next we have to set up CoD Rad&#039;s preferences (edit-&amp;gt;preferences). This will bring up the Preference Options :&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:tut_map_surgeon_1_1_4b.gif|center]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ll take it in stages. Note: I&#039;m only going to cover the points I consider important.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Views/Rendering==&lt;br /&gt;
&lt;br /&gt;
The 4 little pictures offer you a small choice in the layout of CoD Rad. Try them all out and see which one suits you the best.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solid Selection Boxes&#039;&#039;&#039; - When ticked, any brush/entity selected will be shown with solid bold lines. With it unticked, the lines will be dashed.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ents use &#039;_color&#039; value&#039;&#039;&#039; - ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Brushes in 2D&#039;&#039;&#039; - This shows the textures on brushes in the 2D window, useful for building geometry from a 2D image&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Camera==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Slider&#039;&#039;&#039; - The slider controls the speed of camera movement in the 3D Window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Update XY views&#039;&#039;&#039; -&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;QE4 Update Model&#039;&#039;&#039; -&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Farplane&#039;&#039;&#039; - The maximum farplane distance (controls how far the in editor cubic clipping can go).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Texturing==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Toolbar&#039;&#039;&#039; - Unticking this box gives you a handy texture toolbar at the bottom of the screen. Ticking it hides the toolbar.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Scrollbar&#039;&#039;&#039; - Gives you a handy scrollbar to scroll through the textures in the texture window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Texture Subset&#039;&#039;&#039; - Gives you a method of selecting textures within a texture set.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==New Functionality==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Right click to drop entities&#039;&#039;&#039; - With this ticked you can bring up the entity list by right clicking on the 2D Window.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Rotation Inc&#039;&#039;&#039; - ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Vehicle Arrow Time&#039;&#039;&#039; - A chain of vehicle nodes draws a spline in editor when set up correctly. This control sets how far apart the arrows are by time the vehicle would take to get from one arrow to the next.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Vehicle Arrow Size&#039;&#039;&#039; - Sets the size of the arrows in the 2D Window ??&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Patch Toolbar&#039;&#039;&#039; - Adds a selection of buttons to the toolbar at the top, that allow the manipulation of Patch Meshes.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Light Drawing&#039;&#039;&#039; - With this selected, the editor draws a light entity as a diamond shape. Unselected the light entity is drawn as a common box.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Paint Sizing Info&#039;&#039;&#039; - When creating a brush, the unit length/width (dependant on view plane) is visable.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Drop Height&#039;&#039;&#039; - Ctrl-Alt-left click copies a currently selected entity to the location clicked. Ctrl-Alt-middle click moves the selected entity. Drop height controls how far above or below the surface you clicked on the entity will be placed. Useful for making the base of trees be below the terrain when they are placed on non flat surfaces.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Scale Base&#039;&#039;&#039; - See Toggle &amp;quot;tree/grass placement mode&amp;quot;. Scale base defines the default model scale for this mode (100 = normal).&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Scale Range&#039;&#039;&#039; - Like scale base, but controls the amount of scale variation.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Tolerent Wield&#039;&#039;&#039; - The distance at which the editor will do tolerant welding.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Startup Shaders - ??&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Splay Distance&#039;&#039;&#039; - Select some vertices in a terrain patch and press Alt-W . This will make these vertices separate apart along their current direction by the distance set in this box. Useful for keeping the texture a consistent scale on a patch which uses Set for its texturing (for example roads).&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Game Path / Tool Settings / Misc&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Load last project on open&#039;&#039;&#039; - With this ticked, CoD Rad will open your last project when started&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Load last map on open&#039;&#039;&#039; - With this ticked, CoD Rad will open your last map when started&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Auto save every&#039;&#039;&#039; - With this ticked CoD Rad will autosave your map every # of mins that you specify. Handy way of making sure that you don&#039;t loose much work to a hang / crash.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
So thats the basics covered. Now you can begin to learn the basics of mapping with CoD Rad!&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;by Surgeon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://callofduty.filefront.com/info/Tut_Map_1_Surgeon Sources]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Setup]]&lt;br /&gt;
[[Category:Call of Duty]]&lt;br /&gt;
[[Category:Call of Duty UO]]&lt;br /&gt;
[[Category:Modtools]]&lt;br /&gt;
[[Category:Radiant]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Play_Cinematic_ingame&amp;diff=16572</id>
		<title>Call of Duty : Play Cinematic ingame</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_:_Play_Cinematic_ingame&amp;diff=16572"/>
		<updated>2012-02-22T18:19:07Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Made the code look prettier.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note|Short tutorial on how to play cinematics in COD series}}&lt;br /&gt;
&lt;br /&gt;
*Precache the cinematic shader after load:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;precacheshader(&amp;quot;cinematic&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now play your movie - store the bik in cod/main/video (default is the one we are using here)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;movie = newHudElem();&lt;br /&gt;
movie setShader( &amp;quot;cinematic&amp;quot;, 800, 600 );&lt;br /&gt;
CinematicInGame( &amp;quot;default&amp;quot; );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*After playing it should close automatically. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;This works in COD4 and WAW. (Probably also in Black Ops!)&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By Techno2SL&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mappersunited.com/forum/index.php?threads/cinematics-in-game.61/ Sources]&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty]]&lt;br /&gt;
[[Category:Singleplayer]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Cinematic]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=User:Ingram&amp;diff=16562</id>
		<title>User:Ingram</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=User:Ingram&amp;diff=16562"/>
		<updated>2012-02-10T19:25:01Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Created page with &amp;quot;&amp;lt;br&amp;gt; Indrek &amp;#039;Ingram&amp;#039; Ardel&amp;lt;br&amp;gt; [http://www.codpromod.com &amp;#039;&amp;#039;&amp;#039;Call of Duty 4 Promod&amp;#039;&amp;#039;&amp;#039;] developer&amp;lt;br&amp;gt; [http://www.ardel.eu &amp;#039;&amp;#039;&amp;#039;Homepage&amp;#039;&amp;#039;&amp;#039;]&amp;lt;br&amp;gt; [http://twitter.com/Ingramz &amp;#039;&amp;#039;&amp;#039;Twitte...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Indrek &#039;Ingram&#039; Ardel&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.codpromod.com &#039;&#039;&#039;Call of Duty 4 Promod&#039;&#039;&#039;] developer&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ardel.eu &#039;&#039;&#039;Homepage&#039;&#039;&#039;]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://twitter.com/Ingramz &#039;&#039;&#039;Twitter&#039;&#039;&#039;]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Replacement_for_devAdd_motion_functions&amp;diff=16561</id>
		<title>Call of Duty 4: Replacement for devAdd motion functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_Replacement_for_devAdd_motion_functions&amp;diff=16561"/>
		<updated>2012-02-10T19:19:02Z</updated>

		<summary type="html">&lt;p&gt;Ingram: Improved limited_angle code, should be way more efficent.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Motion functions for development:&lt;br /&gt;
&lt;br /&gt;
* [[Call_of_Duty_4:_Scripting_Reference_-_Motion::DevAddPitch|devAddPitch]]&lt;br /&gt;
* [[Call_of_Duty_4:_Scripting_Reference_-_Motion::DevAddYaw|devAddYaw]]&lt;br /&gt;
* [[Call_of_Duty_4:_Scripting_Reference_-_Motion::DevAddRoll|devAddRoll]]&lt;br /&gt;
&lt;br /&gt;
These 3 development functions add a given angle to an entitiy without interpolation and &#039;&#039;&#039;in local space&#039;&#039;&#039; (relative change of pitch, yaw or roll). The stock CreateFX (ingame fx placer) script uses them. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, they aren&#039;t functional in the retail executable of the game. However, the same functionality can be scripted:&lt;br /&gt;
&lt;br /&gt;
==Variant 1==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addPitch(pitch)&lt;br /&gt;
{&lt;br /&gt;
	angle = pitch + self.angles[0];&lt;br /&gt;
	return (limited_angle(angle), self.angles[1], self.angles[2]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addYaw(yaw)&lt;br /&gt;
{&lt;br /&gt;
	angle = yaw + self.angles[1];&lt;br /&gt;
	return (self.angles[0], limited_angle(angle), self.angles[2]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addRoll(roll)&lt;br /&gt;
{&lt;br /&gt;
	angle = roll + self.angles[2];&lt;br /&gt;
	return (self.angles[0], self.angles[1], limited_angle(angle));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
limited_angle(angle)&lt;br /&gt;
{&lt;br /&gt;
	if(!isDefined(angle))&lt;br /&gt;
		return 0;&lt;br /&gt;
	angle %= 360;&lt;br /&gt;
	return (angle&amp;lt;0)*360+angle;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This variation can be used just like the devAdd* functions. You can call it like &amp;lt;code&amp;gt;ent addRoll(20);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Variant 2==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addPitch(pitch, source_angles)&lt;br /&gt;
{&lt;br /&gt;
	angle = pitch + source_angles[0];&lt;br /&gt;
	return (limited_angle(angle), source_angles[1], source_angles[2]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addYaw(yaw, source_angles)&lt;br /&gt;
{&lt;br /&gt;
	angle = yaw + source_angles[1];&lt;br /&gt;
	return (source_angles[0], limited_angle(angle), source_angles[2]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addRoll(roll, source_angles)&lt;br /&gt;
{&lt;br /&gt;
	angle = roll + source_angles[2];&lt;br /&gt;
	return (source_angles[0], source_angles[1], limited_angle(angle));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
limited_angle(angle)&lt;br /&gt;
{&lt;br /&gt;
	if(!isDefined(angle))&lt;br /&gt;
		return 0;&lt;br /&gt;
	angle %= 360;&lt;br /&gt;
	return (angle&amp;lt;0)*360+angle;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of calling &amp;lt;code&amp;gt;ent devAddPitch(20);&amp;lt;/code&amp;gt; you would call &amp;lt;code&amp;gt;addPitch(20, ent.angles);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 20:27, 2 February 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Ingram|Ingram]] 19:19, 10 February 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Ingram</name></author>
	</entry>
</feed>