<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Weapon_scripts</id>
	<title>Weapon scripts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Weapon_scripts"/>
	<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Weapon_scripts&amp;action=history"/>
	<updated>2026-04-21T05:31:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Weapon_scripts&amp;diff=2364&amp;oldid=prev</id>
		<title>Qrow: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Weapon_scripts&amp;diff=2364&amp;oldid=prev"/>
		<updated>2026-03-03T23:55:46Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:55, 3 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Qrow</name></author>
	</entry>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Weapon_scripts&amp;diff=2363&amp;oldid=prev</id>
		<title>interemmanuel&gt;Emmanuel: completed exemple</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Weapon_scripts&amp;diff=2363&amp;oldid=prev"/>
		<updated>2013-03-19T11:09:45Z</updated>

		<summary type="html">&lt;p&gt;completed exemple&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=WEAPONERY:=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;following exemples are designed for being a vehicule with 3 weapons &amp;#039;&amp;#039;&lt;br /&gt;
::&amp;lt;small&amp;gt;(ex: a tank with a vertical missile launcher a turet canon a front flamer )&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 keep in mind the fact that &amp;lt;big&amp;gt;weapon1 is the sight&amp;lt;/big&amp;gt; ,&lt;br /&gt;
that make the unit will &amp;lt;big&amp;gt;move at weapon1 range&amp;lt;/big&amp;gt; if order allow roam &lt;br /&gt;
::(other weapon will not make the vehicule move )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 here the list of 3d model piece needed (can be jusqt some empty :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  local turet3,gun3 = piece (&amp;#039;turet3&amp;#039;,&amp;#039;gun3&amp;#039;)&lt;br /&gt;
  local tir3 = piece &amp;quot;tir3&amp;quot;&lt;br /&gt;
  local turet2,gun2 = piece (&amp;#039;turet2&amp;#039;,&amp;#039;gun2&amp;#039;)&lt;br /&gt;
  local tir2 = piece &amp;quot;tir2&amp;quot;&lt;br /&gt;
  local tir1 = piece &amp;quot;tir1&amp;quot;&lt;br /&gt;
  local aim1 = piece &amp;quot;aim1&amp;quot;&lt;br /&gt;
  local aim2 = piece &amp;quot;aim2&amp;quot;&lt;br /&gt;
  local aim3 = piece &amp;quot;aim3&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UNCONDITIONAL WEAPONS ==&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
 function script.AimWeapon1()&lt;br /&gt;
 return 1&lt;br /&gt;
 end &lt;br /&gt;
&lt;br /&gt;
 function script.FireWeapon1()&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.AimFromWeapon1()&lt;br /&gt;
 return aim1&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.QueryWeapon1()&lt;br /&gt;
 return tir1&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== weapon with turret ===&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
 function script.AimWeapon2(y2,x2)&lt;br /&gt;
   Signal(4)&lt;br /&gt;
   SetSignalMask(4)&lt;br /&gt;
   Turn(turet2,y_axis,y2,2)&lt;br /&gt;
   Turn(gun2,x_axis,- x2,2)&lt;br /&gt;
   WaitForTurn(turet2,y_axis)&lt;br /&gt;
   WaitForTurn(gun2,x_axis)&lt;br /&gt;
   return 1&lt;br /&gt;
 end &lt;br /&gt;
&lt;br /&gt;
 function script.FireWeapon2()&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.AimFromWeapon2()&lt;br /&gt;
 return aim2&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.QueryWeapon2()&lt;br /&gt;
 return tir2&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== weapon with limited rotation turet ====&lt;br /&gt;
 (the turet will turn only if target is between -0.5 to 3 radian mean on side)&lt;br /&gt;
 this can be done with elevation too&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 function script.AimWeapon3(y3,x3)&lt;br /&gt;
   Signal(8)&lt;br /&gt;
   SetSignalMask(8)&lt;br /&gt;
   if  &lt;br /&gt;
     y3&amp;lt;3   &lt;br /&gt;
   and &lt;br /&gt;
     x3&amp;gt;-0.5  &lt;br /&gt;
       then &lt;br /&gt;
       Turn(turet3,y_axis,y3,2)&lt;br /&gt;
       Turn(gun3,x_axis, - x3 ,2)&lt;br /&gt;
       WaitForTurn(turet3,y_axis)&lt;br /&gt;
       WaitForTurn(gun3,x_axis)&lt;br /&gt;
       return 1&lt;br /&gt;
       end &lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.FireWeapon3()&lt;br /&gt;
 EmitSfx (tir3,257) Sleep(50) --this unmandatory make smoke at shooting point&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.AimFromWeapon3()&lt;br /&gt;
 return aim3&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 function script.QueryWeapon3()&lt;br /&gt;
 return tir3&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Signal(1) &amp;amp;  SetSignalMask(1) are using ^2 if ever you need more than 30 of them you must use table names&lt;br /&gt;
**the folowing &amp;lt;big&amp;gt;UnitDef&amp;lt;/big&amp;gt; tag are involved :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
::highTrajectory=0,&lt;br /&gt;
::weapons = {[1]=&amp;quot;verti_missile1&amp;quot;,[2]=&amp;quot;canon2&amp;quot;,[3]=&amp;quot;flamethrower3&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
::slaveTo=0.0, &lt;br /&gt;
::mainDir={0.0, 0.0, 1.0},&lt;br /&gt;
::maxAngleDif=180.0,&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[SpringRtsTutorialAnimDef]] return to the list of animDef exemples&lt;br /&gt;
[[Category:Emmanuel]]&lt;/div&gt;</summary>
		<author><name>interemmanuel&gt;Emmanuel</name></author>
	</entry>
</feed>