

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.zeroy.com/index.php?action=history&amp;feed=atom&amp;title=Call_of_Duty_5%3A_Adding_FXs</id>
	<title>Call of Duty 5: Adding FXs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zeroy.com/index.php?action=history&amp;feed=atom&amp;title=Call_of_Duty_5%3A_Adding_FXs"/>
	<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;action=history"/>
	<updated>2026-05-09T20:41:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=16495&amp;oldid=prev</id>
		<title>CoDEmanX at 12:42, 7 February 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=16495&amp;oldid=prev"/>
		<updated>2012-02-07T12:42:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:Nutshell.png]] As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &amp;quot;as is&amp;quot; because COD5 doesnt use the createfx folder. You can completely remove it, or void the GSCs in there and it makes no difference to the map&amp;#039;s FX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*That means, that the arrays defined in createfx aren&amp;#039;t built and so have no effect on scripts to trigger FX. So, we have to build our own array&amp;#039;s using the code IW gave us.&lt;br /&gt;
*This is from mp_airfield.gsc. I kept the precache FX level definitions used in Airfield, and did this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
----------------- snip -----------------------&lt;br /&gt;
&lt;br /&gt;
	createFX( &amp;quot;oneshotfx&amp;quot;, ( 1843, 2485, 10 ), ( 270, 0, 0 ), level._effect[&amp;quot;mp_fire_medium&amp;quot;], 1 );&lt;br /&gt;
	createFX( &amp;quot;oneshotfx&amp;quot;, ( 1843, 2485, -10 ), ( 270, 0, 0 ),level._effect[&amp;quot;mp_smoke_column_tall&amp;quot;], 0.05 );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
createFX( type, origin, angles, FXid, delay )&lt;br /&gt;
{&lt;br /&gt;
	FX_ent				= spawnstruct();&lt;br /&gt;
	FX_ent.v[&amp;quot;origin&amp;quot;] 		= origin;&lt;br /&gt;
	FX_ent.v[&amp;quot;angles&amp;quot;] 		= angles;&lt;br /&gt;
	FX_ent.v[&amp;quot;up&amp;quot;] 			= anglestoup( FX_ent.v[&amp;quot;angles&amp;quot;]);&lt;br /&gt;
	FX_ent.v[&amp;quot;forward&amp;quot;] 	= anglestoforward( FX_ent.v[&amp;quot;angles&amp;quot;] );&lt;br /&gt;
	FX_ent.v[&amp;quot;FXid&amp;quot;]		= FXid;&lt;br /&gt;
	FX_ent.v[&amp;quot;delay&amp;quot;]		= delay;&lt;br /&gt;
	FX_ent.v[&amp;quot;type&amp;quot;]		= type;&lt;br /&gt;
	&lt;br /&gt;
	if( FX_ent.v[&amp;quot;type&amp;quot;] == &amp;quot;loopfx&amp;quot; )&lt;br /&gt;
		FX_ent thread loopfxthread();&lt;br /&gt;
	if( FX_ent.v[&amp;quot;type&amp;quot;] == &amp;quot;oneshotfx&amp;quot; )&lt;br /&gt;
		FX_ent thread oneshotfxthread();&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
loopfxthread()&lt;br /&gt;
{&lt;br /&gt;
	PlayLoopedFX( self.v[&amp;quot;FXid&amp;quot;], self.v[&amp;quot;delay&amp;quot;], self.v[&amp;quot;origin&amp;quot;], self.v[&amp;quot;forward&amp;quot;], self.v[&amp;quot;up&amp;quot;] );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
oneshotfxthread()&lt;br /&gt;
{&lt;br /&gt;
	self.looper = spawnFx( self.v[&amp;quot;FXid&amp;quot;], self.v[&amp;quot;origin&amp;quot;], self.v[&amp;quot;forward&amp;quot;], self.v[&amp;quot;up&amp;quot;] );&lt;br /&gt;
	triggerFx( self.looper, self.v[&amp;quot;delay&amp;quot;] );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*This gives you this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:spawned_fx.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*That&amp;#039;s a medium sized fire FX, and a smoke column billowing out of it.&lt;br /&gt;
&lt;br /&gt;
If you look at the createFX() method, it transfers its array with these characteristics:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border: 1px solid silver; border-collapse: separate&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| = whether oneshotfx, or loopfx&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;origin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| = the place you want your fx to spawn&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;angles&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| = the vector angles for your fx&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;FXid&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| = the name of the FX precached. If you get this wrong, it wont run&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;delay&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| = the time between loops&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You could have the code anywhere. Its organisation can be anything you want. As it is, I kept it at the foot of the GSC, but you could have a seperate FX GSC file, and have the lot in there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;by Tally Dec. 2, 2008 05:34 am&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 5]]&lt;br /&gt;
[[Category:Advanced Editing]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:FXs]]&lt;/div&gt;</summary>
		<author><name>CoDEmanX</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=3690&amp;oldid=prev</id>
		<title>Zeroy at 10:56, 2 December 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=3690&amp;oldid=prev"/>
		<updated>2008-12-02T10:56:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:56, 2 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Nutshell.png]] As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &amp;quot;as is&amp;quot; because COD5 doesnt use the createfx folder. You can completely remove it, or void the GSCs in there and it makes no difference to the map&amp;#039;s FX.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Nutshell.png]] As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &amp;quot;as is&amp;quot; because COD5 doesnt use the createfx folder. You can completely remove it, or void the GSCs in there and it makes no difference to the map&amp;#039;s FX.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;That means, that the arrays defined in createfx aren&#039;t built and so have no effect on scripts to trigger FX. So, we have to build our own array&#039;s using the code IW gave us.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is from mp_airfield.gsc. I kept the precache FX level definitions used in Airfield, and did this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*That means, that the arrays defined in createfx aren&#039;t built and so have no effect on scripts to trigger FX. So, we have to build our own array&#039;s using the code IW gave us.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/ins&gt;This is from mp_airfield.gsc. I kept the precache FX level definitions used in Airfield, and did this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot;&gt;Line 51:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:spawned_fx.jpg]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:spawned_fx.jpg&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|600px|center&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zeroy</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=3688&amp;oldid=prev</id>
		<title>Zeroy: New page: Image:Nutshell.png As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &quot;as is&quot; because COD5 doesnt use the createfx folder....</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_5:_Adding_FXs&amp;diff=3688&amp;oldid=prev"/>
		<updated>2008-12-02T10:55:05Z</updated>

		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/index.php?title=File:Nutshell.png&quot; title=&quot;File:Nutshell.png&quot;&gt;Image:Nutshell.png&lt;/a&gt; As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &amp;quot;as is&amp;quot; because COD5 doesnt use the createfx folder....&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Image:Nutshell.png]] As many of you have discovered, attempting to dynamically spawn your FX like we did in COD4 isnt working in COD5 &amp;quot;as is&amp;quot; because COD5 doesnt use the createfx folder. You can completely remove it, or void the GSCs in there and it makes no difference to the map&amp;#039;s FX.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That means, that the arrays defined in createfx aren&amp;#039;t built and so have no effect on scripts to trigger FX. So, we have to build our own array&amp;#039;s using the code IW gave us.&lt;br /&gt;
