sendSimpleCommand: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{Feature[ _]arma3" to "{{Feature|arma3")
m (Text replacement - "|size=0.8" to "|size= 0.75")
 
(49 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= ofpe
|version1= 1.00


|1.00|Game version=
|game2= arma1
|version2= 1.00


|gr1= Unit Control |GROUP1=
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| Sends a simple command to the vehicle's driver / gunner (air vehicles ignore it). See also [[vehicleMoveInfo]].<br><br>
|game4= arma2oa
{{Important | Doesn't seem to work if AI driver is alone, needs another unit in the vehicle (could be another AI or player) that is set as [[setEffectiveCommander]]. If driver is [[effectiveCommander]] it will refuse any drive commands.}}
|version4= 1.50
{{Feature|arma3 | Due to some sort of a bug when vehicle is ordered turning ("LEFT" or "RIGHT"), it locks vehicle ability to respond to any other commands properly. Always use "STOPTURNING" to cancel turning before issuing other move commands}}
<br>''Gunner commands''
* <tt>"FIRE"</tt>
* <tt>"CEASE FIRE"</tt>
* <tt>"MANUAL FIRE"</tt>
* <tt>"CANCEL MANUAL FIRE"</tt>
* <tt>"KEY FIRE"</tt>
<br>''Driver move commands''
* <tt>"FORWARD"</tt> - move forward
* <tt>"FAST"</tt> - move forward, fast
* <tt>"SLOW"</tt> - move forward, slow
* <tt>"STOP"</tt> - stop moving forward or backward
* <tt>"BACK"</tt> - move backward
* <tt>"KEY UP"</tt>
* <tt>"KEY DOWN"</tt>
* <tt>"KEY FAST"</tt>
* <tt>"KEY SLOW"</tt>
<br>''Driver turn commands''
* <tt>"LEFT"</tt> - turn left, while moving or not
* <tt>"RIGHT"</tt> - turn right, while moving or not
* <tt>"STOPTURNING"</tt> - cancel turning  (special case, normally would be called by the engine when LEFT or RIGHT turn key is released by the player) {{since|arma3|1.77|true}}
|DESCRIPTION=
____________________________________________________________________________________________


| vehicleName '''sendSimpleCommand''' command |SYNTAX=
|game5= tkoh
|version5= 1.00


|p1=  vehicleName: [[Object]] |PARAMETER1=
|game6= arma3
|p2=  command: [[String]] |PARAMETER2=
|version6= 0.50


| [[Nothing]] |RETURNVALUE=
|gr1= Unit Control
____________________________________________________________________________________________
 
|x1= <code>[[vehicle]] [[player]] [[sendSimpleCommand]] "STOP";</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[vehicleMoveInfo]], [[useAISteeringComponent]], [[effectiveCommander]], [[setEffectiveCommander]], [[enableAI]], [[disableAI]], [[enableAIFeature]], [[enableSentences]] |SEEALSO=
|descr= Sends a simple command to the vehicle's driver / gunner (air vehicles ignore it). See also [[vehicleMoveInfo]].{{Feature | important | Doesn't seem to work if AI driver is alone, needs another unit in the vehicle (could be another AI or player) that is set as [[setEffectiveCommander]]. If driver is [[effectiveCommander]] it will refuse any drive commands.}}
{{Feature|arma3|Due to some sort of a bug when vehicle is ordered turning ("LEFT" or "RIGHT"), it locks the vehicle ability to respond to any other commands properly. Always use "STOPTURNING" to cancel turning before issuing other move commands}}
{{{!}} class="valign-top"
! style="width: 33%" {{!}} Gunner commands
! style="width: 33%" {{!}} Driver Move commands
! Driver Turn commands
{{!}}-
{{!}}
* {{hl|"FIRE"}}
* {{hl|"CEASE FIRE"}}
* {{hl|"MANUAL FIRE"}}
* {{hl|"CANCEL MANUAL FIRE"}}
* {{hl|"KEY FIRE"}}
{{!}}
* {{hl|"FORWARD"}} - move forward
* {{hl|"FAST"}} - move forward, fast
* {{hl|"SLOW"}} - move forward, slow
* {{hl|"STOP"}} - stop moving forward or backward
* {{hl|"BACK"}} - move backward
* {{hl|"KEY UP"}}
* {{hl|"KEY DOWN"}}
* {{hl|"KEY FAST"}}
* {{hl|"KEY SLOW"}}
{{!}}
* {{hl|"LEFT"}} - turn left, while moving or not
* {{hl|"RIGHT"}} - turn right, while moving or not
* {{GVI|arma3|1.78|size= 0.75}} {{hl|"STOPTURNING"}} cancel turning (special case, normally would be called by the engine when LEFT or RIGHT turn key is released by the player)
{{!}}}


}}
|s1= vehicleName [[sendSimpleCommand]] command


<h3 style="display:none">Notes</h3>
|p1= vehicleName: [[Object]]
<dl class="command_description">
|p2= command: [[String]]
<!-- Note Section BEGIN -->


<dd class="notedate">
|r1= [[Nothing]]
<dt class="note">[[User:Ceeeb|Ceeeb]]
<dd class="note">Valid commands include: "FORWARD", "SLOW", "FAST" "BACK", "LEFT", "RIGHT", "STOP", "FIRE", "CEASE FIRE", "MANUAL FIRE", "CANCEL MANUAL FIRE". There may be more. <br><br>
Only vehicles crewed by a player can use sendSimpleCommand.


<dd class="notedate">
|x1= <sqf>vehicle player sendSimpleCommand "STOP";</sqf>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]
<dd class="note">Other commands that work: "KEY FIRE", "KEY FAST", "KEY SLOW", "KEY DOWN", "KEY UP". These will simulate key presses.<br><br>
In Arma 3 player doesn't always need to be in the vehicle to give commands.


