Difference between revisions of "fire"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Removed wrong category)
(Page now contains both "fire weapon" and "fire array" commands)
Line 1: Line 1:
'''fire''' can refer to these scripting commands:
+
{{Command|= Comments
*[[fire Array]] - Forces a unit to fire the given weapon.
+
____________________________________________________________________________________________
*[[fire weaponName]] - Forces a unit to fire the given weapon with enhaced parameters.
 
  
 +
| ofp |= Game name
  
{{Disambig}}
+
|1.00|= Game version
 +
 
 +
|arg= global |= Arguments in MP
 +
 
 +
|eff= global |= Effects in MP
 +
____________________________________________________________________________________________
 +
 
 +
| Forces a unit to fire the given weapon. |= Description
 +
____________________________________________________________________________________________
 +
 
 +
| unit '''fire''' weapon |= Syntax
 +
|p1= unit: [[Object]] - unit that's supposed to fire |= Parameter 1
 +
|p2= weapon: [[String]] - name of the weapon to be fired |= Parameter 2
 +
| [[Nothing]] |= Return value
 +
____________________________________________________________________________________________
 +
 
 +
|s2 = unit '''fire''' array |= Syntax
 +
|p21 = unit: [[Object]]
 +
|p22 = array: [[Array]] - in format [muzzle, mode, magazine] or [muzzle, mode].
 +
|r2 = [[Nothing]] |= Return value
 +
____________________________________________________________________________________________
 +
 
 +
|x1= <code>soldier fire "M16"</code> |= Example 1
 +
|x2= <code>soldier fire ["throw","SmokeShell","SmokeShell"]</code> |= Example 2
 +
____________________________________________________________________________________________
 +
 
 +
| [[doFire]], [[commandFire]] |= See also
 +
 
 +
}}
 +
 
 +
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
 +
<dd class="notedate">Posted on August 17, 2006 - 08:18</dd>
 +
<dt class="note">'''[[User:Str|Str]]'''</dt><dd class="note">Sometimes AI won't shoot when you use this command. It can be fixed by placing [[selectWeapon]] command before it.</dd>
 +
<!-- Note Section END -->
 +
</dl>
 +
 
 +
<h3 style="display:none">Bottom Section</h3>
 +
[[Category:Scripting Commands|FIRE]]
 +
[[Category:Scripting Commands OFP 1.96|FIRE]]
 +
[[Category:Scripting Commands OFP 1.46|FIRE]]
 +
[[Category:Scripting Commands ArmA|FIRE ]]

Revision as of 08:40, 23 October 2006

Introduced with Operation Flashpoint version 1.001.00Arguments of this scripting command don't have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network
Hover & click on the images for descriptions

Description

Description:
Forces a unit to fire the given weapon.

Syntax

Syntax:
unit fire weapon
Parameters:
unit: Object - unit that's supposed to fire
weapon: String - name of the weapon to be fired
Return Value:
Nothing

Alternative Syntax

Syntax:
unit fire array
Parameters:
unit: Object
array: Array - in format [muzzle, mode, magazine] or [muzzle, mode].
Return Value:
Nothing

Examples

Example 1:
soldier fire "M16"
Example 2:
soldier fire ["throw","SmokeShell","SmokeShell"]

Additional Information

See also:
doFirecommandFire
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Posted on August 17, 2006 - 08:18
Str
Sometimes AI won't shoot when you use this command. It can be fixed by placing selectWeapon command before it.

Bottom Section