&lt;br /&gt;
This is from mp_airfield.gsc. I kept the precache FX level definitions used in Airfield, and did this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
----------------- snip -----------------------&lt;br /&gt;
&lt;br /&gt;
	createFX( &amp;quot;oneshotfx&amp;quot;, ( 1843, 2485, 10 ), ( 270, 0, 0 ), level._effect[&amp;quot;mp_fire_medium&amp;quot;], 1 );&lt;br /&gt;
	createFX( &amp;quot;oneshotfx&amp;quot;, ( 1843, 2485, -10 ), ( 270, 0, 0 ),level._effect[&amp;quot;mp_smoke_column_tall&amp;quot;], 0.05 );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
createFX( type, origin, angles, FXid, delay )&lt;br /&gt;
{&lt;br /&gt;
	FX_ent				= spawnstruct();&lt;br /&gt;
	FX_ent.v[&amp;quot;origin&amp;quot;] 		= origin;&lt;br /&gt;
	FX_ent.v[&amp;quot;angles&amp;quot;] 		= angles;&lt;br /&gt;
	FX_ent.v[&amp;quot;up&amp;quot;] 			= anglestoup( FX_ent.v[&amp;quot;angles&amp;quot;]);&lt;br /&gt;
	FX_ent.v[&amp;quot;forward&amp;quot;] 	= anglestoforward( FX_ent.v[&amp;quot;angles&amp;quot;] );&lt;br /&gt;
	FX_ent.v[&amp;quot;FXid&amp;quot;]		= FXid;&lt;br /&gt;
	FX_ent.v[&amp;quot;delay&amp;quot;]		= delay;&lt;br /&gt;
	FX_ent.v[&amp;quot;type&amp;quot;]		= type;&lt;br /&gt;
	&lt;br /&gt;
	if( FX_ent.v[&amp;quot;type&amp;quot;] == &amp;quot;loopfx&amp;quot; )&lt;br /&gt;
		FX_ent thread loopfxthread();&lt;br /&gt;
	if( FX_ent.v[&amp;quot;type&amp;quot;] == &amp;quot;oneshotfx&amp;quot; )&lt;br /&gt;
		FX_ent thread oneshotfxthread();&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
loopfxthread()&lt;br /&gt;
{&lt;br /&gt;
	PlayLoopedFX( self.v[&amp;quot;FXid&amp;quot;], self.v[&amp;quot;delay&amp;quot;], self.v[&amp;quot;origin&amp;quot;] );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
oneshotfxthread()&lt;br /&gt;
{&lt;br /&gt;
	self.looper = spawnFx( self.v[&amp;quot;FXid&amp;quot;], self.v[&amp;quot;origin&amp;quot;] );&lt;br /&gt;
	triggerFx( self.looper, self.v[&amp;quot;delay&amp;quot;] );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*This gives you this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:spawned_fx.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*That&amp;#039;s a medium sized fire FX, and a smoke column billowing out of it.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.png]] &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;The code is by no means finished, and is in fact a &amp;quot;WIP&amp;quot;, but by this method, you can have a oneshotfx or a loopfx.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could have the code anywhere. Its organisation can be anything you want. As it is, I kept it at the foot of the GSC, but you could have a seperate FX GSC file, and have the lot in there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;by Tally Dec. 2, 2008 05:34 am&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Zeroy</name></author>
	</entry>
</feed>