|seealso= [[vehicleMoveInfo]] [[useAISteeringComponent]] [[effectiveCommander]] [[setEffectiveCommander]] [[enableAI]] [[disableAI]] [[enableAIFeature]] [[enableSentences]]
}}


{{Note
|user= Ceeeb
|timestamp= 20070416045200
|text= Valid commands include: "FORWARD", "SLOW", "FAST" "BACK", "LEFT", "RIGHT", "STOP", "FIRE", "CEASE FIRE", "MANUAL FIRE", "CANCEL MANUAL FIRE". There may be more. <br><br>
Only vehicles crewed by a player can use sendSimpleCommand.
}}


<!-- Note Section END -->
{{Note
</dl>
|user= Killzone_Kid
 
|timestamp= 20140126155800
<h3 style="display:none">Bottom Section</h3>
|text= Other commands that work: "KEY FIRE", "KEY FAST", "KEY SLOW", "KEY DOWN", "KEY UP". These will simulate key presses.<br><br>
[[Category:Scripting Commands|SENDSIMPLECOMMAND]]
In {{arma3}} player doesn't always need to be in the vehicle to give commands.
[[Category:Scripting Commands OFP Elite |SENDSIMPLECOMMAND]]
}}
[[Category:Scripting Commands Armed Assault|SENDSIMPLECOMMAND]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:10, 21 December 2022

Hover & click on the images for description

Description

Description:
Sends a simple command to the vehicle's driver / gunner (air vehicles ignore it). See also vehicleMoveInfo.
Doesn't seem to work if AI driver is alone, needs another unit in the vehicle (could be another AI or player) that is set as setEffectiveCommander. If driver is effectiveCommander it will refuse any drive commands.
Arma 3
Due to some sort of a bug when vehicle is ordered turning ("LEFT" or "RIGHT"), it locks the vehicle ability to respond to any other commands properly. Always use "STOPTURNING" to cancel turning before issuing other move commands
Gunner commands Driver Move commands Driver Turn commands
  • "FIRE"
  • "CEASE FIRE"
  • "MANUAL FIRE"
  • "CANCEL MANUAL FIRE"
  • "KEY FIRE"
  • "FORWARD" - move forward
  • "FAST" - move forward, fast
  • "SLOW" - move forward, slow
  • "STOP" - stop moving forward or backward
  • "BACK" - move backward
  • "KEY UP"
  • "KEY DOWN"
  • "KEY FAST"
  • "KEY SLOW"
  • "LEFT" - turn left, while moving or not
  • "RIGHT" - turn right, while moving or not
  • Arma 3 logo black.png1.78 "STOPTURNING" cancel turning (special case, normally would be called by the engine when LEFT or RIGHT turn key is released by the player)
Groups:
Unit Control

Syntax

Syntax:
vehicleName sendSimpleCommand command
Parameters:
vehicleName: Object
command: String
Return Value:
Nothing

Examples

Example 1:
vehicle player sendSimpleCommand "STOP";

Additional Information

See also:
vehicleMoveInfo useAISteeringComponent effectiveCommander setEffectiveCommander enableAI disableAI enableAIFeature enableSentences

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Ceeeb - c
Posted on Apr 16, 2007 - 04:52 (UTC)
Valid commands include: "FORWARD", "SLOW", "FAST" "BACK", "LEFT", "RIGHT", "STOP", "FIRE", "CEASE FIRE", "MANUAL FIRE", "CANCEL MANUAL FIRE". There may be more.

Only vehicles crewed by a player can use sendSimpleCommand.
Killzone_Kid - c
Posted on Jan 26, 2014 - 15:58 (UTC)
Other commands that work: "KEY FIRE", "KEY FAST", "KEY SLOW", "KEY DOWN", "KEY UP". These will simulate key presses.

In Arma 3 player doesn't always need to be in the vehicle to give commands.