<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://eternity.youfailit.net/index.php?action=history&amp;feed=atom&amp;title=SetWeapon</id>
	<title>SetWeapon - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://eternity.youfailit.net/index.php?action=history&amp;feed=atom&amp;title=SetWeapon"/>
	<link rel="alternate" type="text/html" href="https://eternity.youfailit.net/index.php?title=SetWeapon&amp;action=history"/>
	<updated>2026-07-23T01:13:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://eternity.youfailit.net/index.php?title=SetWeapon&amp;diff=6404&amp;oldid=prev</id>
		<title>Printz: Created page with &quot;{{ACSFunction|description=Changes activator&#039;s current weapon. |usage=&#039;&#039;boolean&#039;&#039; &#039;&#039;&#039;SetWeapon&#039;&#039;&#039;(&#039;&#039;str weapon&#039;&#039;) |parameters= *&#039;&#039;weapon&#039;&#039;: name of weapon to switch to. This name is one defined by an EDF weaponinfo block, which for the base games is stored in &#039;&#039;&#039;player.edf&#039;&#039;&#039;. |return=&#039;&#039;&#039;TRUE&#039;&#039;&#039; if the weapon was successfully selected or was already active, &#039;&#039;&#039;FALSE&#039;&#039;&#039; otherwise. |examples=  &lt;code&gt;int result = SetWeapon(&quot;Crossbow&quot;);   // will return TRUE if player...&quot;</title>
		<link rel="alternate" type="text/html" href="https://eternity.youfailit.net/index.php?title=SetWeapon&amp;diff=6404&amp;oldid=prev"/>
		<updated>2026-04-04T11:25:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{ACSFunction|description=Changes activator&amp;#039;s current weapon. |usage=&amp;#039;&amp;#039;boolean&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;SetWeapon&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;str weapon&amp;#039;&amp;#039;) |parameters= *&amp;#039;&amp;#039;weapon&amp;#039;&amp;#039;: name of weapon to switch to. This name is one defined by an &lt;a href=&quot;/wiki/EDF&quot; title=&quot;EDF&quot;&gt;EDF&lt;/a&gt; &lt;a href=&quot;/wiki/Weaponinfo&quot; class=&quot;mw-redirect&quot; title=&quot;Weaponinfo&quot;&gt;weaponinfo&lt;/a&gt; block, which for the base games is stored in &amp;#039;&amp;#039;&amp;#039;player.edf&amp;#039;&amp;#039;&amp;#039;. |return=&amp;#039;&amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;&amp;#039; if the weapon was successfully selected or was already active, &amp;#039;&amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039;&amp;#039; otherwise. |examples=  &amp;lt;code&amp;gt;int result = SetWeapon(&amp;quot;Crossbow&amp;quot;);   // will return TRUE if player...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ACSFunction|description=Changes activator&amp;#039;s current weapon.&lt;br /&gt;
|usage=&amp;#039;&amp;#039;boolean&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;SetWeapon&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;str weapon&amp;#039;&amp;#039;)&lt;br /&gt;
|parameters=&lt;br /&gt;
*&amp;#039;&amp;#039;weapon&amp;#039;&amp;#039;: name of weapon to switch to. This name is one defined by an [[EDF]] [[weaponinfo]] block, which for the base games is stored in &amp;#039;&amp;#039;&amp;#039;player.edf&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|return=&amp;#039;&amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;&amp;#039; if the weapon was successfully selected or was already active, &amp;#039;&amp;#039;&amp;#039;FALSE&amp;#039;&amp;#039;&amp;#039; otherwise.&lt;br /&gt;
|examples=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;int result = SetWeapon(&amp;quot;Crossbow&amp;quot;);   // will return TRUE if player has and can use crossbow&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|notes=&lt;br /&gt;
This function only works if activator is a player.&lt;br /&gt;
&lt;br /&gt;
This will not allow selecting a weapon missing from activator&amp;#039;s [[playerclass]] &amp;#039;&amp;#039;&amp;#039;weaponslot&amp;#039;&amp;#039;&amp;#039; items (i.e. weapons not allowed for the given character class), even if the player holds it in the inventory.&lt;br /&gt;
&lt;br /&gt;
If Heretic tome of power (from [[powereffect]] &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;PowerWeaponLevel2&amp;#039;&amp;#039;&amp;#039;) is active, it will always choose the powered type even if you specify the unpowered &amp;#039;&amp;#039;&amp;#039;weaponinfo&amp;#039;&amp;#039;&amp;#039; definition name.&lt;br /&gt;
|id=(ACS internal)}}&lt;/div&gt;</summary>
		<author><name>Printz</name></author>
	</entry>
</feed>