diff --git a/.gitignore b/.gitignore
index 96374c4e..34cf1e69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,6 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk
+
+# java class files
+plugin/*/bin/
diff --git a/plugin/Raven.SQDev.Editors/.gitignore b/plugin/Raven.SQDev.Editors/.gitignore
new file mode 100644
index 00000000..ae3c1726
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
index 90697139..9a818d7c 100644
--- a/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Editors/META-INF/MANIFEST.MF
@@ -2,17 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Editors
Bundle-SymbolicName: raven.sqdev.editors;singleton:=true
-Bundle-Version: 0.7.1.stable
+Bundle-Version: 0.7.2.stable
Bundle-Activator: raven.sqdev.editors.activator.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.ui.editors;bundle-version="3.8.200",
- org.eclipse.jface.text;bundle-version="3.9.2",
+ org.eclipse.ui.editors,
+ org.eclipse.jface.text,
org.eclipse.swt,
org.eclipse.core.resources,
org.eclipse.ui.ide,
- org.eclipse.core.filesystem;bundle-version="1.4.100",
- raven.sqdev.misc;bundle-version="0.6.0"
+ org.eclipse.core.filesystem,
+ raven.sqdev.misc
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: raven.sqdev.editors;
@@ -42,6 +42,5 @@ Import-Package: raven.sqdev.constants,
raven.sqdev.parser.misc,
raven.sqdev.parser.preprocessor,
raven.sqdev.pluginManagement,
- raven.sqdev.pluginManager,
raven.sqdev.sqdevFile,
raven.sqdev.util
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$1.class
deleted file mode 100644
index 02760f60..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$2.class
deleted file mode 100644
index e4aa427d..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$3.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$3.class
deleted file mode 100644
index 91287570..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor$3.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class
deleted file mode 100644
index c32a243d..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCodeEditor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class
deleted file mode 100644
index 76da3ca5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class
deleted file mode 100644
index 1805f551..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class
deleted file mode 100644
index 79c6cdd5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicCompletionProposal.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class
deleted file mode 100644
index a55fbb54..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicContentAssistProcessor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class
deleted file mode 100644
index cf653e01..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicDocumentProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class
deleted file mode 100644
index 824801cf..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicFoldingManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class
deleted file mode 100644
index 3c3e84eb..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class
deleted file mode 100644
index 11063819..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class
deleted file mode 100644
index 5add7161..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl$InfoComposite.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class
deleted file mode 100644
index 3016f2f9..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicInformationControl.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class
deleted file mode 100644
index 286ce2b4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicKeywordProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class
deleted file mode 100644
index c7d6b991..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicMarkerManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class
deleted file mode 100644
index 68e1c8ff..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class
deleted file mode 100644
index 846ca27c..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicParseTimeListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class
deleted file mode 100644
index 37b9ba0d..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicPartitionScanner.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class
deleted file mode 100644
index 7e3eb6ec..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicSourceViewerConfiguration.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class
deleted file mode 100644
index 6e096fca..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class
deleted file mode 100644
index ce14df3f..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/BasicTextHover.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPair.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPair.class
deleted file mode 100644
index 6bc1d5e9..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPair.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler$1.class
deleted file mode 100644
index ff34f79b..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class
deleted file mode 100644
index 1b9a242e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/CharacterPairHandler.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/ColorManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/ColorManager.class
deleted file mode 100644
index ca5d654e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/ColorManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventManager.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventManager.class
deleted file mode 100644
index 0a4d29c9..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventQueue.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventQueue.class
deleted file mode 100644
index 1b74906e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/EditorKeyEventQueue.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class
deleted file mode 100644
index 651a7b26..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/KeywordScanner.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class
deleted file mode 100644
index b94348fa..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MarkerInformation.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class
deleted file mode 100644
index f6e45bf0..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class
deleted file mode 100644
index 23f69437..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/MultiKeywordScanner.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class
deleted file mode 100644
index 1f98ac3b..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/NonRuleBasedDamagerRepairer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/WordDetector.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/WordDetector.class
deleted file mode 100644
index 228b428f..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/WordDetector.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class
deleted file mode 100644
index 2745d60f..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/activator/Activator.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalConstructorException.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalConstructorException.class
deleted file mode 100644
index 4674c8a0..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalConstructorException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalModificationException.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalModificationException.class
deleted file mode 100644
index cb21bd16..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/IllegalModificationException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/SQDevEditorException.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/SQDevEditorException.class
deleted file mode 100644
index 2d7c1325..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/exceptions/SQDevEditorException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/other/ConfigEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/other/ConfigEditor.class
deleted file mode 100644
index 23e6a7f4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/other/ConfigEditor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class
deleted file mode 100644
index 6020a9c6..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language$1.class
deleted file mode 100644
index b1ae9acb..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class
deleted file mode 100644
index f62dd6f7..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/Language.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class
deleted file mode 100644
index f59e0cb2..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class
deleted file mode 100644
index 338dc53a..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class
deleted file mode 100644
index 0bf30314..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellEditingSupport.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.class
deleted file mode 100644
index d9ec1d24..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableCellLabelProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class
deleted file mode 100644
index e9901bba..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContainer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.class
deleted file mode 100644
index 9ae39b6a..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableContentProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class
deleted file mode 100644
index ba62cbfc..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class
deleted file mode 100644
index 23bcf98e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$10.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class
deleted file mode 100644
index 51005b9b..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$11.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class
deleted file mode 100644
index 4a436404..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class
deleted file mode 100644
index 6ccae7d4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$12.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class
deleted file mode 100644
index bd5f683e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$13.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class
deleted file mode 100644
index 0b2fde2e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$14.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class
deleted file mode 100644
index 32f3a3b5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$15.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class
deleted file mode 100644
index 889111fb..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$16.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class
deleted file mode 100644
index 73b98b0e..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$17.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class
deleted file mode 100644
index db13fd1f..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$18.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class
deleted file mode 100644
index c6758a5a..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class
deleted file mode 100644
index 0a577a25..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class
deleted file mode 100644
index 4e64f892..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class
deleted file mode 100644
index 006c7945..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$3.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class
deleted file mode 100644
index fcd6662d..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$4.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class
deleted file mode 100644
index bfabdb9c..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$5.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class
deleted file mode 100644
index f6c1b8e2..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$6.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class
deleted file mode 100644
index 7154abba..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$7.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class
deleted file mode 100644
index a4f37e53..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$8.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class
deleted file mode 100644
index 272e3063..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor$9.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class
deleted file mode 100644
index dd69e029..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableEditor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class
deleted file mode 100644
index 82b915e4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableKey.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class
deleted file mode 100644
index c21b1635..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTablePackage.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class
deleted file mode 100644
index 853ef9f2..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableSourceViewerConfiguration.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class
deleted file mode 100644
index 36867fbb..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens
deleted file mode 100644
index 3002f98e..00000000
--- a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTable.tokens
+++ /dev/null
@@ -1,19 +0,0 @@
-PROJECT=6
-EQUALS=5
-CLOSE=4
-ANY=15
-PKG=8
-OPEN=3
-NAME=7
-OPEN_CLOSE=2
-CONTAINER=9
-STRING=12
-IDENTIFIER=11
-ID=13
-WS=14
-INFO_TAG=1
-KEY=10
-'>'=4
-'='=5
-'<'=3
-''=2
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseListener.class
deleted file mode 100644
index 998024c4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class
deleted file mode 100644
index c660ac58..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableBaseVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.class
deleted file mode 100644
index 40088df5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.tokens b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.tokens
deleted file mode 100644
index 3002f98e..00000000
--- a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableLexer.tokens
+++ /dev/null
@@ -1,19 +0,0 @@
-PROJECT=6
-EQUALS=5
-CLOSE=4
-ANY=15
-PKG=8
-OPEN=3
-NAME=7
-OPEN_CLOSE=2
-CONTAINER=9
-STRING=12
-IDENTIFIER=11
-ID=13
-WS=14
-INFO_TAG=1
-KEY=10
-'>'=4
-'='=5
-'<'=3
-''=2
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableListener.class
deleted file mode 100644
index 8ade3bcd..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerContext.class
deleted file mode 100644
index 651ef0d5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerEndTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerEndTagContext.class
deleted file mode 100644
index cf2c7c01..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerEndTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerStartTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerStartTagContext.class
deleted file mode 100644
index f391c914..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContainerStartTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContentContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContentContext.class
deleted file mode 100644
index 7ffd93c1..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ContentContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyCloseTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyCloseTagContext.class
deleted file mode 100644
index a8933a2c..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyCloseTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyContext.class
deleted file mode 100644
index 717164c5..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyStartTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyStartTagContext.class
deleted file mode 100644
index 2893767d..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$KeyStartTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageCloseTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageCloseTagContext.class
deleted file mode 100644
index c046acc4..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageCloseTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageContext.class
deleted file mode 100644
index 585075c6..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageOpenTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageOpenTagContext.class
deleted file mode 100644
index 127a87df..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$LanguageOpenTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageEndTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageEndTagContext.class
deleted file mode 100644
index 5d7795a8..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageEndTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageStartTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageStartTagContext.class
deleted file mode 100644
index 5f7938d3..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PackageStartTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PkgContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PkgContext.class
deleted file mode 100644
index f888075b..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$PkgContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectContext.class
deleted file mode 100644
index aaae1b26..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectEndTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectEndTagContext.class
deleted file mode 100644
index a9aa12f9..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectEndTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectStartTagContext.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectStartTagContext.class
deleted file mode 100644
index 38f408a8..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser$ProjectStartTagContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser.class
deleted file mode 100644
index cdfbc2b7..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableParser.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableVisitor.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableVisitor.class
deleted file mode 100644
index de0157bf..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.class b/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.class
deleted file mode 100644
index 6ee35654..00000000
Binary files a/plugin/Raven.SQDev.Editors/bin/raven/sqdev/editors/stringtableParsing/StringTableWalkListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java
index 126b3199..787bee0c 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicCodeEditor.java
@@ -1,8 +1,12 @@
package raven.sqdev.editors;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
import org.antlr.v4.runtime.tree.ParseTree;
import org.eclipse.core.resources.IMarker;
@@ -37,6 +41,7 @@
import raven.sqdev.interfaces.IMacroSupport;
import raven.sqdev.interfaces.IManager;
import raven.sqdev.interfaces.IMarkerSupport;
+import raven.sqdev.interfaces.IParseResult;
import raven.sqdev.misc.CharacterPair;
import raven.sqdev.misc.MultiPreferenceStore;
import raven.sqdev.misc.SQDevInfobox;
@@ -80,9 +85,9 @@ public class BasicCodeEditor extends TextEditor implements IMarkerSupport {
protected BasicSourceViewerConfiguration configuration;
/**
- * The parse tree representing the input of this editor
+ * The parse result representing the input of this editor
*/
- protected ParseTree parseTree;
+ protected IParseResult parseResult;
/**
* The name of the rules used for parsing this editor's input
*/
@@ -142,8 +147,8 @@ public void setColorManager(ColorManager colorManager) {
@Override
public ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
- ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(),
- isOverviewRulerVisible(), styles);
+ ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(),
+ styles);
getSourceViewerDecorationSupport(viewer);
@@ -158,8 +163,7 @@ public ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler,
}
// add parse listener
- getBasicProvider().getDocument(getEditorInput())
- .addDocumentListener(new BasicParseTimeListener(this));
+ getBasicProvider().getDocument(getEditorInput()).addDocumentListener(new BasicParseTimeListener(this));
return viewer;
}
@@ -175,13 +179,11 @@ protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupp
// character pair matching
support.setCharacterPairMatcher(matcher);
- support.setMatchingCharacterPainterPreferenceKeys(
- SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_KEY,
+ support.setMatchingCharacterPainterPreferenceKeys(SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_KEY,
SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY);
// newLine highlighting
- support.setCursorLinePainterPreferenceKeys(
- SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY,
+ support.setCursorLinePainterPreferenceKeys(SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY,
SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY);
}
@@ -253,8 +255,7 @@ public void createPartControl(Composite parent) {
// infrastructure for code folding
ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
- ProjectionSupport projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(),
- getSharedColors());
+ ProjectionSupport projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
projectionSupport.install();
@@ -266,8 +267,7 @@ public void createPartControl(Composite parent) {
// combine the SQDev PreferenceStore with the editor's one
// use the SQDev preferenceStore as the baseStore
- MultiPreferenceStore multiStore = new MultiPreferenceStore(
- SQDevPreferenceUtil.getPreferenceStore());
+ MultiPreferenceStore multiStore = new MultiPreferenceStore(SQDevPreferenceUtil.getPreferenceStore());
// add the editor's preferenceStore if available
IPreferenceStore editorStore = this.getPreferenceStore();
@@ -341,13 +341,13 @@ public BasicDocumentProvider getBasicProvider() {
}
/**
- * Gets the ParseTree
representing the input of this editor
+ * Gets the {@linkplain IParseResult} representing the input of this editor
*
- * @return The ParseTree
or null
if none has been set
+ * @return The result or null
if none has been set
* so far
*/
- public ParseTree getParseTree() {
- return parseTree;
+ public IParseResult getParseResult() {
+ return parseResult;
}
/**
@@ -360,8 +360,8 @@ public List getParseRuleNames() {
}
/**
- * This is a helper method that will do the parsing for the given input wihtout
- * any checks (whetehr there is an active parsing job) and in the same thread as
+ * This is a helper method that will do the parsing for the given input without
+ * any checks (whether there is an active parsing job) and in the same thread as
* it is called
*
* @param input
@@ -370,7 +370,7 @@ public List getParseRuleNames() {
*/
private IStatus startParsingInput(String input) {
// preprocess
- doPreprocessorParsing(input);
+ doPreprocessorParsing(new ByteArrayInputStream(input.getBytes()));
// check if this parsing should be cancelled
synchronized (parsingIsCancelled) {
@@ -381,7 +381,7 @@ private IStatus startParsingInput(String input) {
}
// parse
- ParseTree output = doParse(input);
+ IParseResult output = doParse(new ByteArrayInputStream(input.getBytes()));
// check if this parsing should be cancelled
synchronized (parsingIsCancelled) {
@@ -391,14 +391,17 @@ private IStatus startParsingInput(String input) {
}
}
- if (output == null || output.getChildCount() == 0) {
+ if (output == null
+ || output.getMarkers().stream().filter((element) -> element.getSeverity() == IMarker.SEVERITY_ERROR)
+ .collect(Collectors.toList()).size() > 0) {
+ // don't process the parse tree if errors came up during lexing/parsing
applyParseChanges();
return Status.CANCEL_STATUS;
} else {
- parseTree = output;
+ parseResult = output;
- if (!processParseTree(parseTree)) {
+ if (!processParseTree(parseResult)) {
applyParseChanges();
}
@@ -433,30 +436,29 @@ public boolean parseInput(boolean suspend) {
return false;
}
- String input = document.get();
+ String content = document.get();
- if (input == null) {
+ if (content == null) {
return false;
}
synchronized (parsingIsCancelled) {
if (parsingIsCancelled && (parseJob == null || parseJob.getResult() != null)) {
// There is no other parsing in progress that should be
- // cancelled and cancelling is only possible after having
+ // cancelled and canceling is only possible after having
// initialized it
parsingIsCancelled = false;
}
}
if (parseJob != null && parseJob.getState() != Job.NONE) {
- // Ther previous Job is still running -> reschedule
+ // The previous Job is still running -> reschedule
parseJob.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
// As there has been a request to parse the input again
- // do
- // it now as the old parsing process is finished
+ // do it now as the old parsing process is finished
parseInput();
}
});
@@ -465,13 +467,13 @@ public void done(IJobChangeEvent event) {
}
if (suspend) {
- startParsingInput(input);
+ startParsingInput(content);
} else {
parseJob = new Job("Parsing \"" + getEditorInput().getName() + "\"...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
- return startParsingInput(input);
+ return startParsingInput(content);
}
};
@@ -514,10 +516,17 @@ public void cancelParsing() {
* and sets the found macros if this editor is an instance of
* IMacroSupport
.
*/
- protected void doPreprocessorParsing(String input) {
+ protected void doPreprocessorParsing(InputStream input) {
if (this instanceof IMacroSupport && getEditorInput() instanceof IFileEditorInput) {
- PreprocessorParseResult result = ParseUtil.parseAndValidatePreprocess(input,
- ((IFileEditorInput) getEditorInput()).getFile().getLocation());
+ PreprocessorParseResult result;
+ try {
+ result = ParseUtil.parseAndValidatePreprocess(input,
+ ((IFileEditorInput) getEditorInput()).getFile().getLocation());
+ } catch (IOException e) {
+ e.printStackTrace();
+ createMarker(IMarker.PROBLEM, 0, 0, "Unable to preprocess the file", IMarker.SEVERITY_ERROR);
+ return;
+ }
((IMacroSupport) this).setMacros(result.getMacros(), true);
@@ -533,18 +542,18 @@ protected void doPreprocessorParsing(String input) {
* Note: You might want to call {@link #applyParseChanges()} after the
* processing
*
- * @param tree
- * The generated tree
+ * @param parseResult
+ * The generated parse result
* @return Whether this function has called {@link #applyParseChanges()}. If not
* the default implementation of {@link #parseInput()} will call this
* function afterwards.
*/
- protected boolean processParseTree(ParseTree parseTree) {
+ protected boolean processParseTree(IParseResult parseResult) {
return false;
}
/**
- * Parses the input of this editor in order to set the {@link #parseTree} for
+ * Parses the input of this editor in order to set the {@link #parseResult} for
* this editor.
* Note: You might want to call {@link #applyParseChanges()} after parsing (or
* rather after {@link #processParseTree(ParseTree)}.
@@ -559,7 +568,7 @@ protected boolean processParseTree(ParseTree parseTree) {
* parsing failed (if not overridden by subclasses this method always
* returns null
*/
- protected ParseTree doParse(String input) {
+ protected IParseResult doParse(InputStream input) {
// parsing diabled
return null;
}
@@ -573,8 +582,7 @@ protected ParseTree doParse(String input) {
*/
protected void createManagers(List managerList) {
// add folding manager
- managerList.add(new BasicFoldingManager(
- ((ProjectionViewer) getSourceViewer()).getProjectionAnnotationModel()));
+ managerList.add(new BasicFoldingManager(((ProjectionViewer) getSourceViewer()).getProjectionAnnotationModel()));
// add marker manager
managerList.add(new BasicMarkerManager(this));
}
@@ -598,8 +606,8 @@ public void createMarker(String type, int offset, int length, String message, in
}
}
- ((BasicMarkerManager) getManager(BasicMarkerManager.TYPE)).addMarker(type, line, offset, length,
- severity, message);
+ ((BasicMarkerManager) getManager(BasicMarkerManager.TYPE)).addMarker(type, line, offset, length, severity,
+ message);
}
@Override
@@ -651,8 +659,8 @@ public void addFoldingArea(Position position) {
// don't fold if the code is only one line long
try {
- if (doc == null || doc.getLineOfOffset(position.offset) == doc
- .getLineOfOffset(position.offset + position.length)) {
+ if (doc == null
+ || doc.getLineOfOffset(position.offset) == doc.getLineOfOffset(position.offset + position.length)) {
return;
}
} catch (BadLocationException e) {
@@ -666,15 +674,14 @@ public void addFoldingArea(Position position) {
ProjectionAnnotation annotation = new ProjectionAnnotation();
- BasicFoldingManager foldingManager = (BasicFoldingManager) getManager(
- BasicFoldingManager.getManagerType());
+ BasicFoldingManager foldingManager = (BasicFoldingManager) getManager(BasicFoldingManager.getManagerType());
if (foldingManager == null) {
return;
}
- foldingManager.addFoldingArea(
- new AbstractMap.SimpleEntry(annotation, position));
+ foldingManager
+ .addFoldingArea(new AbstractMap.SimpleEntry(annotation, position));
}
/**
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java
index c083ba77..83bc8479 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java
@@ -1,7 +1,10 @@
package raven.sqdev.editors;
import java.util.ArrayList;
-import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.CompletionProposal;
@@ -33,26 +36,32 @@ public BasicContentAssistProcessor(BasicCodeEditor editor) {
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- String prefix = EditorUtil.getWordPartBeforeOffset(viewer.getDocument(), offset);
+ String prefix = EditorUtil.getWordPartBeforeOffset(viewer.getDocument(), offset).toLowerCase();
- List keywords;
- // get the respective list of keywords
- if (prefix.isEmpty()) {
- keywords = editor.getBasicConfiguration().getAllConfiguredKeywords();
- } else {
- keywords = editor.getBasicConfiguration().getConfiguredKeywordsFor(prefix.charAt(0));
- }
+ Map keywords = editor.getBasicConfiguration().getAllConfiguredKeywords();
ArrayList proposals = new ArrayList();
// create proposals
- for (Keyword currentKeyword : keywords) {
- if (currentKeyword.getKeyword().toLowerCase().startsWith(prefix.toLowerCase())) {
+ Stream keywordStream = keywords.values().stream().filter(new Predicate() {
+
+ @Override
+ public boolean test(Keyword keyword) {
+ return keyword.getKeyword().toLowerCase().startsWith(prefix);
+ }
+ });
+
+ keywordStream = keywordStream.sorted();
+
+ keywordStream.forEachOrdered(new Consumer() {
+
+ @Override
+ public void accept(Keyword keyword) {
// add a proposal
- proposals.add(new BasicCompletionProposal(currentKeyword, offset - prefix.length(),
+ proposals.add(new BasicCompletionProposal(keyword, offset - prefix.length(),
prefix.length()));
}
- }
+ });
if (proposals.size() > 0) {
return proposals.toArray(new ICompletionProposal[proposals.size()]);
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java
index 94e28fd5..cabc605c 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicParseTimeListener.java
@@ -12,7 +12,7 @@
import raven.sqdev.misc.SQDevPreferenceUtil;
/**
- * This listener will cause the editor to reparse it's input when the user
+ * This listener will cause the editor to re-parse its input when the user
* stopped typing for a longer time
*
* @author Raven
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
index d1e833f2..1c4a1880 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
@@ -36,14 +36,13 @@
* @see {@linkplain SourceViewerConfiguration}
*
*/
-public class BasicSourceViewerConfiguration extends SourceViewerConfiguration
- implements IPropertyChangeListener {
-
+public class BasicSourceViewerConfiguration extends SourceViewerConfiguration implements IPropertyChangeListener {
+
/**
* The color manager
*/
protected ColorManager colorManager;
-
+
/**
* The configured keywordScanner providing the keywords for the syntax
* highlighting
@@ -51,109 +50,98 @@ public class BasicSourceViewerConfiguration extends SourceViewerConfiguration
* their keyword highlighting
*/
protected Map configuredKeywordScanners;
-
+
/**
* The MultiKeywordScanner
that will be applied for this
* SourceViewerConfiguration
*/
protected MultiKeywordScanner multiScanner;
-
+
/**
* The editor this SourceViewer is applied on
*/
protected BasicCodeEditor editor;
-
+
/**
* The contentAssistant for this editor
*/
protected ContentAssistant assistant;
-
+
public BasicSourceViewerConfiguration(ColorManager manager, BasicCodeEditor editor) {
this.setColorManager(manager);
this.editor = editor;
-
+
this.configuredKeywordScanners = new HashMap();
this.multiScanner = new MultiKeywordScanner(editor);
-
+
// register to get notified about preference changes
SQDevPreferenceUtil.getPreferenceStore().addPropertyChangeListener(this);
}
-
+
@Override
public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
return editor.getBasicProvider().getPartitionScanner().getConfiguredContentTypes();
}
-
+
public ColorManager getColorManager() {
return colorManager;
}
-
+
public void setColorManager(ColorManager colorManager) {
this.colorManager = colorManager;
}
-
+
/**
* Gets all configured Keywords
*/
- public List getAllConfiguredKeywords() {
+ public List getAllConfiguredKeywordsAsList() {
ArrayList keywordList = new ArrayList();
-
- Iterator> iterator = configuredKeywordScanners.entrySet()
- .iterator();
-
+
+ Iterator> iterator = configuredKeywordScanners.entrySet().iterator();
+
while (iterator.hasNext()) {
// add the respective keywords to the list
- keywordList.addAll(
- iterator.next().getValue().getKeywordProvider().getKeywordList().getKeywords());
+ keywordList.addAll(iterator.next().getValue().getKeywordProvider().getKeywordList().getKeywords().values());
}
-
+
return keywordList;
}
-
+
/**
- * Gets a list of all configured Keywords starting with the given character
- *
- * @param c
- * The starting charcter
+ * Gets all configured Keywords
*/
- public List getConfiguredKeywordsFor(char c) {
- ArrayList keywordList = new ArrayList();
-
- Iterator> iterator = configuredKeywordScanners.entrySet()
- .iterator();
-
- while (iterator.hasNext()) {
- // add the respective keywords to the list
- keywordList.addAll(
- iterator.next().getValue().getKeywordProvider().getKeywordList().getListFor(c));
+ public Map getAllConfiguredKeywords() {
+ Map keywords = new HashMap<>();
+
+ for (KeywordScanner currentScanner : configuredKeywordScanners.values()) {
+ keywords.putAll(currentScanner.getKeywordProvider().getKeywordList().getKeywords());
}
-
- return keywordList;
+
+ return keywords;
}
-
+
/**
* Gets the keywordScanner for this configuration
*
* @param colorPreferenceKey
* The preference key for the color of the desired
* KeywordScanner
- * @return The KeywordScanner
working for the given preference
- * key or null
if no such scanner could be found
+ * @return The KeywordScanner
working for the given preference key
+ * or null
if no such scanner could be found
*/
public KeywordScanner getKeywordScanner(String colorPreferenceKey) {
if (!configuredKeywordScanners.containsKey(colorPreferenceKey)) {
return null;
}
-
+
// return scanner
return configuredKeywordScanners.get(colorPreferenceKey);
}
-
+
/**
- * Creates a KeywordScanner
for the given preference key that
- * is automatically registered to this
- * BasicSourceViewerConfiguration
if there is no other scanner
- * for that key
+ * Creates a KeywordScanner
for the given preference key that is
+ * automatically registered to this BasicSourceViewerConfiguration
+ * if there is no other scanner for that key
*
* @param colorPreferenceKey
* The key the scanner should be configured for
@@ -163,20 +151,19 @@ public KeywordScanner getKeywordScanner(String colorPreferenceKey) {
public void createKeywordScanner(String colorPreferenceKey, boolean caseSensitive) {
if (!configuredKeywordScanners.containsKey(colorPreferenceKey)) {
// create new scanner
- KeywordScanner scanner = new KeywordScanner(new BasicKeywordProvider(),
- colorPreferenceKey, this.editor);
-
+ KeywordScanner scanner = new KeywordScanner(new BasicKeywordProvider(), colorPreferenceKey, this.editor);
+
if (!caseSensitive) {
scanner.makeCaseSensitive(caseSensitive);
}
-
+
configuredKeywordScanners.put(colorPreferenceKey, scanner);
-
+
// add to multiScanner
multiScanner.addScanner(scanner);
}
}
-
+
/**
* Checks if a KeywordScanner
for the given preference key does
* exist in this BasicSourceViewerConfiguration
@@ -187,80 +174,77 @@ public void createKeywordScanner(String colorPreferenceKey, boolean caseSensitiv
public boolean scannerExists(String colorPreferenceKey) {
return configuredKeywordScanners.containsKey(colorPreferenceKey);
}
-
+
/**
* Gets the KeywordScanner
that contains the given
* Keyword
*
* @param keyword
* The Keyword
to search for
- * @return The matching KeywordScanner
or null
if
- * none could be found
+ * @return The matching KeywordScanner
or null
if none
+ * could be found
*/
public KeywordScanner getKeywordScannerContaining(Keyword keyword) {
- Iterator> iterator = configuredKeywordScanners.entrySet()
- .iterator();
-
+ Iterator> iterator = configuredKeywordScanners.entrySet().iterator();
+
while (iterator.hasNext()) {
KeywordScanner currentScanner = iterator.next().getValue();
-
+
if (currentScanner.contains(keyword)) {
return currentScanner;
}
}
-
+
return null;
}
-
+
/**
* Gets the KeywordScanner
that contains a Keyword
* matching the given word
*
* @param word
* The word to search for
- * @return The matching KeywordScanner
or null
if
- * none could be found
+ * @return The matching KeywordScanner
or null
if none
+ * could be found
*/
public KeywordScanner getKeywordScannerContaining(String word) {
- Iterator> iterator = configuredKeywordScanners.entrySet()
- .iterator();
-
+ Iterator> iterator = configuredKeywordScanners.entrySet().iterator();
+
while (iterator.hasNext()) {
KeywordScanner currentScanner = iterator.next().getValue();
-
+
if (currentScanner.contains(word)) {
return currentScanner;
}
}
-
+
return null;
}
-
+
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
-
+
// syntax highlighting for keywords
DefaultDamagerRepairer dr_Default = new DefaultDamagerRepairer(multiScanner);
reconciler.setDamager(dr_Default, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr_Default, IDocument.DEFAULT_CONTENT_TYPE);
-
+
boolean containsString = false;
boolean containsComment = false;
-
- for (String currentType : editor.getBasicProvider().getPartitionScanner()
- .getConfiguredContentTypes()) {
+
+ for (String currentType : editor.getBasicProvider().getPartitionScanner().getConfiguredContentTypes()) {
switch (currentType) {
- case BasicPartitionScanner.BASIC_STRING:
- containsString = true;
- break;
-
- case BasicPartitionScanner.BASIC_COMMENT:
- containsComment = true;
- break;
+ case BasicPartitionScanner.BASIC_STRING:
+ containsString = true;
+ break;
+
+ case BasicPartitionScanner.BASIC_COMMENT:
+ containsComment = true;
+ break;
}
}
-
+
if (containsString) {
// colorize strings
NonRuleBasedDamagerRepairer ndr_String = new NonRuleBasedDamagerRepairer(
@@ -268,7 +252,7 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie
reconciler.setDamager(ndr_String, BasicPartitionScanner.BASIC_STRING);
reconciler.setRepairer(ndr_String, BasicPartitionScanner.BASIC_STRING);
}
-
+
if (containsComment) {
// colorize comments
NonRuleBasedDamagerRepairer ndr_Comment = new NonRuleBasedDamagerRepairer(
@@ -276,58 +260,58 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie
reconciler.setDamager(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT);
reconciler.setRepairer(ndr_Comment, BasicPartitionScanner.BASIC_COMMENT);
}
-
+
return reconciler;
}
-
+
@Override
public IContentAssistant getContentAssistant(ISourceViewer viewer) {
assistant = new ContentAssistant();
assistant.enableAutoInsert(SQDevPreferenceUtil.isAutoCompleteEnabled());
assistant.enableColoredLabels(true);
-
+
IContentAssistProcessor processor = new BasicContentAssistProcessor(editor);
-
+
assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
+
assistant.setInformationControlCreator(getInformationControlCreator(viewer));
-
+
return assistant;
}
-
+
@Override
public ITextHover getTextHover(ISourceViewer sv, String contentType) {
return new BasicTextHover(editor);
}
-
+
@Override
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
return new DefaultAnnotationHover();
}
-
+
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getNewValue() == null) {
// if there is no useful new value just ignore it
return;
}
-
+
// watch out for a change concerning the autoCompletion
switch (event.getProperty()) {
- case SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY:
- assistant.enableAutoActivation((boolean) event.getNewValue());
- break;
-
- default:
- if (configuredKeywordScanners.containsKey(event.getProperty())) {
- // configure respective keyword scanner
- configuredKeywordScanners.get(event.getProperty()).syncToPropertyChange(event);
- } else {
- // don't update editor
- return;
- }
+ case SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY:
+ assistant.enableAutoActivation((boolean) event.getNewValue());
+ break;
+
+ default:
+ if (configuredKeywordScanners.containsKey(event.getProperty())) {
+ // configure respective keyword scanner
+ configuredKeywordScanners.get(event.getProperty()).syncToPropertyChange(event);
+ } else {
+ // don't update editor
+ return;
+ }
}
-
+
editor.update(true);
}
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java
index 062018f1..8b00fce8 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java
@@ -13,17 +13,16 @@
import raven.sqdev.miscellaneous.AdditionalKeywordProposalInformation;
import raven.sqdev.util.EditorUtil;
-public class BasicTextHover
- implements ITextHover, ITextHoverExtension, ITextHoverExtension2 {
-
+public class BasicTextHover implements ITextHover, ITextHoverExtension, ITextHoverExtension2 {
+
/**
* The editor this assist works on
*/
private BasicCodeEditor editor;
-
+
/**
- * Creates an instance of this hover assist that will use the keywords of
- * the given editor as a foundation
+ * Creates an instance of this hover assist that will use the keywords of the
+ * given editor as a foundation
*
* @param editor
* The editor this assist works on
@@ -31,56 +30,53 @@ public class BasicTextHover
public BasicTextHover(BasicCodeEditor editor) {
this.editor = editor;
}
-
+
@Override
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
// won't get called
return null;
}
-
+
@Override
public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
return new Region(offset, 0);
}
-
+
@Override
public IInformationControlCreator getHoverControlCreator() {
return new IInformationControlCreator() {
-
+
@Override
public IInformationControl createInformationControl(Shell parent) {
return new BasicInformationControl(parent, false);
}
};
}
-
+
@Override
public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) {
// get the respective word
- String word = EditorUtil.getWordAroundOffset(textViewer.getDocument(),
- hoverRegion.getOffset());
-
+ String word = EditorUtil.getWordAroundOffset(textViewer.getDocument(), hoverRegion.getOffset());
+
AdditionalKeywordProposalInformation info = null;
-
+
if (!word.isEmpty()) {
// check if there is a corresponding keyword
- KeywordScanner scanner = editor.getBasicConfiguration()
- .getKeywordScannerContaining(word);
-
+ KeywordScanner scanner = editor.getBasicConfiguration().getKeywordScannerContaining(word);
+
if (scanner != null) {
// create the info for this keyword
info = new AdditionalKeywordProposalInformation(
- scanner.getKeywordProvider().getKeywordList()
- .getKeyword(word, scanner.isCaseSensitive()));
-
- if(info.isEmpty()) {
+ scanner.getKeywordProvider().getKeywordList().getKeyword(word));
+
+ if (info.isEmpty()) {
// There isn't actually information to display
info = null;
}
}
}
-
+
return info;
}
-
+
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java
index 84279b51..88c5c84c 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java
@@ -2,6 +2,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.TextAttribute;
@@ -33,78 +34,74 @@
* @author Raven
*
*/
-public class KeywordScanner extends RuleBasedScanner
- implements IKeywordListChangeListener {
+public class KeywordScanner extends RuleBasedScanner implements IKeywordListChangeListener {
/**
* The preferenceKey for the color of the token
*/
protected String preferenceKey;
-
+
/**
* The keyworProvider for this token
*/
protected IKeywordProvider provider;
-
+
/**
* The editor this scanner is working for
*/
protected BasicCodeEditor editor;
-
+
/**
* The token this scanner produces
*/
protected IToken token;
-
+
/**
* The default token the corrsponding WordRule will use
*/
protected IToken defaultToken;
-
+
/**
* indicates whether the keywords should be matched case sensitively
*/
protected boolean caseSensitive;
-
+
/**
* A list of IKeywordListChangeListeners
*/
protected List keywordListListeners;
-
+
/**
* A list of IUpdateListener
*/
protected List updateListeners;
-
+
/**
- * Indicates whether this scanner is part of a
- * MultiKeywordScanner
+ * Indicates whether this scanner is part of a MultiKeywordScanner
*/
protected boolean isPartOfMultiScanner;
-
+
/**
* Creates an instance of this scanner
*
* @param provider
- * An IKeyowrdProvider
that will supply this method
- * with keywords
+ * An IKeyowrdProvider
that will supply this method with
+ * keywords
* @param colorPreferenceKey
- * The key of the preference describing the color of the
- * highlighting of the keywords
+ * The key of the preference describing the color of the highlighting
+ * of the keywords
* @param editor
* The editor this scanner is working on
* @param caseSensitive
* Whether or not to match keywords case sensitive
*/
- public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey,
- BasicCodeEditor editor, boolean caseSensitive) {
- String strColor = SQDevPreferenceUtil.getPreferenceStore()
- .getString(colorPreferenceKey);
-
+ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey, BasicCodeEditor editor,
+ boolean caseSensitive) {
+ String strColor = SQDevPreferenceUtil.getPreferenceStore().getString(colorPreferenceKey);
+
if (strColor == null || strColor.isEmpty()) {
- throw new IllegalArgumentException(
- "Invalid preference key \"" + colorPreferenceKey + "\"");
+ throw new IllegalArgumentException("Invalid preference key \"" + colorPreferenceKey + "\"");
}
-
+
// assign variables
preferenceKey = colorPreferenceKey;
this.provider = provider;
@@ -113,58 +110,55 @@ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey,
defaultToken = Token.UNDEFINED;
keywordListListeners = new ArrayList();
updateListeners = new ArrayList();
-
- Color color = new Color(Display.getCurrent(),
- ColorUtils.decodeRGB(strColor));
-
+
+ Color color = new Color(Display.getCurrent(), ColorUtils.decodeRGB(strColor));
+
token = new Token(new TextAttribute(color, null, SWT.BOLD));
-
+
updateRules(provider.getKeywordList().getKeywords().size() > 0);
-
+
// add this as a listener for the keyword provider
this.provider.addKeywordListChangeListener(this);
}
-
+
/**
* Creates an instance of this scanner (case sensitive)
*
* @param provider
- * An IKeyowrdProvider
that will supply this method
- * with keywords
+ * An IKeyowrdProvider
that will supply this method with
+ * keywords
* @param colorPreferenceKey
- * The key of the preference describing the color of the
- * highlighting of the keywords
+ * The key of the preference describing the color of the highlighting
+ * of the keywords
* @param editor
* The editor this scanner is working on
*/
- public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey,
- BasicCodeEditor editor) {
+ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey, BasicCodeEditor editor) {
this(provider, colorPreferenceKey, editor, true);
}
-
+
/**
- * Synchronizes this scanner to a PropertyChangeEvent (adjusts the color of
- * the highlighting
+ * Synchronizes this scanner to a PropertyChangeEvent (adjusts the color of the
+ * highlighting
*
* @param event
- * The respective PropertyChangeEvent. Must be the same as the
- * one this scanner has been initialized with
+ * The respective PropertyChangeEvent. Must be the same as the one
+ * this scanner has been initialized with
*/
public void syncToPropertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(preferenceKey)) {
// if the changed property is the one for the color this scanner
// depends on
if (event.getNewValue() != null) {
- Color color = new Color(Display.getCurrent(),
- ColorUtils.decodeRGB((String) event.getNewValue()));
-
+ Color color = new Color(Display.getCurrent(), ColorUtils.decodeRGB((String) event.getNewValue()));
+
token = new Token(new TextAttribute(color, null, SWT.BOLD));
-
+
updateRules(true);
}
}
}
-
+
/**
* Will update the applied rules for this scanner according to the
* keywordProvider and the {@link #token}.
@@ -174,33 +168,30 @@ public void syncToPropertyChange(PropertyChangeEvent event) {
* Indicates if the editor shoukd be updated
*/
protected void updateRules(boolean updateEditor) {
- ArrayList keywordList = provider.getKeywordList()
- .getKeywords();
-
- Keyword[] keywords = keywordList
- .toArray(new Keyword[keywordList.size()]);
-
+ Map keywordList = provider.getKeywordList().getKeywords();
+
+ Keyword[] keywords = keywordList.values().toArray(new Keyword[keywordList.size()]);
+
// create the respective WordRule
- WordRule keywordRule = new WordRule(new WordDetector(),
- getDefaultToken(), !isCaseSensitive());
-
+ WordRule keywordRule = new WordRule(new WordDetector(), getDefaultToken(), !isCaseSensitive());
+
// add keywords
for (Keyword currentKeyword : keywords) {
keywordRule.addWord(currentKeyword.getKeyword(), token);
}
-
+
IRule[] rules = { keywordRule };
-
+
this.setRules(rules);
-
+
if (!isPartOfMultiScanner && updateEditor) {
// only update editor if this scanner is autonomous
editor.update(false);
}
-
+
notifyUpdateListener();
}
-
+
/**
* Gets the rule for this KeywordScanner
that describes which
* keywords to color in the respective color of this scanner
@@ -212,33 +203,31 @@ public IRule getRule() {
if (fRules == null || fRules.length == 0) {
return null;
}
-
+
return fRules[0];
}
-
+
/**
* Gets the keywordProvider of this scanner
*/
public IKeywordProvider getKeywordProvider() {
return provider;
}
-
+
/**
- * Sets the keywordProvider for this scanner and updates the editor
- * accordingly
+ * Sets the keywordProvider for this scanner and updates the editor accordingly
*
* @param provider
* The new keywordProvider
*/
public void setKeywordProvider(IKeywordProvider provider) {
this.provider = provider;
-
+
updateRules(true);
-
- notifyKeywordListChangeListeners(
- IKeywordListChangeListener.CTX_LIST_REMOVED);
+
+ notifyKeywordListChangeListeners(IKeywordListChangeListener.CTX_LIST_REMOVED);
}
-
+
/**
* Sets the keywords for this scanner
*
@@ -248,14 +237,13 @@ public void setKeywordProvider(IKeywordProvider provider) {
public void setKeywords(KeywordList list) {
IKeywordProvider provider = getKeywordProvider();
provider.setKeywordList(list);
-
+
setKeywordProvider(provider);
-
+
// notify listeners about change
- notifyKeywordListChangeListeners(
- IKeywordListChangeListener.CTX_LIST_CHANGED);
+ notifyKeywordListChangeListeners(IKeywordListChangeListener.CTX_LIST_CHANGED);
}
-
+
/**
* Gets the token of this scanner
*/
@@ -263,19 +251,18 @@ public IToken getToken() {
if (token == null) {
token = new Token(new TextAttribute(getColor(), null, SWT.BOLD));
}
-
+
return token;
}
-
+
/**
* Gets the color for the token of this keywordScanner
*/
protected Color getColor() {
return new Color(Display.getCurrent(),
- ColorUtils.decodeRGB(SQDevPreferenceUtil.getPreferenceStore()
- .getString(preferenceKey)));
+ ColorUtils.decodeRGB(SQDevPreferenceUtil.getPreferenceStore().getString(preferenceKey)));
}
-
+
/**
* Sets whether the keywords should be matched case sensitively
*
@@ -284,31 +271,31 @@ protected Color getColor() {
*/
public void makeCaseSensitive(boolean sensitive) {
caseSensitive = sensitive;
-
+
// apply changes
updateRules(true);
}
-
+
/**
* Checks whether this scanner matches keywords case sensitivelys
*/
public boolean isCaseSensitive() {
return caseSensitive;
}
-
+
/**
- * Sets the default token the WordRule corresponding to this KeywordScanner
- * will use as the default token
+ * Sets the default token the WordRule corresponding to this KeywordScanner will
+ * use as the default token
*
* @param token
* The new default token
*/
public void setDefaultToken(IToken token) {
Assert.isNotNull(token);
-
+
defaultToken = token;
}
-
+
/**
* Gets the default token of this KeywordScanner
*
@@ -317,7 +304,7 @@ public void setDefaultToken(IToken token) {
public IToken getDefaultToken() {
return defaultToken;
}
-
+
/**
* Checks whether this KeywordScanner
contains the given
* Keyword
@@ -328,7 +315,7 @@ public IToken getDefaultToken() {
public boolean contains(Keyword keyword) {
return getKeywordProvider().getKeywordList().contains(keyword);
}
-
+
/**
* Checks whether this KeywordScanner
contains a
* Keyword
matching the given word
@@ -337,10 +324,9 @@ public boolean contains(Keyword keyword) {
* The word to search for
*/
public boolean contains(String word) {
- return getKeywordProvider().getKeywordList().getKeyword(word,
- isCaseSensitive()) != null;
+ return getKeywordProvider().getKeywordList().getKeyword(word) != null;
}
-
+
/**
* Notifies all IKeywordListChangeListeners
*
@@ -352,7 +338,7 @@ protected void notifyKeywordListChangeListeners(String ctx) {
listener.keywordListChanged(ctx);
}
}
-
+
/**
* Notifies all IUpdateListeners
*/
@@ -361,32 +347,30 @@ protected void notifyUpdateListener() {
listener.updated();
}
}
-
+
/**
- * Adds the given IKeywordListChangeListener
if it is not
- * already registered
+ * Adds the given IKeywordListChangeListener
if it is not already
+ * registered
*
* @param listener
* The listener to add
*/
- public void addKeywordListChangeListener(
- IKeywordListChangeListener listener) {
+ public void addKeywordListChangeListener(IKeywordListChangeListener listener) {
if (!keywordListListeners.contains(listener)) {
keywordListListeners.add(listener);
}
}
-
+
/**
* Removes the given IKeywordListChangeListener
*
* @param listener
* The listener to remove
*/
- public void removeKeywordListChangeListener(
- IKeywordListChangeListener listener) {
+ public void removeKeywordListChangeListener(IKeywordListChangeListener listener) {
keywordListListeners.remove(listener);
}
-
+
/**
* Adds the given listener if it is not already added
*
@@ -398,7 +382,7 @@ public void addUpdateListener(IUpdateListener listener) {
updateListeners.add(listener);
}
}
-
+
/**
* Removes the given listener
*
@@ -408,15 +392,15 @@ public void addUpdateListener(IUpdateListener listener) {
public void removeUpdateListener(IUpdateListener listener) {
updateListeners.remove(listener);
}
-
+
@Override
public void keywordListChanged(String ctx) {
if (ctx.equals(IKeywordListChangeListener.CTX_LIST_CHANGED)) {
// update rules
-
+
updateRules(true);
}
-
+
// forward event
notifyKeywordListChangeListeners(ctx);
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java
index efeed618..29b8705e 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/activator/Activator.java
@@ -5,7 +5,7 @@
import org.osgi.framework.BundleContext;
import raven.sqdev.misc.SQDevPreferenceUtil;
-import raven.sqdev.pluginManager.SQDevPluginManager;
+import raven.sqdev.pluginManagement.SQDevPluginManager;
/**
* The activator class controls the plug-in life cycle
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/other/ConfigEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/other/ConfigEditor.java
index ff526b16..cf239017 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/other/ConfigEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/other/ConfigEditor.java
@@ -1,7 +1,8 @@
package raven.sqdev.editors.other;
import java.util.ArrayList;
-import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.jface.text.rules.MultiLineRule;
import org.eclipse.jface.text.rules.Token;
@@ -16,74 +17,65 @@
import raven.sqdev.misc.Macro;
public class ConfigEditor extends BasicCodeEditor implements IMacroSupport {
-
- private List macros;
-
+
+ private Map macros;
+
public ConfigEditor() {
super();
-
- macros = new ArrayList();
-
+
+ macros = new HashMap();
+
// configure macro syntax highlighting
- configuration.createKeywordScanner(
- SQDevPreferenceConstants.SQDEV_EDITOR_MACROHIGHLIGHTING_COLOR_KEY,
- true);
- configuration.createKeywordScanner(
- SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY,
- true);
-
+ configuration.createKeywordScanner(SQDevPreferenceConstants.SQDEV_EDITOR_MACROHIGHLIGHTING_COLOR_KEY, true);
+ configuration.createKeywordScanner(SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY, true);
+
// set keywords for this scanner
- setKeywords(configuration.getKeywordScanner(
- SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY));
-
+ setKeywords(
+ configuration.getKeywordScanner(SQDevPreferenceConstants.SQDEV_EDITOR_KEYWORDHIGHLIGHTING_COLOR_KEY));
+
// get PartitionScanner
- BasicPartitionScanner partitionScanner = getBasicProvider()
- .getPartitionScanner();
-
+ BasicPartitionScanner partitionScanner = getBasicProvider().getPartitionScanner();
+
// exchange the string rule of the partitionScanner
+ partitionScanner.removeRule(BasicPartitionScanner.DOUBLE_QUOTE_STRING_RULE);
partitionScanner
- .removeRule(BasicPartitionScanner.DOUBLE_QUOTE_STRING_RULE);
- partitionScanner.addRule(new MultiLineRule("\"", "\"",
- new Token(BasicPartitionScanner.BASIC_STRING), (char) 0, true));
+ .addRule(new MultiLineRule("\"", "\"", new Token(BasicPartitionScanner.BASIC_STRING), (char) 0, true));
}
-
+
/**
* Sets the keywords available in this editor
*
* @param scanner
- * The KeywordScanner
the Keywords have to be added
- * to (e.g. in form of a KeywordProvider
). By
- * default this scanner is case-sensitive
+ * The KeywordScanner
the Keywords have to be added to
+ * (e.g. in form of a KeywordProvider
). By default this
+ * scanner is case-sensitive
*/
protected void setKeywords(KeywordScanner scanner) {
scanner.getKeywordProvider().addKeyword(new Keyword("class"));
}
-
+
@Override
- public boolean setMacros(List macros, boolean update) {
+ public boolean setMacros(Map macros, boolean update) {
if (!this.macros.equals(macros)) {
- this.macros = new ArrayList(macros);
-
- configuration
- .getKeywordScanner(
- SQDevPreferenceConstants.SQDEV_EDITOR_MACROHIGHLIGHTING_COLOR_KEY)
- .getKeywordProvider()
- .setKeywordList(new KeywordList(this.macros));
-
+ this.macros = new HashMap<>(macros);
+
+ configuration.getKeywordScanner(SQDevPreferenceConstants.SQDEV_EDITOR_MACROHIGHLIGHTING_COLOR_KEY)
+ .getKeywordProvider().setKeywordList(new KeywordList(new ArrayList<>(this.macros.values())));
+
if (update) {
update(false);
}
-
+
return true;
}
-
-
+
+
return false;
}
-
+
@Override
- public List getMacros() {
+ public Map getMacros() {
return macros;
}
-
+
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
index c67c0ef5..57a514dd 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/sqdevEditor/SQDevFileEditor.java
@@ -1,5 +1,7 @@
package raven.sqdev.editors.sqdevEditor;
+import java.io.InputStream;
+
import raven.sqdev.constants.SQDevPreferenceConstants;
import raven.sqdev.editors.BasicCodeEditor;
import raven.sqdev.editors.BasicPartitionScanner;
@@ -73,7 +75,7 @@ protected void setKeywords() {
}
@Override
- protected void doPreprocessorParsing(String input) {
+ protected void doPreprocessorParsing(InputStream input) {
// Do nothing
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java
index 7a28d6d8..9ebf8b2c 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/stringTableEditor/StringTableXMLEditor.java
@@ -1,5 +1,7 @@
package raven.sqdev.editors.stringTableEditor;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
@@ -16,7 +18,9 @@
import raven.sqdev.editors.stringtableParsing.StringTableLexer;
import raven.sqdev.editors.stringtableParsing.StringTableParser;
import raven.sqdev.editors.stringtableParsing.StringTableWalkListener;
+import raven.sqdev.interfaces.IParseResult;
import raven.sqdev.misc.CharacterPair;
+import raven.sqdev.misc.SQDevInfobox;
import raven.sqdev.parser.misc.BasicErrorListener;
/**
@@ -43,8 +47,19 @@ public StringTableXMLEditor() {
}
@Override
- protected ParseTree doParse(String input) {
- ANTLRInputStream in = new ANTLRInputStream(input);
+ protected IParseResult doParse(InputStream input) {
+ ANTLRInputStream in;
+ try {
+ in = new ANTLRInputStream(input);
+ } catch (IOException e) {
+ e.printStackTrace();
+
+ SQDevInfobox info = new SQDevInfobox("Error while parsing stringtable", e);
+
+ info.open(false);
+
+ return null;
+ }
BasicErrorListener listener = new BasicErrorListener();
@@ -61,17 +76,19 @@ protected ParseTree doParse(String input) {
ParseTree tree = parser.content();
listener.getParseResult().applyMarkersTo(this);
+
+ listener.getParseResult().setParseTree(tree);
- return tree;
+ return listener.getParseResult();
}
@Override
- protected boolean processParseTree(ParseTree tree) {
+ protected boolean processParseTree(IParseResult result) {
ParseTreeWalker walker = new ParseTreeWalker();
StringTableWalkListener listener = new StringTableWalkListener(stream);
- walker.walk(listener, tree);
+ walker.walk(listener, result.getANTRLParseTree());
packageList = listener.getPackageList();
diff --git a/plugin/Raven.SQDev.Misc/.classpath b/plugin/Raven.SQDev.Misc/.classpath
index cea67ffa..f26a260c 100644
--- a/plugin/Raven.SQDev.Misc/.classpath
+++ b/plugin/Raven.SQDev.Misc/.classpath
@@ -4,5 +4,8 @@
+
+
+
diff --git a/plugin/Raven.SQDev.Misc/.gitignore b/plugin/Raven.SQDev.Misc/.gitignore
new file mode 100644
index 00000000..ae3c1726
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/plugin/Raven.SQDev.Misc/Abego/AbegoSWT.jar b/plugin/Raven.SQDev.Misc/Abego/AbegoSWT.jar
new file mode 100644
index 00000000..075b0f61
Binary files /dev/null and b/plugin/Raven.SQDev.Misc/Abego/AbegoSWT.jar differ
diff --git a/plugin/Raven.SQDev.UI/Abego/org.abego.treelayout.core-1.0.3.jar b/plugin/Raven.SQDev.Misc/Abego/org.abego.treelayout.core-1.0.3.jar
similarity index 100%
rename from plugin/Raven.SQDev.UI/Abego/org.abego.treelayout.core-1.0.3.jar
rename to plugin/Raven.SQDev.Misc/Abego/org.abego.treelayout.core-1.0.3.jar
diff --git a/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
index 60cbbcde..e23dc3fc 100644
--- a/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Misc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Misc
Bundle-SymbolicName: raven.sqdev.misc;singleton:=true
-Bundle-Version: 0.6.1.stable
+Bundle-Version: 0.7.0.stable
Bundle-Activator: raven.sqdev.activator.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
@@ -13,28 +13,94 @@ Require-Bundle: org.eclipse.core.runtime,
org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
-Export-Package: org.antlr.v4.runtime,
- org.antlr.v4.runtime.atn,
- org.antlr.v4.runtime.dfa,
- org.antlr.v4.runtime.misc,
- org.antlr.v4.runtime.tree,
- org.antlr.v4.runtime.tree.pattern,
- org.antlr.v4.runtime.tree.xpath,
- raven.sqdev.constants,
- raven.sqdev.exceptions,
- raven.sqdev.fileSystemListener,
- raven.sqdev.infoCollection,
- raven.sqdev.infoCollection.base,
- raven.sqdev.interfaces,
- raven.sqdev.misc,
- raven.sqdev.parser.misc,
- raven.sqdev.parser.preprocessor,
- raven.sqdev.parser.sqf,
- raven.sqdev.pluginManagement,
- raven.sqdev.pluginManager,
- raven.sqdev.styles,
- raven.sqdev.syntax
+Export-Package: dataStructures,
+ lexer;uses:="dataStructures",
+ org.abego.treelayout,
+ org.abego.treelayout.util,
+ org.antlr.v4.runtime;
+ uses:="new org.antlr.v4.runtime,
+ org.antlr.v4.runtime.dfa,
+ org.antlr.v4.runtime.atn,
+ org.antlr.v4.runtime.tree,
+ org.antlr.v4.runtime.misc,
+ org.antlr.v4.runtime.tree.pattern",
+ org.antlr.v4.runtime.atn;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.dfa,org.antlr.v4.runtime.misc",
+ org.antlr.v4.runtime.dfa;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.atn",
+ org.antlr.v4.runtime.misc;uses:="org.antlr.v4.runtime",
+ org.antlr.v4.runtime.tree;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.misc",
+ org.antlr.v4.runtime.tree.pattern;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.tree,org.antlr.v4.runtime.misc",
+ org.antlr.v4.runtime.tree.xpath;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.tree,org.antlr.v4.runtime.atn",
+ parser;uses:="dataStructures",
+ raven.sqdev.constants;uses:="org.eclipse.swt.graphics,raven.sqdev.misc",
+ raven.sqdev.exceptions;uses:="raven.sqdev.infoCollection.base",
+ raven.sqdev.fileSystemListener;uses:="org.eclipse.core.runtime,raven.sqdev.interfaces",
+ raven.sqdev.infoCollection;uses:="org.eclipse.core.runtime,raven.sqdev.infoCollection.base",
+ raven.sqdev.infoCollection.base;uses:="raven.sqdev.syntax,raven.sqdev.misc,raven.sqdev.interfaces",
+ raven.sqdev.interfaces;
+ uses:="org.eclipse.swt.events,
+ raven.sqdev.pluginManagement,
+ dataStructures,
+ raven.sqdev.fileSystemListener,
+ raven.sqdev.infoCollection.base,
+ raven.sqdev.misc,
+ org.eclipse.swt.widgets",
+ raven.sqdev.misc;
+ uses:="raven.sqdev.pluginManagement,
+ org.eclipse.swt.graphics,
+ org.eclipse.swt.widgets,
+ org.eclipse.core.runtime.preferences,
+ org.osgi.framework,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.util,
+ raven.sqdev.infoCollection.base,
+ org.eclipse.jface.preference,
+ org.eclipse.swt.custom,
+ org.eclipse.core.resources,
+ raven.sqdev.styles,
+ raven.sqdev.interfaces",
+ raven.sqdev.parser.misc;
+ uses:="org.antlr.v4.runtime,
+ dataStructures,
+ org.eclipse.jface.text,
+ raven.sqdev.parser.preprocessor,
+ lexer,
+ org.eclipse.core.runtime,
+ parser,
+ org.antlr.v4.runtime.tree,
+ raven.sqdev.parser.sqf,
+ raven.sqdev.interfaces",
+ raven.sqdev.parser.preprocessor;
+ uses:="org.antlr.v4.runtime,
+ org.eclipse.core.runtime,
+ raven.sqdev.misc,
+ org.antlr.v4.runtime.tree,
+ raven.sqdev.parser.misc,
+ org.antlr.v4.runtime.atn",
+ raven.sqdev.parser.sqf;
+ uses:="org.antlr.v4.runtime,
+ raven.sqdev.infoCollection.base,
+ raven.sqdev.misc,
+ org.eclipse.jface.text,
+ org.antlr.v4.runtime.tree,
+ raven.sqdev.parser.misc,
+ org.antlr.v4.runtime.atn,
+ raven.sqdev.interfaces",
+ raven.sqdev.pluginManagement;
+ uses:="org.eclipse.core.runtime.jobs,
+ org.osgi.framework,
+ org.eclipse.ui.plugin,
+ raven.sqdev.interfaces",
+ raven.sqdev.styles;uses:="org.eclipse.swt.custom,org.eclipse.swt.widgets",
+ raven.sqdev.syntax;uses:="raven.sqdev.misc",
+ ui;
+ uses:="org.abego.treelayout.util,
+ abego.swt,
+ dataStructures,
+ org.eclipse.swt.widgets"
Import-Package: raven.sqdev.misc
Bundle-Vendor: Raven
Bundle-ClassPath: ANTLR/antlr-runtime-4.7.jar,
- .
+ SQFParser/SQFParser.jar,
+ Abego/AbegoSWT.jar,
+ Abego/org.abego.treelayout.core-1.0.3.jar,
+ .
diff --git a/plugin/Raven.SQDev.Misc/SQFParser/SQFParser.jar b/plugin/Raven.SQDev.Misc/SQFParser/SQFParser.jar
new file mode 100644
index 00000000..264ecdfb
Binary files /dev/null and b/plugin/Raven.SQDev.Misc/SQFParser/SQFParser.jar differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class
deleted file mode 100644
index b0c18750..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/activator/Activator.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class
deleted file mode 100644
index 705f17d5..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ISQDevColorConstants.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ProblemMessages.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ProblemMessages.class
deleted file mode 100644
index 766f614b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/ProblemMessages.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class
deleted file mode 100644
index f9fb19ea..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/SQDevPreferenceConstants.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/TextConstants.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/TextConstants.class
deleted file mode 100644
index 7f79489d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/constants/TextConstants.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.class
deleted file mode 100644
index a8f2c916..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/BadSyntaxException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/FailedAtCreatingFileException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/FailedAtCreatingFileException.class
deleted file mode 100644
index b8610099..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/FailedAtCreatingFileException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalAccessStateException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalAccessStateException.class
deleted file mode 100644
index db7de0ed..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalAccessStateException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalConstructorException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalConstructorException.class
deleted file mode 100644
index d620a566..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalConstructorException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalModificationException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalModificationException.class
deleted file mode 100644
index 75e180f8..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalModificationException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalRGBSyntaxException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalRGBSyntaxException.class
deleted file mode 100644
index f081cb3c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/IllegalRGBSyntaxException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class
deleted file mode 100644
index 5434beca..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCollectionException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCoreException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCoreException.class
deleted file mode 100644
index 70292901..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevCoreException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevEditorException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevEditorException.class
deleted file mode 100644
index 6652659a..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevEditorException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevException.class
deleted file mode 100644
index 883ed3a8..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileIsInvalidException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileIsInvalidException.class
deleted file mode 100644
index c501afca..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileIsInvalidException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileNoSuchAttributeException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileNoSuchAttributeException.class
deleted file mode 100644
index 0d3597c7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevFileNoSuchAttributeException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevIllegalFileChangeException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevIllegalFileChangeException.class
deleted file mode 100644
index e69f2d8b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevIllegalFileChangeException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevSyntaxException.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevSyntaxException.class
deleted file mode 100644
index 087ff1c1..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/SQDevSyntaxException.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/activator/Activator.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/activator/Activator.class
deleted file mode 100644
index 5d4e1645..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/exceptions/activator/Activator.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/AbstractFileSystemChangeListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/AbstractFileSystemChangeListener.class
deleted file mode 100644
index 7b8dd353..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/AbstractFileSystemChangeListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/EFileChangeType.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/EFileChangeType.class
deleted file mode 100644
index 825ea429..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/EFileChangeType.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeAdapter.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeAdapter.class
deleted file mode 100644
index a4cf9823..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeAdapter.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeEvent.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeEvent.class
deleted file mode 100644
index e30137d3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemChangeEvent.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher$1.class
deleted file mode 100644
index 2271d7a3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher.class
deleted file mode 100644
index 529cee9d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/fileSystemListener/FileSystemWatcher.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector$1.class
deleted file mode 100644
index d0b8ee47..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class
deleted file mode 100644
index f0b5f7ef..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandCollector.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandPageProvider.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandPageProvider.class
deleted file mode 100644
index 20952a6f..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/SQFCommandPageProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$1.class
deleted file mode 100644
index 74481b75..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$2.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$2.class
deleted file mode 100644
index 1f553607..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$3.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$3.class
deleted file mode 100644
index ec85c6e3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality$3.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality.class
deleted file mode 100644
index 704c4804..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/ELocality.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Keyword.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Keyword.class
deleted file mode 100644
index b7e9da24..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Keyword.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.class
deleted file mode 100644
index 1a0b7085..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/KeywordList.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class
deleted file mode 100644
index eb6869c2..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFCommand.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFElement.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFElement.class
deleted file mode 100644
index 526b04cf..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/SQFElement.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Variable.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Variable.class
deleted file mode 100644
index 3bbcb369..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/infoCollection/base/Variable.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IAdditionalProposalInformation.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IAdditionalProposalInformation.class
deleted file mode 100644
index c630d083..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IAdditionalProposalInformation.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IEditorKeyHandler.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IEditorKeyHandler.class
deleted file mode 100644
index bb1f649d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IEditorKeyHandler.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IFileSystemChangeListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IFileSystemChangeListener.class
deleted file mode 100644
index 29c253fe..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IFileSystemChangeListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordListChangeListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordListChangeListener.class
deleted file mode 100644
index 3107e700..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordListChangeListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class
deleted file mode 100644
index b125ced4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IKeywordProvider.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMacroSupport.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMacroSupport.class
deleted file mode 100644
index a488acdc..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMacroSupport.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class
deleted file mode 100644
index 42fadf20..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMarkerSupport.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMarkerSupport.class
deleted file mode 100644
index 0a1c4fe5..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IMarkerSupport.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IPluginListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IPluginListener.class
deleted file mode 100644
index 7b38c300..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IPluginListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IProposalInformationCategory.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IProposalInformationCategory.class
deleted file mode 100644
index df80fea7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IProposalInformationCategory.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IReplaceTester.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IReplaceTester.class
deleted file mode 100644
index fb49f452..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IReplaceTester.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISQFParseInformation.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISQFParseInformation.class
deleted file mode 100644
index 228dc759..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISQFParseInformation.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISaveable.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISaveable.class
deleted file mode 100644
index 7b919576..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/ISaveable.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class
deleted file mode 100644
index aa551360..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IUpdateListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IVersionListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IVersionListener.class
deleted file mode 100644
index fcc4cb7b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/interfaces/IVersionListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AbstractAdditionalProposalInformation.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AbstractAdditionalProposalInformation.class
deleted file mode 100644
index d0f0c04a..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AbstractAdditionalProposalInformation.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AdvancedLineReader.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AdvancedLineReader.class
deleted file mode 100644
index 86333d7d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/AdvancedLineReader.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ArrayUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ArrayUtils.class
deleted file mode 100644
index f607dbac..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ArrayUtils.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class
deleted file mode 100644
index 1bc441d4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/CharacterPair.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ColorUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ColorUtils.class
deleted file mode 100644
index 7a650c63..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ColorUtils.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/DataTypeList.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/DataTypeList.class
deleted file mode 100644
index e6819b48..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/DataTypeList.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$1.class
deleted file mode 100644
index f69f1543..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$10.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$10.class
deleted file mode 100644
index c31b74f4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$10.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$11.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$11.class
deleted file mode 100644
index 63bc9c3b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$11.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$12.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$12.class
deleted file mode 100644
index 53d16662..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$12.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$13.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$13.class
deleted file mode 100644
index 4aa77837..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$13.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$14.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$14.class
deleted file mode 100644
index e49066d4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$14.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$15.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$15.class
deleted file mode 100644
index 32c788cf..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$15.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$16.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$16.class
deleted file mode 100644
index 03d4da3a..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$16.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$17.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$17.class
deleted file mode 100644
index 6f6104c3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$17.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$18.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$18.class
deleted file mode 100644
index 3f4c00b8..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$18.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$19.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$19.class
deleted file mode 100644
index ac7f7359..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$19.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$2.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$2.class
deleted file mode 100644
index d8c3231d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$20.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$20.class
deleted file mode 100644
index b3f1a11c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$20.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$21.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$21.class
deleted file mode 100644
index 54024eb6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$21.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$22.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$22.class
deleted file mode 100644
index 5dcaf952..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$22.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$23.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$23.class
deleted file mode 100644
index 1f1fd633..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$23.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$24.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$24.class
deleted file mode 100644
index 6eecaa80..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$24.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$25.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$25.class
deleted file mode 100644
index cb4df0bb..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$25.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$26.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$26.class
deleted file mode 100644
index 682118a6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$26.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$27.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$27.class
deleted file mode 100644
index 2d4773f3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$27.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$28.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$28.class
deleted file mode 100644
index 3ea0b0cb..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$28.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$29.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$29.class
deleted file mode 100644
index ed9aacbc..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$29.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$3.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$3.class
deleted file mode 100644
index 7f3c5a47..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$3.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$30.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$30.class
deleted file mode 100644
index cb9107bd..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$30.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$31.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$31.class
deleted file mode 100644
index 4e8c3e28..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$31.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$32.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$32.class
deleted file mode 100644
index ed7832d3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$32.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$33.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$33.class
deleted file mode 100644
index a1b56e16..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$33.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$34.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$34.class
deleted file mode 100644
index 5c8aef43..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$34.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$35.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$35.class
deleted file mode 100644
index 86bac5ab..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$35.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$36.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$36.class
deleted file mode 100644
index 667c255d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$36.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$37.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$37.class
deleted file mode 100644
index b882dbf2..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$37.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$38.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$38.class
deleted file mode 100644
index 5e15e07d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$38.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$39.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$39.class
deleted file mode 100644
index 5c85dafe..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$39.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$4.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$4.class
deleted file mode 100644
index 5492aab3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$4.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$40.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$40.class
deleted file mode 100644
index 5dc33865..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$40.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$41.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$41.class
deleted file mode 100644
index 41909b52..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$41.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$42.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$42.class
deleted file mode 100644
index 25b1d685..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$42.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$43.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$43.class
deleted file mode 100644
index 86515cc5..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$43.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$44.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$44.class
deleted file mode 100644
index 3d78449d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$44.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$45.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$45.class
deleted file mode 100644
index c70fac43..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$45.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$46.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$46.class
deleted file mode 100644
index 66a7b712..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$46.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$47.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$47.class
deleted file mode 100644
index 24ff137e..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$47.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$48.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$48.class
deleted file mode 100644
index 88945ab6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$48.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$5.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$5.class
deleted file mode 100644
index 1be4fc89..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$5.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$6.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$6.class
deleted file mode 100644
index 0374277a..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$6.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$7.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$7.class
deleted file mode 100644
index ea3216d4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$7.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$8.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$8.class
deleted file mode 100644
index 385aa6b8..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$8.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$9.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$9.class
deleted file mode 100644
index e5691a27..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType$9.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType.class
deleted file mode 100644
index d8a50918..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/EDataType.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/FileUtil.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/FileUtil.class
deleted file mode 100644
index 69aeb85f..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/FileUtil.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/LineBuffer.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/LineBuffer.class
deleted file mode 100644
index e140dbbc..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/LineBuffer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class
deleted file mode 100644
index 3a6dce1e..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/ListUtils.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Macro.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Macro.class
deleted file mode 100644
index c6e18e93..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Macro.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Marker.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Marker.class
deleted file mode 100644
index 3b6698a0..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Marker.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class
deleted file mode 100644
index a562cd70..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/MultiPreferenceStore.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Pair.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Pair.class
deleted file mode 100644
index 6f3f36b0..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/Pair.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDev.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDev.class
deleted file mode 100644
index dda22df9..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDev.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevComposite.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevComposite.class
deleted file mode 100644
index 0b72b913..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevComposite.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox$1.class
deleted file mode 100644
index aa0aae47..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox.class
deleted file mode 100644
index f2d5a42d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevInfobox.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevPreferenceUtil.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevPreferenceUtil.class
deleted file mode 100644
index 1f8f54e7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevPreferenceUtil.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevProjectNature.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevProjectNature.class
deleted file mode 100644
index 27e99ac2..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/SQDevProjectNature.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StringProposalInformationCategory.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StringProposalInformationCategory.class
deleted file mode 100644
index b95c1d69..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StringProposalInformationCategory.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledProposalInformationCategory.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledProposalInformationCategory.class
deleted file mode 100644
index 25005590..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledProposalInformationCategory.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class
deleted file mode 100644
index 097186d2..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/StyledRegion.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.class
deleted file mode 100644
index 37972e0d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TextUtils.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class
deleted file mode 100644
index b5516f66..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/TreeUtils.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class
deleted file mode 100644
index a016c92e..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/UpdateReporter.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/VersionChangeEvent.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/VersionChangeEvent.class
deleted file mode 100644
index e15a8bbe..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/misc/VersionChangeEvent.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/BasicErrorListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/BasicErrorListener.class
deleted file mode 100644
index 9cb0965a..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/BasicErrorListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseResult.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseResult.class
deleted file mode 100644
index e06e4a92..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseResult.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseUtil.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseUtil.class
deleted file mode 100644
index 92164f76..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/misc/ParseUtil.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/Preprocessor.tokens b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/Preprocessor.tokens
deleted file mode 100644
index 63badf73..00000000
--- a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/Preprocessor.tokens
+++ /dev/null
@@ -1,31 +0,0 @@
-COMMENT=1
-WS=2
-PREP_PREFIX=3
-NL=4
-INCLUDE=5
-DEFINE=6
-UNDEFINE=7
-IF=8
-IFN=9
-ELSE=10
-ENDIF=11
-LPAREN=12
-RPAREN=13
-COMMA=14
-STRING=15
-ID=16
-LETTER=17
-INT=18
-OTHER=19
-'#'=3
-'\n'=4
-'#include'=5
-'#define'=6
-'#undef'=7
-'#ifdef'=8
-'#ifndef'=9
-'#else'=10
-'#endif'=11
-'('=12
-')'=13
-','=14
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseListener.class
deleted file mode 100644
index 71436786..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseVisitor.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseVisitor.class
deleted file mode 100644
index 30cba504..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorBaseVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorErrorListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorErrorListener.class
deleted file mode 100644
index 2392de68..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorErrorListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.class
deleted file mode 100644
index 43b422d3..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.tokens b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.tokens
deleted file mode 100644
index 63badf73..00000000
--- a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorLexer.tokens
+++ /dev/null
@@ -1,31 +0,0 @@
-COMMENT=1
-WS=2
-PREP_PREFIX=3
-NL=4
-INCLUDE=5
-DEFINE=6
-UNDEFINE=7
-IF=8
-IFN=9
-ELSE=10
-ENDIF=11
-LPAREN=12
-RPAREN=13
-COMMA=14
-STRING=15
-ID=16
-LETTER=17
-INT=18
-OTHER=19
-'#'=3
-'\n'=4
-'#include'=5
-'#define'=6
-'#undef'=7
-'#ifdef'=8
-'#ifndef'=9
-'#else'=10
-'#endif'=11
-'('=12
-')'=13
-','=14
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorListener.class
deleted file mode 100644
index 41ac685b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$1.class
deleted file mode 100644
index d7095c8c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$2.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$2.class
deleted file mode 100644
index 51d1b280..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener.class
deleted file mode 100644
index ea776327..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseResult.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseResult.class
deleted file mode 100644
index e2084e74..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParseResult.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$DefineContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$DefineContext.class
deleted file mode 100644
index ecc43f24..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$DefineContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$ErrorContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$ErrorContext.class
deleted file mode 100644
index 393c388b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$ErrorContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$IncludeContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$IncludeContext.class
deleted file mode 100644
index 9ae80eab..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$IncludeContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$MacroArgsContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$MacroArgsContext.class
deleted file mode 100644
index 86a60263..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$MacroArgsContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$OtherContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$OtherContext.class
deleted file mode 100644
index 182281a2..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$OtherContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PrepIfContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PrepIfContext.class
deleted file mode 100644
index 6b97408c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PrepIfContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PreprocessorStatementContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PreprocessorStatementContext.class
deleted file mode 100644
index 024a7b37..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$PreprocessorStatementContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$StartContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$StartContext.class
deleted file mode 100644
index c698844d..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$StartContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$UndefineContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$UndefineContext.class
deleted file mode 100644
index e5a4f0e7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser$UndefineContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser.class
deleted file mode 100644
index ec1fc4ab..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorParser.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorVisitor.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorVisitor.class
deleted file mode 100644
index c5748423..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/preprocessor/PreprocessorVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/ERelativPosition.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/ERelativPosition.class
deleted file mode 100644
index 479c54b4..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/ERelativPosition.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQF.tokens b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQF.tokens
deleted file mode 100644
index fd7116b5..00000000
--- a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQF.tokens
+++ /dev/null
@@ -1,42 +0,0 @@
-OPERATOR_PRECEDENCE_MULTIPLY=1
-OPERATOR_PRECEDENCE_ADD=2
-PUCTUATION_OTHER=3
-OR=4
-AND=5
-COMPARE_PRECEDENCE_OPERATOR=6
-ELSE=7
-POWER=8
-SEMICOLON=9
-COMMA=10
-EQUALS=11
-PRIVATE=12
-MACRO_DECLARATION=13
-WHITESPACE=14
-COMMENT=15
-NUMBER=16
-ID=17
-BINARY_OPERATOR=18
-STRING=19
-C_B_O=20
-C_B_C=21
-S_B_O=22
-S_B_C=23
-R_B_O=24
-R_B_C=25
-OTHER=26
-MACRO_NAME=27
-UNARY_OPERATOR=28
-'!'=3
-'||'=4
-'&&'=5
-'^'=8
-';'=9
-','=10
-'='=11
-':'=18
-'{'=20
-'}'=21
-'['=22
-']'=23
-'('=24
-')'=25
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseListener.class
deleted file mode 100644
index 90e46015..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseVisitor.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseVisitor.class
deleted file mode 100644
index 58b8fd4c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFBaseVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.class
deleted file mode 100644
index 1539b412..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.tokens b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.tokens
deleted file mode 100644
index 99407c04..00000000
--- a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFLexer.tokens
+++ /dev/null
@@ -1,40 +0,0 @@
-OPERATOR_PRECEDENCE_MULTIPLY=1
-OPERATOR_PRECEDENCE_ADD=2
-PUCTUATION_OTHER=3
-OR=4
-AND=5
-COMPARE_PRECEDENCE_OPERATOR=6
-ELSE=7
-POWER=8
-SEMICOLON=9
-COMMA=10
-EQUALS=11
-PRIVATE=12
-MACRO_DECLARATION=13
-WHITESPACE=14
-COMMENT=15
-NUMBER=16
-ID=17
-BINARY_OPERATOR=18
-STRING=19
-C_B_O=20
-C_B_C=21
-S_B_O=22
-S_B_C=23
-R_B_O=24
-R_B_C=25
-OTHER=26
-'!'=3
-'||'=4
-'&&'=5
-'^'=8
-';'=9
-','=10
-'='=11
-':'=18
-'{'=20
-'}'=21
-'['=22
-']'=23
-'('=24
-')'=25
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFListener.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFListener.class
deleted file mode 100644
index a1e063d6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFListener.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseInformation.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseInformation.class
deleted file mode 100644
index f5615767..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseInformation.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseResult.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseResult.class
deleted file mode 100644
index de427c7b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParseResult.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ArrayContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ArrayContext.class
deleted file mode 100644
index 0fe851bf..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ArrayContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$AssignmentContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$AssignmentContext.class
deleted file mode 100644
index 2bcd2073..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$AssignmentContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$BinaryExpressionContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$BinaryExpressionContext.class
deleted file mode 100644
index c0e78dd8..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$BinaryExpressionContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CodeContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CodeContext.class
deleted file mode 100644
index b3f839dd..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CodeContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CommonErrorContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CommonErrorContext.class
deleted file mode 100644
index f846fa0c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$CommonErrorContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ErrorContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ErrorContext.class
deleted file mode 100644
index a3e83537..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ErrorContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$InlineCodeContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$InlineCodeContext.class
deleted file mode 100644
index e6d024be..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$InlineCodeContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroArgumentContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroArgumentContext.class
deleted file mode 100644
index 5503ec39..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroArgumentContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroContext.class
deleted file mode 100644
index 21d424dd..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$MacroContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularExpressionContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularExpressionContext.class
deleted file mode 100644
index 34cd63b5..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularExpressionContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularOperatorContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularOperatorContext.class
deleted file mode 100644
index dfb66415..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NularOperatorContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NumberContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NumberContext.class
deleted file mode 100644
index 6c563ff6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$NumberContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$OperatorContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$OperatorContext.class
deleted file mode 100644
index 7902a86f..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$OperatorContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ParenthesisContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ParenthesisContext.class
deleted file mode 100644
index 9cbc0565..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$ParenthesisContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PrimaryExpressionContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PrimaryExpressionContext.class
deleted file mode 100644
index 6204b112..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PrimaryExpressionContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PunctuationContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PunctuationContext.class
deleted file mode 100644
index 422a1fc9..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$PunctuationContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StartContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StartContext.class
deleted file mode 100644
index ea937833..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StartContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StatementContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StatementContext.class
deleted file mode 100644
index 687d3634..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StatementContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StringContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StringContext.class
deleted file mode 100644
index b3301f10..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$StringContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$UnaryExpressionContext.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$UnaryExpressionContext.class
deleted file mode 100644
index 605a4e5c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser$UnaryExpressionContext.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser.class
deleted file mode 100644
index deb841cb..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFParser.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFSyntaxProcessor.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFSyntaxProcessor.class
deleted file mode 100644
index b1102fc7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFSyntaxProcessor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFValidator.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFValidator.class
deleted file mode 100644
index 550ccd10..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFValidator.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFVisitor.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFVisitor.class
deleted file mode 100644
index be481878..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/SQFVisitor.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest$1.class
deleted file mode 100644
index a42e2ef5..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest.class
deleted file mode 100644
index d6cc3e70..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/SQFParserTest.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/TestScripts/VariableDeclaration.sqf b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/TestScripts/VariableDeclaration.sqf
deleted file mode 100644
index 87237edd..00000000
--- a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/parser/sqf/tests/TestScripts/VariableDeclaration.sqf
+++ /dev/null
@@ -1,39 +0,0 @@
-_myTestVar1 = 5;
-_myTestVar2 = getPos player;
-
-params [
- ["_parameter1", nil, [0]],
- ["_parameter2", nil, [[], 4]],
- ["", nil, []],
- ["_parameter4", nil, ["", objNull]]
-];
-
-{
- GlobalTestVar = "Hello World";
-
- if (isNil "Miau") then {
- _innerVariable = ["Hello", "There", "You", "Stranger"];
-
- for "_forVar" from 0 to 12 step 3 do {
- for[{_innerForVar = 0},{_innerForVar < 5},{_innerForVar = _innerForVar + 1}] do {
-
- };
- };
- };
-} count [];
-
-private ["_private1", "_private2"];
-
-private _private3 = "Ola";
-// _commentVar = 5; }
-/*
- * CommentVar = "Mammamia";
- * (
- */
-
-hint Implicit1;
-[] call Implicit2;
-
-_ifVar = if(Implicit3) then {"One"} else {"Two"};
-
-nil;
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$1.class
deleted file mode 100644
index 99e5283f..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$2.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$2.class
deleted file mode 100644
index 407d4fd7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$2.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$3.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$3.class
deleted file mode 100644
index b31bf91c..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$3.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$4.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$4.class
deleted file mode 100644
index 9c23a4a6..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$4.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$5.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$5.class
deleted file mode 100644
index e38438a0..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$5.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$6.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$6.class
deleted file mode 100644
index a9d81bd7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$6.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$7.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$7.class
deleted file mode 100644
index 45dd8e27..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin$7.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin.class
deleted file mode 100644
index cc95be04..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ESQDevPlugin.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ResourceManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ResourceManager.class
deleted file mode 100644
index e650240f..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/ResourceManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class
deleted file mode 100644
index e10f76f7..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class
deleted file mode 100644
index b87bc77e..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class
deleted file mode 100644
index f754c484..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevPluginManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevPluginManager.class
deleted file mode 100644
index 993317ec..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/SQDevPluginManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/VersionManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/VersionManager.class
deleted file mode 100644
index 8916ce16..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManagement/VersionManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManager/SQDevPluginManager.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManager/SQDevPluginManager.class
deleted file mode 100644
index cf9d8a72..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/pluginManager/SQDevPluginManager.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/BoldStyle.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/BoldStyle.class
deleted file mode 100644
index a7519afe..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/BoldStyle.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/CodeStyle.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/CodeStyle.class
deleted file mode 100644
index 6c853f24..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/CodeStyle.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/SQDevStyle.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/SQDevStyle.class
deleted file mode 100644
index 5f69fbe9..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/styles/SQDevStyle.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class
deleted file mode 100644
index b45b7139..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/Syntax.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class b/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class
deleted file mode 100644
index 34dafe2b..00000000
Binary files a/plugin/Raven.SQDev.Misc/bin/raven/sqdev/syntax/SyntaxElement.class and /dev/null differ
diff --git a/plugin/Raven.SQDev.Misc/build.properties b/plugin/Raven.SQDev.Misc/build.properties
index d713dcfa..cde26ab6 100644
--- a/plugin/Raven.SQDev.Misc/build.properties
+++ b/plugin/Raven.SQDev.Misc/build.properties
@@ -5,7 +5,12 @@ bin.includes = META-INF/,\
plugin.xml,\
resources/,\
ANTLR/,\
- ANTLR/antlr-runtime-4.5.3.jar
+ SQFParser/SQFParser.jar,\
+ Abego/AbegoSWT.jar,\
+ Abego/org.abego.treelayout.core-1.0.3.jar
src.includes = resources/,\
ANTLR/,\
+ SQFParser/,\
+ Abego/
+
diff --git a/plugin/Raven.SQDev.Misc/resources/icons/parseTreeIcon.png b/plugin/Raven.SQDev.Misc/resources/icons/syntaxTreeIcon.png
similarity index 100%
rename from plugin/Raven.SQDev.Misc/resources/icons/parseTreeIcon.png
rename to plugin/Raven.SQDev.Misc/resources/icons/syntaxTreeIcon.png
diff --git a/plugin/Raven.SQDev.Misc/resources/sqf/SQFKeywords.txt b/plugin/Raven.SQDev.Misc/resources/sqf/SQFKeywords.txt
index 355a558a..2fbaf9d4 100644
--- a/plugin/Raven.SQDev.Misc/resources/sqf/SQFKeywords.txt
+++ b/plugin/Raven.SQDev.Misc/resources/sqf/SQFKeywords.txt
@@ -2,97 +2,125 @@
- !
+ isTutHintsEnabled
- Negates the given Boolean value. Synonym for 'not'.
+ Returns the status of TUTORIAL HINTS setting in UI (OPTIONS GAME GENERAL TUTORIAL HINTS).
- https://community.bistudio.com/wiki/!_a
+ https://community.bistudio.com/wiki/isTutHintsEnabled
- ! Boolean
+ isTutHintsEnabled
-
+ isTutHintsEnabled
+
-
+ $Code$hint str isTutHintsEnabled ;$/Code$
+
undefined / undefined
- Boolean
+ Boolean
+
- !=
+ createGroup
- Returns whether one value is not equal to another. Both values have need be of the same type.
+ Creates a new Group for the given Side. An HQ (center) for that side must already be in the Mission.sqm or have been initialized with createCenter. For the available sides see Side.
+ NOTES
+ The default limit of groups created per side was 144. Since Arma 3 v1.67 it is increased to 288.
+ Since Arma 3 v 1.67 it is possible to mark created group for automatic deletion when the group becomes empty (see Alt Syntax). When group is set to be automatically deleted when empty, when group becomes empty it may take up to a minute for it to get deleted.
+ In Arma 3 when last unit leaves its group, the group usually gets immediately auto deleted, regardless of whether or not if it was set for auto deletion manually
- https://community.bistudio.com/wiki/a_!%3D_b
+ https://community.bistudio.com/wiki/createGroup
- Anything != Anything
+ createGroup Side
+
+ createGroup Array
-
+ createGroup side
+
+ createGroup [side, deleteWhenEmpty]
+
-
+ $Code$_group = createGroup east$/Code$
+
+ $Code$_group = createGroup [ east, true ];$/Code$
+
- undefined / undefined
+ undefined / global
+ (December 15, 2006)
+ The group limit is 144 groups groups per side. If you attempt to create a group, and there is no room for another, it simply doesn't create, and it doesn't error.
+
+ (July 10,2007)
+ In Armed Assault, empty groups are not automatically deleted - if you created 144 groups, you will not be able to create new group even if all units in all those groups died, because all the 144 groups still exists - you will have to delete some groups manually.
+
+ (January 04, 2011)
+ A group created with createGroup will get a waypoint at [0,0,0]. When you use createUnit to fill it with units, it will get an additional waypoint at the position the first unit is created. This new waypoint will also be set as currentWaypoint. However keep these two waypoints in mind when you do some scripting involving this groups' waypoints.
- Boolean
+ Group - Group
+
- %
+ lightDetachObject
- Returns the remainder of a corresponding division
+ Detach light from object.
- https://community.bistudio.com/wiki/a_%25_b
+ https://community.bistudio.com/wiki/lightDetachObject
- Number % Number
+ lightDetachObject Object
-
+ lightDetachObject light
+
-
+ $Code$LightDetachObject _light$/Code$
+
undefined / undefined
- Number
+ Nothing
+
- &&
+ assignedGunner
- Returns true only if both conditions are true. In case of the alternative syntax (code as right argument), lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely). Identical to: a and b
+ Returns the soldier assigned to the given vehicle as a gunner.
- https://community.bistudio.com/wiki/a_%26%26_b
+ https://community.bistudio.com/wiki/assignedGunner
- Boolean && Boolean/Code
+ assignedGunner Object
-
+ assignedGunner vehicle
+
@@ -101,24 +129,26 @@
- Boolean
+ Object
+
- *
+ menuCollapse
- Multiplies the given numbers.
+ Collapses item on given path and all its childs.
- https://community.bistudio.com/wiki/a_*_b
+ https://community.bistudio.com/wiki/menuCollapse
- Number * Number
+ menuCollapse Array
-
+ menuCollapse [idc, path]
+
@@ -127,34 +157,26 @@
- Number
+ Nothing
+
- +
+ removeSwitchableUnit
- Adds the given two values together or if used only with one argument it returns a copy of that argument
+ Remove a unit from the list of units available for Team Switch.
- https://community.bistudio.com/wiki/valuea_plus_valueb
+ https://community.bistudio.com/wiki/removeSwitchableUnit
- Number + Number
-
- String + String
-
- Array + Array
-
- + Number
-
- + Array
-
- + String
+ removeSwitchableUnit Object
-
+ removeSwitchableUnit unitName
+
@@ -163,321 +185,388 @@
- Number - String - Array - Number - Array - String
+ Nothing
+
- -
+ scriptName
- Subtracts the right value from the left one. Both need to be of the same type, both Numbers or both Arrays. In Arma 3 it is possible to subtract nested arrays.
+ Assign a user friendly name to the VM script this command is executed from.
+ Once name is assigned, it cannot be changed.
- https://community.bistudio.com/wiki/a_-_b
+ https://community.bistudio.com/wiki/scriptName
- Number - Number
-
- Array - Array
-
- - Number
+ scriptName String
-
+ scriptName name
+
-
+ $Code$scriptName "leetScript.sqf";$/Code$
+
+ $Code$scriptName format ["%1ARTY\data\scripts\ARTY_sadarmDeploy.sqf (_this: %1)",_this];$/Code$
+
undefined / undefined
+ (17:39, 13 June 2009 (CEST))
+ scriptName is good when you want to load the handle of some spawn or call with some name:
+ on top of leetscript.sqf
+ $Code$
+ scriptName "LEETSCRIPT";
+ GLOBAL_SCR_NAME = [] spawn "leetscript.sqf";
+ hint format ["%1",GLOBAL_SCR_NAME];
+ //display "LEETSCRIPT"$/Code$
- Number - Array - Number
+ Nothing
+
- /
+ addGroupIcon
- Divides the left number by the right one. Division by 0 throws "Division by zero" error, however script doesn't stop and the result of such division is assumed to be 0. If used with config and String as arguments it returns the subentry of the given config entry with the given name.
+ Add icon to a group. Returns icon ID
- https://community.bistudio.com/wiki/a_/_b
+ https://community.bistudio.com/wiki/addGroupIcon
- Number / Number
-
- Config / String
+ Group addGroupIcon Array
-
+ group addGroupIcon properties
+
-
+ $Code$groupName addGroupIcon ["b_inf",[offsetX,offsetY]]$/Code$
+
undefined / undefined
- Number - Config
+ Number
+
- :
+ setImportance
- Helper construct used in a switch-construct
+ Sets the importance value of location.
- https://community.bistudio.com/wiki/a:b
+ https://community.bistudio.com/wiki/setImportance
- Switch_Type : Code
+ Location setImportance Number
-
+ location setImportance value
+
-
+ $Code$myLocation setImportance 2$/Code$
+
undefined / undefined
- Nothing
+ Nothing
+
- <
+ removeItem
- Checks if the left number is smaller than the right one
+ Removes item from the inventory.
- https://community.bistudio.com/wiki/a_less_b
+ https://community.bistudio.com/wiki/removeItem
- Number < Number
+ Object removeItem String
-
+ unit removeItem item
+
-
+ $Code$bluforUnit unassignItem "NVGoggles";
+ bluforUnit removeItem "NVGoggles";
+ opforUnit unassignItem "NVGoggles_OPFOR";
+ opforUnit removeItem "NVGoggles_OPFOR";
+ independentUnit unassignItem "NVGoggles_INDEP";
+ independentUnit removeItem "NVGoggles_INDEP";$/Code$
+
- undefined / undefined
+ global / global
- Boolean
+ Nothing
+
- <=
+ setSimpleTaskDescription
- Checks if the left number is smaller than or equal to the right one
+ Attach descriptions to the simple task.
- https://community.bistudio.com/wiki/a_less%3D_b
+ https://community.bistudio.com/wiki/setSimpleTaskDescription
- Number <= Number
+ Task setSimpleTaskDescription Array
-
+ task setSimpleTaskDescription [description, descriptionShort, descriptionHUD]
+
-
+ $Code$mytask setSimpleTaskDescription ["Today you have to kill Spongebob","Kill Spongebob","Here he is!"];$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- ==
+ simulInClouds
- Check if one value is equal to another. Both values need to be of the same type.
+ Returns if given position is in clouds.
- https://community.bistudio.com/wiki/a_%3D%3D_b
+ https://community.bistudio.com/wiki/simulInClouds
- Anything == Anything
+ simulInClouds Position
-
+ simulInClouds pos
+
-
+ $Code$simulInClouds (getPos player)$/Code$
+
undefined / undefined
- Boolean
+ Boolean
+
- >
+ itemCargo
- Checks if the left number is greater than the right one
+ Get array with items from ammo box (or any general weapon holder container).
- https://community.bistudio.com/wiki/a_greater_b
+ https://community.bistudio.com/wiki/itemCargo
- Number > Number
+ itemCargo Object
-
+ itemCargo box
+
-
+ $Code$hint str itemCargo vestContainer player ;$/Code$
+
- undefined / undefined
+ global / undefined
- Boolean
+ Array
+
- >=
+ preloadObject
- Checks if the left number is greater than or equal to the right one
+ Preloads all textures, materials and proxies needed to render given object. Works with both class names and objects. Returns true once all data is loaded and ready.
- https://community.bistudio.com/wiki/a_greater%3D_b
+ https://community.bistudio.com/wiki/preloadObject
- Number >= Number
+ Number preloadObject Object
+
+ Number preloadObject String
-
+ distance preloadObject object
+
+ distance preloadObject classname
+
-
+ $Code$[] spawn
+ {
+ waitUntil {10 preloadObject "SoldierW"};
+ hint "Preload finished";
+ };$/Code$
+
+ $Code$[] spawn
+ {
+ waitUntil {10 preloadObject leader player };
+ hint "Preload finished";
+ };$/Code$
+
undefined / undefined
- Boolean
+ Boolean - Boolean
+
- >>
+ vehicleChat
- Returns subentry of config entry with given name. Identical to config/name.
+ Types text to the vehicle radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
+ Note: Object parameter must be a vehicle, not a player.
+ Note: If you are in a crew seat (i.e. driver, gunner or commander), then it will include that role in the chat name output (Eg: Driver (you_name): "Message").
- https://community.bistudio.com/wiki/config_greater_greater_name
+ https://community.bistudio.com/wiki/vehicleChat
- Config >> String
+ Object vehicleChat String
-
+ vehicleName vehicleChat chatText
+
-
+ $Code$vehicle player vehicleChat "Show this text";$/Code$
+
+ $Code$driver vehicle player sideChat "sideChat";
+ driver vehicle player globalChat "globalChat";
+ driver vehicle player groupChat "groupChat";
+ vehicle player vehicleChat "vehicleChat";
+ driver vehicle player commandChat "commandChat";
+ driver vehicle player customChat [1, "customChat"];
+ systemChat "systemChat";$/Code$
+
- undefined / undefined
+ global / local
- Config
+ Nothing
+
- ^
+ deleteStatus
- Returns the left number to the power of the right one.
+ Delete a status (created with saveStatus ) from the campaign's progress file.
- https://community.bistudio.com/wiki/a_%5E_b
+ https://community.bistudio.com/wiki/deleteStatus
- Number ^ Number
+ deleteStatus String
-
+ deleteStatus statusName
+
-
+ $Code$? deleteStatus "playerStatus" : "saved status gone from campaign"$/Code$
+
- undefined / undefined
+ undefined / global
- Number
+ Boolean
+
- ||
+ setTargetAge
- Returns true only if one or both conditions are true. In case of the alternative syntax(code as right argument), lazy evaluation is used (if left operand is true, evaluation of the right side is skipped completely). Identical to: a or b
+ Sets how the target is known to the other centers. They behave like the target was seen age seconds ago.
+ Possible age values are: "ACTUAL", "5 MIN", "10 MIN", "15 MIN", "30 MIN", "60 MIN", "120 MIN" or "UNKNOWN".
- https://community.bistudio.com/wiki/a_or_b
+ https://community.bistudio.com/wiki/setTargetAge
- Boolean || Boolean/Code
+ Object setTargetAge String
-
+ object setTargetAge age
+
-
+ $Code$player setTargetAge "10 MIN"$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- AGLToASL
+ removeSimpleTask
- Converts position from PositionAGL to PositionASL
+ Remove a simple task from the list of simple tasks.
- https://community.bistudio.com/wiki/AGLToASL
+ https://community.bistudio.com/wiki/removeSimpleTask
- AGLToASL PositionAGL
+ Object removeSimpleTask Task
- AGLToASL posAGL
+ person removeSimpleTask task
- $Code$_playerPosASL = AGLToASL ( player modelToWorld [0,0,0]);$/Code$
-
- $Code$_camPosASL = AGLToASL positionCameraToWorld [0,0,0];$/Code$
+ $Code$player removeSimpleTask _tskKillSpongebob$/Code$
undefined / undefined
@@ -485,263 +574,260 @@
- PositionASL
+ Nothing
+
- AISFinishHeal
+ !
- Alternative Injury Simulation (AIS) end state. Used to tell engine that script side healing is done when using "HandleHeal" event handler.
+ Negates the given Boolean value. Synonym for 'not'.
- https://community.bistudio.com/wiki/AISFinishHeal
+ https://community.bistudio.com/wiki/!_a
- AISFinishHeal Array
+ ! Boolean
- AISFinishHeal [unit, healer, healercanheal]
-
+
- $Code$AISFinishHeal [_wounded, _medic, true ];$/Code$
-
+
undefined / undefined
- Nothing
+ Boolean
+
- ASLToAGL
+ addScoreSide
- Converts position from PositionASL to PositionAGL
+ Adds side score. This is shown in the MP score tab as the total score. MP Only. Server execution only.
- https://community.bistudio.com/wiki/ASLToAGL
+ https://community.bistudio.com/wiki/addScoreSide
- ASLToAGL PositionASL
+ Side addScoreSide Number
- ASLToAGL posASL
+ side addScoreSide value
- $Code$_playerPosAGL = ASLToAGL getPosASL player ;$/Code$
+ $Code$west addScoreSide 10;$/Code$
- undefined / undefined
+ global / global
+ This scripting command must be executed on the server to work properly in multiplayer
- PositionAGL
+ Nothing
+
- ASLToATL
+ %
- Converts a position from PositionASL to PositionATL
+ Returns the remainder of a corresponding division
- https://community.bistudio.com/wiki/ASLToATL
+ https://community.bistudio.com/wiki/a_%25_b
- ASLToATL PositionASL
+ Number % Number
- ASLToATL pos
-
+
- $Code$ASLToATL ( getPosASL player ) isEqualTo getPosATL player$/Code$
-
+
undefined / undefined
- PositionATL
+ Number
+
- ATLToASL
+ showWatch
- Converts a position from PositionATL to PositionASL
+ Shows or hides the watch on the map screen, if enabled for the mission and you possess the item. (default true )
- https://community.bistudio.com/wiki/ATLToASL
+ https://community.bistudio.com/wiki/showWatch
- ATLToASL PositionATL
+ showWatch Boolean
- ATLToASL pos
+ showWatch show
- $Code$ATLToASL ( getPosATL player ) isEqualTo getPosASL player$/Code$
-
- $Code$_camPosASL = ATLToASL positionCameraToWorld [0,0,0];$/Code$
+ $Code$showWatch false ;$/Code$
undefined / undefined
+ (16 Aug, 2009)
+ In Arma 2, the Watch is now an inventory item. Class path is CfgWeapons- ItemWatch. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon "ItemWatch")
- PositionASL
+ Nothing
+
- abs
+ curatorCameraArea
- Absolute value of a real number
+ Returns all curator camera areas.
- https://community.bistudio.com/wiki/abs
+ https://community.bistudio.com/wiki/curatorCameraArea
- abs Number
+ curatorCameraArea Object
- abs n
+ curatorCameraArea curatorObj
- $Code$_n = abs -3;
- // Returns 3$/Code$
+ $Code$_camArea = curatorCameraArea myCurator;$/Code$
- local / undefined
+ undefined / undefined
- Number
+ Array
+
- accTime
+ setCuratorWaypointCost
- Returns the current time acceleration factor
+ Sets cost of waypoints (used for placing, editing and deleting).
- https://community.bistudio.com/wiki/accTime
+ https://community.bistudio.com/wiki/setCuratorWaypointCost
- accTime
+ Object setCuratorWaypointCost Number
- accTime
+ curatorObj setCuratorWaypointCost cost
- $Code$_acc = accTime$/Code$
+ $Code$myCUrator setCuratorWaypointCost 0.1;$/Code$
undefined / undefined
- (August 2, 2006)
- Use setAccTime to change the time acceleration factor. Not to be confused with skipTime.
+ This scripting command must be executed on the server to work properly in multiplayer
- Number
+ Nothing
+
- acos
+ unitAimPosition
- ArcCosine of a number, result in Degrees
+ Returns the position on the unit other units can aim at. Same as aimPos only returns position in PositionAGL format and has render scope alternative unitAimPositionVisual.
- https://community.bistudio.com/wiki/acos
+ https://community.bistudio.com/wiki/unitAimPosition
- acos Number
+ unitAimPosition Object
- acos x
+ unitAimPosition unit
- $Code$_degrees = acos 0.5
- // returns 60$/Code$
+ $Code$unitAimPosition player ;$/Code$
- undefined / undefined
+ global / undefined
- Number
+ Array
+
- actionIDs
+ addItemCargoGlobal
- Returns Array of Numbers, where numbers are IDs of all user actions added to given entity with addAction command.
+ Creates new items and stores them in the given container. Works with items, weapons and magazines.
- https://community.bistudio.com/wiki/actionIDs
+ https://community.bistudio.com/wiki/addItemCargoGlobal
- actionIDs Object
+ Object addItemCargoGlobal Array
- actionIDs entity
+ box addItemCargoGlobal [item, count]
- $Code$_actions = actionIDs player ;$/Code$
+ $Code$supplyBox addItemCargoGlobal ["optic_ARCO2", 10];$/Code$
- undefined / undefined
+ global / global
- Array
+ Nothing
+
- actionKeysImages
+ ctrlModelScale
- Returns a list of button images or names assigned to the given user action. A maximum of maxKeys keys is listed. You can find the action names in config class ControllerSchemes or user action names.
+ Returns 3D control model scale
- https://community.bistudio.com/wiki/actionKeysImages
+ https://community.bistudio.com/wiki/ctrlModelScale
- actionKeysImages String
-
- actionKeysImages Array
+ ctrlModelScale Control
- actionKeysImages userAction
-
- actionKeysImages [userAction, maxKeys]
+ ctrlModelScale control
- $Code$_text = actionKeysImages "ReloadMagazine"$/Code$
-
- $Code$_reload = actionKeysImages ["ReloadMagazine",1] will return "R" (incl. the quotation marks!)$/Code$
+ $Code$_currentScale = ctrlModelScale _ctrl3D;$/Code$
undefined / undefined
@@ -749,164 +835,123 @@
- Structured_Text - Structured_Text
+ Number
+
- actionKeysNamesArray
+ *
- Returns a list of button names assigned to the given user action. You can find the action names in config class ControllerSchemes or user action names.
+ Multiplies the given numbers.
- https://community.bistudio.com/wiki/actionKeysNamesArray
+ https://community.bistudio.com/wiki/a_*_b
- actionKeysNamesArray String
-
- actionKeysNamesArray Array
+ Number * Number
- actionKeysNamesArray userAction
-
- actionKeysNamesArray [userAction, maxKeys]
-
- actionKeysNamesArray [userAction, maxKeys, inputDevicePriority]
-
+
- $Code$list = actionKeysNamesArray "ReloadMagazine";$/Code$
-
- $Code$list = actionKeysNamesArray ["ReloadMagazine", 1];$/Code$
-
+
undefined / undefined
- (October 26, 2014)
- inputDevicePriority 'Controler' is not a spelling mistake in description.
- Array - Array
+ Number
+
- actionKeysNames
+ +
- Returns a list of button names assigned to the given user action. You can find the action names in config class ControllerSchemes or user action names.
+ Adds the given two values together or if used only with one argument it returns a copy of that argument
- https://community.bistudio.com/wiki/actionKeysNames
+ https://community.bistudio.com/wiki/valuea_plus_valueb
- actionKeysNames String
+ Number + Number
- actionKeysNames Array
+ String + String
+
+ Array + Array
+
+ + Number
+
+ + Array
+
+ + String
- actionKeysNames userAction
-
- actionKeysNames [userAction, maxKeys]
-
- actionKeysNames [userAction, maxKeys, inputDevicePriority]
-
+
- $Code$_list = actionKeysNames "ReloadMagazine"; //"R"$/Code$
-
+
undefined / undefined
- (20:14, 20 January 2010 (CET))
- The return type is a stacked string. A string inside a string. To compare use first single and inside double quotes:
- if ((actionKeysNames "User1") == '"W"') then...
-
- (October 26, 2014)
- inputDevicePriority 'Controler' is not a spelling mistake in description.
- String - String
+ Number - String - Array - Number - Array - String
+
- actionKeys
+ -
- Returns Array containing dikCodes of keys, buttons and combos assigned to the given user action. Action names could be found in config class ControllerSchemes or user action names or user profile, for example:
- keyWatch [ ] = { 24 } ;
- To retrieve the value, use the property name without 'key':
- $Code$ actionKeys "Watch"; // 24$/Code$
- In addition, some of the actions are also listed in here: inputAction/actions
+ Subtracts the right value from the left one. Both need to be of the same type, both Numbers or both Arrays. In Arma 3 it is possible to subtract nested arrays.
- https://community.bistudio.com/wiki/actionKeys
+ https://community.bistudio.com/wiki/a_-_b
- actionKeys String
+ Number - Number
+
+ Array - Array
+
+ - Number
- actionKeys userAction
-
+
- $Code$_array = actionKeys "ReloadMagazine"$/Code$
-
+
undefined / undefined
- (May 11, 2016)
- If an action key is configured with a modifier (e.g. "Right Ctrl + M" for "MiniMapToggle"), the DIK code returned by this command has a weird value, equivalent to the following:
- Left Ctrl + Key = 486539264 + DIK
- Left Shift + Key = 704643072 + DIK
- Left Alt + Key = 939524096 + DIK
- Right Ctrl + Key = -1660944384 + DIK
- Right Shift + Key = 905969664 + DIK
- Right Alt + Key = -1207959552 + DIK
- For example, to detect if actionKeys "NetworkPlayers" contain a match for "Right Ctrl + P", one must do the following:
- $Code$ if (-1660944359 in actionKeys "NetworkPlayers") then$/Code$
- with -1660944359 being equal to -1660944384 + 25, and 25 being the DIK code for the "P" key.
- This increases the difficulty of accurately comparing key codes to actionKeys in UI event handlers. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile.
- In case of mouse buttons, actionKeys will also return values that are different from those in "MouseButton" UI events:
- LMB: MouseButton 0 = actionKeys 65536
- RMB: MouseButton 1 = actionKeys 65665 (65536 + 1 + 128)
- MMB: MouseButton 2 = actionKeys 65538 (65536 + 2)
- 4MB: MouseButton 3 = actionKeys 65539 (65536 + 3)
- 5MB: MouseButton 4 = actionKeys 65540 (65536 + 4)
- The values above are valid for a right-handed mouse configuration, and may or may not differ for a left-handed config.
-
- (August 6, 2016)
- The method described by @AgentRev does not work.
- All numbers in SQF are floats and those are only precise up to 6...7 digits.
- $Code$486539264 + 19 == 486539264 + 20
- - true
- $/Code$
- The DIK codes for 'LCtrl + R' and 'LCtrl + T' are indistinguishable.
- Array
+ Number - Array - Number
+
- actionName
+ isSprintAllowed
- Returns localized name of action.
+ Returns true if player is allowed to sprint
- https://community.bistudio.com/wiki/actionName
+ https://community.bistudio.com/wiki/isSprintAllowed
- actionName String
+ isSprintAllowed Object
- actionName action
+ isSprintAllowed unit
- $Code$actionName "ReloadMagazine"$/Code$
+ $Code$isSprintAllowed player;$/Code$
undefined / undefined
@@ -914,154 +959,114 @@
- String
+ Boolean
+
- actionParams
+ /
- Returns Array with params for given user action id (similar to addAction param array). The output array is of the following format:
- [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground, selection], where:
- title: String - action title text
- script: String - script file or script expression assigned to the action
- arguments: Anything or nil - arguments passed to the action
- priority: Number - action priority on the action menu
- showWindow: Boolean - whether the action is shown in the center of the screen too
- hideOnUse: Boolean - whether the action menu should close after selecting the action
- shortcut: String - action bindings to some existing engine action if any
- condition: String - expression returning true or nil for action to appear on the action menu
- radius: Number - max distance to entity at which action becomes available. -1 means it is engine default (~15m)
- unconscious: Boolean - whether the action is available to unconscious person
- textWindowBackground: String - same as textWindowBackground in setUserActionText
- textWindowForeground: String - same as textWindowForeground in setUserActionText
- selection: String - named selection in Geometry LOD to which the action is attached
- New array element selection is available since Arma 3 v1.69.140846
+ Divides the left number by the right one. Division by 0 throws "Division by zero" error, however script doesn't stop and the result of such division is assumed to be 0. If used with config and String as arguments it returns the subentry of the given config entry with the given name.
- https://community.bistudio.com/wiki/actionParams
+ https://community.bistudio.com/wiki/a_/_b
- Object actionParams Number
+ Number / Number
+
+ Config / String
- entity actionParams id
-
+
- $Code$_params = player actionParams 0;$/Code$
-
+
undefined / undefined
- Array/Nothing
+ Number - Config
+
- action
+ removeItemFromVest
- Make a unit to perform an action. Use the List of Actions for reference about the available actions and their syntax.
- NOTES:
- While this command should be executed where unit is local, it is not always the case. Actions such as "Eject", "GetOut", "GetInXXXX", "MoveToXXXX", etc can be executed on remote units.
- In SP, when user Alt+Tabs the simulation is paused and so the action will also halt until user returns to the game. For example, player action ["GetInDriver", car] executed while user is Alt+Tabbed will result in user seeing the action happening when he returns to the game screen. This doesn't happen in MP.
+ Removes item from soldier's vest.
- https://community.bistudio.com/wiki/action
+ https://community.bistudio.com/wiki/removeItemFromVest
- Object action Array
+ Object removeItemFromVest String
- unit action actionArray
+ unit removeItemFromVest item
- $Code$player action ["SitDown", player ];$/Code$
-
- $Code$_soldier action ["Eject", vehicle _soldier];$/Code$
-
+
- local / global
+ global / global
- (28 Aug, 2009)
- In ArmA 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action.
-
- (March 27, 2015)
- This command has no effect when a dead unit is used as input.
-
- (June 27, 2017)
- $Code$player action ["SWITCHWEAPON",player,player,-1]$/Code$
- Switching weapon to the back.
-
- (July 20, 2017)
- Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run.
- The unit must be able to perform the dropping animation in order for the action to properly execute.
- So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.
- Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform.
- There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice.
- Nothing
+ Nothing
+
- activateAddons
+ keyImage
- Activates the listed addons. The list of active addons is initialized during this function.
+ Returns a structured text, containing an image or name (if no image is found) of the button, on the keyboard, mouse or joystick, with the given code.
- https://community.bistudio.com/wiki/activateAddons
+ https://community.bistudio.com/wiki/keyImage
- activateAddons Array
+ keyImage Number
- activateAddons [addon1,]
+ keyImage dikCode
- $Code$activateAddons ["BISOFP"];$/Code$
+ $Code$_name = keyImage 28; //result is "Enter"$/Code$
undefined / undefined
- (Jan 21, 2009)
- Be aware that "Addon1" is the cfgPatches class of the desired addon to preload.
-
- (May 10, 2009)
- This command will activate addons that are referenced via scripts but not included in a missions required addons section. If executed from a configs init event with the call command, it will effectively override a missions required addons, preventing them from being activated (Appears to only happen in multi player).
- To activate the passed addons along with those defined in the mission.sqm, execute the command from a configs init event using spawn or execVM. UNN
- Nothing
+ Structured_Text
+
- activateKey
+ size
- Activates the given keyname for the current user profile. The keys are used to unlock missions or campaigns.
- See keys, keysLimit and doneKeys in the description.ext file of the missions.
+ Returns a location's size.
- https://community.bistudio.com/wiki/activateKey
+ https://community.bistudio.com/wiki/size
- activateKey String
+ size Location
- activateKey keyname
+ size location
- $Code$activateKey "Mission04Key";$/Code$
+ $Code$_locSize = size myLocation$/Code$
undefined / undefined
@@ -1069,59 +1074,59 @@
- Nothing
+ Array
+
- activatedAddons
+ allowFleeing
- Returns a list of all activated addons.
+ Sets the cowardice level (the lack of courage or bravery) of a group or unit.
+ The more cowardice a Group or Object has, the sooner it will start fleeing.
+ 0 means maximum courage, while 1 means always fleeing.
- https://community.bistudio.com/wiki/activatedAddons
+ https://community.bistudio.com/wiki/allowFleeing
- activatedAddons
+ Object/Group allowFleeing Number
- activatedAddons
+ name allowFleeing cowardice
- $Code$_addons = activatedAddons ;$/Code$
+ $Code$_group1 allowFleeing 0;$/Code$
- undefined / undefined
+ local / global
- (March 28, 2014)
- This command can return a large array, often too large to be diag_log'd or hinted. At the time of writing, my game returned an array with 389 elements. The code below will ignore all the BI addons (they start with a3_) and writes the rest (ie, all your custom addons) to the RPT.
- $Code${ if (! (["a3_", _x] call BIS_fnc_inString )) then { diag_log _x;} } forEach activatedAddons ;$/Code$
- Array
+ Nothing
+
- add3DENConnection
+ camPreloaded
- Connect entities together.
+ Checks whether the camera has finished preloading.
- https://community.bistudio.com/wiki/add3DENConnection
+ https://community.bistudio.com/wiki/camPreloaded
- add3DENConnection Array
+ camPreloaded Object
- add3DENConnection [type, from, to]
+ camPreloaded camera
- $Code$add3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
- // Set random start on marker "marker_0" for all selected objects.$/Code$
+ $Code$?(camPreloaded _camera) : exit$/Code$
undefined / undefined
@@ -1129,392 +1134,340 @@
- Boolean
+ Boolean
+
- add3DENEventHandler
+ :
- Add code to be run when a Eden Editor event is triggered.
- See the list of all Eden Editor Event Handlers.
+ Helper construct used in a switch-construct
- https://community.bistudio.com/wiki/add3DENEventHandler
+ https://community.bistudio.com/wiki/a:b
- add3DENEventHandler Array
+ Switch_Type : Code
- add3DENEventHandler [type,code]
-
+
- $Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];$/Code$
-
+
undefined / undefined
- Number
+ Nothing
+
- add3DENLayer
+ customRadio
- Add an editing layer in Eden Editor.
+ Sends the message to the custom radio channel. The message is defined in the description.ext file or radio protocol.
- https://community.bistudio.com/wiki/add3DENLayer
+ https://community.bistudio.com/wiki/customRadio
- Number add3DENLayer String
+ Object customRadio Array
- parentLayerID add3DENLayer name
+ unit customRadio [channel, message]
- $Code$_myLayer = -1 add3DENLayer "Enemy Base";
- _myLayerFort = _myLayer add3DENLayer "Fortifications";
- _myLayerPatrol = _myLayer add3DENLayer "Patrols";$/Code$
+ $Code$_soldierOne customRadio [1, "WordEnemy"];$/Code$
- undefined / undefined
+ global / local
+ (December 3, 2016)
+ To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
+ $Code$ player customRadio [1, "#MySound.ogg"];$/Code$
- Number
+ Nothing
+
- addAction
+ getMissionConfig
- This command syntax is for Arma 3 only. For TKOH and older versions see addAction TKOH
- Adds an entry to the action menu of an object (scroll wheel menu). The action can only be activated when in proximity to the object (eg: building). Adding an action to the player obviously makes that action available to the player at all times. The appearance of onscreen text could be further tweaked with setUserActionText. For event handling of user interaction see inGameUISetEventHandler
- This command has local effect. Created action is only available on the computer where command was executed. To make action available to all players, command must be executed on all connected clients (see remoteExec ). addAction is also ignored on dedicated server, because of no user interface. In Arma 3 addAction does not work on animals. This is intended behavior.
- Since Arma 3 v1.63.136787, two new params are available: radius and unconscious.
- Since Arma 3 v1.69.140846, new param is available: selection.
+ Returns Config entry for the given scenario attribute from the 1st tier. The attribute can be config class or config property. If it is defined in multiple places, the command checks them in the following order:
+ External Description.ext file
+ Eden Editor scenario attribute
+ So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
- https://community.bistudio.com/wiki/addAction
+ https://community.bistudio.com/wiki/getMissionConfig
- Object addAction Array
+ getMissionConfig String
- object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection]
+ getMissionConfig attribute
- $Code$// Short and sweet:
- player addAction ["A Useless Action That Does Nothing", {}];
- player addAction [" t color='#FF0000' This Useless Action Is RED /t ", { hint "RED"}];
- player addAction ["Hint Hello!", { hint format ["Hello %1!", _this select 3]}, name player ];
- player addAction ["String Exec", " hint 'this is also compiled'"];$/Code$
-
- $Code$// SQF file example:
- _act = player addAction ["Exec the file", "somescript.sqf"]
- // somescript.sqf: hint str _this;$/Code$
-
- $Code$// SQS file example:
- _genAct = generator addAction ["Switch on generator", "activate_generator.sqs"]
- // activate_generator.sqs:_gen = _this select 0
- _caller = _this select 1
- _id = _this select 2
- ; remove the action once it is activated
- _gen removeAction _id
- // This example shows an action called "Switch on generator" added to an object with the name 'generator'. As soon as the player gets close to this object, he can execute the given action via the action menu. Then the script 'activate_generator.sqs' is executed, which in our example only removes the action from the generator.$/Code$
-
- $Code$// Create object on dedicated server and add action to the object on every client:
- if ( isDedicated ) then
- {
- _obj = "some_obj_class" createVehicle [1234, 1234, 0];
- [_obj, ["Greetings!", { hint "Hello!"}]] remoteExec ["addAction", -2, _obj];
- };$/Code$
+ $Code$_header = getMissionConfig "Header"
+ // Returns scenario header config. Replaces the previous approach which would scan only the external Description.ext file, but ignore the value set in the Eden Editor:_header = missionConfigFile "Header"; // Old approach$/Code$
- global / local
+ undefined / undefined
- (August 2, 2006)
- An easy way to keep track of and remove actions is to store the IDs of the actions in variables.
- This can be accomplished by doing the following:
- $Code$_myaction = player addAction ["Hello", "hello.sqs"];$/Code$
- This stores the action's ID in the local variable "_myaction" and assists in keeping track of the action ID.
- To remove the above action, you would use the following line:
- $Code$ player removeAction _myaction;$/Code$
-
- (June 19, 2014)
- If executing actual script code like this:
- $Code$_unit addAction [ "yourAction", { hint "A line of code" } ];$/Code$
- you can have a user action that uses and/or affects variables used elsewhere in the script that adds the action.
- But beware!
- The variable(s) must be global otherwise it won't work! i.e.
- Fail
- $Code$_variable = false ; _unit addAction [ "action", { _variable = true } ];$/Code$
- Succeed
- $Code$variable = false ; _unit addAction [ "action", { variable = true } ];$/Code$
-
- (March 10, 2015)
- Actionception: $Code$actions = [];
- actions set [0, player addAction ["Actionception", {
- if ( count actions == 1) then {
- actions set [1, player addAction [" Actionception ", {
- if ( count actions == 2) then {
- actions set [2, player addAction [" Actionception ", {
- if ( count actions == 3) then {
- actions set [3, player addAction [" Actionception ", {
- {
- player removeAction _x ;
- } forEach actions;
- }, [], 10, false, true ]];
- };
- }, [], 10, false, false ]];
- };
- }, [], 10, false, false ]];
- };
- }, [], 10, false, false ]];$/Code$
- Function to remove user actions with unknown ids:
- $Code$KK_fnc_removeUnknownUserActions = {
- for "_i" from 0 to ( player addAction ["",""]) do {
- if !(_i in _this ) then {
- player removeAction _i;
- };
- };
- };$/Code$
- To test:
- $Code$ for "_i" from 0 to 9 do {
- player addAction ["Action #" + str _i, {
- [0,5,6] call KK_fnc_removeUnknownUserActions;
- }];
- };
- $/Code$
- Removes all user actions but 0, 5 and 6.
-
- (July 18, 2016)
- A3 v1.62.137494 : Condition is not evaluated when map is opened (and probably also true for other displays or opened dialog)
- Number
+ Config
+
- addBackpackCargoGlobal
+ setSoundEffect
- Add backpack(s) to the cargo space of vehicle. MP synchronized. Classname list of available backpacks is here
+ Defines the different sound effects.
+ Sound - plays a 2D sound from CfgSounds
+ Voice - plays a 3D sound from CfgSounds
+ SoundEnv - plays an environmental sound from CfgEnvSounds
+ SoundDet (only for triggers) - creates a dynamic sound object attached to a trigger defined in CfgSFX
+ To stop any sound, deactivate the trigger (might take up to 0.5 sec to stop) or delete the trigger (immediate). Also use "$NONE$" to skip the sound (1st item), when there is none to be used (Example 3, 4, 5).
- https://community.bistudio.com/wiki/addBackpackCargoGlobal
+ https://community.bistudio.com/wiki/setSoundEffect
- Object addBackpackCargoGlobal Array
+ Object setSoundEffect Array
+
+ Array setSoundEffect Array
- vehicle addBackpackCargoGlobal [packClassName, count]
+ trigger setSoundEffect [sound, voice, soundEnv, soundDet]
+
+ waypoint setSoundEffect [sound, voice, soundEnv, soundDet]
- $Code$this addBackpackCargoGlobal ["TK_RPG_Backpack_EP1",2];$/Code$
+ $Code$_trigger setSoundEffect ["Alarm", "", "", ""];$/Code$
- $Code$_apc addBackpackCargoGlobal ["US_Patrol_Pack_EP1",4];$/Code$
+ $Code$[_group1,2] setSoundEffect ["Alarm", "", "", ""];$/Code$
+
+ $Code$_trigger setSoundEffect ["$NONE$", "Alarm", "", ""];$/Code$
+
+ $Code$_trigger setSoundEffect ["$NONE$", "", "BattlefieldFirefight1", ""];$/Code$
+
+ $Code$_trigger setSoundEffect ["$NONE$", "", "", "Owl"];$/Code$
- global / global
+ undefined / undefined
+ (October 2, 2013)
+ To avoid having to create a dummy sound definition, you can use $NONE$ instead.
+ $Code$private "_trigger";
+ _trigger = createTrigger ["EmptyDetector", position player];
+ _trigger setTriggerStatements ["true", "", ""];
+ _trigger setSoundEffect ["$NONE$", "", "BattlefieldFirefight1", ""];
+ $/Code$
+
+ (March 7, 2012)
+ When using this function, I found that if the parameter sound was empty, then you would always get a 'Sound not found' error. The following code fixes this problem. You need to create a dummy sound. This is what example 3 is hinting towards.
+ description.ext:
+ $Code$class CfgSounds
+ {
+ sounds[] = {};
+ class NoSound
+ {
+ name = "NoSound";
+ sound[] = {"", 0, 1};
+ titles[] = {};
+ }; //Dummy sound needed for setSoundEffect command, due to stupid bug in engine.
+ };
+ $/Code$
+ (code sample above written by 'CarlGustaffa' on the Bohemia Interactive forums.)
+ script.sqf:
+ $Code$_trigger = createTrigger[ "EmptyDetector", _position ];
+ _trigger setTriggerStatements [ "true", "", "" ];
+ _trigger setSoundEffect[ "NoSound", "", "", "Wind2_EP1" ];
+ $/Code$
- Nothing
+ Nothing - Nothing
+
- addBackpackCargo
+ <
- Add backpack(s) to the cargo space of vehicle. Classname list of available backpacks is here.
- In Arma 3, arguments for this command must be local ( ). For global variant see addBackpackCargoGlobal
+ Checks if the left number is smaller than the right one
- https://community.bistudio.com/wiki/addBackpackCargo
+ https://community.bistudio.com/wiki/a_less_b
- Object addBackpackCargo Array
+ Number < Number
- vehicle addBackpackCargo [packClassName,count]
-
+
- $Code$this addBackpackCargo ["TK_RPG_Backpack_EP1",2];$/Code$
-
- $Code$_apc addBackpackCargo ["US_Patrol_Pack_EP1",4];$/Code$
-
+
- global / local
+ undefined / undefined
- Nothing
+ Boolean
+
- addBackpackGlobal
+ logNetworkTerminate
- Adds a backpack to a unit (even non-local)
+ Terminates a network log file started with logNetwork with the given handle
- https://community.bistudio.com/wiki/addBackpackGlobal
+ https://community.bistudio.com/wiki/logNetworkTerminate
- Object addBackpackGlobal String
+ logNetworkTerminate Number
- unit addBackpackGlobal backpack
+ logNetworkTerminate handle
- $Code$player addBackpackGlobal "B_AssaultPack_khk";$/Code$
-
+
- global / global
+ undefined / undefined
- Nothing
+ Nothing
+
- addBackpack
+ >
- Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit.
- Classname list of available backpacks :
- Arma 2 OA backpacks
- Arma 3 backpacks - objects starting with "B_", starts with " B_AssaultPack_khk "
+ Checks if the left number is greater than the right one
- https://community.bistudio.com/wiki/addBackpack
+ https://community.bistudio.com/wiki/a_greater_b
- Object addBackpack String
+ Number > Number
- unit addBackpack packClassName
-
+
- $Code$this addBackpack "TK_RPG_Backpack_EP1";$/Code$
-
- $Code$_mySoldierDude addBackpack "US_Patrol_Pack_EP1";$/Code$
-
+
- local / global
+ undefined / undefined
- Nothing
+ Boolean
+
- addCamShake
+ wind
- Creates the camera shaking effect, like when you are near an explosion
+ Returns the current wind vector (in m/s) as array [x, y, z].
+ NOTE: the last value (z, "up-down") always returns 0 – wind being only horizontal.
- https://community.bistudio.com/wiki/addCamShake
+ https://community.bistudio.com/wiki/wind
- addCamShake Array
+ wind
- addCamShake [power, duration, frequency]
+ wind
- $Code$addCamShake [10, 1, 25];$/Code$
-
- $Code$enableCamShake true ;
- addCamShake [5, 5, 25];$/Code$
+ $Code$_windArray = wind ;$/Code$
- undefined / local
+ undefined / undefined
+ In OFP 1.96, wind speed and direction are directly related to overcast.
- Nothing
+ Array
+
- addCuratorAddons
+ createMissionDisplay
- Allow curator use of given addon.
+ Create single missions display as a child of given display. The mission dialog will be set to the directory given as an argument "root".
- https://community.bistudio.com/wiki/addCuratorAddons
+ https://community.bistudio.com/wiki/createMissionDisplay
- Object addCuratorAddons Array
+ Display createMissionDisplay String
- curatorObj addCuratorAddons addons
+ display createMissionDisplay string
- $Code$curatorObj addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"];$/Code$
-
- $Code$curatorObj addCuratorAddons ["A3_Modules_F_Curator_Lightning"];$/Code$
+ $Code$_ChildDisplay = _Rootdisplay createMissionDisplay "Tutorial";$/Code$
- $Code$// Addons can be stacked:
- curatorObj addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"];
- curatorObj addCuratorAddons ["A3_Modules_F_Curator_Lightning"];
- diag_log curatorAddons curatorObj;[
- "A3_Armor_F_AMV",
- "A3_Armor_F_Panther",
- "A3_Modules_F_Curator_Lightning"
- ]$/Code$
+ $Code$// In Arma 3 this would create scenarios UI
+ findDisplay 46 createMissionDisplay "";$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Display
+
- addCuratorCameraArea
+ camPrepareBank
- Adds or changes curator camera area (depends on if ID is already used).
+ Prepares the camera bank angle.
+ This command is non-functional !
- https://community.bistudio.com/wiki/addCuratorCameraArea
+ https://community.bistudio.com/wiki/camPrepareBank
- Object addCuratorCameraArea Array
+ Object camPrepareBank Number
- curatorObj addCuratorCameraArea [cameraAreaID,position,radius]
+ camera camPrepareBank bank
- $Code$myCurator addCuratorCameraArea [3, position mySoldier,300];$/Code$
+ $Code$_camera camPrepareBank -0.1$/Code$
undefined / undefined
@@ -1522,56 +1475,81 @@
- Nothing
+ Nothing
+
- addCuratorEditableObjects
+ currentWaypoint
- Register objects which can be edited by a curator.
+ Return the index of the current waypoint.
+ To determine the validity of the index, compare it to the waypoints count.
+ If all waypoints are 'completed', then the index is 1 greater than the last valid index.
+ If there are no waypoints, then the index is 0.
+ By default, a group has 1 waypoint at their starting position, which is considered completed and so the currentWaypoint is 1.
- https://community.bistudio.com/wiki/addCuratorEditableObjects
+ https://community.bistudio.com/wiki/currentWaypoint
- Object addCuratorEditableObjects Array
+ currentWaypoint Group
- curatorObj addCuratorEditableObjects [objects,addCrew]
+ currentWaypoint groupName
- $Code$curatorModule addCuratorEditableObjects [[car], true ];$/Code$
+ $Code$_index = currentWaypoint group player ;$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Number
+
- addCuratorEditingArea
+ ctrlMapMouseOver
- Adds or changes curator edit area (depends on if ID is already used).
+ Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.
- https://community.bistudio.com/wiki/addCuratorEditingArea
+ https://community.bistudio.com/wiki/ctrlMapMouseOver
- Object addCuratorEditingArea Array
+ ctrlMapMouseOver Control
- curatorObj addCuratorEditingArea [editAreaID,position,radius]
+ ctrlMapMouseOver control
- $Code$myCurator addCuratorEditingArea [4, position player,1000];$/Code$
+ $Code$( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];
+ _mouseover = if ( count ( ctrlMapMouseOver (uiNamespace getVariable "_map")) 0) then
+ {
+ ctrlMapMouseOver ( uiNamespace getVariable "_map")
+ }
+ else
+ {
+ [""]
+ };
+ if (_mouseover select 0 == "task" && str (_logic getVariable "onTaskAssigned") != str {}) then
+ {
+ //--- Task
+ ( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"];
+ }
+ else
+ {
+ //--- Waypoint
+ ( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"];
+ };$/Code$
+
+ $Code$onEachFrame { hintSilent str ctrlMapMouseOver ( findDisplay 12 displayCtrl 51)};$/Code$
undefined / undefined
@@ -1579,27 +1557,30 @@
- Nothing
+ Array
+
- addCuratorPoints
+ airDensityRTD
- Adds or removes curator points. Points can be only in range from 0 to 1.
+ Returns air density in given altitude
- https://community.bistudio.com/wiki/addCuratorPoints
+ https://community.bistudio.com/wiki/airDensityRTD
- Object addCuratorPoints Number
+ airDensityRTD Number
- curatorObj addCuratorPoints points
+ airDensityRTD altitude
- $Code$curatorModule addCuratorPoints 0.5$/Code$
+ $Code$_density = airDensityRTD 0;//Returns 1.22406$/Code$
+
+ $Code$_density = airDensityRTD 1000;//Returns 1.11096$/Code$
undefined / undefined
@@ -1607,446 +1588,487 @@
- Nothing
+ Number
+
- addEditorObject
+ independent
- Add an object to the editor and assign arguments. Create script is,called with _new equal to true. Returns the ID of the new EditorObject.,Subtype class is optional.
- i
- Some Old Editor Command
+ Pre-defined variable for the independent side.
+ Alias for resistance.
- https://community.bistudio.com/wiki/addEditorObject
+ https://community.bistudio.com/wiki/independent
- Control addEditorObject Array
+ independent
- map addEditorObject [type,[name1,value1,],subtype class]
+ independent
-
+ $Code$// SQF:
+ if (( side _unit) == independent ) then {
+ hint "This is a independent unit!";
+ };$/Code$
+
undefined / undefined
- String
+ Side
+
- addEventHandler
+ hcSetGroup
- Adds event handler (EH) to the given object and returns EH handle. If EH has some data to return upon event (e.g. the "killed" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For more information about event handlers and their types check the scripting topic Event handlers in this reference. You may add as many event handlers of any type as you like to every unit. For instance, if you add an event handler of type "killed" and one already exists, the old one doesn't get overwritten. Use removeEventHandler to delete event handlers.
+ Add group to unit's high command bar.
+ Array parameters are group, group-name and team (teammain, teamred, teamgreen, teamblue, teamyellow).
+ Group is the only necessary parameter.
- https://community.bistudio.com/wiki/addEventHandler
+ https://community.bistudio.com/wiki/hcSetGroup
- Object addEventHandler Array
+ Object hcSetGroup Array
- object addEventHandler [type, command]
+ unit hcSetGroup array
- $Code$_EHkilledIdx = player addEventHandler ["killed", {_this exec "playerKilled.sqs"}]$/Code$
+ $Code$unit hcSetGroup [group, "HQ", teamred];$/Code$
- $Code$this addEventHandler ["killed", " hint format ['Killed by %1',_this select 1]"]$/Code$
+ $Code$player hcSetGroup [group];$/Code$
- global / local
+ undefined / undefined
- (July 7, 2015)
- When using overridable EH, such as "InventoryOpened" and similar, where returning true allows to override default action, exitWith cannot be used to return value. So:
- $Code$ if (whatever) exitWith { true }; false ;$/Code$
- Forget about it, will not work. Instead use:
- $Code$ if (whatever) then { true } else { false };$/Code$
- 100% satisfaction guaranteed!
- Number
+ Nothing
+
- addForce
+ findCover
- Applies force to given object at given position. Force is defined as vector [x, y, z] in world space, position is vector [x, y, z] in model space. If you need to define force in model space, use vectorModelToWorld or vectorModelToWorldVisual commands first. The force applied as impulse. For more information see NVIDIA docs
+ Returns the object around where the unit finds cover. The minDist, visibilityPosition and ignoreObject parameters are optional. Command is not functional since Arma 2.
+ This function is no longer available in ArmA 2.
+ This function is no longer available in Arma 3.
- https://community.bistudio.com/wiki/addForce
+ https://community.bistudio.com/wiki/findCover
- Object addForce Array
+ Object findCover Array
- object addForce [force, position]
+ object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]
- $Code$// Apply force [0,1000,0] defined in world space (not factoring object actual positioning) to object position [1,0,0]:
- _object addForce [[0,1000,0],[1,0,0]];$/Code$
-
- $Code$// Apply force [0,1000,0] defined in model space (relative to object) to object position [1,0,0]:
- _object addForce [_object vectorModelToWorld [0,1000,0],[1,0,0]];$/Code$
-
+
- global / global
+ undefined / undefined
+ (July 4, 2015)
+ An alternative function in Arma 3 might be BIS_fnc_findSafePos
- Nothing
+ Object
+
- addGoggles
+ logNetwork
- Create a new item and try to link it into goggles slot. This command doesn't add NVGoggles. Use addItem and assignItem or just linkItem for latter.
+ Registers new log file recording a network traffic and returns handle of the log.
- https://community.bistudio.com/wiki/addGoggles
+ https://community.bistudio.com/wiki/logNetwork
- Object addGoggles String
+ logNetwork String
- unit addGoggles type
+ logNetwork logFile
- $Code$player addGoggles "G_Tactical_Clear";$/Code$
-
- $Code$diver addGoggles "G_Diving";$/Code$
+ $Code$_handle = logNetwork "myLog.txt";$/Code$
undefined / undefined
+ (March 15, 2016)
+ With his syntax i get an error... - logNetwork "networkLog.txt";
+ $Code$ 5:37:06 Error in expression logNetwork "networkLog.txt";
+ 5:37:06 Error position: logNetwork "networkLog.txt";
+ 5:37:06 Error lognetwork: Typ Zeichenfolge(STRING), erwartet(except) Array
+ $/Code$
- Nothing
+ Number
+
- addGroupIcon
+ hcGroupParams
- Add icon to a group. Returns icon ID
+ Returns parameters describing group in high command bar.
+ Return value is [string, float[4]]
- https://community.bistudio.com/wiki/addGroupIcon
+ https://community.bistudio.com/wiki/hcGroupParams
- Group addGroupIcon Array
+ Object hcGroupParams Group
- group addGroupIcon properties
+ unit hcGroupParams group
- $Code$groupName addGroupIcon ["b_inf",[offsetX,offsetY]]$/Code$
-
+
undefined / undefined
- Number
+ Array
+
- addHandgunItem
+ speedMode
- Adds weapon item to the weapon cargo space. This is used for infantry weapons.
- As of Arma 3 DEV 1.37, this command also supports weapon magazines.
+ Returns speed mode of the group, which can be any of the following:
+ "LIMITED"
+ "NORMAL"
+ "FULL"
- https://community.bistudio.com/wiki/addHandgunItem
+ https://community.bistudio.com/wiki/speedMode
- Object addHandgunItem String
+ speedMode Object/Group
- unit addHandgunItem item
+ speedMode groupName
- $Code$player addHandgunItem "muzzle_snds_L";$/Code$
+ $Code$_grpspeed1 = speedMode grp1$/Code$
- local / global
+ undefined / undefined
- Nothing
+ String
+
- addHeadgear
+ isWeaponDeployed
- Creates a headgear item and tries to link it to headgear slot. If slot is occupied with another item, the item in the slot will be replaced.
+ Returns true if weapon is currently deployed.
- https://community.bistudio.com/wiki/addHeadgear
+ https://community.bistudio.com/wiki/isWeaponDeployed
- Object addHeadgear String
+ isWeaponDeployed Object
- unit addHeadgear item
+ isWeaponDeployed unit
- $Code$player addHeadgear "H_HelmetB";$/Code$
+ $Code$_dep = isWeaponDeployed player ;$/Code$
- global / global
+ global / undefined
+ (July 1, 2015)
+ You can force a unit out of bipod or resting with:
+ $Code$_unit playMove "";$/Code$
+
+ (March 4, 2017)
+ playMove, as well as switchMove, appear to not work when forcing a player out of being deployed. A more reliable method is: $Code$_player setPos (_player modelToWorld [0,0,0]);$/Code$
- Nothing
+ Boolean
+
- addItemCargoGlobal
+ leaveVehicle
- Creates new items and stores them in the given container. Works with items, weapons and magazines.
+ Ceases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned from unit's group. After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.
+ In short the command could be hypothetically presented as:
+ leaveVehicle = un- addVehicle + unassignVehicle forEach crew
+ However, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut command and force unassign the vehicle with unassignVehicle
- https://community.bistudio.com/wiki/addItemCargoGlobal
+ https://community.bistudio.com/wiki/leaveVehicle
- Object addItemCargoGlobal Array
+ Group/Object leaveVehicle Object
- box addItemCargoGlobal [item, count]
+ group leaveVehicle vehicle
- $Code$supplyBox addItemCargoGlobal ["optic_ARCO2", 10];$/Code$
+ $Code$_unit leaveVehicle _vehicle$/Code$
+
+ $Code$_grp leaveVehicle _vehicle$/Code$
- global / global
+ local / local
+ (August 31, 2013)
+ In ArmA 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.
- Nothing
+ Nothing
+
- addItemCargo
+ removeAllEventHandlers
- Creates new items and stores them in given container. Works with items, weapons and magazines. For global variant see addItemCargoGlobal
+ Removes all event handlers of given type that were added by addEventHandler. Since VBS2 v1.24 can be applied on individual weapon rounds.
- https://community.bistudio.com/wiki/addItemCargo
+ https://community.bistudio.com/wiki/removeAllEventHandlers
- Object addItemCargo Array
+ Object removeAllEventHandlers String
- box addItemCargo [item, count]
+ objectName removeAllEventHandlers handlerType
- $Code$supplyBox addItemCargo ["optic_ARCO", 10];$/Code$
+ $Code$player removeAllEventHandlers "killed";$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Nothing
+
- addItemPool
+ lbSetTextRight
- Adds count items of type name into the weapon pool (used in the campaign to transfer items to the next mission)
+ Sets the text on the right side of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- https://community.bistudio.com/wiki/addItemPool
+ https://community.bistudio.com/wiki/lbSetTextRight
- addItemPool Array
+ lbSetTextRight Array
+
+ Control lbSetTextRight Array
- addItemPool [itemName, count]
+ lbSetTextRight [idc, index, name]
+
+ control lbSetTextRight [index, name]
- $Code$addItemPool ["ItemGPS", 5];$/Code$
+ $Code$lbSetTextRight [101, 0, "iskoda"];$/Code$
+
+ $Code$_control lbSetTextRight [0, "iskoda"];$/Code$
- undefined / undefined
+ local / local
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- addItemToBackpack
+ getSpeed
- Create new item and store it to soldier's backpack. The item can also be a weapon or a magazine.
+ Get the speed for the given speed mode.
+ SpeedMode can be:
+ "AUTO"
+ "SLOW"
+ "NORMAL"
+ "FAST"
- https://community.bistudio.com/wiki/addItemToBackpack
+ https://community.bistudio.com/wiki/getSpeed
- Object addItemToBackpack String
+ Object getSpeed String
- unit addItemToBackpack item
+ object getSpeed speedMode
- $Code$player addItemToBackpack "arifle_MXM_Hamr_pointer_F";$/Code$
-
- $Code$player addItemToBackpack "itemGPS";$/Code$
+ $Code$_spd = player getSpeed "FAST";$/Code$
- global / global
+ global / undefined
- Nothing
+ Number
+
- addItemToUniform
+ deleteMarkerLocal
- Create new item and store it to soldier's uniform. The item can also be a weapon or a magazine.
+ Destroys the given marker.
- https://community.bistudio.com/wiki/addItemToUniform
+ https://community.bistudio.com/wiki/deleteMarkerLocal
- Object addItemToUniform String
+ deleteMarkerLocal String
- unit addItemToUniform item
+ deleteMarkerLocal markerName
- $Code$player addItemToUniform "itemGPS";$/Code$
-
- $Code$player addItemToUniform "hgun_Rook40_F";$/Code$
+ $Code$deleteMarkerLocal "Marker1"$/Code$
- global / global
+ undefined / local
+ (7 January, 2012)
+ Unproven: I believe that if you use this command on a globally-created marker, and subsequently another machine executes a global command on the same marker (e.g. setMarkerPos), then the marker will be re-created on the machine it was previously deleted on. Can result in confusing marker behaviour.
- Nothing
+ Nothing
+
- addItemToVest
+ ^
- Create new item and store it to soldier's vest. The item can also be a weapon or a magazine.
+ Returns the left number to the power of the right one.
- https://community.bistudio.com/wiki/addItemToVest
+ https://community.bistudio.com/wiki/a_%5E_b
- Object addItemToVest String
+ Number ^ Number
- unit addItemToVest item
-
+
- $Code$player addItemToVest "itemGPS";$/Code$
-
- $Code$player addItemToVest "hgun_Rook40_F";$/Code$
-
+
- global / global
+ undefined / undefined
- Nothing
+ Number
+
- addItem
+ systemChat
- Creates new item and tries to add it into inventory. Inventory must have enough space to accomodate new item or command will fail.The item can also be a weapon or a magazine.
+ Types text to the system radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
- https://community.bistudio.com/wiki/addItem
+ https://community.bistudio.com/wiki/systemChat
- Object addItem String
+ systemChat String
- unit addItem item
+ systemChat text
- $Code$bluforUnit addItem "NVGoggles";
- bluforUnit assignItem "NVGoggles";
- opforUnit addItem "NVGoggles_OPFOR";
- opforUnit assignItem "NVGoggles_OPFOR";
- independentUnit addItem "NVGoggles_INDEP";
- independentUnit assignItem "NVGoggles_INDEP";$/Code$
+ $Code$systemChat "Hello world!";$/Code$
+
+ $Code$driver vehicle player sideChat "sideChat";
+ driver vehicle player globalChat "globalChat";
+ driver vehicle player groupChat "groupChat";
+ vehicle player vehicleChat "vehicleChat";
+ driver vehicle player commandChat "commandChat";
+ driver vehicle player customChat [1, "customChat"];
+ systemChat "systemChat";$/Code$
- global / global
+ undefined / local
- Nothing
+ Nothing
+
- addLiveStats
+ titleCut
- Adds score to the Xbox Live Statistics score for the given unit (or the commander unit of the given vehicle). (Also available in OFPE & VBS2)
+ this command was obsoleted, use cutText instead.
- https://community.bistudio.com/wiki/addLiveStats
+ https://community.bistudio.com/wiki/titleCut
- Object addLiveStats Number
+ titleCut Array
- unit addLiveStats score
+ titleCut [text, type, speed]
- $Code$player addLiveStats 10$/Code$
+ $Code$titleCut ["Hello, how are you?","Plain Down",3];$/Code$
undefined / undefined
@@ -2054,342 +2076,388 @@
- Nothing
+ Nothing
+
- addMPEventHandler
+ animationSourcePhase
- Adds MP event handler (EH) to the given object and returns EH handle. MP event handlers are added globally to every client on network in multiplayer and will fire on every client too upon event. If EH has some data to return upon event (e.g. the "MPKilled" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For more information see: Arma_3:_Event_Handlers#addMPEventHandler
+ Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource.
- https://community.bistudio.com/wiki/addMPEventHandler
+ https://community.bistudio.com/wiki/animationSourcePhase
- Object addMPEventHandler Array
+ Object animationSourcePhase String
- object addMPEventHandler [type, expression]
+ object animationSourcePhase source
- $Code$_index = player addMPEventHandler ["mpkilled", {Null = _this execVM "playerkilled.sqf";}];$/Code$
+ $Code$_phase = house animationSourcePhase "Door_1_source";$/Code$
- global / global
+ undefined / undefined
- (May 8, 2015)
- MP EHs are added on every PC and execute on every PC, apart from MPRespawn, that only executes at the locality where unit respawns.
- Number
+ Number
+
- addMagazineAmmoCargo
+ selectNoPlayer
- Adds magazines with specified ammo count to the cargo space of a vehicle or a container.
+ Switches player to no unit, makes player return objNull. SP only, the command is completely ignored in MP.
- https://community.bistudio.com/wiki/addMagazineAmmoCargo
+ https://community.bistudio.com/wiki/selectNoPlayer
- Object addMagazineAmmoCargo Array
+ selectNoPlayer
- cargospace addMagazineAmmoCargo [magazine, quantity, ammocount]
+ selectNoPlayer
- $Code$_ammobox addMagazineAmmoCargo ["30Rnd_65x39_caseless_mag", 2, 5];$/Code$
+ $Code$// Single player:
+ selectNoPlayer ;
+ hint str player ; // NULL-object
+ // Rough multiplayer emulation:_noPlayer = createGroup sideLogic createUnit [
+ "Logic",
+ [0,0,1000],
+ [],
+ 0,
+ "NONE"
+ ];
+ selectPlayer _noPlayer;
+ hint str player ; //L Charlie 4-3:1 (KK)$/Code$
- global / global
+ undefined / undefined
+ Player returns objNull after this command has been used. It also has at least the following side effects: closeDialog won't work anymore and onKeyDown event handlers cease to detect the ESC key. In order to get things back to normal a new player object has to be set with selectPlayer. Using objNull won't cut it in this case.
- Nothing
+ Nothing
+
- addMagazineCargoGlobal
+ publicVariableClient
- Add magazines to the cargo space of vehicles, which can be taken out by infantry units.
- MP Synchronized
+ Send the variable value to the client computer - same limitations regarding variable type as publicVariable.
+ The Client ID is the temporary ID given to a connected client for that session. You can find out this ID with the owner command (using it on a player's character, for example, will give you that players client ID).
+ In Arma 3 it is possible to broadcast nil value
- https://community.bistudio.com/wiki/addMagazineCargoGlobal
+ https://community.bistudio.com/wiki/publicVariableClient
- Object addMagazineCargoGlobal Array
+ Number publicVariableClient String
- vehicleName addMagazineCargoGlobal [magazineName, count]
+ clientID publicVariableClient varName
- $Code$_truck addMagazineCargoGlobal ["M16", 5];$/Code$
+ $Code$3 publicVariableClient "CTFscoreOne";$/Code$
- global / global
+ undefined / undefined
- (November 7, 2011)
- Synchronized to JIP as well.
+ (24 Aug, 2012)
+ publicVariableServer (run on client)
+ publicVariableClient (run on server)
+ Publishes a variable (name as STRING) to a specific client, from the server. This is useful where you want to synchronize a variable with only a specific client.
+ This is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - Rocket
+
+ (21 Sep, 2013)
+ While publicVariable is JIP compatible and persistent, publicVariableClient is not. If you log out then log in with the same owner id the public variable sent to your client prior will be nil.
+ $Code$//server
+ pv = 123;
+ 3 publicVariableClient "pv";
+ //connected client with id 3
+ hint str pv; //123
+ //
+ //client log out/log in
+ //
+ //client id is still 3
+ hint str pv; //error, undefined variable pv$/Code$
+
+ (April 12, 2015)
+ Tested in Arma 3 v1.43, publicVariableClient works client-to-client if owner id of the targeted client is known.
- Nothing
+ Nothing
+
- addMagazineCargo
+ countType
- Add magazines to the cargo space of vehicles, which can be taken out by infantry units. Once the magazine cargo space is filled up, any further addMagazineCargo commands are ignored.
- In Arma 3, arguments for this command must be local ( ). For global variant see addMagazineCargoGlobal
+ Count how many objects in the array are of given type. This command also works with parent classes like "Air", "Tank", and "Car". For a full class reference see Classes.
- https://community.bistudio.com/wiki/addMagazineCargo
+ https://community.bistudio.com/wiki/countType
- Object addMagazineCargo Array
+ String countType Array
- vehicleName addMagazineCargo [magazineName, count]
+ type countType objects
- $Code$_truck addMagazineCargo ["M16", 5];$/Code$
+ $Code$_count = "Tank" countType list _triggerOne;$/Code$
+
+ $Code$_count = "B_medic_F" countType units player ;$/Code$
- global / local
+ global / undefined
- (October 24, 2009)
- Only works on clients.
+ (April 23, 2007)
+ This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc.)
+
+ (May 4, 2016)
+ To complement Kronzky's note, if one needs to count exact types, countType is not suitable for this, use count instead:
+ $Code$_count = { typeOf _x == "B_medic_F"} count units player ;$/Code$
- Nothing
+ Number
+
- addMagazineGlobal
+ worldSize
- Adds a magazine to the unit.
- Note: You may create invalid combinations by adding more magazines than the free space in unit's inventory allows. When doing so, application behaviour is undefined.
- This command is broken in MP as it dupes inventory items. Use addMagazine array for now, it takes global argument and has global effect too.
+ Returns config size of the current world.
- https://community.bistudio.com/wiki/addMagazineGlobal
+ https://community.bistudio.com/wiki/worldSize
- Object addMagazineGlobal String
+ worldSize
- unit addMagazineGlobal magazineName
+ worldSize
- $Code$player addMagazineGlobal "30Rnd_65x39_caseless_mag";$/Code$
+ $Code$_size = worldSize ; //8192$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Number
+
- addMagazinePool
+ lbPicture
- Add magazines to the magazine pool, of which the player may choose in the following mission. Available in campaigns only.
+ Returns the picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- https://community.bistudio.com/wiki/addMagazinePool
+ https://community.bistudio.com/wiki/lbPicture
- addMagazinePool Array
+ lbPicture Array
+
+ Control lbPicture Number
- addMagazinePool [magazineName, count]
+ lbPicture [idc, index]
+
+ control lbPicture index
- $Code$addMagazinePool ["M16", 20];$/Code$
+ $Code$_picture = lbPicture [101, 0];$/Code$
+
+ $Code$_picture = _control lbPicture 0;$/Code$
undefined / undefined
+ More information on the LB command family can be found here
- Nothing
+ String - String
+
- addMagazineTurret
+ selectEditorObject
- Adds a magazine to the turret. Use turret path [-1] for driver's turret.
- Note: you may create invalid combinations by using this function, for example by adding 20 grenades. When doing so, application behaviour is undefined. Since Arma 3 v1.55.133817 it is possible to set custom ammo count in added magazine.
+ Select an editor object. Does not un-select previously selected objects.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/addMagazineTurret
+ https://community.bistudio.com/wiki/selectEditorObject
- Object addMagazineTurret Array
+ Control selectEditorObject String
- vehicle addMagazineTurret [magazineName, turretPath, ammoCount]
+ map selectEditorObject object
- $Code$_tank addMagazineTurret ["SmokeLauncherMag",[0,0]];$/Code$
-
- $Code$_tank addMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]];$/Code$
-
+
- local / global
+ undefined / undefined
- Nothing
+ Any_Value
+
- addMagazines
+ setCurrentTask
- Adds multiple magazines to the unit. For cargo containers use addMagazineCargoGlobal command.
+ Set the task as a current task of the person.
- https://community.bistudio.com/wiki/addMagazines
+ https://community.bistudio.com/wiki/setCurrentTask
- Object addMagazines Array
+ Object setCurrentTask Task
- unit addMagazines [magazineName, count]
+ object setCurrentTask task
- $Code$player addMagazines ["30Rnd_65x39_caseless_mag", 3];$/Code$
+ $Code$player setCurrentTask tskKillSpongebob;$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Nothing
+
- addMagazine
+ currentVisionMode
- Add a magazine to a person. Infantry units can only carry a specific number of magazines, once the magazine slots are filled, any further addMagazine commands are ignored.
- Note: When you add a new weapon via scripting commands as well as the magazines for it, the addMagazine command has to be given before the addWeapon command, otherwise the weapon won't be loaded.
- In Arma 3, the alternative variant of this command (addMagazine ARRAY) accepts global arguments, i.e. you can use it on the server to give remote unit a magazine with limited ammo.
-
+ Returns current vision mode of unit's weapon.
+ 0 - daytime
+ 1 - night vision
+ 2 - thermal vision
+
- https://community.bistudio.com/wiki/addMagazine
+ https://community.bistudio.com/wiki/currentVisionMode
- Object addMagazine String
-
- Object addMagazine Array
+ currentVisionMode Object
- unitName addMagazine magazineName
-
- unitName addMagazine [magazineName, ammoCount]
+ currentVisionMode unit
- $Code$player addMagazine "30Rnd_556x45_STANAG";$/Code$
+ $Code$_currMode = currentVisionMode gunner _tank$/Code$
- $Code$player addMagazine ["30Rnd_556x45_STANAG", 15];$/Code$
+ $Code$if ( currentVisionMode player == 1) then
+ {
+ hint "nightvision active";
+ };$/Code$
- local / global
+ global / undefined
- (August 2, 2006)
- If the unit has magazines already, you may need to use the commands removeMagazine or removeMagazines to make space for the mags you want to add.
-
- (February 21, 2010)
- In turreted vehicles the magazine is added to the first turret with primaryGunner = 1; set in the Vehicles turret config part (and the magazine is ONLY added to the very first turret if more than one is configged with primaryGunner = 1; ).
-
- (May 12, 2010)
- When wanting to add many magazines to an object's init-line it can be easier to use loops than to just repeat the addMagazine command.
- If you want to add N magazines to an object either of the two below ways are handy, the first for fewer magazines, and the latter when you want to add many since it then is the easiest of the two to read.
- $Code${this addMagazine "magazineClassName"} forEach [1,2,3,...,N];
- for "_i" from 0 to (N - 1) do {this addMagazine "magazineClassName"};$/Code$
+ (April 29, 2016)
+ The return value is somewhat erratic for UAVs. For example, if you are connected to a UAV, with the turret set to thermal vision and PIP feed enabled, "currentVisionMode gunner _uav" returns 2 when controlling the turret, but returns 0 after releasing control, even thought the PIP feed is still in thermal mode. WIth nightvision, it will return 1 whether or not you are controlling the turret, but if you switch from 1st to 3rd person before releasing control, then it returns 0 afterwards...
- Nothing - Nothing
+ Number
+
- addMenuItem
+ ctrlCommitted
- Creates a new menu item. Menu can be "file" or "view",index is index,as returned from addMenu command. priority is optional and determines,where in the menu the item will reside (higher priority items first).
- i
- Some Old Editor Command
+ Check if the control animation is finished.
- https://community.bistudio.com/wiki/addMenuItem
+ https://community.bistudio.com/wiki/ctrlCommitted
- Control addMenuItem Array
+ ctrlCommitted Control
- map addMenuItem [menu or index,text,command,priority]
+ ctrlCommitted controlName
-
+ $Code$_done = ctrlCommitted _control$/Code$
+
undefined / undefined
- Number
+ Boolean
+
- addMenu
+ ctrlSetStructuredText
- Adds a new menu button. Priority is optional.
- i
- Some Old Editor Command
+ Set the structured text which will be displayed in structured text control.
- https://community.bistudio.com/wiki/addMenu
+ https://community.bistudio.com/wiki/ctrlSetStructuredText
- Control addMenu Array
+ Control ctrlSetStructuredText Structured_Text
- map addMenu [text,priority]
+ control ctrlSetStructuredText structuredText
- $Code$example$/Code$
+ $Code$_control ctrlSetStructuredText parseText "First line img image=data\isniper.paa / br / Second line"$/Code$
+
+ $Code$// To center text vertically, add extra line above with blank space ( ) and set its size to adjust:
+ with uiNamespace do {
+ button = findDisplay 46 ctrlCreate ["RscShortcutButton", -1];
+ button ctrlSetPosition [0,0,0.3,0.1];
+ button ctrlCommit 0;
+ button ctrlSetStructuredText parseText
+ " t size='0.5' /t br/ t size='1' align='center' Button Text /t ";
+ };$/Code$
undefined / undefined
@@ -2397,28 +2465,28 @@
- Number
+ Nothing
+
- addMissionEventHandler
+ halt
- Adds event handler (EH) attached to the current mission and returns EH handle. If EH has some data to return upon event, it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For the list of available mission event handlers see: Arma_3:_Event_Handlers/addMissionEventHandler
+ Stops the program into a debugger. In retail version using halt results in error.
- https://community.bistudio.com/wiki/addMissionEventHandler
+ https://community.bistudio.com/wiki/halt
- addMissionEventHandler Array
+ halt
- addMissionEventHandler [type, command]
+ halt
- $Code$// A script could be executed to stop custom scripts graciously, or save progress & stats, for example:
- _id = addMissionEventHandler ["Ended",{ _this execVM "missionEnded.sqf" }];$/Code$
+ $Code$? _DbugWanted :halt$/Code$
undefined / undefined
@@ -2426,61 +2494,147 @@
- Number
+ Nothing
+
- addMusicEventHandler
+ isFlatEmpty
- Adds playMusic event handler. Returns id of the handler or -1 when failed. Just like addMissionEventHandler, music EH is also attached to the mission.
+ Checks given position against given filter params. Filter includes checks for:
+ If there are any objects closer than given distance from given position (in 2D)
+ If the area around position is flat enough to match given gradient
+ If the given position is over water or land
+ If the given position is over shore line
+ The gradient seems to correlate with general hill steepness: 0.1 (10%) ~6 o, 0.5 (50%) ~27 o, 1.0 (100%) ~45 o, etc.There are also some oddities about this command that need to be noted:
+ Objects accounted for proximity check seem to be static objects. Nearby vehicles and units do not seem to affect the output
+ Given position will be magically transferred into given position + getTerrainHeightASL value
+ The second element must be -1 ( = 0 really) at all times, otherwise command becomes unusable
+ The command might be a bit heavy on computations so avoid frequent and large area checks
+ See also: BIS_fnc_findSafePos
- https://community.bistudio.com/wiki/addMusicEventHandler
+ https://community.bistudio.com/wiki/isFlatEmpty
- addMusicEventHandler Array
+ Array isFlatEmpty Array
- addMusicEventHandler [type, function]
+ position isFlatEmpty [minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]
- $Code$_ehID = addMusicEventHandler ["MusicStart", { hint str _this}];$/Code$
+ $Code$// Check if player position is over land:
+ _overLand = !( position player isFlatEmpty [-1, -1, -1, -1, 0, false ] isEqualTo []);$/Code$
- $Code$_ehID = addMusicEventHandler ["MusicStop", { hint str _this}];$/Code$
+ $Code$// Check if player position is over shore line:
+ _overShore = !( position player isFlatEmpty [-1, -1, -1, -1, 0, true ] isEqualTo []);$/Code$
+
+ $Code$// Check if player position is over water:
+ _overWater = !( position player isFlatEmpty [-1, -1, -1, -1, 2, false ] isEqualTo []);$/Code$
+
+ $Code$// Check if no object is closer than 5m to player position:
+ _isEmpty = !( position player isFlatEmpty [5, -1, -1, -1, -1, false, player ] isEqualTo []);$/Code$
+
+ $Code$// Check if area 10m around player position is relatively flat:
+ _isFlat = !( position player isFlatEmpty [-1, -1, 0.3, 10, -1] isEqualTo []);$/Code$
+
+ $Code$// Check if area 15m around player position is very flat and empty:
+ _isFlatEmpty = !( position player isFlatEmpty [15, -1, 0.1, 15, -1, false, player ] isEqualTo []);$/Code$
undefined / undefined
- (March 4, 2013)
- There are these two types at this time:
- MusicStart - It is triggered when the music is started (command playMusic ). In variable _this is stored class name from CfgMusic.
- MusicStop - It is triggered when the music is ended (command playMusic ). In variable _this is stored class name from CfgMusic.
+ (April 24, 2016)
+ When this command is instructed to check if area at given position is empty it takes into account the radius of the bounding sphere of surrounding objects. Because of this, the high voltage columns such as "Land_HighVoltageColumnWire_F" and such objects may appear extremely large to the calculations and the position will be rejected even if visually it doesn't look too bad. To avoid this, use findEmptyPosition command first to find guaranteed empty position, then pass the result to isFlatEmpty making sure you switched off proximity check by setting 1st param to -1. For example:
+ $Code$// Check if given position is flat and empty within 1m radius
+ [4274.66,12113,0.00139618] isFlatEmpty [1, -1, 0.1, 1, -1, false, objNull ]; //[]$/Code$
+ The result suggests it is not flat and empty.
+ $Code$// Check if given position is flat within 1m radius
+ [4274.66,12113,0.00139618] isFlatEmpty [-1, -1, 0.1, 1, -1, false, objNull ]; //[4274.66,12113,48.3209]$/Code$
+ The result suggests it is.
+ $Code$// Check if given position is empty within 1m radius
+ [4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, -1, -1, false, objNull ]; //[]$/Code$
+ The result suggests it is not empty. But the position is in the middle of a road and there is nothing within 1m but there is "Land_HighVoltageColumnWire_F" not far.
+ $Code$// Check if given position is empty within 1m radius ignoring nearest "Land_HighVoltageColumnWire_F"
+ [4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, 1, -1, false, nearestObject [[4274.66,12113,0.00139618], "Land_HighVoltageColumnWire_F"]]; //[4274.66,12113,48.3209]$/Code$
+ The result now suggests it is empty. So instead of relying on internal proximity check we can combine both commands:
+ $Code$fnc_isFlatEmpty =
+ {
+ params ["_pos", "_params"];
+ _pos = _pos findEmptyPosition [0, _params select 0];
+ if (_pos isEqualTo []) exitWith {[]};
+ _params =+ _params;
+ _params set [0, -1];
+ _pos = _pos isFlatEmpty _params;
+ if (_pos isEqualTo []) exitWith {[]};
+ _pos
+ };
+ // Test
+ [[4274.66,12113,0.00139618], [1, -1, 0.1, 1, -1, false, objNull ]] call fnc_isFlatEmpty; //[4274.53,12113,48.3175]
+ $/Code$
- Number
+ Array
+
- addOwnedMine
+ throw
- Sets ownership over a remotely detonatable mine to the unit.
+ Throws an exception. The exception is processed by first catch block. This command will terminate further execution of the code.
+ NOTE : Avoid using alternative shorthand syntax if you are planning on preparing your exception information dynamically, as it will have to be generated first regardless of the condition of the if statement before it, as shown in example 3.
- https://community.bistudio.com/wiki/addOwnedMine
+ https://community.bistudio.com/wiki/throw
- Object addOwnedMine Object
+ throw Anything
+
+ If_Type throw Anything
- Unit addOwnedMine mine
+ throw expression
+
+ if throw exception
- $Code$player addOwnedMine SuperMine;$/Code$
+ $Code$try { throw "invalid argument"} catch { hint str _exception};$/Code$
+
+ $Code$// Since Arma 3 v1.53.133045:
+ 123 try { if (_this != 123) throw "invalid argument"} catch { hint str _exception};$/Code$
+
+ $Code$// The correct usage of shorthand alt syntax:
+ try {
+ if (a b) throw "Error: some error"; /// OK
+ /// The command argument is static
+ } catch {
+ hint str _exception;
+ };
+ try {
+ _someFunc = {
+ .....
+ };
+ if (a b) throw ( call _someFunc); /// NOT OK
+ /// The command argument is dynamic
+ /// _someFunc is called first to get the value regardless of (a b) outcome
+ } catch {
+ hint str _exception;
+ };
+ try {
+ _someFunc = {
+ .....
+ };
+ if (a b) then { throw ( call _someFunc)}; /// OK
+ /// The command argument is dynamic
+ /// _someFunc is only called when (a b) is true
+ } catch {
+ hint str _exception;
+ };$/Code$
undefined / undefined
@@ -2488,508 +2642,464 @@
- Nothing
+ Nothing - Nothing
+
- addPlayerScores
+ setAnimAimPrecision
- MP server only: Adds player score.
+ Set aimPrecision value of the current animation state (parameter aimPrecision)
- https://community.bistudio.com/wiki/addPlayerScores
+ https://community.bistudio.com/wiki/setAnimAimPrecision
- Object addPlayerScores Array
+ Object setAnimAimPrecision Number
- unit addPlayerScores values
+ unit setAnimAimPrecision value
- $Code$player addPlayerScores [0, 1, 0, 0, 1];$/Code$
+ $Code$player setAnimAimPrecision 1$/Code$
- undefined / undefined
+ global / global
- This scripting command must be executed on the server to work properly in multiplayer
-
- (May 2, 2017)
- As this command will add the given number to a player's score, a little bit of thought needs to be given to friendly-fire if it's for something like a deathmatch or a FFA, due to friendly-fire incurring negative points. So to counter this just add 2 points every time a player kills a unit from the same side:
- $Code$player addPlayerScores [2, 0, 0, 0, 0];$/Code$
- The 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score.
- Nothing
+ Nothing
+
- addPrimaryWeaponItem
+ disableCollisionWith
- Adds weapon item to the weapon cargo space. This is used for infantry weapons.
- As of Arma 3 DEV 1.37, this command also supports weapon magazines.
+ Disable collision between vehicles. This command doesn't disable collision between PhysX objects.
+ !
+ Command has to be executed where objects are local, and as long as they don't change locality, the effect of this command will be global.
+ If the 2 objects are not local to the same computer, then it has to be executed on both computers to achieve the desired effect.
+ If one or both objects change locality, the command needs to be executed again on the new owner 's machine(s) to maintain the effect.
- https://community.bistudio.com/wiki/addPrimaryWeaponItem
+ https://community.bistudio.com/wiki/disableCollisionWith
- Object addPrimaryWeaponItem String
+ Object disableCollisionWith Object
- unit addPrimaryWeaponItem item
+ vehicle disableCollisionWith vehicle
- $Code$player addPrimaryWeaponItem "muzzle_snds_H";$/Code$
-
+
local / global
- (June 22, 2014)
- If the item being added is not supported by the unit's weapon then the command will simply fail silently. The item is also not added to the unit's inventory in such a case.
+ (April 4, 2015)
+ disableCollisionWith is basically a script that when you apply it to an object, and your unit can go through it like a ghost. However, if you wish the object to be solid again, you may wish to use the enableCollisionWith.
+ An example for this is:
+ $Code$//name of unit in editor such as player1
+ //name of object in editor such as barrel1
+ barrel1 disableCollisionWith player1;
+ //to make the barrel solid again, do this as vice versa if you know what your doing!
+ barrel1 enableCollisionWith player1 $/Code$
+ On a side note: this can come in handy a lot if you want a unit to sit on the back of a car or on top of a container
- Nothing
+ Nothing
+
- addPublicVariableEventHandler
+ composeText
- This event handler will detect if a missionNamespace variable (it is attached to) has been broadcast over network with publicVariable, publicVariableClient or publicVariableServer commands and will execute EH code upon detection. Arguments passed to the code in _this array are:
- _this select 0: String - broadcast variable name (same variable name EH is attached to)
- _this select 1: Anything - broadcast variable value
- _this select 2: Object, Group - target the variable got set on with setVariable (see: alternative syntax)
- Please note:
- * EH works only in Multiplayer environment.
- * EH will not fire on the machine that executed broadcast command, only on the machines that receive the broadcast.
- * The value of broadcast variable can be exactly the same, it is the actual broadcast that triggers EH not the change in variable.
- Alt syntax of this command doesn't work as intended
+ Creates a structured text by joining the given structured or plain texts.
- https://community.bistudio.com/wiki/addPublicVariableEventHandler
+ https://community.bistudio.com/wiki/composeText
- String addPublicVariableEventHandler Code
-
- String addPublicVariableEventHandler Array
+ composeText Array
- varName addPublicVariableEventHandler code
-
- varName addPublicVariableEventHandler [target, code]
+ composeText [text1, text2,]
- $Code$"publicThis" addPublicVariableEventHandler {
- hint format [
- "%1 has been updated to: %2",
- _this select 0,
- _this select 1
- ]
- };$/Code$
-
- $Code$// Client:
- "'^:)123BURP,+=lol" addPublicVariableEventHandler { hint ("NUTS are " + (_this select 1))};
- // Server: missionNamespace setVariable ["'^:)123BURP,+=lol", "craZZZZy"];
- publicVariable "'^:)123BURP,+=lol";$/Code$
+ $Code$_txt = composeText ["First line", image "data\isniper.paa", lineBreak, "Second line"];$/Code$
- global / local
+ undefined / undefined
- (22 Dec, 2007)
- Please note that varName indicates which variable you want to monitor with this eventhandler.
- As a result, the example eventhandler on this page will only fire when the variable publicThis has been changed,
- but not if any other variable was changed by any other client via the publicVariable command.
-
- (27 Feb, 2014 00:57)
- Note on using addPublicVariableEventHandler during initialization: If you need a function to call addPublicVariableEventHandler during initialization, you must use postInit. addPublicVariableEventHandler does not work during preInit.
-
- (27 Feb, 2014 08:40)
- MulleDK13 note above needs some clarification. You don't "must" use postInit and you absolutely can use preInit function to initialise addPublicVariableEventHandler if you start scheduled script from it.
- $Code$//script with preInit = 1; in CfgFunctions
- 0 = 0 spawn {
- "someVar" addPublicVariableEventHandler {
- //yourcode
- };
- };$/Code$
-
- (November 23, 2015)
- While it is true that the event handler will only fire on the machine receiving the broadcast value. Please note that this machine can actually be the same machine broadcasting it in the cases of publicVariableClient and publicVariableServer.
- Examples: $Code$if ( isServer ) then {
- "OnServer" addPublicVariableEventHandler { hint "This event handler still fired!"; };
- publicVariableServer "OnServer";
- };$/Code$
- $Code$// This example assumes the client knows their own client ID
- // It does also work on the server (when the server ID is used) irrespective of the command name
- "OnClient" addPublicVariableEventHandler { hint "This event handler still fired!"; };
- client ID publicVariableClient "OnClient";
- $/Code$
- Nothing - Nothing
+ Structured_Text
+
- addRating
+ someAmmo
- Add a number to the rating of a unit - negative values can be used to reduce the rating.
- This command is usually used to reward for completed mission objectives. The rating is given at the end of the mission and is automatically adjusted when killing enemies or friendlies.
- When the rating gets below -2000, the unit's side switches to "ENEMY" ( sideEnemy ) and the unit is attacked by everyone.(see Rating Values )
- See also: Arma_3:_Event_Handlers#HandleRating
+ Check if unit has some ammo.
- https://community.bistudio.com/wiki/addRating
+ https://community.bistudio.com/wiki/someAmmo
- Object addRating Number
+ someAmmo Object
- unitName addRating rating
+ someAmmo unitName
- $Code$player addRating 2000;$/Code$
+ $Code$? not (someAmmo _loon1) : hint "Loon1 is out of ammo!"$/Code$
- local / global
+ undefined / undefined
- (November 16, 2014)
- Since there is no setRating command, its expected behaviour can scripted as such:
- $Code$BNRG_fnc_setRating = {
- _setRating = _this select 0;
- _unit = _this select 1;
- _getRating = rating _unit;
- _addVal = _setRating - _getRating;
- _unit addRating _addVal;
- };
- [1000,player] call BNRG_fnc_setRating//set player rating 1000$/Code$
- Using this example, no matter what the units rating was before, it will always set its rating to 1000.
- Nothing
+ Boolean
+
- addResources
+ diag_captureFrameToFile
- Adds resources to a team member.
+ This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and
+ written to a log file in the same directory as the.rpt file.
+ The full Path to the log file is logged to simultaneously.
+ The data in the log file can be copied and pasted into the diag_captureFrame UI dialog to get a visualisation later on.
+ Note : Only available in specific builds. See Performance Profiling for details.
- https://community.bistudio.com/wiki/addResources
+ https://community.bistudio.com/wiki/diag_captureFrameToFile
- Team_Member addResources Array
+ diag_captureFrameToFile Number
- teamMember addResources [resource1, resource2,]
+ diag_captureFrameToFile frame
-
+ $Code$diag_captureFrameToFile 1; //capture the first frame after command execution$/Code$
+
+ $Code$diag_captureFrameToFile 24; //capture 24th frame after command execution$/Code$
+
- global / local
+ undefined / undefined
- Nothing
+ Nothing
+
- addScoreSide
+ diag_activeSQSScripts
- Adds side score. This is shown in the MP score tab as the total score. MP Only. Server execution only.
+ Returns array with active SQSs.
- https://community.bistudio.com/wiki/addScoreSide
+ https://community.bistudio.com/wiki/diag_activeSQSScripts
- Side addScoreSide Number
+ diag_activeSQSScripts
- side addScoreSide value
+ diag_activeSQSScripts
- $Code$west addScoreSide 10;$/Code$
+ $Code${ systemChat str _x} forEach diag_activeSQSScripts ;$/Code$
- global / global
+ undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Array
+
- addScore
+ menuChecked
- Add a number to the score of a unit. This score is shown in multiplayer in the "I" ("P" in Arma 3) screen. Negative values will remove from the score. Server execution only.
- See also: Arma_3:_Event_Handlers#HandleScore
+ Returns if item on given path is checked or not.
- https://community.bistudio.com/wiki/addScore
+ https://community.bistudio.com/wiki/menuChecked
- Object addScore Number
+ menuChecked Array
- unit addScore score
+ menuChecked [idc, path]
- $Code$unit addScore 10;$/Code$
-
+
- global / global
+ undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Boolean
+
- addSecondaryWeaponItem
+ remove3DENConnection
- Adds weapon item to the weapon cargo space. This is used for infantry weapons.
- As of Arma 3 DEV 1.37, this command also supports weapon magazines.
+ Remove connection between entities.
- https://community.bistudio.com/wiki/addSecondaryWeaponItem
+ https://community.bistudio.com/wiki/remove3DENConnection
- Object addSecondaryWeaponItem String
+ remove3DENConnection Array
- unit addSecondaryWeaponItem item
+ remove3DENConnection [type, from, to]
-
+ $Code$remove3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
+ // Remove random start on marker "marker_0" from all selected objects.$/Code$
+
- local / global
+ undefined / undefined
- Nothing
+ Boolean
+
- addSwitchableUnit
+ addResources
- Adds a unit into the list of units available for Team Switch. Units marked as playable in editor are automatically switchable. This command allows to add non-playable unit into array of switchableUnits and make them available for teamSwitch. SP only.
+ Adds resources to a team member.
- https://community.bistudio.com/wiki/addSwitchableUnit
+ https://community.bistudio.com/wiki/addResources
- addSwitchableUnit Object
+ Team_Member addResources Array
- addSwitchableUnit unitName
+ teamMember addResources [resource1, resource2,]
- $Code$addSwitchableUnit bob$/Code$
-
+
- undefined / undefined
+ global / local
- Nothing
+ Nothing
+
- addTeamMember
+ addHeadgear
- Add given member to given team. Effect is local, unless both member and team are local to PC on which command is executed, then effect is global.
- The same Team Member can be member of several different teams at the same time.
+ Creates a headgear item and tries to link it to headgear slot. If slot is occupied with another item, the item in the slot will be replaced.
- https://community.bistudio.com/wiki/addTeamMember
+ https://community.bistudio.com/wiki/addHeadgear
- Team_Member addTeamMember Team_Member
+ Object addHeadgear String
- team addTeamMember member
+ unit addHeadgear item
- $Code$_team addTeamMember _teamMember;$/Code$
+ $Code$player addHeadgear "H_HelmetB";$/Code$
- local / local
+ global / global
- Nothing
+ Nothing
+
- addToRemainsCollector
+ enableAudioFeature
- Adds an array of vehicles/units to disposal manager for automatic wreck/body removal. The disposal manager follows wreck/body removal values set in description.ext
+ Enable/disable an audio feature, features are: "lowpass", "building_interior". Return previous state
- https://community.bistudio.com/wiki/addToRemainsCollector
+ https://community.bistudio.com/wiki/enableAudioFeature
- addToRemainsCollector Array
+ enableAudioFeature Array
- addToRemainsCollector remains
+ enableAudioFeature [feature, enable]
- $Code$addToRemainsCollector [unit1, unit2, vehicle1];$/Code$
+ $Code$prevState = enableAudioFeature ["lowpass", true ];$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Boolean
+
- addTorque
+ showRadio
- Applies torque (rotation momentum) to the center of mass of the given object. Torque force is defined as vector [x, y, z] applied in world space. If you need to define torque in model space, convert the torque vector first by vectorModelToWorld or vectorModelToWorldVisual command. The torque applied as impulse. Diagram below explain which way the object would rotate. For more information see NVIDIA docs
+ Shows or hides the radio on the map screen, if enabled for the mission and you possess the item. (default true )
- https://community.bistudio.com/wiki/addTorque
+ https://community.bistudio.com/wiki/showRadio
- Object addTorque Array
+ showRadio Boolean
- object addTorque torque
+ showRadio show
- $Code$// Apply torque [1000,0,0] to object not factoring object positioning:
- _wheel addTorque [1000,0,0];$/Code$
-
- $Code$// Apply torque [1000,0,0] relative to object:
- _wheel addTorque (_wheel vectorModelToWorld [1000,0,0]);$/Code$
+ $Code$showRadio false$/Code$
- global / global
+ undefined / undefined
+ (16 Aug, 2009)
+ In Arma 2, the radio is now an item in ArmA 2. Class path is CfgWeapons- ItemRadio. Use the command addWeapon and removeWeapon to remove it from a unit's inventory. (example: player removeweapon "ItemRadio")
- Nothing
+ Nothing
+
- addUniform
+ getUnitTrait
- Create a new uniform and try to link it into uniform slot (given uniform has to be supported by allowedUniforms list of target soldier). To check if uniform is allowed use isUniformAllowed and to force add incompatible uniform use forceAddUniform
+ Gets the current value of a trait of the given unit.
+ Default traits are:
+ audibleCoef (scalar)
+ camouflageCoef (scalar)
+ engineer (bool)
+ explosiveSpecialist (bool)
+ loadCoef (scalar)
+ medic (bool)
+ UAVHacker (bool)
- https://community.bistudio.com/wiki/addUniform
+ https://community.bistudio.com/wiki/getUnitTrait
- Object addUniform String
+ Object getUnitTrait String
- unit addUniform type
+ unit getUnitTrait skill_name
- $Code$_unit addUniform "U_B_CombatUniform_mcam";$/Code$
+ $Code$player getUnitTrait "Medic";$/Code$
- global / global
+ global / undefined
- Nothing
+ Boolean/Number
+
- addVehicle
+ clearRadio
- Adds a specified vehicle for use by a specified AI led group taking into account vehicle's cost. The vehicle will be considered as an available vehicle for use by this group.
- When vehicle is added in this way, it can appear as a target for the enemy even if the vehicle is currently free of the crew. Vehicles with crew, which are placed in the editor, get automatically added to the group. To remove vehicle from a group, use leaveVehicle.
+ Clean up the content of radio protocol history.
- https://community.bistudio.com/wiki/addVehicle
+ https://community.bistudio.com/wiki/clearRadio
- Group addVehicle Object
+ clearRadio
- groupName addVehicle vehicleName
+ clearRadio
- $Code$_grp addVehicle _vehicle$/Code$
-
- $Code$// Using on crewed vehicle:
- group tank addVehicle tank;$/Code$
+ $Code$clearRadio;$/Code$
- local / undefined
+ undefined / local
- (22 Nov, 2008 00:40)
- This command works best when used on empty vehicles. If used on a vehicle already driven by a member of another group, the driver will continue under his own group's orders, which may not benefit the addVehicle group.
- More than one vehicle can be added to a group, and more than one group can be added to a vehicle.
- When deciding whether to board a vehicle, AI leaders seem to only consider the transport benefit of a vehicle, ignoring any combat benefits the vehicle may provide.
+ Use $Code$ enableRadio false;$/Code$ to disable the chat.
- Nothing
+ Nothing
+
- addVest
+ ATLToASL
- Create a new vest and try to link it into vest slot.
+ Converts a position from PositionATL to PositionASL
- https://community.bistudio.com/wiki/addVest
+ https://community.bistudio.com/wiki/ATLToASL
- Object addVest String
+ ATLToASL PositionATL
- unit addVest type
+ ATLToASL pos
- $Code$player addVest "V_TacVest_blk_POLICE";$/Code$
+ $Code$ATLToASL ( getPosATL player ) isEqualTo getPosASL player$/Code$
+
+ $Code$_camPosASL = ATLToASL positionCameraToWorld [0,0,0];$/Code$
undefined / undefined
@@ -2997,334 +3107,371 @@
- Nothing
+ PositionASL
+
- addWaypoint
+ lnbData
- Adds (or inserts when index is given) a new waypoint to a group.
- The waypoint is placed randomly within a circle with the given center and radius.
- The function returns a waypoint with format [group, index].
+ Returns the additional text (invisible) in an item with the given position of the 2D listbox.
- https://community.bistudio.com/wiki/addWaypoint
+ https://community.bistudio.com/wiki/lnbData
- Group addWaypoint Array
+ lnbData Array
+
+ Control lnbData Array
- groupName addWaypoint [center, radius, index, name]
+ lnbData [idc, [row, column]]
+
+ ctrl lnbData [row, column]
- $Code$_wp =_grp addWaypoint [ position player, 0];$/Code$
+ $Code$_ctrl lnbData [ lnbCurSelRow _ctrl,0]; //"#1"$/Code$
- global / global
+ local / local
- (November 26, 2009)
- In game versions prior to Arma 3 v1.22:
- If you add a waypoint to your group and then want them to start moving to that waypoint, make sure to call setWaypointType "MOVE" on your waypoint.
-
- (18:23, 28 April 2011 (CEST))
- In VBS2 1.30, the randomization of addWaypoint doesn't seem to work correctly all of the time.
- The alternative syntax of addWaypoint with a specified index doesn't seem to work correctly.
-
- (June 21, 2014)
- if you want to create a waypoint of type "MOVE" and set it as actual waypoint, you can use the move command that does everything for you with only one line of code ! Be aware that move command intercepts multiple waypoints and it will not line up in waypoints queue. In other word it is a quick solution if you want your group to get only one waypoint, but for several waypoints you'll have to use addwaypoint and all setwaypointXXXXXX commands around. see move command.
-
- (August 4, 2014)
- The waypoint may not be created exactly at the center position even if radius is zero. The position will be moved away if there are e.g. rocks at the center position or if it is placed at the edge of water on a shore.
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Array
+ String - String
+
- addWeaponCargoGlobal
+ fillWeaponsFromPool
- Add weapons to the cargo space of vehicles, which can be taken out by infantry units.
- MP Synchronized
+ Adds magazines from the campaign pool to the given unit, depending on his weapons.
- https://community.bistudio.com/wiki/addWeaponCargoGlobal
+ https://community.bistudio.com/wiki/fillWeaponsFromPool
- Object addWeaponCargoGlobal Array
+ fillWeaponsFromPool Object
- vehicleName addWeaponCargoGlobal [weaponName, count]
+ fillWeaponsFromPool unitName
- $Code$_truck addWeaponCargoGlobal["M16",5];$/Code$
+ $Code$fillWeaponsFromPool _soldier$/Code$
- global / global
+ undefined / undefined
- (November 7, 2011)
- Synchronized to JIP as well.
- Nothing
+ Nothing
+
- addWeaponCargo
+ cameraInterest
- Add weapons to the cargo space of vehicles, which can be taken out by infantry units. Ignores available cargo space.
- In Arma 3, arguments for this command must be local ( ). For global variant see addWeaponCargoGlobal
+ Return camera interest for given entity, as set by setCameraInterest, or as autodetected.
- https://community.bistudio.com/wiki/addWeaponCargo
+ https://community.bistudio.com/wiki/cameraInterest
- Object addWeaponCargo Array
+ cameraInterest Object
- vehicleName addWeaponCargo [weaponName, count]
+ cameraInterest entity
- $Code$_truck addWeaponCargo ["M16",5]$/Code$
+ $Code$camInterest = cameraInterest myUnit;$/Code$
- global / local
+ undefined / undefined
- (October 24, 2009)
- Only works on clients.
-
- (July 10, 2010)
- When players add/remove gear directly via the gear menu that gear is synchronized across the network. Since this command is local only, using it during a mission can cause all sorts of weird issues. To get proper synchronization use this command in the object's init line or in a script called from its init line with a call compile preprocessFile command (and not execVM ).
- Nothing
+ Number
+
- addWeaponGlobal
+ surfaceIsWater
- Add a weapon to a unit. Infantry units can only carry weapons in their respective slots (primary, secondary and handgun), the addWeaponGlobal command will replace the weapon currently in a slot with the added weapon if it shares the same slot.
- To make sure the added weapon is loaded and ready, add the magazine first.
- This command is broken when used on dedicated server
+ Returns whether water is at given position.
- https://community.bistudio.com/wiki/addWeaponGlobal
+ https://community.bistudio.com/wiki/surfaceIsWater
- Object addWeaponGlobal String
+ surfaceIsWater Array
- unit addWeaponGlobal weapon
+ surfaceIsWater position
- $Code${
- _x addMagazineGlobal "Laserbatteries";
- _x addWeaponGlobal "Laserdesignator";
- } forEach allUnits ;$/Code$
+ $Code$_isWater= surfaceIsWater [1000, 3000];$/Code$
- $Code${
- if ( typeOf _x == "O_Heli_Attack_02_black_F") then {
- _x addMagazineGlobal "38Rnd_80mm_rockets";
- _x addWeaponGlobal "rockets_Skyfire";
- };
- } forEach vehicles ;$/Code$
+ $Code$_isWater = surfaceIsWater position player ;$/Code$
- global / global
+ undefined / undefined
- (July 7, 2015)
- If you do not remove weapon first, using this command from dedicated server will duplicate weapon.
+ (4 May, 2012)
+ Does not work with inland water. Works only with sea water.
- Nothing
+ Boolean
+
- addWeaponItem
+ addItem
- Adds a weapon item to the specified weapon. The item can be weapon magazine, in which case the amount of ammo and target muzzle could also be specified.
+ Creates new item and tries to add it into inventory. Inventory must have enough space to accomodate new item or command will fail.The item can also be a weapon or a magazine.
- https://community.bistudio.com/wiki/addWeaponItem
+ https://community.bistudio.com/wiki/addItem
- Object addWeaponItem Array
+ Object addItem String
- unit addWeaponItem [weaponName, itemName]
-
- unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName]]
+ unit addItem item
- $Code$player addWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];$/Code$
-
- $Code$player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]];$/Code$
+ $Code$bluforUnit addItem "NVGoggles";
+ bluforUnit assignItem "NVGoggles";
+ opforUnit addItem "NVGoggles_OPFOR";
+ opforUnit assignItem "NVGoggles_OPFOR";
+ independentUnit addItem "NVGoggles_INDEP";
+ independentUnit assignItem "NVGoggles_INDEP";$/Code$
- local / global
+ global / global
- Nothing
+ Nothing
+
- addWeaponPool
+ setRain
- Add weapons to the weapon pool, of which the player may choose in the following mission. Available in campaigns only.
+ Set rain density smoothly over the given transition time (in seconds). A transition time of zero means an immediate change. A rain density of zero is no rain, one is maximum rain. Rain is not possible when overcast is less than 0.7.
+ NOTE : Since Arma 3 this command is MP synchronised, if executed on server, the changes will propagate globally. If executed on client effect is temporary as it will soon change to the server setting.
- https://community.bistudio.com/wiki/addWeaponPool
+ https://community.bistudio.com/wiki/setRain
- addWeaponPool Array
+ Number setRain Number
- addWeaponPool [weaponName, count]
+ time setRain rain
- $Code$addWeaponPool ["M16",5];$/Code$
+ $Code$60 setRain 1;$/Code$
+
+ $Code$// Force no rain:
+ 0 setRain 0;
+ forceWeatherChange ;
+ 999999 setRain 0;$/Code$
- undefined / undefined
+ undefined / global
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (December 15, 2015)
+ setTimeMultiplier does NOT affect transition time.
+
+ (November 16, 2016)
+ Using Example 2 on dedicated server might need additional interference on JIP clients. The reason is that JIP has rain value 0 slowly changing to 0. To force client to sync one can execute this on client: $Code$ skipTime 1; skipTime -1;$/Code$
- Nothing
+ Nothing
+
- addWeaponTurret
+ list
- Adds a weapon to the turret. Use turret path [-1] for driver's turret.
+ List of units that would activate given Trigger.
+ It returns nothing before the simulation started, i.e. in (undelayed) init.sqf files. Returns a pointer to the trigger's list after the simulation started. Since this is just a reference this means that the value in your local variable will change as the content of the trigger area changes. To permanently copy the returned list to a different variable, use _mylist = +(list triggerOne).
+ The second example can be used inside the trigger (in that case, no need to name your trigger).
+ The list returned for trigger of type "Not present" is the same as that returned for type "present".
+ NOTE: While the command can query any trigger, local or remote, the result will be only for the trigger condition set on the local client. See createTrigger for more info.
- https://community.bistudio.com/wiki/addWeaponTurret
+ https://community.bistudio.com/wiki/list
- Object addWeaponTurret Array
+ list Object
- vehicle addWeaponTurret [weaponName, turretPath]
+ list trigger
- $Code$_tank addWeaponTurret ["LMG_M200",[0,0]];$/Code$
+ $Code$_tlist = list _triggerOne;$/Code$
+
+ $Code$hint format ["%1", thislist ];$/Code$
- local / global
+ global / local
+ (March 6, 2013)
+ Calling list immediately after creating a trigger via createTrigger (and setting up activation, area, statements, timeout, etc..), will return null instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array.
- Nothing
+ Array/Nothing
+
- addWeapon
+ groupFromNetId
- Add a weapon to a unit. The unit must be local to the computer where command is executed. For a global version of this command see addWeaponGlobal.
- Infantry units can only carry a specific number of weapons, once the weapon slots are filled, any further addWeapon commands are ignored.
+ Get group with given unique ID. For objects use objectFromNetId. As this command is MP only, you can use BIS_fnc_groupFromNetId, which extends the use to SP as well.
- https://community.bistudio.com/wiki/addWeapon
+ https://community.bistudio.com/wiki/groupFromNetId
- Object addWeapon String
+ groupFromNetId String
- unit addWeapon weapon
+ groupFromNetId id
- $Code$player addMagazine "30Rnd_556x45_Stanag";
- player addWeapon "BAF_L85A2_RIS_SUSAT";$/Code$
-
- $Code$An_2 addMagazine "100Rnd_762x51_M240";
- An_2 addWeapon "M240_veh";$/Code$
+ $Code$_group = groupFromNetId "4:45";$/Code$
- local / global
+ undefined / undefined
- (August 2, 2006)
- Notes from before the conversion:
- To ensure that the weapon is loaded at the start of the mission, add at least one magazine ( addMagazine ) before adding the weapon. To remove weapons use the removeAllWeapons or the removeWeapon commands.
-
- When adding a weapon in-game, a bug means that sometimes the weapon can't be fired. Swap to a different weapon and swap back again to enable the newly added weapon to fire; or drop and pick up the weapon again.
- Nothing
+ Group
+
- admin
+ WFSideText
- This is dedicated server command, which queries the admin state of any client on the network by their client ( owner ) id. Possible results are:
- 1 - client is admin that is voted in
- 2 - client is admin that is logged in
- In all other cases it returns 0. To self check the admin state of a local client, use BIS_fnc_admin.
+ Returns the un localized text value of an object's side / a group's side or a side as:
+ east, opfor - "East"
+ west, blufor - "West"
+ resistance, independent - "Resistance"
+ civilian - "Civilian"
+ sideUnknown - "Unknown"
+ sideEnemy - "Unknown"
+ sideFriendly - "Unknown"
+ sideLogic - "Unknown"
+ sideEmpty - "Unknown"
+ sideAmbientLife - "Unknown"
- https://community.bistudio.com/wiki/admin
+ https://community.bistudio.com/wiki/WFSideText
- admin Number
+ WFSideText Object/Group/Side
- admin ownerID
+ WFSideText param
- $Code$_isLoggedInAdmin = admin 3 == 2;$/Code$
+ $Code$WFSideText player ;$/Code$
- $Code$_adminState = admin owner unit1;$/Code$
+ $Code$WFSideText group player ;$/Code$
+
+ $Code$WFSideText west$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
+ (August 17, 2014)
+ WF stands for Warfare
- Number
+ String
+
- agent
+ weaponAccessoriesCargo
- Return a person for a given agent.
+ Returns array with all items assigned to the given weapon in given cargo container.
- https://community.bistudio.com/wiki/agent
+ https://community.bistudio.com/wiki/weaponAccessoriesCargo
- agent Team_Member
+ Object weaponAccessoriesCargo Array
- agent teamMember
+ container weaponAccessoriesCargo [weaponId, creatorId]
@@ -3334,596 +3481,660 @@
- Object
+ Array
+
- agents
+ camPrepareDir
- Return a list of agents in the current mission.
+ Prepares the camera heading.
+ This command is non-functional !
- https://community.bistudio.com/wiki/agents
+ https://community.bistudio.com/wiki/camPrepareDir
- agents
+ Object camPrepareDir Number
- agents
+ camera camPrepareDir direction
- $Code${ agent _x moveTo position player } forEach agents ;$/Code$
+ $Code$_camera camPrepareDir 150$/Code$
undefined / undefined
- (April 4, 2012)
- Note that agents returns a reference to the agent itself, not the object. For example: {alive _x} count agents; would return an error. But you can assign the agent a reference using setVariable, and then reference it, for example: {alive (_x getVariable ["agentObject",objNull]) count agents; would return the number of agents still alive - BUT you would need to define "agentObject" after you create the agent, for example:
- _agent = createAgent [_type, _position, [], _radius, "NONE"];_agent setVariable["agentObject",_agent,true];
-
- (August 1, 2013)
- Alternatively, to get object from agent reference use agent command.
- Array
+ Nothing
+
- aimPos
+ diag_activeSQFScripts
- Returns the position of the object other units can aim to.
+ Returns an array with active SQFs.
- https://community.bistudio.com/wiki/aimPos
+ https://community.bistudio.com/wiki/diag_activeSQFScripts
- aimPos Object
+ diag_activeSQFScripts
- aimPos object
+ diag_activeSQFScripts
- $Code$aimPos player$/Code$
+ $Code${ systemChat str _x} forEach diag_activeSQFScripts ;$/Code$
+
+ $Code$[] spawn {
+ hint str diag_activeSQFScripts ; //[[" spawn ","",true,1]]
+ };
+ [] spawn {
+ scriptName "myScript";
+ hint str diag_activeSQFScripts ; //[["myScript","",true,1]]
+ };$/Code$
- global / undefined
+ undefined / undefined
- (July 7, 2015)
- Generally returns the center position of the object (middle of the geometry, not the model's [0,0,0]).
- Array
+ Array
+
- aimedAtTarget
+ lockCameraTo
- Returns how good the weapon of the vehicle is aimed at the target.
+ Lock/Unlock stabilized camera (in vanilla used currently only for UAVs) to target.
- https://community.bistudio.com/wiki/aimedAtTarget
+ https://community.bistudio.com/wiki/lockCameraTo
- Object aimedAtTarget Array
+ Object lockCameraTo Array
- vehicle aimedAtTarget [target, weapon]
+ vehicle lockCameraTo [target, turretPath]
- $Code$_aimingQuality = heli aimedAtTarget [target];$/Code$
-
- $Code$_aimingQuality = heli aimedAtTarget [target,"M197"];$/Code$
+ $Code$uav lockCameraTo [vehicle, [0,0]];$/Code$
undefined / undefined
- (November 19, 2013)
- The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between. 1 doesn't mean you are going to hit the target, while 0 means you're definitely off.
+ (April 10, 2015)
+ The command also accepts a position (ASL) instead of an object. The vehicle has to have a stabilized optic for this command to work.
- Number
+ Nothing
+
- airDensityRTD
+ tvSetValue
- Returns air density in given altitude
+ Sets scalar data to item on given path. IDC means id of parent Tree View. If the given value is not integer, it will be converted to integer
- https://community.bistudio.com/wiki/airDensityRTD
+ https://community.bistudio.com/wiki/tvSetValue
- airDensityRTD Number
+ tvSetValue Array
+
+ Control tvSetValue Array
- airDensityRTD altitude
+ tvSetValue [idc, [path], val]
+
+ _ctrl tvSetValue [ [path], val]
- $Code$_density = airDensityRTD 0;//Returns 1.22406$/Code$
+ $Code$tvSetValue [101, [0], 555];$/Code$
- $Code$_density = airDensityRTD 1000;//Returns 1.11096$/Code$
+ $Code$_ctrl tvSetValue [ [0,0,0], 14];$/Code$
- undefined / undefined
+ local / local
+ (September 11, 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Number
+ Nothing - Nothing
+
- airplaneThrottle
+ setLightIntensity
- Returns throttle position. Works only on player's vehicle.
+ Sets intensity of light.
- https://community.bistudio.com/wiki/airplaneThrottle
+ https://community.bistudio.com/wiki/setLightIntensity
- airplaneThrottle Object
+ Object setLightIntensity Number
- airplaneThrottle airplane
+ light setLightIntensity value
- $Code$_trottle = airplaneThrottle myPlane$/Code$
+ $Code$myLight setLightIntensity 4;$/Code$
- undefined / undefined
+ local / local
+ (Mar 24, 2014)
+ In ArmA3 ver1.14 setLightIntensity will overwrite the previous effect processed by setLightBrightness on the same light source, vice versa. And both of them currently play the same role on brightness, for example: $Code$_light setLightIntensity 3000;// same as _light setLightBrightness 1;$/Code$
- Number
+ Nothing
+
- airportSide
+ weaponAccessories
- Checks a side of the airport. ID is the number to identify which airport on the island you want to check.
- Possible values for sara are:
- 0 - Paraiso
- 1 - Rahmadi
- 2 - Pita
- 3 - Antigua
+ Get array with all items linked to a given weapon.
- https://community.bistudio.com/wiki/airportSide
+ https://community.bistudio.com/wiki/weaponAccessories
- airportSide Number
-
- airportSide Object
+ Object weaponAccessories String
- airportSide id
-
- airportSide target
+ unit weaponAccessories weapon
- $Code$airportSide 0;$/Code$
+ $Code$player weaponAccessories primaryWeapon player ; ["","acc_pointer_IR","optic_Aco",""]$/Code$
undefined / undefined
+ (October 26, 2014)
+ To check if currently selected muzzle has a silencer:
+ $Code$hasSilencer = player weaponAccessories currentMuzzle player param [0, ""] != "";$/Code$
+
+ (March 16, 2015)
+ Since revision 129742, this command also returns an attached bipod.
- Side - Side
+ Array
+
- alive
+ musicVolume
- Check if given vehicle/person/building is alive (i.e. not dead or destroyed). alive objNull returns false.
+ Checks the current music volume (set by fadeMusic )
- https://community.bistudio.com/wiki/alive
+ https://community.bistudio.com/wiki/musicVolume
- alive Object
+ musicVolume
- alive object
+ musicVolume
- $Code$// SQS:
- ?!( alive player ) : exit$/Code$
-
- $Code$// SQF:
- if (! alive player ) exitWith {};$/Code$
-
+
- global / undefined
+ undefined / undefined
- (October 19, 2015)
- Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, (alive player) will return false, then almost immediately true if the "revive" respawn template is enabled, then could turn on false if time for assistance is elapsed or if the player activates the respawn menu before; and finally true after player respawns. Just be aware that in that case (respawn + revive enabled), the status of the player is toggling: true false true false true. Then, alive status while player is waiting for being rescued could lead to some error scripts as player is supposed to be alive but in limbo and the dead entity "player" passed to server.
- Boolean
+ Number
+
- all3DENEntities
+ createLocation
- Returns an array of all currently placed Eden Editor entities, including groups, waypoints, and markers in following format:
- [objects, groups, triggers, systems, waypoints, markers, layers, comments]
- objects: Array of Objects
- groups: Array of Groups
- triggers: Array of Objects
- systems: Array of Objects
- waypoints: Array of Arrays in Waypoint format
- markers: Array of Strings
- layers: Array of Numbers
- comments: Array of Numbers
+ Creates a location of the specified class and dimensions at the specified position. Classes are defined in CfgLocationTypes.
- https://community.bistudio.com/wiki/all3DENEntities
+ https://community.bistudio.com/wiki/createLocation
- all3DENEntities
+ createLocation Array
- all3DENEntities
+ createLocation [className, position, sizeX, sizeY]
- $Code$systemChat str all3DENEntities ;$/Code$
+ $Code$_location = createLocation [ "NameVillage", [4035,2151,10], 100, 100];$/Code$
+
+ $Code$_location = createLocation [ "NameVillage", [4035,2151,10], 30, 30];
+ _location setText "Player town";$/Code$
- undefined / undefined
+ undefined / local
+ (12:25, 12 February 2010)
+ Possible location types, see: Location Types
+ For the actual name text of the location, use setText.
- Array
+ Location
+
- allAirports
+ getDLCs
- Returns all map airports, both static and dynamic
+ Returns array of appIDs of DLCs. Use filter param to get specific type of DLCs:
+ 0 - all
+ 1 - owned
+ 2 - not owned
- https://community.bistudio.com/wiki/allAirports
+ https://community.bistudio.com/wiki/getDLCs
- allAirports
+ getDLCs Number
- allAirports
+ getDLCs filter
- $Code$_allAirports = allAirports ;$/Code$
+ $Code$_ownedDLCs = getDLCs 1;$/Code$
+
+ $Code$// Is the Karts DLC owned by this client?
+ hintSilent str (288520 in ( getDLCs 1));$/Code$
undefined / undefined
+ (May 30, 2014)
+ Current list of IDs that correspond to the available DLCs:
+ 275700 - Arma 3 Zeus
+ 249860 - Arma 3 Soundtrack
+ 304400 - Arma 3 DLC Bundle
+ 249861 - Arma 3 Maps
+ 249862 - Arma 3 Tactical Guide
+ 288520 - Arma 3 Karts
+ 304380 - Arma 3 Helicopters
+ 332350 - Arma 3 Marksmen
+
+ (April 7, 2015)
+ To add to the note above, app ID can be found in CfgMods. Here is an example path from zeus using the Splendid Config Viewer:
+ $Code$ configFile "CfgMods" "Curator" "appId"$/Code$
+ This method can be used to find app IDs without having to find a list like the one above.
+ I am also pretty sure you are able to define your own app ID for your own mods using this method.
+
+ (July 1, 2016)
+ The required DLC-IDs equal to the Steam App-IDs of each obtainable DLC.
+ To extend Sniperwolfs list:
+ 395180 - Arma 3 Apex
+
+ (October 30, 2017)
+ More dlc
+ Arma 3 Laws of War 571710
+ Arma 3 Jets 601670
- Array
+ Array
+
- allControls
+ ctSetValue
- Returns a list of all controls for desired existing display. Returned controls also include controls from control groups
+ Associates metadata (number) with the row determined by the index. Returns Nothing.
- https://community.bistudio.com/wiki/allControls
+ https://community.bistudio.com/wiki/ctSetValue
- allControls Display
+ Control ctSetValue Number
- allControls display
+ Control ctSetValue Number
- $Code$_allCtrls = allControls findDisplay 46;$/Code$
+ $Code$_control ctSetValue 0;$/Code$
- undefined / undefined
+ local / local
- Array
+ Nothing
+
- allCurators
+ lnbGetColumnsPosition
- Returns list of all curators.
+ Returns relative screen X of ListNBox control columns position [0.1,0.3,0.6...]. Use lnbSetColumnsPos to set positions.
- https://community.bistudio.com/wiki/allCurators
+ https://community.bistudio.com/wiki/lnbGetColumnsPosition
- allCurators
+ lnbGetColumnsPosition Control
- allCurators
+ lnbGetColumnsPosition _ctrl
- $Code$_myVariable = allCurators;$/Code$
+ $Code$lnbGetColumnsPosition _ctrl;$/Code$
- undefined / undefined
+ local / local
- (June 20, 2015)
- This returns all curator logic units, not the units assigned to the logic.
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Array
+ Array
+
- allCutLayers
+ removeAllMPEventHandlers
- Returns all named layers used by cutRsc, cutText, cutObj or cutFadeOut. The layer normally would be added on the first use of any of the aforementioned commands, however if a layer needs to be reserved it could be done like so: _layerNum = "myLayerName" cutFadeOut 0;. The index of the layer name in the array corresponds to the layer number the cut effect will be displayed on. If no layers were defined, the return is [""], because 0 layer is reserved for usage in cut commands without layer param or when name of the layer given is empty "".
+ Removes all MP event handlers of the given type which were added by addMPEventHandler. Command needs to be executed only on one PC for MP event handler to be removed globally.
- https://community.bistudio.com/wiki/allCutLayers
+ https://community.bistudio.com/wiki/removeAllMPEventHandlers
- allCutLayers
+ Object removeAllMPEventHandlers String
- allCutLayers
+ objectName removeAllMPEventHandlers event
- $Code$_allLayers = allCutLayers ;$/Code$
+ $Code$player removeAllMPEventHandlers "mpkilled";$/Code$
- undefined / undefined
+ global / global
- Array
+ Nothing
+
- allDeadMen
+ addMagazineCargo
- Return a list of dead units including agents. Dead unit might be inside vehicle.
+ Add magazines to the cargo space of vehicles, which can be taken out by infantry units. Once the magazine cargo space is filled up, any further addMagazineCargo commands are ignored.
+ In Arma 3, arguments for this command must be local ( ). For global variant see addMagazineCargoGlobal
- https://community.bistudio.com/wiki/allDeadMen
+ https://community.bistudio.com/wiki/addMagazineCargo
- allDeadMen
+ Object addMagazineCargo Array
- allDeadMen
+ vehicleName addMagazineCargo [magazineName, count]
- $Code${ deleteVehicle _x } forEach allDeadMen;$/Code$
+ $Code$_truck addMagazineCargo ["M16", 5];$/Code$
- undefined / undefined
+ global / local
- (17 Oct, 2009)
- As dead men are civilian side, don't try to count them with {side _x isEqualTo EAST} count allDeadMen; result will always be 0.
- Use the configfile "side" instead:
- 0 = [] spawn {while {true} do {sleep 0.1; _westScore = {getNumber (configfile "CfgVehicles" typeOf _x "side") == 0} count allDeadMen; hintSilent format ["East killed: %1",_westScore]};};
+ (October 24, 2009)
+ Only works on clients.
- Array
+ Nothing
+
- allDead
+ ctFindRowHeader
- Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.
+ Takes index of a row as a parameter. Returns index of the closest header above this row.
- https://community.bistudio.com/wiki/allDead
+ https://community.bistudio.com/wiki/ctFindRowHeader
- allDead
+ Control ctFindRowHeader Number
- allDead
+ ctrl ctFindRowHeader row
- $Code${ deleteVehicle _x } forEach allDead ;$/Code$
-
- $Code$// allAlive:
- _all = allUnits + vehicles ;
- {
- _all pushBack agent _x;
- } forEach ( agents - [ teamMemberNull ]);
- allAlive = _all - allDead ;$/Code$
+ $Code$_index = _control ctFindRowHeader 0;$/Code$
- undefined / undefined
+ local / local
- (April 6, 2017)
- This also returns bodies hidden with hideBody until they are deleted. Tested in A2OA 1.63.131129
- Array
+ Number
+
- allDisplays
+ curatorRegisteredObjects
- Returns a list of all opened GUI displays. Other displays, such as IGUI displays could be accessed via uiNamespace variable, which is updated every time display is opened or closed. For example, to access IGUI displays:
- $Code$ uiNamespace getVariable ["IGUI_displays", []];$/Code$. Other display variables:
- 3DENDisplays_displays
- 3DENDisplaysTemp_displays
- GUI_displays
- IGUI_displays
- Loading_displays
- CuratorDisplays_displays
- BootcampDisplays_displays
- CuratorTitles_displays
- BootcampTitles_displays
- KartDisplays_displays
+ Returns array with all objects that has curator registered and their settings.
- https://community.bistudio.com/wiki/allDisplays
+ https://community.bistudio.com/wiki/curatorRegisteredObjects
- allDisplays
+ curatorRegisteredObjects Object
- allDisplays
+ curatorRegisteredObjects curatorObj
- $Code$_allDisps = allDisplays ;$/Code$
-
+
undefined / undefined
- Array
+ Array
+
- allGroups
+ addCuratorAddons
- Return a list of all groups created on the following sides east, west, resistance / independent and civilian only. Does not contain groups of sideLogic.
+ Allow curator use of given addon.
- https://community.bistudio.com/wiki/allGroups
+ https://community.bistudio.com/wiki/addCuratorAddons
- allGroups
+ Object addCuratorAddons Array
- allGroups
+ curatorObj addCuratorAddons addons
- $Code${( leader _x) sideChat "Go ! Go ! Go !"} forEach allGroups ;$/Code$
+ $Code$curatorObj addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"];$/Code$
- $Code$// All groups with players:
- private _allGroupsWithPlayers = [];
- {_allGroupsWithPlayers pushBackUnique group _x} forEach allPlayers ;$/Code$
+ $Code$curatorObj addCuratorAddons ["A3_Modules_F_Curator_Lightning"];$/Code$
+
+ $Code$// Addons can be stacked:
+ curatorObj addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"];
+ curatorObj addCuratorAddons ["A3_Modules_F_Curator_Lightning"];
+ diag_log curatorAddons curatorObj;[
+ "A3_Armor_F_AMV",
+ "A3_Armor_F_Panther",
+ "A3_Modules_F_Curator_Lightning"
+ ]$/Code$
undefined / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
- Array
+ Nothing
+
- allMapMarkers
+ menuSetData
- Return all markers in map including user placed markers (_USER_DEFINED #).
- Since Arma 3 v1.57.134377 User defined markers have the following name format: _USER_DEFINED # PlayerID / MarkerID / ChannelID where:
- PlayerID - unique network id of the player (same as _id in onPlayerConnected )
- MarkerID - a marker counter id
- ChannelID - id of the chat channel on which marker was placed (see currentChannel )
+ Sets new data into item on given path.
- https://community.bistudio.com/wiki/allMapMarkers
+ https://community.bistudio.com/wiki/menuSetData
- allMapMarkers
+ menuSetData Array
- allMapMarkers
+ menuSetData [idc, path, data]
- $Code$_markers = allMapMarkers ;
- // returns: ["marker1","_USER_DEFINED #2/0"]$/Code$
-
- $Code${
- private "_a";
- _a = toArray _x;
- _a resize 15;
- if ( toString _a == "_USER_DEFINED #") then {
- deleteMarker _x;
- }
- } forEach allMapMarkers ;$/Code$
-
- $Code$if (_someString in allMapMarkers ) then {
- hint (_someString + " is a valid marker name");
- };$/Code$
-
+
undefined / undefined
- (March 17, 2014)
- A3 1.12 : Markers placed in editor will be in the array as a string of their name. Markers placed by the player will begin with "_USER_DEFINED #."
-
- (March 17, 2014)
- To expand on the comment above. In Multiplayer, user created marker will appear in allMapMarkers as _USER_DEFINED #ID/Number, where ID is unique id related to _id param from onPlayerConnected and Number is sequential integer incremented by 1 with each marker placement by the IDed user.
- Array
+ Nothing
+
- allMines
+ getShotParents
- Returns an array of all mines in the mission
+ Returns shot information Array for the given projectile in format [vehicle, instigator], where vehicle is the vehicle the shot was fired from, and the instigator is the person who pulled the trigger. If shot was fired by a soldier on foot or in FFV position in vehicle, the soldier is returned for the vehicle.
- https://community.bistudio.com/wiki/allMines
+ https://community.bistudio.com/wiki/getShotParents
- allMines
+ getShotParents Object
- allMines
+ getShotParents projectile
- $Code$allMines$/Code$
+ $Code$_shotParents = getShotParents myProjectile;$/Code$
- $Code$( allMines select 0) mineDetectedBy west ;$/Code$
+ $Code$tank addEventHandler ["Fired", { systemChat str getShotParents (_this select 6)}];$/Code$
undefined / undefined
@@ -3931,393 +4142,364 @@
- Array
+ Array
+
- allMissionObjects
+ camCommitPrepared
- Returns all mission objects (created by or during a mission) with given type (or its subtype). In some cases allMissionObjects could be substituted with entities, which would be much much faster alternative. Some of the unusual mission objects that can be detected with this command (as well as with nearestObject ):
- "#slop" - blood drop
- "#mark" - unit footprints
- "#track" - vehicle tracks
- "#crater" - explosion crater on the ground
- "#crateronvehicle" - bullet marks on vehicle
- "#explosion" - an explosion
- "#objectdestructed" - building, tree or bush destruction
- "#soundonvehicle" - sound created with say3D for example
- "#dynamicsound" - sound source created using createSoundSource
+ Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately.
- https://community.bistudio.com/wiki/allMissionObjects
+ https://community.bistudio.com/wiki/camCommitPrepared
- allMissionObjects String
+ Object camCommitPrepared Number
- allMissionObjects type
+ camera camCommitPrepared time
- $Code$_airObjects = allMissionObjects "Air";$/Code$
-
- $Code${ deleteVehicle _x } forEach ( allMissionObjects "");$/Code$
-
- $Code$_allMObjects = allMissionObjects "All";$/Code$
+ $Code$//create a camera object
+ _cam = "camera" camCreate [5600,4800,10];
+ _cam camPrepareTarget player ;
+ _cam cameraEffect ["internal", "BACK"];
+ _cam camCommitPrepared 0;
+ //smoothly move the camera to its new position in 6 seconds.
+ _cam camPreparePos [5680,4720,20];
+ _cam camCommitPrepared 6;
+ waitUntil { camCommitted _cam};
+ //proceed$/Code$
- undefined / undefined
+ local / local
- (June 22, 2012)
- Be VERY careful with the use of this command. It is very demanding as it must iterate through all mission created objects. Particular care should be taken exercising this often on dedicated servers.
-
- (Decembere 15, 2013)
- For some reason in Arma 3 this command is up to 5 times faster on the dedicated server than on a connected client. In my experiments it took on average 5 ms for the command to complete on a client while under 1 ms on the server.
- Array
+ Nothing
+
- allPlayers
+ simulCloudOcclusion
- Returns a list of all human players including dead players. The command also returns all connected headless clients. To filter headless clients out:
- $Code$_justPlayers = allPlayers - entities "HeadlessClient_F";$/Code$
- NOTES:
- In player hosted game, the complete array of allPlayers may get delayed at the start. Use BIS_fnc_listPlayers if you need it earlier
- The order of players in the return array may differ from server to clients
+ Returns clouds occlusion between two given points (0 - no clouds, 1 - full clouds).
- https://community.bistudio.com/wiki/allPlayers
+ https://community.bistudio.com/wiki/simulCloudOcclusion
- allPlayers
+ simulCloudOcclusion Array
- allPlayers
+ simulCloudOcclusion [pos1,pos2]
- $Code${
- systemChat format [
- "Player %1 is %2",
- name _x,
- ["dead", "alive"] select alive _x
- ];
- } forEach allPlayers ;$/Code$
-
- $Code$_bluNums = west countSide allPlayers ;$/Code$
-
- $Code$// Find all human players if headless clients are used:
- _allHCs = entities "HeadlessClient_F";
- _allHPs = allPlayers - _allHCs;$/Code$
+ $Code$canSeeSun = ( simulCloudOcclusion == 0)$/Code$
undefined / undefined
+ (8 August, 2014)
+ The simulCloudOcclusion command is not recognized on dedicated servers, and will produce an error. If you use this command, it cannot be anywhere within a script that is run on the dedicated server, or the entire script will halt. To get around this, you can use: $Code$if ! isDedicated then {[] execVM "simulCloudOcclusionScript.sqf"};$/Code$
- Array
+ Number
+
- allSimpleObjects
+ getCameraViewDirection
- Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name. NOTE : There is no inheritance in simple objects, so only exact class match is allowed. className is not case sensitive.
+ Returns the direction unit is looking in render time scope. While for AI the origin for the view direction vector can be taken from eyePos unit, for human player the origin should be taken from player camera position positionCameraToWorld [0,0,0]
- https://community.bistudio.com/wiki/allSimpleObjects
+ https://community.bistudio.com/wiki/getCameraViewDirection
- allSimpleObjects Array
+ getCameraViewDirection Object
- allSimpleObjects [className1, className2,classNameN]
+ getCameraViewDirection unit
- $Code$allSimpleObjects ["Box_NATO_Equip_F", "Land_CampingChair_V2_F"];$/Code$
-
- $Code$_allSimpleObjects = allSimpleObjects [];$/Code$
+ $Code$// Draw AI eye direction (green), weapon direction (red) and camera direction (blue) in 3D:
+ bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"];
+ bob setVehiclePosition [ player modelToWorld [0,100,0], [], 0, "NONE"];
+ onEachFrame
+ {
+ _beg = ASLToAGL eyePos bob;
+ _endE = (_beg vectorAdd ( eyeDirection bob vectorMultiply 100));
+ drawLine3D [ _beg, _endE, [0,1,0,1]];
+ _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100));
+ drawLine3D [_beg, _endW, [1,0,0,1]];
+ _endV = (_beg vectorAdd ( getCameraViewDirection bob vectorMultiply 100));
+ drawLine3D [_beg, _endV, [0,0,1,1]];
+ };$/Code$
- undefined / undefined
+ global / undefined
- Array
+ Array
+
- allSites
+ getMass
- Return all sites in map.
- This command is considered deprecated and is no longer supported
+ Returns mass of a PhysX object.
- https://community.bistudio.com/wiki/allSites
+ https://community.bistudio.com/wiki/getMass
- allSites
+ getMass Object
- allSites
+ getMass object
- $Code$_allSites = allSites ;$/Code$
+ $Code$_mass = getMass _myCar$/Code$
- undefined / undefined
+ global / undefined
+ (April 15, 2015)
+ This function will return 0 for infantry AI units. That means a manned Blufor Hunter has the same mass than an empty one (8306.63).
+ Crates return their initial mass, but if you empty them or load items, magazines and weapons, the mass remains the same. In fact, none of these (non-physx) objects has a mass.
- Array
+ Number
+
- allTurrets
+ endLoadingScreen
- Returns array of available turret paths from vehicle object. To look up turrets from config, use BIS_fnc_allTurrets
+ Finishes loading screen started by startLoadingScreen.
- https://community.bistudio.com/wiki/allTurrets
+ https://community.bistudio.com/wiki/endLoadingScreen
- allTurrets Object
-
- allTurrets Array
+ endLoadingScreen
- allTurrets vehicle
-
- allTurrets [vehicle, personTurrets]
+ endLoadingScreen
- $Code$_turretPaths = allTurrets SlammerUP; //[[0],[0,0]]
- _turretPaths = allTurrets [SlammerUP, true ]; //[[0],[0,0]] - Commander turret is also FFV turret
- _turretPaths = allTurrets [SlammerUP, false ]; //[[0]]$/Code$
-
- $Code$// Return FFV turrets only:
- _FFVTurrets = allTurrets [tank, true ] - allTurrets [tank, false ];$/Code$
+ $Code$startLoadingScreen ["Loading My Mission"];
+ //Batch of code
+ //Batch of code
+ //Batch of code
+ progressLoadingScreen 0.5;
+ //Batch of code
+ //Batch of code
+ //Batch of code
+ endLoadingScreen ;$/Code$
undefined / undefined
- (April 13, 2016)
- The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.
- Also, the driver turret [-1] is never included in the results, which can be solved as follows:
- $Code$_paths = [[-1]] + allTurrets _vehicle;$/Code$
- Array - Array
+ Nothing
+
- allUnitsUAV
+ ctRowCount
- Return a list of all UAV vehicles.
+ Returns number of rows (headers not included) in the RscControlsTable.
- https://community.bistudio.com/wiki/allUnitsUAV
+ https://community.bistudio.com/wiki/ctRowCount
- allUnitsUAV
+ ctRowCount Control
- allUnitsUAV
+ ctRowCount Control
- $Code$hint format ["No. of UAV(s) on the map: %1", count allUnitsUAV ];$/Code$
-
- $Code${_x setDamage 1} forEach allUnitsUAV ;$/Code$
+ $Code$ctRowCount _control;$/Code$
- undefined / undefined
+ local / local
- (October 10, 2014)
- This command returns a list of all unmanned vehicles, not the UAV AI units inside them, as the name might otherwise suggest.
- Array
+ Number
+
- allUnits
+ ctrlDelete
- Return a list of all units (all persons except agents) created on the following sides east, west, resistance / independent and civilian only. Does not contain units of sideLogic. Dead units and units awaiting for respawn are also excluded.
+ Deletes given control.
+ Returns whether the deletion was successful.
- https://community.bistudio.com/wiki/allUnits
+ https://community.bistudio.com/wiki/ctrlDelete
- allUnits
+ ctrlDelete Control
- allUnits
+ ctrlDelete control
- $Code${_x setDamage 0.5; _x groupChat "Braaains"} forEach allUnits ;$/Code$
+ $Code$ctrlDelete (( findDisplay 20000) displayCtrl 20001);$/Code$
undefined / undefined
- (July 15, 2011)
- It returns infantry outside and inside vehicles.
+ (April 18, 2015)
+ ctrlDelete can only delete controls created with ctrlCreate. Use ctrlShow false and ctrlEnable false to disable existing controls.
- Array
+ Boolean
+
- allVariables
+ globalRadio
- Returns a list of all variables from desired namespace. Namespaces supported:
- Control
- Team_Member
- Namespace
- Object
- Group
- Task
- Location
+ Sends the audio message to the global radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+ Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
- https://community.bistudio.com/wiki/allVariables
+ https://community.bistudio.com/wiki/globalRadio
- allVariables Control/Team_Member
+ Object globalRadio String
- allVariables namespace
+ unit globalRadio radioName
- $Code$_allVarsUINamespace = allVariables uiNamespace ;$/Code$
+ $Code$_soldierOne globalRadio "messageOne";$/Code$
- $Code$_allVarsTrigger = allVariables trigger1;$/Code$
+ $Code$player globalRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
- undefined / undefined
+ global / local
- (June 11, 2016)
- Using profileNamespace and uiNamespace with this command has been disabled in multiplayer. [1]
-
- (October 1, 2016)
- One still can use allVariables in Multiplayer against profileNamespace and uiNamespace using config parser. In Description.ext
- $Code$_EXEC(somevar = allVariables profileNamespace)$/Code$
- in code
- $Code$_allprofilevars = parsingNamespace getVariable "somevar"$/Code$
- but list will be valid only at the moment of parsing config.
+ (December 3, 2016)
+ To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
+ $Code$ player globalRadio "#MySound.ogg";$/Code$
- Array
+ Nothing
+
- allow3DMode
+ checkAIFeature
- Allow/dissallow 3D mode.,
- i
- Some Old Editor Command
+ Check if given AI feature is currently enabled. Feature may be one of:
+ "AwareFormationSoft", "CombatFormationSoft".
- https://community.bistudio.com/wiki/allow3DMode
+ https://community.bistudio.com/wiki/checkAIFeature
- Control allow3DMode Boolean
+ checkAIFeature String
- map allow3DMode bool
+ checkAIFeature feature
-
+ $Code$_featureUsed = checkAIFeature "AwareFormationSoft"$/Code$
+
undefined / undefined
- Nothing
+ Boolean
+
- allowCrewInImmobile
+ isSimpleObject
- If true, units can be in a vehicle with broken tracks/wheels.
+ Returns true if given object is simple object
- https://community.bistudio.com/wiki/allowCrewInImmobile
+ https://community.bistudio.com/wiki/isSimpleObject
- Object allowCrewInImmobile Boolean
+ isSimpleObject Object
- vehicle allowCrewInImmobile bool
+ isSimpleObject object
- $Code$_vehicle allowCrewInImmobile true ;$/Code$
+ $Code$_isSimple = isSimpleObject _obj1;$/Code$
undefined / undefined
- (April 27, 2015)
- This will stop AI disembarking when immobile
- $Code$KK_fnc_allowCrewInImmobile = {
- _this allowCrewInImmobile true;
- {
- _x disableAI "FSM";
- _x setBehaviour "CARELESS";
- } forEach crew _this;
- };
- //example
- car call KK_fnc_allowCrewInImmobile;$/Code$
- Nothing
+ Boolean
+
- allowCuratorLogicIgnoreAreas
+ kbAddDatabase
- Allows curator placing and working with modules outside of edit areas.
+ Register knowledge base database to given person. See Conversations for more details.
+ This function is no longer available in ArmA 2.
+ This function is no longer available in Arma 3.
- https://community.bistudio.com/wiki/allowCuratorLogicIgnoreAreas
+ https://community.bistudio.com/wiki/kbAddDatabase
- Object allowCuratorLogicIgnoreAreas Boolean
+ Object kbAddDatabase String
- curatorObj allowCuratorLogicIgnoreAreas allow
+ person kbAddDatabase fileName
- $Code$curatorModule allowCuratorLogicIgnoreAreas true$/Code$
+ $Code$_hasBeenAdded = _unit kbAddDatabase "chat.txt"$/Code$
undefined / undefined
@@ -4325,681 +4507,714 @@
- Nothing
+ Boolean
+
- allowDamage
+ primaryWeaponMagazine
- Allow or prevent an object being damaged (or injured, or killed). The command does not prevent object from taking scripted damage such as setHit, setHitIndex, setHitPointDamage or setDamage. To check if damage is allowed at current locality, see isDamageAllowed.
- !
- This command has to be executed where object is local and as long as object does not change locality the effect of this command will be global. If object changes locality, the command needs to be executed again on the new owner 's machine to maintain the effect
+ Returns array containing class name of currently loaded primary weapon magazine (or magazine s in case of weapon having grenade launcher), otherwise it returns []. This command is used for infantry weapons only.
- https://community.bistudio.com/wiki/allowDamage
+ https://community.bistudio.com/wiki/primaryWeaponMagazine
- Object allowDamage Boolean
+ primaryWeaponMagazine Object
- object allowDamage allow
+ primaryWeaponMagazine unit
- $Code$player allowDamage false ;$/Code$
+ $Code$hint primaryWeaponMagazine player ; //["30Rnd_65x39_caseless_mag"]$/Code$
+
+ $Code$_array = primaryWeaponMagazine player ;
+ if ( count _array 0) then {
+ hint ("Primary weapon is loaded with " + (_array select 0) + "!");
+ } else {
+ if ( primaryWeapon player != "") then {
+ hint "Primary weapon is not loaded!";
+ } else {
+ hint "Player doesn't have a primary weapon!";
+ };
+ };$/Code$
- local / global
+ undefined / undefined
- (September 2, 2013)
- $Code$_object allowDamage false$/Code$
- has the same effect as
- $Code$_object addEventHandler ["HandleDamage", {0}]$/Code$
- (except for buildings that are native to the map; for those, the effects of HandleDamage will not sync properly across all clients, even if added to the building on every client and the server)
+ (June 8, 2014)
+ This function returns an array like ["type of magazine loaded in primary weapon", "type of grenade loaded in launcher if exist"]
+ For example ["30Rnd_556x45_Stanag", "1Rnd_HE_Grenade_shell"], with no consideration about amount of these ammo.
+ However, be careful if you intend to use it in expression like : (magazines _unit) - (primaryWeaponMagazine _unit), i.e. magazines "minus" this array,
+ The result will inventory all magazines (with grenades, chemlights...) except ALL magazines (and grenades eventually) belonging to the TYPE of the loaded one! i.e. you suppress ALL "30Rnd_556x45_Stanag" but the "30Rnd_556x45_Stanag_Tracer_Green" are still remaining.
+ If you kill the unit, the same expression will return a consistent inventory as primary weapon "disappears" and primaryWeaponMagazine is empty. "30Rnd_556x45_Stanag" are back!
- Nothing
+ Array
+
- allowDammage
+ waypointDescription
- Allow or prevent an object being damaged (or injured, or killed). Alias of allowDamage.
- The command does not prevent object from taking scripted damage such as setDamage or setHit.
- !
- Command has to be executed where object is local and as long as object does not change locality the effect of this command will be global.
- If object changes locality, the command needs to be executed again on the new owner 's machine to maintain the effect.
+ Gets the waypoint description.
- https://community.bistudio.com/wiki/allowDammage
+ https://community.bistudio.com/wiki/waypointDescription
- Object allowDammage Boolean
+ waypointDescription Array
- object allowDammage allow
+ waypointDescription waypoint
- $Code$player allowDammage false ;$/Code$
+ $Code$waypointDescription [groupOne,1]$/Code$
undefined / undefined
- (October 24, 2014)
- This command is still working in A3 1.32.127785, at least in single player. I didn't test multiplayer.
- Nothing
+ String
+
- allowFileOperations
+ setParticleFire
- Allow/dissallow file ops (load/save etc).
- i
- Some Old Editor Command
+ Set fire parameters to particle effect.
+ Note: You need to create emitter at first. Basic parameters of particle effect must be defined too. You can use script commands setParticleClass or setParticleParams to do so (see example). Correspondence between CfgCloudlets class param names and command array of params:
+ $Code$particleSource setParticleFire
+ [
+ coreIntensity,
+ coreDistance,
+ damageTime
+ ];$/Code$
- https://community.bistudio.com/wiki/allowFileOperations
+ https://community.bistudio.com/wiki/setParticleFire
- Control allowFileOperations Boolean
+ Object setParticleFire Array
- map allowFileOperations bool
+ source setParticleFire [coreIntensity, coreDistance, damageTime]
-
+ $Code$_emitter = "#particlesource" createVehicleLocal ( getPos player );
+ _emitter setParticleClass "MediumSmoke";
+ _emitter setParticleFire [0.3,1.0,0.1];$/Code$
+
undefined / undefined
- Nothing
+ Nothing
+
- allowFleeing
+ registerTask
- Sets the cowardice level (the lack of courage or bravery) of a group or unit.
- The more cowardice a Group or Object has, the sooner it will start fleeing.
- 0 means maximum courage, while 1 means always fleeing.
+ Register a new task type. Parameters are defined in the given config class (subclass of CfgTasks).
- https://community.bistudio.com/wiki/allowFleeing
+ https://community.bistudio.com/wiki/registerTask
- Object/Group allowFleeing Number
+ Team_Member registerTask String
- name allowFleeing cowardice
+ teamMember registerTask entryName
- $Code$_group1 allowFleeing 0;$/Code$
-
+
- local / global
+ undefined / undefined
- Nothing
+ Boolean
+
- allowGetIn
+ commandFire
- Set if the units given in the list are allowed to enter vehicles.
+ Order the given unit to fire on the given target (via the radio).
+ If the target is objNull, the unit is ordered to fire on its current target (set with doTarget or commandTarget ).
- https://community.bistudio.com/wiki/allowGetIn
+ https://community.bistudio.com/wiki/commandFire
- Array allowGetIn Boolean
+ Object/Array commandFire Object
- unitArray allowGetIn allow
+ unitName commandFire target
- $Code$[_soldier1, _soldier2] allowGetIn true ;$/Code$
+ $Code$_ESoldier1 commandFire _WSoldier1$/Code$
- global / global
+ local / local
- (8 May, 2014)
- (ArmA3 ver 1.18), here's a quick reference to unit's embarkation and disembarkation.
- Command
- Remote Control
- Behavior
- Role Unassigning
- orderGetIn
- false
- orderGetIn won't take effect on player controlled AI units, and which needs to be used together with assaignAs command family. Generally speaking, orderGetIn is a Role Excuator.
- When orderGetIn was disabled it won't automatically unassign unit's vehicle role but will force the unit get out of the vehicle and stop him re-entering until it was enabled again. orderGetIn false won't stop a unit when he is embarking a vehicle in the half way but unassignVehicle will do. orderGetIn false will wait to fire until the unit enter a vehicle.
- allowGetIn
- false
- allowGetIn won't take effect on player controlled AI units. Different from orderGetIn, this command is a Role Holder, it can control the unit's movement in the half way set by orderGetIn but not by setWaypointType, unit will be forced to get out from a vehicle by allowGetIn false and won't automatically re-enter the vehicle until allowGetIn true
- allowGetIn won't do anything with unit's vehicle role
- doGetOut
- true
- Works on player controlled ai silently, unit will automatically get back to the vehicle after disembarkation. (Unit won't get out until vehicle is stopped or landed)
- false
- commandGetOut
- true
- Same as doGetOut with radio message. (Unit won't get out until vehicle is stopped or landed)
- false
- leaveVehicle
- false
- leaveVehicle can't force a player controlled AI disembark
- true
- action ["GetOut",_veh]
- true
- Eject immediately without parachute
- false
- action ["Eject",_veh]
- true
- Eject immediately with parachute if needed
- false
- setWaypointType "GETIN"
- false
- Waypoint won't be affected by orderGetIn false or allowGetIn false until the unit is on the vehicle.
- N/A
- Nothing
+ Nothing
+
- allowSprint
+ createMarkerLocal
- Force player to run/jog if set to false.
+ Creates a local marker at the given position. Marker exists only on PC that created it. The marker name has to be unique.
+ NOTE: Local markers have own set of local commands "XXXXLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker.
- https://community.bistudio.com/wiki/allowSprint
+ https://community.bistudio.com/wiki/createMarkerLocal
- Object allowSprint Boolean
+ createMarkerLocal Array
- unit allowSprint state
+ createMarkerLocal [name, position]
- $Code$player allowSprint false$/Code$
+ $Code$_marker = createMarkerLocal ["Marker1", position player ];$/Code$
- undefined / undefined
+ undefined / local
+ To create a marker which is visible on the map you need to define at least the following three settings:
+ $Code$_markerstr = createMarkerLocal ["markername",[_Xpos,_Ypos]];
+ _markerstr setMarkerShapeLocal "ICON";
+ _markerstr setMarkerTypeLocal "DOT";$/Code$
- Nothing
+ String
+
- ammoOnPylon
+ with
- Returns ammo count on given pylon.
- Returns false ( Bool ) on failure.
+ Creates a With Type that is used inside a do construct in order to execute code inside a given namespace.
+ when used in a do-construct in scripts with allowed suspension, an unexpected namespace switch could happen (see note below)
+ NOTE for the reasons unknown, namespace switching might unexpectedly occur inside some scopes ( for, if, try, call ) started in scheduled scripts ( canSuspend true) after small suspension if with was not the main scope. For example:
+ $Code$[] spawn
+ {
+ with uiNamespace do
+ {
+ for "_i" from 1 to 1 do
+ {
+ systemChat str [
+ currentNamespace isEqualTo uiNamespace,
+ currentNamespace isEqualTo missionNamespace
+ ];
+ // result [true, false]
+ sleep 0.05; // -- small suspension
+ systemChat str [
+ currentNamespace isEqualTo uiNamespace,
+ currentNamespace isEqualTo missionNamespace
+ ];
+ // result [false, true] -- switching
+ };
+ };
+ };$/Code$
+ However if with used in parent scope, everything works correctly:
+ $Code$ with uiNamespace do
+ {
+ [] spawn
+ {
+ for "_i" from 1 to 1 do
+ {
+ systemChat str [
+ currentNamespace isEqualTo uiNamespace,
+ currentNamespace isEqualTo missionNamespace
+ ];
+ // result [true, false]
+ sleep 0.05; // -- small suspension
+ systemChat str [
+ currentNamespace isEqualTo uiNamespace,
+ currentNamespace isEqualTo missionNamespace
+ ];
+ // result [true, false] -- NO switching
+ };
+ };
+ };$/Code$
+ To eliminate possibility of error you can also use setVariable or getVariable with desired Namespace, which is also scheduled environment safe.
- https://community.bistudio.com/wiki/ammoOnPylon
+ https://community.bistudio.com/wiki/with
- Object ammoOnPylon String/Number
+ with Namespace
- vehicle ammoOnPylon pylon
+ with namespace
- $Code$_ammoCount = ( vehicle player ) ammoOnPylon "pylon1";$/Code$
+ $Code$_myWithType = with uiNamespace ;$/Code$
- $Code$hint str (( vehicle player ) ammoOnPylon "pylonCenter");$/Code$
+ $Code$with missionNamespace do {global = global + 1};$/Code$
undefined / undefined
- (August 18, 2017)
- The pylon indices start at 1 and not at 0.
- Number/Boolean
+ With_Type
+
- ammo
+ vectorDistance
- Check how many rounds are left in the currently loaded magazine in the given muzzle. Since Arma v1.55.133505 the command also returns ammo for units in vehicles.
+ Distance between two 3D vectors.
- https://community.bistudio.com/wiki/ammo
+ https://community.bistudio.com/wiki/vectorDistance
- Object ammo String
+ Array vectorDistance Array
- unit ammo muzzle
+ vector1 vectorDistance vector2
- $Code$_count = player ammo "M16"; //returns 30 in case of a full magazine$/Code$
-
- $Code$_count = player ammo "M203Muzzle";$/Code$
+ $Code$_euclideanDist = getPosASL player vectorDistance [0,0,0];$/Code$
- $Code$_count = player ammo primaryWeapon player ;$/Code$
+ $Code$( getPosASL _a) vectorDistance ( getPosASL _b); /* same as */( getPosATL _a) distance ( getPosATL _b);$/Code$
- global / undefined
+ undefined / undefined
- (February 17, 2012)
- OA 1.60 : The command works (now?) also for units in vehicles. However only for the vehicle's gunners' weapons - aka those returned by "weapons vehicle".
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+ Result = sqrt ((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2);
+ $/Code$
- Number
+ Number
+
- and
+ getSlingLoad
- Returns true only if both conditions are true. In case of the alternative syntax, lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely).
+ Return object which is sling loaded by vehicle
- https://community.bistudio.com/wiki/and
+ https://community.bistudio.com/wiki/getSlingLoad
- Boolean and Boolean
-
- Boolean and Code
+ getSlingLoad Object
- a and b
-
- a and b
+ getSlingLoad vehicle
- $Code$if (( alive player ) and (_enemycount == 0)) then { hint "you win !"}$/Code$
-
- $Code$if (( count _array 0) and {(_array select 0) == player }) then { hint "It works! Without lazy evaluation it would throw an error if array was empty."}$/Code$
+ $Code$_cargo = getSlingLoad heli1;$/Code$
undefined / undefined
- (April 12, 2015)
- Just like the "or" command, the "and" command allows several conditions to be checked. Example:
- $Code$if(alive player and speed player 0 and _someOtherVar) then { hint"All three condtions are true" };$/Code$
- The example above will check if the player is alive and if the player is moving and checks if _someOtherVar is true.
+ (05 April, 2014)
+ Returns objNull when nothing is sling loaded.
- Boolean - Boolean
+ Object
+
- animateBay
+ addMagazines
- Force animation of bay to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when bay state =1.
+ Adds multiple magazines to the unit. For cargo containers use addMagazineCargoGlobal command.
- https://community.bistudio.com/wiki/animateBay
+ https://community.bistudio.com/wiki/addMagazines
- Object animateBay Array
+ Object addMagazines Array
- vehicle animateBay [pylon nameindex, anim phase]
+ unit addMagazines [magazineName, count]
- $Code$( vehicle player ) animateBay ["pylonLeft1", 0.5];$/Code$
+ $Code$player addMagazines ["30Rnd_65x39_caseless_mag", 3];$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- animateDoor
+ markerShape
- Animates a door on a vehicle. Animation is defined in config file in CfgVehicles - AnimationSources. Wanted animation phase is set with phase param. This command works only on animation sources with "door" controller. Door_L in the example below can be animated with animateDoor but not CargoRamp_Open: heli animateDoor ["Door_L", 1];
- class AnimationSources
- {
- class CargoRamp_Open
- {
- source = "user" ;
- animPeriod = 5 ;
- initPhase = 0 ;
- } ;
- class Door_L
- {
- source = "door" ;
- animPeriod = 1.6 ;
- } ;
- } ;
- To animate doors or other sources that have "user" controller, use animate command, or even better, animateSource (recommended). Sources with "hit" controller can be animated with setHitPointDamage command applied to the name contained in hitpoint property. For availability of animation sources and their controller types see: createVehicle/vehicles
+ Gets the marker shape. See setMarkerShape for a list of strings that can be returned.
- https://community.bistudio.com/wiki/animateDoor
+ https://community.bistudio.com/wiki/markerShape
- Object animateDoor Array
+ markerShape String
- object animateDoor [doorname, phase, instant]
+ markerShape name
- $Code$Taru animateDoor ["Door_1_source", 1];$/Code$
-
- $Code$// Open left front door on Ifrit instantly:
- Ifrit animateDoor ["Door_LF", 1, true ];$/Code$
+ $Code$if ( markerShape "Marker1" == "RECTANGLE") then { hint "Marker1 is a rectangle!"}$/Code$
- global / global
+ global / undefined
+ (May 30, 2016)
+ Free hand drawn markers return "POLYLINE"
- Nothing
+ String
+
- animatePylon
+ surfaceType
- Force animation of pylon to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when pylon state =1.
+ Returns what surface type is at the given position.
+ See the spoiler for surface types:
+ Show text
+ A3 1.28:
+ "#GdtStratisConcrete"
+ "#GdtStratisDryGrass"
+ "#GdtStratisGreenGrass"
+ "#GdtStratisRocky"
+ "#GdtStratisForestPine"
+ "#GdtStratisBeach"
+ "#GdtStratisDirt"
+ "#GdtVRsurface01"
+ "#GdtDirt"
+ "#GdtGrassGreen"
+ "#GdtGrassDry"
+ "#GdtSoil"
+ "#GdtThorn"
+ "#GdtStony"
+ "#GdtConcrete"
+ "#GdtMarsh"
+ "#GdtBeach"
+ "#GdtSeabed"
+ "#GdtDead"
+ A3 1.66:
+ "#Default"
+ "#Water"
+ "#SurfRoadDirt"
+ "#SurfRoadConcrete"
+ "#SurfRoadTarmac"
+ "#SurfWood"
+ "#SurfMetal"
+ "#SurfRoofTin"
+ "#SurfRoofTiles"
+ "#SurfIntWood"
+ "#SurfIntConcrete"
+ "#SurfIntTiles"
+ "#SurfIntMetal"
+ "#SurfWater"
+ "#TEST_SurfNormal"
+ "#GdtStratisConcrete"
+ "#GdtStratisBeach"
+ "#GdtStratisDirt"
+ "#GdtStratisSeabedCluttered"
+ "#GdtStratisSeabed"
+ "#GdtStratisDryGrass"
+ "#GdtStratisGreenGrass"
+ "#GdtStratisRocky"
+ "#GdtStratisThistles"
+ "#GdtStratisForestPine"
+ "#GdtRubble"
+ "#GdtForestPine"
+ "#GdtConcrete"
+ "#GdtSoil"
+ "#GdtBeach"
+ "#GdtRock"
+ "#GdtDead"
+ "#GdtDirt"
+ "#GdtDesert"
+ "#GdtGrassGreen"
+ "#GdtGrassDry"
+ "#GdtGrassWild"
+ "#GdtWeed"
+ "#GdtWildField"
+ "#GdtThorn"
+ "#GdtStony"
+ "#GdtStonyThistle"
+ "#GdtMud"
+ "#GdtMarsh"
+ "#GdtSeabed"
+ "#concrete"
+ "#concrete_out"
+ "#concrete_inside"
+ "#dirtrunway"
+ "#road"
+ "#floor"
+ "#floor_inside"
+ "#carpet_inside"
+ "#carpet"
+ "#mud"
+ "#concrete_hall"
+ "#stones"
+ "#cardboard"
+ "#lino"
+ "#steel"
+ "#trash"
+ "#parquet"
+ "#sand"
+ "#metalPlate"
+ "#woodenFloor"
+ "#planks"
+ "#planks_inside"
+ "#grid"
+ "#rubble"
+ "#BuildingRubble"
+ "#tiling"
+ "#wavyMetal"
+ "#GdtVRsurface01"
+ "#surf_metal"
+ "#surf_roadconcrete"
+ "#surf_roaddirt"
+ "#surf_roadtarmac"
+ "#surf_rooftiles"
+ "#surf_rooftin"
+ "#surf_wood"
+ "#surfint_concrete"
+ "#surfint_metal"
+ "#surfint_tiles"
+ "#surfint_wood"
+ "#road_exp"
+ "#sand_exp"
+ "#SurfRoadDirt_exp"
+ "#SurfRoadConcrete_exp"
+ "#SurfRoadTarmac_exp"
+ "#SurfTrailDirt_exp"
+ "#concrete_exp"
+ "#concrete_in_exp"
+ "#concrete_hall_exp"
+ "#floor_exp"
+ "#floor_in_exp"
+ "#stones_exp"
+ "#planks_in_exp"
+ "#planks_exp"
+ "#softwood_in_exp"
+ "#steel_exp"
+ "#metalPlate_exp"
+ "#metalPlatePressed_exp"
+ "#metalPlate_in_exp"
+ "#grid_exp"
+ "#wavyMetal_exp"
+ "#carpet_exp"
+ "#carpet_in_exp"
+ "#mat_in_exp"
+ "#mud_exp"
+ "#straw_exp"
+ "#cardboard_exp"
+ "#lino_in_exp"
+ "#lino_exp"
+ "#roof_tiles_exp"
+ "#trash_exp"
+ "#rubble_exp"
+ "#BuildingRubble_exp"
+ "#GdtGrassShort"
+ "#GdtGrassTall"
+ "#GdtGrassLong"
+ "#GdtVolcanoBeach"
+ "#GdtRedDirt"
+ "#GdtAsphalt"
+ "#GdtField"
+ "#GdtForest"
+ "#GdtVolcano"
+ "#GdtCliff"
- https://community.bistudio.com/wiki/animatePylon
+ https://community.bistudio.com/wiki/surfaceType
- Object animatePylon Array
+ surfaceType Array
- vehicle animatePylon [pylon nameindex, anim phase]
+ surfaceType position
- $Code$( vehicle player ) animatePylon [1, 0.5];$/Code$
+ $Code$_surface = surfaceType [4500, 4500];$/Code$
+
+ $Code$_surface = surfaceType position player ;$/Code$
undefined / undefined
+ (February 05, 2010)
+ In ArmA 2 returned value is "#UTGRASS" for natural surface and "#UTCONCRETE" for urban surface.
+
+ (December 16, 2006)
+ Only seems to return either "#GRASSSOUTH" or "#GRASSGENERAL", even when you're in a building or in water.
+
+ (December 30, 2006)
+ Another returned value is "#SANDGENERAL". However, when providing an exact [x,y] position the "surfaceType" function seems to return the general surface type of the environment rather than the exact type on that given position.
- Nothing
+ String
+
- animateSource
+ opfor
- Process an animation of the object. If animate uses class name from CfgModels Animations, animateSource uses name defined by source property. This allows to use just one command on a bunch of animations related to the same source simultaneously. Since Arma 3 v1.65.138459 speed of animation can be altered with coefficient.
- A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:
- house animate ["Door_1_rot", 1];
- house animate ["Door_Handle_1_rot", 1];
- With animateSource this would require only 1 (provided everything is configured correctly):
- house animateSource ["Door_1_sound_source", 1];
- // model.cfg
- ....
- class Animations
- {
- class Door_1_rot
- {
- type = rotation ;
- source = Door_1_sound_source ;
- selection = Door_1 ;
- axis = Door_1_axis ;
- memory = 1 ;
- minValue = 0.1 ;
- maxValue = 1 ;
- angle0 = 0 ;
- angle1 = ( rad 110 ) ;
- } ;
- class Door_Handle_1_rot
- {
- type = rotation ;
- source = Door_1_noSound_source ;
- selection = Door_Handle_1 ;
- axis = Door_Handle_1_axis ;
- memory = 1 ;
- minValue = 0 ;
- maxValue = 0.1 ;
- angle0 = 0 ;
- angle1 = ( rad - 50 ) ;
- } ;
- } ;
- ...
- // config.cpp
- ...
- class AnimationSources
- {
- class Door_1_sound_source
- {
- source = "user" ;
- initPhase = 0 ;
- animPeriod = 1 ;
- sound = "GenericDoorsSound" ;
- soundPosition = "Door_1_trigger" ;
- } ;
- } ;
- ...
- If you don't know much about model config you can use this page createVehicle/vehicles for reference. Some of the AnimationSources are listed with the class names of the available assets in Arma 3. If it says "user", the chances are it could work with animateSource (see example 2).
- It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP
- Mixing animateSource command with animate command to animate the same part can lead to unexpected behavior
+ Pre-defined variable for the opfor side.
+ Alias for east.
- https://community.bistudio.com/wiki/animateSource
+ https://community.bistudio.com/wiki/opfor
- Object animateSource Array
+ opfor
- object animateSource [source, phase, speed]
+ opfor
- $Code$house animateSource ["Door_1_source", 1, true ];$/Code$
-
- $Code$// Create UGV and manipulate its turret (Currently not possible to do with animate command. See createVehicle/vehicles for reference)
- ugv = "B_UGV_01_F" createVehicle ( player getRelPos [5, 0]);
- ugv addAction ["Show Turret",
- {
- ugv animateSource ["Turret", 0];
- ugv animateSource ["MainTurret", rad 0, true ];
- ugv animateSource ["MainGun", rad 0, true ];
- }];
- ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}];
- ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}];
- ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", - rad 90]}];
- ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}];
- ugv addAction ["Turret Down", {ugv animateSource ["MainGun", - rad 20]}];$/Code$
-
- $Code$barGate animateSource ["Door_1_source",0]; //Close
- barGate animateSource ["Door_1_source",1]; //Open$/Code$
+ $Code$if ( side player == opfor ) then {
+ hint "OPFOR";
+ };$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Side
+
- animate
+ taskCompleted
- Activates given object animation. Animation is defined in CfgModels Animations class of model.cfg or another model config. Since Arma 3 v1.65.138459 speed of animation can be altered with coefficient.
- To animate door of the house from example below: house animate ["Door_1_rot", 1];
- class Animations
- {
- class Door_1_rot
- {
- type = rotation ;
- source = Door_1_source ;
- selection = Door_1 ;
- axis = Door_1_axis ;
- memory = 1 ;
- minValue = 0.1 ;
- maxValue = 1 ;
- angle0 = 0 ;
- angle1 = ( rad 110 ) ;
- } ;
- class Door_Handle_1_rot_1
- {
- type = rotation ;
- source = Door_1_handle_source ;
- selection = Door_Handle_1 ;
- axis = Door_Handle_1_axis ;
- memory = 1 ;
- minValue = 0 ;
- maxValue = 0.1 ;
- angle0 = 0 ;
- angle1 = ( rad - 50 ) ;
- } ;
- } ;
- Since model.cfg is not always available for reference, most animation names could also be obtained from animationNames command. Class names listed in CfgVehicles AnimationSources bound to "Proxy" controller can also be animated with animate command (see createVehicle/vehicles ): offroad animate ["HideBackpacks", 0];
- It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for MP
- Mixing animateSource command with animate command to animate the same part may produce some undefined behaviour
+ Return if task is completed. (state Succeeded, Failed or Canceled)
- https://community.bistudio.com/wiki/animate
+ https://community.bistudio.com/wiki/taskCompleted
- Object animate Array
+ taskCompleted Task
- objectName animate [animationName, phase, speed]
+ taskCompleted task
- $Code$_building animate ["maindoor", 1];$/Code$
-
- $Code$_building animate ["Door_1_rot", 1, true ];$/Code$
-
- $Code$// Create Offroad and add flashing police light bar:
- offroad = "C_Offroad_01_F" createVehicle ( player getRelPos [5, 0]);
- offroad animate ["HidePolice", 0];
- offroad animate ["BeaconsStart", 1];$/Code$
-
+
- global / global
+ undefined / undefined
- (Aug 2007)
- Animations can be used on existing game models such as houses that have doors eg. The general syntax is house animate ["dvere1",1] to 'open' the door and house animate ["dvere1",0] to 'close it'. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required.
- 'open' and 'close' are visual perceptions of the state of the model, and are a design decision of the p3d. Open does not, necessarily mean, 1, and close does not mean 0.
- '0' and '1' are better seen as FULLY_OFF and FULLY_ON
- If a door is initially closed in the model, FULLY_ON, will open it. If it is initialy OPEN visually, in the model, FULLY_ON will close it.
- initphase=1; (in config cpp) does not alter open and close meanings, all it does, is, set the model to the 'on' (rather than 'off') state to begin with. Whether on means open or close visually, is a p3d design decision.
-
- (June 2011)
- Also, to animate the object called "Bar Gate" in ArmA, use the following: $Code$myGate animate ["Bargate",1]$/Code$ to close it, and $Code$myGate animate ["Bargate", 0]$/Code$ to open it.
-
- (June 21, 2015)
- With this command you can switch the offroad police lights on like this :
- $Code$_vehicle animate ["BeaconsStart",1];$/Code$
- And switch it off :
- $Code$_vehicle animate ["BeaconsStart",0];$/Code$
-
- (February 16, 2016)
- Aparently "Bargate" was exchainged with "Door_1_rot"
- Doesen't work:
- $Code$object animate ["Bargate", 0];$/Code$
- Works:
- $Code$object animate ["Door_1_rot", 0];$/Code$
-
- (March 14, 2016)
- To animate bargate use animateSource :
- $Code$bargate animateSource ["Door_1_source", 1];$/Code$
- Nothing
+ Boolean
+
- animationNames
+ currentCommand
- Returns Array of Strings where elements are the names of model animations, which should theoretically be available for use with animate command. However in practice this depends on whether animation is also made available for use in scripts via config.
+ Return the current command type (empty string when no command) for the commander of given vehicle (or for a given soldier). Value returned can be one of:
+ "WAIT", "ATTACK", "HIDE", "MOVE", "HEAL", "REPAIR", "REFUEL", "REARM", "SUPPORT", "JOIN", "GET IN", "FIRE", "GET OUT", "STOP", "EXPECT", "ACTION", "ATTACKFIRE",
- https://community.bistudio.com/wiki/animationNames
+ https://community.bistudio.com/wiki/currentCommand
- animationNames Object
+ currentCommand Object
- animationNames object
+ currentCommand vehicleName
- $Code$_names = animationNames static_AT;
- // Returns: ["MainTurret", "MainGun", "MainTurret_destructX", "MainTurret_destructY", "MainTurret_destructZ", "MainGun_destructX", "MainGun_destructY", "MainGun_destructZ", "magazine_destruct", "ammo_belt_destruct", "bolt_destruct", "charging_handle_destruct", "damagehideVez_destruct", "damagehideHlaven_destruct", "damagehideRecoil_destruct", "Turret_shake", "Turret_shake_aside", "Magazine_hide", "Ammo_belt_hide", "muzzleFlash", "AddAutonomous_unhide", "bullet001_reload_hide", "bullet002_reload_hide", "bullet003_reload_hide", "bullet004_reload_hide", "bullet005_reload_hide", "bullet006_reload_hide", "bullet007_reload_hide", "bullet008_reload_hide"]$/Code$
-
+
undefined / undefined
- Array
+ String
+
- animationPhase
+ flagAnimationPhase
- Returns the phase of the given animation on the given object. Animation can be scripted ( animate, animateSource, animateDoor ) or engine driven. Animation names for an object could be found out with animationNames command. When animation is rotation, like with "MainTurret" for example, the output is in radians, to convert to degrees use deg command.
+ Returns flag position on the flag pole in range of 0..1, where 0 is bottom of the flag pole, 1 is the top of the flag pole. The result is local to the PC on which command is executed
- https://community.bistudio.com/wiki/animationPhase
+ https://community.bistudio.com/wiki/flagAnimationPhase
- Object animationPhase String
+ flagAnimationPhase Object
- object animationPhase animationName
+ flagAnimationPhase flag
- $Code$_building animate ["maindoor",1];
- sleep 1;
- _p = _building animationPhase "maindoor";
- // returns 1 (if the animation speed is = 2 seconds)$/Code$
-
- $Code$_flagPole animationPhase "flag";$/Code$
-
- $Code$_tank animationPhase "MainTurret";$/Code$
+ $Code$flagAnimationPhase _flag1; //0.5$/Code$
global / undefined
@@ -5007,240 +5222,238 @@
- Number
+ Number
+
- animationSourcePhase
+ setMarkerPos
- Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource.
+ Moves the marker. Pos format is Position2D.
- https://community.bistudio.com/wiki/animationSourcePhase
+ https://community.bistudio.com/wiki/setMarkerPos
- Object animationSourcePhase String
+ String setMarkerPos Array
- object animationSourcePhase source
+ markerName setMarkerPos pos
- $Code$_phase = house animationSourcePhase "Door_1_source";$/Code$
+ $Code$"MarkerOne" setMarkerPos getMarkerPos "MarkerTwo"$/Code$
- undefined / undefined
+ undefined / global
+ Effect is local in OFP.
+
+ (March 31, 2008)
+ This command will not move a marker on dedicated server (if a client calls it). AI will continue to respawn at old spot if you are moving something like respawn_west.
+
+ (August 7, 2009)
+ The marker position can actually be set in 3D. This has a benefit for respawn markers, when placed at the correct altitude ASL on the LHD, the correct altitude will be used for respawn. There is no particular benefit for regular markers since markerPos will still return 0 for the altitude array element.
- Number
+ Nothing
+
- animationState
+ addItemPool
- Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.
+ Adds count items of type name into the weapon pool (used in the campaign to transfer items to the next mission)
- https://community.bistudio.com/wiki/animationState
+ https://community.bistudio.com/wiki/addItemPool
- animationState Object
+ addItemPool Array
- animationState unitName
+ addItemPool [itemName, count]
- $Code$_state = animationState player ;$/Code$
+ $Code$addItemPool ["ItemGPS", 5];$/Code$
- global / undefined
+ undefined / undefined
- (August 22, 2014)
- (A3 1.26) To sort animation state by keyword, use BIS_fnc_ambientAnimGetParams
- $Code$ ("KNEEL" call BIS_fnc_ambientAnimGetParams ) select 0;
- //return: ["amovpknlmstpslowwrfldnon"…]$/Code$
- Useful keywords are: "STAND", "WATCH", "GUARD", "LISTEN_BRIEFING", "LEAN_ON_TABLE", "LEAN", "SIT_AT_TABLE", "KNEEL", "PRONE_INJURED", "BRIEFING" ect.
- String
+ Nothing
+
- append
+ cbSetChecked
- Appends array2 to the back of array1 modifying array1.
- NOTE: append does not return array, it modifies existing array. If you need to return a copy, use "+":
- $Code$array3 = array1 + array2;$/Code$
+ Sets the current state of a checkbox (CT_CHECKBOX type 77 of Dialog Control ).
- https://community.bistudio.com/wiki/append
+ https://community.bistudio.com/wiki/cbSetChecked
- Array append Array
+ Control cbSetChecked Boolean
- array1 append array2
+ control cbSetChecked state
- $Code$_arr = [1,2,3];
- _arr append [4,5,6];
- hint str _arr; //[1,2,3,4,5,6]$/Code$
+ $Code$_myCheckBox cbSetChecked true ;$/Code$
+
+ $Code$_disp = findDisplay 46 createDisplay "RscDisplayEmpty";
+ _chk = _disp ctrlCreate ["RscCheckBox", -1];
+ _chk cbSetChecked true ;$/Code$
undefined / undefined
- (March 9, 2015)
- $Code$_array1 append _array2$/Code$ is roughly 1.2x faster (depending on array size) than $Code$_array1 = _array1 + _array2$/Code$ (Averaged over 10.000 iterations with two identical arrays containing the numbers 0 through 9)
- The larger the arrays to append, the faster append is as it does not create a new array, which happens with array addition.
-
- (May 21, 2015)
- Array "unshift" implementation using append, a faster alternative to BIS_fnc_arrayUnShift :
- $Code$KK_fnc_unshift = {
- private ["_arr", "_tmp"];
- _arr = _this select 0;
- _tmp = [_this select 1];
- _tmp append _arr;
- _arr resize 0;
- _arr append _tmp;
- _arr
- };
- // Example
- arr = [1,2,3];
- [arr, 0] call KK_fnc_unshift; //both arr and return of function are [0,1,2,3]
- $/Code$
-
- (May 21, 2015)
- Array "insert" implementation using append, much faster alternative to BIS_fnc_arrayInsert :
- $Code$KK_fnc_insert = {
- private ["_arr", "_i", "_res"];
- _arr = _this select 0;
- _i = _this select 2;
- _res = [];
- _res append (_arr select [0, _i]);
- _res append (_this select 1);
- _res append (_arr select [_i, count _arr - _i]);
- _res
- };
- // Example
- arr = [1,2,3,4];
- [arr, ["a","b"], 2] call KK_fnc_insert; //[1,2,"a","b",3,4]$/Code$
-
- (May 21, 2015)
- A faster alternative to BIS_fnc_arrayPushStack using append :
- $Code$KK_fnc_pushStack = {
- _this select 0 append (_this select 1);
- _this select 0
- };
- // Example
- arr = [1,2,3];
- [arr,[4,5,6]] call KK_fnc_pushStack; //both arr and function return are [1,2,3,4,5,6]$/Code$
- Nothing
+ Nothing
+
- apply
+ setWaypointTimeout
- Applies given code to each element of the array and returns resulting array. The value of the current array element, to which the code will be applied, is stored in variable _x.
+ Defines the time between condition satisfaction and waypoint finish (randomly from min to max, with an average value mid).
- https://community.bistudio.com/wiki/apply
+ https://community.bistudio.com/wiki/setWaypointTimeout
- Array apply Code
+ Array setWaypointTimeout Array
- array apply code
+ waypoint setWaypointTimeout [min, mid, max]
- $Code$_arr = [1,2,3,4,5,6,7,8,9,0] apply {[1,0] select (_x % 2 == 0)}; //[1,0,1,0,1,0,1,0,1,0]$/Code$
-
- $Code$_arr = [1,2,3,4,5,6,7,8,9,0] apply {_x ^ _x}; //[1,4,27,256,3125,46656,823543,16777216,387420480,1]$/Code$
-
- $Code$_arr1 = [];
- _arr1 resize 20;
- _arr2 = _arr1 apply {0}; //[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]$/Code$
+ $Code$[_grp, 2] setWaypointTimeout [5, 10, 6];$/Code$
undefined / undefined
- (February 18, 2016)
- (to anyone else wondering, I took a minute to get it): This is Array.map() is JavaScript
+ (00:32, 12 December 2010)
+ The example doesn't seem to make sense, according to the listed syntax. It seems to set a Max time greater than the Mid time.
+
+ (03:30, 12 December 2010)
+ If mid is greater than max, the result will be really near the mid value.
+ Results with the values of the example: 8.237, 9.383, 10.425, 9.417, 9.43401, 10.425, 9.90601, 9.96701, 9.42401, 9.42502, 9.96698, 9.89999...
- Array
+ Nothing
+
- armoryPoints
+ allowGetIn
- Returns, stored in [USERNAME].ArmaXProfile, value of armoryPoints entry. If the entry doesn't exist, it returns 0.
+ Set if the units given in the list are allowed to enter vehicles.
- https://community.bistudio.com/wiki/armoryPoints
+ https://community.bistudio.com/wiki/allowGetIn
- armoryPoints
+ Array allowGetIn Boolean
- armoryPoints
+ unitArray allowGetIn allow
- $Code$_points = armoryPoints ;$/Code$
+ $Code$[_soldier1, _soldier2] allowGetIn true ;$/Code$
- undefined / undefined
+ global / global
+ (8 May, 2014)
+ (ArmA3 ver 1.18), here's a quick reference to unit's embarkation and disembarkation.
+ Command
+ Remote Control
+ Behavior
+ Role Unassigning
+ orderGetIn
+ false
+ orderGetIn won't take effect on player controlled AI units, and which needs to be used together with assaignAs command family. Generally speaking, orderGetIn is a Role Excuator.
+ When orderGetIn was disabled it won't automatically unassign unit's vehicle role but will force the unit get out of the vehicle and stop him re-entering until it was enabled again. orderGetIn false won't stop a unit when he is embarking a vehicle in the half way but unassignVehicle will do. orderGetIn false will wait to fire until the unit enter a vehicle.
+ allowGetIn
+ false
+ allowGetIn won't take effect on player controlled AI units. Different from orderGetIn, this command is a Role Holder, it can control the unit's movement in the half way set by orderGetIn but not by setWaypointType, unit will be forced to get out from a vehicle by allowGetIn false and won't automatically re-enter the vehicle until allowGetIn true
+ allowGetIn won't do anything with unit's vehicle role
+ doGetOut
+ true
+ Works on player controlled ai silently, unit will automatically get back to the vehicle after disembarkation. (Unit won't get out until vehicle is stopped or landed)
+ false
+ commandGetOut
+ true
+ Same as doGetOut with radio message. (Unit won't get out until vehicle is stopped or landed)
+ false
+ leaveVehicle
+ false
+ leaveVehicle can't force a player controlled AI disembark
+ true
+ action ["GetOut",_veh]
+ true
+ Eject immediately without parachute
+ false
+ action ["Eject",_veh]
+ true
+ Eject immediately with parachute if needed
+ false
+ setWaypointType "GETIN"
+ false
+ Waypoint won't be affected by orderGetIn false or allowGetIn false until the unit is on the vehicle.
+ N/A
- Number
+ Nothing
+
- arrayIntersect
+ getUnitLoadout
- Intersects array1 with array2 returning array of unique common elements. Additionally, using the same array for array1 and array2 will simply return array of unique elements. Intersects only 1st dimension of an array.
+ Returns an array with all assigned items, weapons, containers and their stored items.
+ Detailed explanation of the returned array: Talk:getUnitLoadout
+ This command is not final and might be changed in a near future.
- https://community.bistudio.com/wiki/arrayIntersect
+ https://community.bistudio.com/wiki/getUnitLoadout
- Array arrayIntersect Array
+ getUnitLoadout Object
+
+ getUnitLoadout String/Config
- array1 arrayIntersect array2
+ getUnitLoadout unit
+
+ getUnitLoadout class
- $Code$_arr1 = [1,2,3,4,5,2,3,4];
- _arr2 = [4,5,6,1,2,3,5,6];
- hint str (_arr1 arrayIntersect _arr2); // [4,5,1,2,3]$/Code$
-
- $Code$_arr = [1,2,3,1,2,3,1,2,3,4,5];
- hint str (_arr arrayIntersect _arr); // [1,2,3,4,5]$/Code$
+ $Code$getUnitLoadout player ;$/Code$
- $Code$// Remove nils :
- hint str ([1,2, nil,3] arrayIntersect [1,2, nil,3]); // [1,2,3]$/Code$
+ $Code$getUnitLoadout "B_Soldier_F";$/Code$
- $Code$// Also works with array elements which are equal :
- hint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]$/Code$
+ $Code$getUnitLoadout ( configFile "CfgVehicles" "B_Soldier_F");$/Code$
undefined / undefined
@@ -5248,28 +5461,28 @@
- Array
+ Array - Array
+
- asin
+ visibleGPS
- Arcsine of a number, result in Degrees.
+ Checks if the player has GPS receiver opened and visible
- https://community.bistudio.com/wiki/asin
+ https://community.bistudio.com/wiki/visibleGPS
- asin Number
+ visibleGPS
- asin x
+ visibleGPS
- $Code$_degrees=asin 0.5
- returns 30$/Code$
+ $Code$if ( visibleGPS ) then { hint "GPS is visible"};$/Code$
undefined / undefined
@@ -5277,73 +5490,79 @@
- Number
+ Boolean
+
- assert
+ loadVest
- Tests a condition and if the condition is false, displays error on screen (if -showscripterrors enabled) and logs error into.rpt file. It does not interrupt the script execution.
- If script was pre-processed with preprocessFileLineNumbers, it will also show/log the error line number and the file name.
+ Returns current sum of mass from items stored in a vest.
- https://community.bistudio.com/wiki/assert
+ https://community.bistudio.com/wiki/loadVest
- assert Boolean
+ loadVest Object
- assert condition
+ loadVest unit
- $Code$assert (1 2);$/Code$
-
- $Code$// Check function params (Faster alternative to BIS_fnc_param )
- some_func = {
- _0 = _this select 0;
- _1 = _this select 1;
- _2 = _this select 2;
- if (! assert (
- typeName _0 == "ARRAY" &&
- typeName _1 == "STRING" &&
- typeName _2 == "SCALAR"
- )) exitWith {/*optional error logging*/};
- hint "Alright!";
- };
- [1,2,3] call some_func; //assert error
- [[1],"2",3] call some_func; //Alright!$/Code$
-
+
undefined / undefined
- (May 15, 2010)
- Returns false, if condition is false, and returns true, if condition is true.
- Boolean
+ Number
+
- assignAsCargoIndex
+ serverCommand
- Assigns the character to a specific cargo / passenger index of the given vehicle.
+ Executes a server command. Which command is available for execution can be found with serverCommandAvailable and whether or not it can be executed with serverCommandExecutable.
+ If serverCommand is executed on a client, it must be executed from UI event handler ( ctrlAddEventHandler, displayAddEventHandler ), such as onButtonDown or other User_Interface_Event_Handlers.
+ As of Arma 3 v1.39 serverCommand can be used on dedicated server and headless clients. This requires a password, both set in server.cfg and passed to the command itself (See Alt Syntax). This new version also doesn't need to be executed from within a UI Eventhandler.
- https://community.bistudio.com/wiki/assignAsCargoIndex
+ https://community.bistudio.com/wiki/serverCommand
- Object assignAsCargoIndex Array
+ serverCommand String
+
+ String serverCommand String
- character assignAsCargoIndex [vehicle, index]
+ serverCommand command
+
+ password serverCommand command
- $Code$player assignAsCargoIndex [myHelicopter, 1];$/Code$
+ $Code$serverCommand "#logout";$/Code$
+
+ $Code$// Create button on the main map which will show userlist to anyone who clicks on it:
+ with uiNamespace do
+ {
+ ctrl = findDisplay 12 ctrlCreate ["RscButton", -1];
+ ctrl ctrlSetPosition [0,0,0.5,0.1];
+ ctrl ctrlSetText "USERLIST";
+ ctrl ctrlCommit 0;
+ ctrl ctrlAddEventHandler ["ButtonDown",
+ {
+ serverCommand "#userlist";
+ }];
+ };$/Code$
+
+ $Code$serverCommand format ["#kick %1",_name];$/Code$
+
+ $Code$_isOK = "MyServerCommandPassword" serverCommand "#lock";$/Code$
undefined / undefined
@@ -5351,140 +5570,146 @@
- Boolean
+ Boolean - Boolean
+
- assignAsCargo
+ lbDelete
- Assign a unit as cargo of a vehicle. Used together with orderGetIn to order a unit to get in as cargo into a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the cargo space of the vehicle.
+ Removes the item with the given index from the listbox or combobox with id idc of the topmost user dialog.
- https://community.bistudio.com/wiki/assignAsCargo
+ https://community.bistudio.com/wiki/lbDelete
- Object assignAsCargo Object
+ lbDelete Array
+
+ Control lbDelete Number
- unitName assignAsCargo vehicleName
+ lbDelete [idc, index]
+
+ control lbDelete index
- $Code$_soldier1 assignAsCargo _truck
- [_soldier1] orderGetIn true$/Code$
+ $Code$lbDelete [101, 0];$/Code$
+
+ $Code$_control lbDelete 0;$/Code$
- global / global
+ local / local
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- assignAsCommander
+ setMimic
- Assign a unit as commander of a vehicle. Used together with orderGetIn to order subordinate units to get in as commander of a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the commander place of the vehicle.
-
-
- https://community.bistudio.com/wiki/assignAsCommander
-
-
- Object assignAsCommander Object
-
-
- unitName assignAsCommander vehicleName
-
-
- $Code$_soldier1 assignAsCommander _tank
- [_soldier1] orderGetIn true$/Code$
-
-
- global / global
-
-
-
-
- Nothing
-
-
-
-
- assignAsDriver
-
-
- Assign a unit as driver of a vehicle. Used together with orderGetIn to order subordinate units to get in as driver of a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the driver place of the vehicle.
+ Set person's facial expression. Following mimic values are recognized:
+ "Default"
+ "Normal"
+ "Smile"
+ "Hurt"
+ "Ironic"
+ "Sad"
+ "Cynic"
+ "Surprised"
+ "Agresive"
+ "Angry"
+ Since Arma 2 OA 1.6*, these values are used :
+ "neutral"
+ "dead"
+ "danger"
+ "hurt"
+ "aware"
+ "safe"
+ "combat"
- https://community.bistudio.com/wiki/assignAsDriver
+ https://community.bistudio.com/wiki/setMimic
- Object assignAsDriver Object
+ Object setMimic String
- unitName assignAsDriver vehicleName
+ person setMimic mimic
- $Code$_soldier1 assignAsDriver _tank
- [_soldier1] orderGetIn true$/Code$
+ $Code$_soldier1 setmimic "angry"$/Code$
- global / global
+ global / local
+ To give the impression of hard faced guys going into a mission, use the setmimic "angry" command. I always have this on my guys to stop them grinning during a cutscene/mission.
+
+ In OFP v1.96, a character will keep any facial expression you set indefinately. Setmimic to "" to return soldier to automatic facial expressions.
+
+ (Jan 19, 2010)
+ Not working in Arma 2 1.05.
+
+ (September 2, 2013)
+ In Arma 3 the following face expressions work: "neutral","dead","danger","hurt","aware","safe","combat". Names must be written in all lower case letters. There is another grimace in config - "unconscious", which doesn't quite work.
- Nothing
+ Nothing
+
- assignAsGunner
+ getPosASLVisual
- Assign a unit as gunner of a vehicle. Used together with orderGetIn to order subordinate units to get in as gunner of a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the gunner place of the vehicle.
+ Returns an object's rendered 3D position ASL (z value above sea level) in render time scope. Alias of visiblePositionASL.
- https://community.bistudio.com/wiki/assignAsGunner
+ https://community.bistudio.com/wiki/getPosASLVisual
- Object assignAsGunner Object
+ getPosASLVisual Object
- unitName assignAsGunner vehicleName
+ getPosASLVisual object
- $Code$_soldier1 assignAsGunner _tank
- [_soldier1] orderGetIn true$/Code$
+ $Code$_playerRenderedPosASL = getPosASLVisual player ;$/Code$
- global / global
+ global / undefined
- Nothing
+ Array
+
- assignAsTurret
+ taskChildren
- Assigns the soldier to turret.
+ Return the child tasks of the specified task.
- https://community.bistudio.com/wiki/assignAsTurret
+ https://community.bistudio.com/wiki/taskChildren
- Object assignAsTurret Array
+ taskChildren Task
- unit assignAsTurret [vehicle, [turretPath]]
+ taskChildren task
@@ -5494,134 +5719,158 @@
- Nothing
+ Array
+
- assignCurator
+ arrayIntersect
- Assign player as curator. Two players cannot act as one curator.
+ Intersects array1 with array2 returning array of unique common elements. Additionally, using the same array for array1 and array2 will simply return array of unique elements. Intersects only 1st dimension of an array.
- https://community.bistudio.com/wiki/assignCurator
+ https://community.bistudio.com/wiki/arrayIntersect
- Object assignCurator Object
+ Array arrayIntersect Array
- player assignCurator curatorObj
+ array1 arrayIntersect array2
- $Code$player assignCurator myCurator;$/Code$
+ $Code$_arr1 = [1,2,3,4,5,2,3,4];
+ _arr2 = [4,5,6,1,2,3,5,6];
+ hint str (_arr1 arrayIntersect _arr2); // [4,5,1,2,3]$/Code$
+
+ $Code$_arr = [1,2,3,1,2,3,1,2,3,4,5];
+ hint str (_arr arrayIntersect _arr); // [1,2,3,4,5]$/Code$
+
+ $Code$// Remove nils :
+ hint str ([1,2, nil,3] arrayIntersect [1,2, nil,3]); // [1,2,3]$/Code$
+
+ $Code$// Also works with array elements which are equal :
+ hint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Array
+
- assignItem
+ commandStop
- Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. If the slot is occupied by another item, it gets replaced.
+ Order the given unit(s) to stop (via the radio). A stop command will never finish, the unit will never be ready.
- https://community.bistudio.com/wiki/assignItem
+ https://community.bistudio.com/wiki/commandStop
- Object assignItem String
+ commandStop Object/Array
- unit assignItem item
+ commandStop unitName
- $Code$bluforUnit addItem "NVGoggles";
- bluforUnit assignItem "NVGoggles";
- opforUnit addItem "NVGoggles_OPFOR";
- opforUnit assignItem "NVGoggles_OPFOR";
- independentUnit addItem "NVGoggles_INDEP";
- independentUnit assignItem "NVGoggles_INDEP";$/Code$
+ $Code$commandStop _soldier1;$/Code$
+
+ $Code$commandStop [_soldier1, _soldier2];$/Code$
+
+ $Code$commandStop ( units player );$/Code$
global / global
+ In ArmA 1.14, this command will not stop a unit that has been given a move order by means of selecting the unit, then clicking on the in game map (or ground).
- Nothing
+ Nothing
+
- assignTeam
+ selectRandomWeighted
- Assigns the unit (in case of a vehicle, its commander) to the given team. Team is an option in group control (unit management) menu that allows to split player group in teams and then give bulk order to separate teams. In order to operate properly, the command requires specific conditions:
- The command requires player to be fully initialised
- The unit getting assigned must be either player himself or a unit in player's group
- Units in player's group as well as player himself can all have different teams assigned
- The colour of the assigned team for a unit is seen on the group management UI as well as squad radar
- The possible team values (colours) are:
- "MAIN" - (white)
- "RED" - (red)
- "GREEN" - (green)
- "BLUE" - (blue)
- "YELLOW" - (yellow)
- NOTE : In older version of the game the effect of this command is local
+ Returns a random element from the given array according to assigned weights. Engine solution to BIS_fnc_selectRandomWeighted. A few notes:
+ Negative weights are not supported
+ If an item's weight is 0, the item is ignored
+ The weights don't have to total to 1
+ If numbers of items and weights do not match, the shortest array is used
+ A single array Syntax is slightly faster then Alt Syntax
- https://community.bistudio.com/wiki/assignTeam
+ https://community.bistudio.com/wiki/selectRandomWeighted
- Object assignTeam String
+ selectRandomWeighted Array
+
+ Array selectRandomWeighted Array
- unit assignTeam team
+ selectRandomWeighted valuesAndWeights
+
+ values selectRandomWeighted weights
- $Code$_soldier2 assignTeam "RED";$/Code$
+ $Code$_randomWeightedElement = selectRandomWeighted [1,0.1,2,0.2,3,1.3,4,2.4,5,7.5];$/Code$
+
+ $Code$_randomWeightedElement = [1,2,3,4,5] selectRandomWeighted [0.1,0.2,1.3,2.4,7.5];$/Code$
- global / global
+ undefined / undefined
- (July 12, 2016)
- Since Arma 3 v1.62 this command has global effects and is persistent even on machines that join in progress.
+ (June 26, 2017)
+ A 100000 runs of the following code:
+ $Code$_values = [0,1,2,3,4,5,6,7,8,9];
+ _weights = [0.109,0.65,0.01,1.01,1.24,0,1.59,0.09,1.15,0.55];
+ _result = _values selectRandomWeighted _weights;$/Code$
+ Gave this result:
+ 0 - 0
+ 0.01 - 144
+ 0.09 - 1409
+ 0.109 - 1633
+ 0.55 - 8673
+ 0.65 - 10127
+ 1.01 - 15668
+ 1.15 - 18059
+ 1.24 - 19518
+ 1.59 - 24769
- Nothing
+ Anything - Anything
+
- assignToAirport
+ setPlateNumber
- Not correctly implemented yet, currently it does the same as landAt. As the implementation may get fixed sometime, please do not use this command until then.
+ Change the license plates on any vehicle which has plates configured. Max 15 characters are allowed!
- https://community.bistudio.com/wiki/assignToAirport
+ https://community.bistudio.com/wiki/setPlateNumber
- Object assignToAirport Number
-
- Object assignToAirport Object
+ Object setPlateNumber String
- plane assignToAirport id
-
- plane assignToAirport target
+ vehicle setPlateNumber string
- $Code$plane1 assignToAirport 0$/Code$
+ $Code$vehicle player setPlateNumber "Custom Plate 99"$/Code$
undefined / undefined
@@ -5629,364 +5878,449 @@
- Nothing - Nothing
+ Nothing
+
- assignedCargo
+ setVelocityTransformation
- Returns the list of soldiers assigned to the given vehicle as a cargo.
+ Places an object at an interpolated position between two other objects and sets its vectors in proportion to the relative position.
+ The final position/vector is determined by the "interval" specified in the command.
+ This assumes an imaginary path between the two reference objects, where
+ at the beginning of the path (interval: 0) the position and vector are identical to the first reference object,
+ at the end of the path (interval: 1) they're identical to the second reference object,
+ and at 0.5 they are halfway in-between.
+ See setVelocityTransformation (VBS2) for more details.
- https://community.bistudio.com/wiki/assignedCargo
+ https://community.bistudio.com/wiki/setVelocityTransformation
- assignedCargo Object
+ Object setVelocityTransformation Array
- assignedCargo vehicle
+ object setVelocityTransformation [position1, position2, velocity1, velocity2, direction1, direction2, upVector1, upVector2, interval]
- $Code$_list = assignedCargo _vehicleName$/Code$
+ $Code$_tracker setVelocityTransformation [
+ getPosASL _currentPos,
+ getPosASL _nextPos,
+ velocity _currentVelocity,
+ velocity _nextVelocity,
+ vectorDir _currentVectorDir,
+ vectorDir _nextVectorDir,
+ vectorUp _currentVectorUp,
+ vectorUp _nextVectorUp,
+ _timeDiff
+ ];$/Code$
+
+ $Code$// Bob on imaginary stairway to heaven:
+ bob = createAgent ["C_man_1", player getRelPos [5, 0], [], 0, "CAN_COLLIDE"];
+ bob switchMove "ladderciviluploop";
+ pos1 = getPosASL bob;
+ pos2 = pos1 vectorAdd [0,0,0.75];
+ bob addEventHandler ["AnimDone",
+ {
+ pos1 = pos2;
+ pos2 = pos2 vectorAdd [0,0,0.75]
+ }];
+ onEachFrame
+ {
+ if (! alive bob) then
+ {
+ onEachFrame {};
+ bob switchMove "";
+ bob removeAllEventHandlers "AnimDone";
+ };
+ bob setVelocityTransformation [
+ pos1,
+ pos2,
+ [0,0,0],
+ [0,0,0],
+ [0,1,0],
+ [0,1,0],
+ [0,0,1],
+ [0,0,1],
+ moveTime bob
+ ];
+ };$/Code$
undefined / undefined
+ (Aug 4, 2014 – 12:35)
+ (A3 1.24) Generally speaking setVelocityTransformation is more likely a combination of setPosASL, setVectorDirAndUp (or BIS_fnc_setPitchBank ) and time multiplier. It can be used as a position tracker with all necessary information collected, copied and then released within one function. Here’s a simple reproduction on how setVelocityTransformation works in game:
+ $Code$
+ private ["_dataOld","_dataNext","_capturedData","_obj","_fps","_startTrackingTime","_stepOld","_stepNext","_tracker","_tempTime"];
+ _stepOld = 0;
+ _tempTime = 0;
+ _stepNext = 1;
+ while { true } do {
+ _capturedData = _capturedData + [[ getPosASL _obj, velocity _obj, vectorDir _obj, vectorUp _obj]];
+ sleep _fps;
+ _tempTime = _tempTime + _fps;
+ if (_tempTime = _startTrackingTime) then {
+ _dataOld = _capturedData select _stepOld;
+ _dataNext = _capturedData select _stepNext;
+ _stepOld = _stepOld + 1;
+ _stepNext = if (_stepNext = ( count _capturedData)) then [{_stepOld},{_stepNext + 1}];
+ _tracker setVelocityTransformation
+ [_dataOld select 0,_dataNext select 0,_dataOld select 1,_dataNext select 1,
+ _dataOld select 2,_dataNext select 2,_dataOld select 3,_dataNext select 3,1];
+ };
+ };$/Code$
+ Tracker starts coping the route and stance from the object when time start counting. TimeDiff determines the distance multiply between the current position and the next position.
- Array
+ Nothing
+
- assignedCommander
+ lbSortByValue
- Returns the soldier assigned to the given vehicle as a commander.
+ Sorts the ListBox entries by lbValue. The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value.
- https://community.bistudio.com/wiki/assignedCommander
+ https://community.bistudio.com/wiki/lbSortByValue
- assignedCommander Object
+ lbSortByValue Control
+
+ lbSortByValue Number
- assignedCommander vehicle
+ lbSortByValue control
+
+ lbSortByValue idc
- $Code$_commander = assignedCommander vehicleName$/Code$
+ $Code$lbSortByValue _control;$/Code$
+
+ $Code$lbSortByValue 101;$/Code$
undefined / undefined
+ A good way to avoid that this Command will mix your Listbox up is, to assign your Value summed up with the Index ID returned by lbAdd to your Listbox Entries.
+ Posted: Sep 10 2014
+
+ More information on the LB command family can be found here
- Object
+ Nothing - Nothing
+
- assignedDriver
+ camCommand
- Returns the soldier assigned to the given vehicle as a driver.
+ Executes a command on the given camera / actor object. Known commands for:
+ All camera types - "manual on", "manual off"
+ "camera" - "inertia on", "inertia off"
+ "seagull" - "landed", "airborne"
+ When you execute camCommand "landed" on a flying seagull, it will land and sit on the floor until you call camCommand "airborne". The camCommand changes are conducted immediately, the command doesn't wait for camCommit.
- https://community.bistudio.com/wiki/assignedDriver
+ https://community.bistudio.com/wiki/camCommand
- assignedDriver Object
+ Object camCommand String
- assignedDriver vehicle
+ camera camCommand command
- $Code$_driver= assignedDriver vehicleName$/Code$
+ $Code$_camera camCommand "manual on";$/Code$
- undefined / undefined
+ local / local
+ (May 23, 2017)
+ In Arma 3 with the addition of the curator camera type, the following commands are supported:
+ $Code$_camera = "CamCurator" camCreate [0,0,0];
+ _camera camCommand "maxPitch 89";
+ _camera camCommand "minPitch -89";
+ _camera camCommand "speedDefault 0.1";
+ _camera camCommand "speedMax 2";
+ _camera camCommand "ceilingHeight 5000";
+ _camera camCommand "atl off";
+ _camera camCommand "surfaceSpeed off";
+ $/Code$
- Object
+ Nothing
+
- assignedGunner
+ controlsGroupCtrl
- Returns the soldier assigned to the given vehicle as a gunner.
+ Returns a child control with specified idc from a controls group
- https://community.bistudio.com/wiki/assignedGunner
+ https://community.bistudio.com/wiki/controlsGroupCtrl
- assignedGunner Object
+ Control controlsGroupCtrl Number
- assignedGunner vehicle
+ ctrlgrp controlsGroupCtrl idc
-
+ $Code$_control = _controlsGroup controlsGroupCtrl 101;$/Code$
+
undefined / undefined
- Object
+ Control
+
- assignedItems
+ windStr
- Get array with all assigned items.
+ Returns the current wind strength.
- https://community.bistudio.com/wiki/assignedItems
+ https://community.bistudio.com/wiki/windStr
- assignedItems Object
+ windStr
- assignedItems unit
+ windStr
- $Code$hint str assignedItems player ;$/Code$
+ $Code$10 setWindStr (0.5 * windStr );$/Code$
undefined / undefined
- (June 18, 2013)
- Arma 3, version 0.70 - headgear and goggles are not present in returned array now.
-
- (August 22, 2013)
- For head gear use headgear, addHeadgear and removeHeadgear. For goggles use goggles, addGoggles and removeGoggles
- Array
+ Number
+
- assignedTarget
+ magazinesDetailBackpack
- Returns the target assigned to the vehicle/unit. To unassign the target use doWatch objNull or commandWatch objNull.
+ Returns an array with the type names of all the unit's backpack magazines.
- https://community.bistudio.com/wiki/assignedTarget
+ https://community.bistudio.com/wiki/magazinesDetailBackpack
- assignedTarget Object
+ magazinesDetailBackpack Object
- assignedTarget vehicleName
+ magazinesDetailBackpack unit
- $Code$_target = assignedTarget _T72$/Code$
+ $Code$magazinesDetailBackpack player$/Code$
- local / undefined
+ undefined / undefined
- Object
+ Array
+
- assignedTeam
+ getFriend
- Returns the team the unit belongs to. Possible values:
- MAIN (default and white)
- RED
- GREEN
- BLUE
- YELLOW
- This command will return nil if given unit is objNull, remoteControling another unit or is not local
+ Returns if sides are friendly or hostile. For a value smaller than 0.6 it results in being enemy, otherwise it's friendly. See also Side relations.
- https://community.bistudio.com/wiki/assignedTeam
+ https://community.bistudio.com/wiki/getFriend
- assignedTeam Object
+ Side getFriend Side
- assignedTeam unitName
+ side1 getFriend side2
- $Code$_team = assignedTeam player ;$/Code$
+ $Code$value = west getFriend east ;$/Code$
+
+ $Code$_isEnemy = side _killer getFriend side _victim 0.6;$/Code$
- local / undefined
+ global / undefined
- (December 13, 2014)
- As of Arma 3 version 1.36. assignedTeam might return nil instead of any of the STRINGs above if the player is currently remote controlling a unit.
- $Code$ assignedTeam player
- - $/Code$
-
- (May 23, 2017)
- Executed on server also nothing is returned... so arguments need to be local.
- String/Nothing
+ Number
+
- assignedVehicleRole
+ isKindOf
- Return the role a unit is assigned to within its assigned vehicle.
- The array which is returned contains:
- [] - Not assigned to any vehicle
- ["Driver"] - Assigned as driver
- ["Cargo"] (or ["Cargo", [turret path]] since Arma 3 1.31.127272) - Assigned as cargo
- ["Turret", [turret path]] - Assigned to a turret
- If no vehicle role is assigned, an empty array is returned.
+ Checks whether the object is (a subtype) of the given type. While main syntax and alt syntax support only CfgVehicles, CfgAmmo and CfgNonAIVehicles, alt syntax 2 allows to specify any config, including mission config.
- https://community.bistudio.com/wiki/assignedVehicleRole
+ https://community.bistudio.com/wiki/isKindOf
- assignedVehicleRole Object
+ Object isKindOf String
+
+ String isKindOf String
+
+ String isKindOf Array
- assignedVehicleRole unitName
+ object isKindOf typeName
+
+ typeName1 isKindOf typeName2
+
+ typeName1 isKindOf [typeName2, targetConfig]
- $Code$_RoleArray = assignedVehicleRole player ;$/Code$
+ $Code$vehicle player isKindOf "Tank";$/Code$
- $Code$// Get weapons available to player at player occupied turret:
- _weaponsTurret = vehicle player weaponsTurret ( assignedVehicleRole player select 1);$/Code$
+ $Code$"BMP2" isKindOf "Tank";$/Code$
+
+ $Code$currentWeapon player isKindOf ["Rifle", configFile "CfgWeapons"];$/Code$
- global / undefined
+ undefined / undefined
- (August 31, 2013)
- When unit with unassigned vehicle role enters a vehicle, it gets assigned vehicle role automatically. The unit then will hold on to its assigned role after exiting the vehicle. To add, when player is in the group of AIs and is not the leader, assignedVehicleRole of the player could be unpredictable and absolutely not related to the position player occupies. In short, forget about this command, it is unreliable and has been broken too many times in the past.
+ (April 23, 2007)
+ This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc., all of which would return true.)
- (November 15, 2014)
- In multiplayer (tested in v1.34), this only works reliably on the server.
- Behaviour is as follows:
- On a client, the command will return empty arrays for every unit that is not local.
- On the server, the command correctly returns the position, regardless of the units locality.
+ (16 Apr, 2008)
+ It appears isKindOf is limited to the CfgVehicles branch of the class hierachy.
+ So CfgWeapons, CfgMagazines, etc will return false for checks like:
+ ("M9" isKindOf "Pistol") returns false
+
+ (8 Nov, 2009)
+ In a2 isKindOf also works for CfgAmmo in addition to CfgVehicles: ("M_9M311_AA" isKindOf "MissileBase") returns true. NOT for CfgWeapons, CfgMagazines and others..
+
+ (June 16, 2015)
+ In case you cannot use isKindOf because of the reasons stated, just use BIS fnc returnParents with class names as return value:
+ $Code$ _isKindOf = "Rifle" in [( configFile "CfgWeapons" "BWA3_G36K"), true ] call BIS_fnc_returnParents ; // is true$/Code$
+
+ (September 6, 2015)
+ In A3 isKindOf works well with CfgWeapons and CfgMagazines using the syntax from example 3.
+ It should be prefered to James' solution as it performs more than 25x faster. Tested in debug console with the following code snippets:
+ $Code$bool = "CA_Magazine" in ([( configFile "CfgMagazines" "HandGrenade"),true] call BIS_fnc_returnParents ); -- 0.12111ms$/Code$
+ $Code$bool = "HandGrenade" isKindOf ["CA_Magazine", configFile "CfgMagazines"]; -- 0.00439453ms$/Code$
+ When checking in CfgVehicles the syntax from example 2 performs a little faster.
- Array
+ Boolean - Boolean - Boolean
+
- assignedVehicle
+ pixelGridNoUIScale
- Returns the vehicle a unit is assigned to. If no vehicle is assigned objNull is returned.
+ Returns grid size based on screen resolution and configs: uiScaleFactor, uiScaleMaxGrids
+ As mentioned in the name of this command, the user interface scale is ignored.
- https://community.bistudio.com/wiki/assignedVehicle
+ https://community.bistudio.com/wiki/pixelGridNoUIScale
- assignedVehicle Object
+ pixelGridNoUIScale
- assignedVehicle unit
+ pixelGridNoUIScale
- $Code$_vehicle = assignedVehicle player ;$/Code$
+ $Code$_gridHeightNoUIScale = pixelH * pixelGridNoUIScale ;$/Code$
- local / undefined
+ undefined / undefined
- Object
+ Number
+
- atan2
+ waypointLoiterRadius
- ArcTangent of x/y. Used to determine the angle of a vector [x,y]. Result in Degrees between -180 and 180.
- Note that this command can handle y being 0, unlike when using atan, and will return 90
+ Gets the waypoint loiter radius. Waypoint uses format Waypoint.
- https://community.bistudio.com/wiki/atan2
+ https://community.bistudio.com/wiki/waypointLoiterRadius
- Number atan2 Number
+ waypointLoiterRadius Waypoint
- x atan2 y
+ waypointLoiterRadius Waypoint
- $Code$_xy = [5,3];
- _degrees = (_xy select 0) atan2 (_xy select 1); //59.0362$/Code$
-
- $Code$// Get direction from _obj1 to _obj2:
- _vd = getPosASL _obj2 vectorDiff getPosASL _obj1;
- _dir = (_vd select 0) atan2 (_vd select 1); //_dir range from -180 to +180
- if (_dir 0) then {_dir = 360 + _dir}; //_dir range from 0 to 360$/Code$
-
- $Code$// Get relative direction from _obj1 to _obj2:
- _xy = _obj1 worldToModel getPosASL _obj2;
- _dir = (_xy select 0) atan2 (_xy select 1); //_dir range from -180 to +180
- if (_dir 0) then {_dir = 360 + _dir}; //_dir range from 0 to 360$/Code$
+ $Code$_radius = waypointLoiterRadius [groupOne, 1];$/Code$
undefined / undefined
- (08:00, 18 November 2009)
- To get the direction of an object from the player:
- $Code$
- _dir = (( getPos _obj select 0) - ( getPos player select 0)) atan2 (( getPos _obj select 1) - ( getPos player select 1));
- //_dir will be from -180 to 180.
- $/Code$
- If positive values are needed then use:
- $Code$
- if (_dir 0) then {_dir = _dir + 360};
- $/Code$
- Or just use BIS_fnc_dirTo directly.
- Number
+ Number
+
- atan
+ allSites
- ArcTangent of a number, result in Degrees.
+ Return all sites in map.
+ This command is considered deprecated and is no longer supported
- https://community.bistudio.com/wiki/atan
+ https://community.bistudio.com/wiki/allSites
- atan Number
+ allSites
- atan x
+ allSites
- $Code$_degrees = atan 1; //45$/Code$
+ $Code$_allSites = allSites ;$/Code$
undefined / undefined
@@ -5994,24 +6328,25 @@
- Number
+ Array
+
- atg
+ moveToFailed
- Equivalent to atan
+ Check if latest low level moveTo command failed.
- https://community.bistudio.com/wiki/atg
+ https://community.bistudio.com/wiki/moveToFailed
- atg Number
+ moveToFailed Object
- atg x
+ moveToFailed person
@@ -6021,265 +6356,229 @@
- Number
+ Boolean
+
- attachObject
+ removeHeadgear
- Attaches a location to the specified object. To detach a location, attach it to objNull.
+ Removes headgear from a unit. If unit has no headgear command quietly fails.
- https://community.bistudio.com/wiki/attachObject
+ https://community.bistudio.com/wiki/removeHeadgear
- Location attachObject Object
+ removeHeadgear Object
- location attachObject object
+ removeHeadgear unit
- $Code$myLocation attachObject player ;$/Code$
+ $Code$removeHeadgear player ;$/Code$
- undefined / undefined
+ global / global
+ (August 5, 2016)
+ To clarify, this command effectively DELETES the headgear. It does not simply remove it from unit's head and move it into inventory.
- Nothing
+ Nothing
+
- attachTo
+ flagOwner
- Attaches an object to another object. The offset is applied to the object center unless a memory point is provided. If no offset is specified, the offset used will be the current relative positioning of objects against each other.
+ Returns the global owner of a flag. A getter for setFlagOwner. Note that owner of a flag is Object rather than Number, as how it is usually with other owner commands
- https://community.bistudio.com/wiki/attachTo
+ https://community.bistudio.com/wiki/flagOwner
- Object attachTo Array
+ flagOwner Object
- object1 attachTo [object2, offset, memPoint]
+ flagOwner flag
- $Code$player attachTo [car, [0, 0, 1] ];$/Code$
-
- $Code$player attachTo [tank, [0, -1, 0], "Usti hlavne"];$/Code$
-
- $Code$// Automatic offset:
- ammoCrate attachTo [ player ];$/Code$
-
- $Code$To set orientation of attached object use setVectorDirAndUp command:
- _expl1 = "DemoCharge_Remote_Ammo" createVehicle position player ;
- _expl1 attachTo [ player, [-0.1, 0.1, 0.15], "Pelvis"];
- _expl1 setVectorDirAndUp [ [0.5, 0.5, 0], [-0.5, 0.5, 0] ];
- _expl2 = "DemoCharge_Remote_Ammo" createVehicle position player ;
- _expl2 attachTo [ player, [0, 0.15, 0.15], "Pelvis"];
- _expl2 setVectorDirAndUp [ [1, 0, 0], [0, 1, 0] ];
- _expl3 = "DemoCharge_Remote_Ammo" createVehicle position player ;
- _expl3 attachTo [ player, [0.1, 0.1, 0.15], "Pelvis"];
- _expl3 setVectorDirAndUp [ [0.5, -0.5, 0], [0.5, 0.5, 0] ];$/Code$
+ $Code$_person = flagOwner _flagOne;$/Code$
global / global
- (June 6, 2009)
- You can use setDir to change the direction of the attached object. The direction is relative to the object you attach it to, so setDir 180 won't point to the south but to the rear of the object you attach it to.
- Use setPos to synchronize the direction of the object in a network game.
- Example code:
- $Code$
- _obj setDir 180;
- _obj setPos getPos _obj;$/Code$
-
- (September 17, 2011)
- Some objects you cannot attach anything to. To be more precise, you can attach objects to them, but the behaviour is unexpected. For instance: $Code$
- SuitcaseObject attachTo [FoldingTableObject, [0,0,0]];$/Code$
- You would expect the suitcase to jump to the pivot point of the table, and stick to it.
- Instead, the suitcase will freeze in it's original position. Even if the table is moved, the suitcase will be unaffected: it will not follow the table, it will not even respond to actions it reacted to prior to being attached: pushing, being shot at, etc.. It's just an object frozen in space. In MP it's even weirder, the suitcase would turn invisible.
- Dodgy objects when it comes to attaching things to them: most in Objects(small), Objects(signs), all of Objects(helpers) categories, etc..
-
- (March 28, 2014)
- If you attach an explosive charge to an object (e.g. ammobox), the charge will not detonate when you simply set the damage to 1. You must detach it before.
- $Code$ private ["_target"];
- _target = your_ammobox ;
- // create and attach charge
- private ["_charge"];
- _charge = "DemoCharge_Remote_Ammo_Scripted" createVehicle position player ;
- _charge attachTo [_target, [0,0,0.2]];
- _charge setVectorDirAndUp [[0.5,0.5,0],[-0.5,0.5,0]];
- // now detonate charge
- detach _charge; //Important!
- _charge setDamage 1;
- $/Code$
-
- (1 Jun, 2014)
- (ArmA3 ver 1.20) attachTo overwrites setVectorDirAndUp if attached obj was changed to attach another one.
- $Code$
- _obj attachTo [_logic,[0,0,0]];
- _obj setVectorDirAndUp [[0,1,0],[0,0,-1]];
- _obj attachTo [_logic,[0,0,2]]; //vector no changes
- _obj attachTo [_anotherOne,[0,0,0]]; //vector changes to default
- $/Code$
-
- (September 25, 2014)
- Attaching an object does not update the accessibility of a place for the AI. The command shouldn't be used for positioning large static objects - the AI will simply walk thru such objects.
-
- (September 1, 2016)
- Using attachTo with an objects that have ragdoll physics (such as ammo boxes, containers, etc.) may cause unexpected behaviour. When you do so, if the attached object intersect origin object, origin object may gain some
- enormous collision properties even if the collision model for the attached object is not present localy to origin object, until detached. Vehicles may start flipping with no mass calculation (ie tank might fly), player object might gain inifinite
- Z-vector velocity on any interaction with terrain relief and other objects.
- Nothing
+ Object
+
- attachedObjects
+ lnbSize
- Returns a list of attached objects.
+ Returns size of 2D listbox or combobox as [rows, columns].
- https://community.bistudio.com/wiki/attachedObjects
+ https://community.bistudio.com/wiki/lnbSize
- attachedObjects Object
+ lnbSize Control/Number
- attachedObjects obj
+ lnbSize ctrl
- $Code${
- detach _x;
- } forEach attachedObjects player ;$/Code$
-
- $Code$if ( count attachedObjects player == 0) then {
- hint "There are no objects attached to player";
- };$/Code$
+ $Code$lnbSize _ctrl;//[8,2]$/Code$
- undefined / undefined
+ local / local
- Array
+ Array
+
- attachedObject
+ goto
- Returns the object a location is attached to. If the location is unattached, then objNull is returned.
+ In SQS scripts only: Go to given label.
+ String argument is used here.
+ Be sure to use double quotes around label name in goto. Define the label with #. Note that Labels are not case sensitive and that labels are searched for from the top of the script, so multiple occurrences of a label will only result in the top most one ever being found.
- https://community.bistudio.com/wiki/attachedObject
+ https://community.bistudio.com/wiki/goto
- attachedObject Location
+ goto String
- attachedObject location
+ goto label
- $Code$_locAttachedObj = attachedObject myLocation;$/Code$
-
+
undefined / undefined
+ (August 4, 2006)
+ Notes from before the conversion:
+ This function works only inside of SQS script.
+ The search for labels always begins at the top of the script so that if there are multiple occurrences of a label the first occurrence will always be the one found.
+ Because of the searching order, it is faster to place loops which are executed often at the top of a script.
+ Labels are not case sensitive.
+ Loops which look something like the example below should be avoided as many of them could cause the mission to slow down:
+ #wait
+ if (condition) then { goto "wait"}
+ It is better to use the @ command to wait for a condition to be true, or put a small delay into the wait loop.
+ Example
+ While it is not required to include a delay in a loop, such a loop without a delay can cause the script to slow the game down, as the loop will be executed many times before the game engine interrupts the script.
+ Unless you really want the loop to execute multiple times during a frame, you should include a small delay.
+ You would need to have many scripts running for this to be a significant issue.
+ Deciding whether to use a script with a loop or a trigger or even a @ statement to detect a condition is a complicated matter and should be subject to experimentation.
+
+ (August 4, 2006)
+ A goto command called within a forEach loop, will only execute a single jump to goto, once the forEach loop has finished:
+ { goto "wait"} forEach [0,1,2,3,4]
- Object
+ Nothing
+
- attachedTo
+ setPitch
- Returns the object it is attached to.
- Returns objNull if not attached to anything.
+ Sets the pitch of a persons voice.
- https://community.bistudio.com/wiki/attachedTo
+ https://community.bistudio.com/wiki/setPitch
- attachedTo Object
+ Object setPitch Number
- attachedTo object
+ person setPitch pitch
- $Code$if ( isNull attachedTo _obj1) then {
- hint "_obj1 is not attached to anything.";
- };$/Code$
+ $Code$unit1 setPitch 1$/Code$
- undefined / undefined
+ undefined / local
- Object
+ Nothing
+
- attackEnabled
+ animationState
- Return whether a group's leader can issue attack commands to soldiers under his command.
+ Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.
- https://community.bistudio.com/wiki/attackEnabled
+ https://community.bistudio.com/wiki/animationState
- attackEnabled Object/Group
+ animationState Object
- attackEnabled name
+ animationState unitName
- $Code$if (not attackEnabled _soldier) then {_soldier setCombatMode "Careless"}$/Code$
+ $Code$_state = animationState player ;$/Code$
global / undefined
+ (August 22, 2014)
+ (A3 1.26) To sort animation state by keyword, use BIS_fnc_ambientAnimGetParams
+ $Code$ ("KNEEL" call BIS_fnc_ambientAnimGetParams ) select 0;
+ //return: ["amovpknlmstpslowwrfldnon"…]$/Code$
+ Useful keywords are: "STAND", "WATCH", "GUARD", "LISTEN_BRIEFING", "LEAN_ON_TABLE", "LEAN", "SIT_AT_TABLE", "KNEEL", "PRONE_INJURED", "BRIEFING" ect.
- Boolean
+ String
+
- backpackCargo
+ teamMember
- Get array with backpacks from ammo box (or any general weapon holder container).
+ Return an agent for given person.
- https://community.bistudio.com/wiki/backpackCargo
+ https://community.bistudio.com/wiki/teamMember
- backpackCargo Object
+ teamMember Object
- backpackCargo box
+ teamMember person
- $Code$hint str backpackCargo vehicle player ;$/Code$
+ $Code$_agent = teamMember player ;$/Code$
undefined / undefined
@@ -6287,135 +6586,173 @@
- Array
+ Team_Member
+
- backpackContainer
+ animatePylon
- Returns a cargo container of a unit's backpack.
+ Force animation of pylon to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when pylon state =1.
- https://community.bistudio.com/wiki/backpackContainer
+ https://community.bistudio.com/wiki/animatePylon
- backpackContainer Object
+ Object animatePylon Array
- backpackContainer unit
+ vehicle animatePylon [pylon nameindex, anim phase]
- $Code$hint str backpackContainer player ; //1a5f7900# 163944: backpack_fast.p3d$/Code$
-
- $Code$hint str getMagazineCargo backpackContainer player ;
- // [
- //[
- //"APERSBoundingMine_Range_Mag",
- //"ClaymoreDirectionalMine_Remote_Mag",
- //"SLAMDirectionalMine_Wire_Mag",
- //"DemoCharge_Remote_Mag"
- //],[
- //3,
- //2,
- //2,
- //1
- //]
- //]$/Code$
-
- $Code$( backpackContainer player ) addWeaponCargoGlobal [ weapons player select 0,1];$/Code$
+ $Code$( vehicle player ) animatePylon [1, 0.5];$/Code$
undefined / undefined
- (Apr 29, 2014)
- In ArmA3 ver 1.16, we can use either backpackContainer or unitBackpack at present since both of them enjoy same operand type and return value.
- Object
+ Nothing
+
- backpackItems
+ isNil
- Get array with all items (of any kind, even weapons) in backpack of the given unit.
+ Tests whether the variable defined by the String argument is undefined, or whether an expression result passed as Code is undefined.
+ The command returns true if the variable or the expression result is undefined (i.e. the expression result is Void ), and false in all other cases.
- https://community.bistudio.com/wiki/backpackItems
+ https://community.bistudio.com/wiki/isNil
- backpackItems Object
+ isNil String
+
+ isNil Code
- backpackItems unit
+ isNil variableName
+
+ isNil code
- $Code$backpackItems player ;[
- "hgun_P07_F",
- "Titan_AT"
- ]$/Code$
+ $Code$if ( isNil "_pokus") then {_pokus = 0};$/Code$
+
+ $Code$isNil { player getVariable "someVar"};$/Code$
undefined / undefined
+ I recently had a strange experience with this command. I forgot to wrap the name of the variable with quotes, and it returned the opposite of the true null status of the variable. Just something to watch out for.
+
+ ^ If you don't wrap the name of the variable in quotes, then it will instead read the value of the variable itself. If that variable is a string or code, then the command will use that string or code held by the variable. Example:
+ _myvar = "_hisvar";
+ isnil _myvar;
+ //will return true if _hisvar is null
+ _myvar = {tank1};
+ sleep (random 50);
+ isnil _myvar;
+ //will return if tank1 is nil, at the time the isnil command is checked (not at the time _myvar is established)
+ -- General Barron 10:37, 30 December 2009 (CET)
+
+ isNil is also able to check if an expression is undefined. As such, an alternative way to check variables would be:
+ isNil {variable}
+ you can use this method to also check if variables defined using setVariable exist as well:
+ isNil {player getVariable "Something"}
+ As well as testing if a function returns a value
+ func_ChangeVehicleName =
+ {
+ _this setVehicleVarName "newName";
+ };
+ if (isNil {player call func_ChangeVehicleName}) // returns true, because this function does not return anything
+
+ (September 25, 2014)
+ While isNil isn't available in OFP/CWA you can easily emulate it with something like this:
+ _nil = format["%1",_nilstring];
+ ?(format["%1",foo]==_nil): foo = "Hello World!"
+
+ (October 25, 2014)
+ You can also use isNil to check if an array element exists or if a setVariable variable exists
+ $Code$_array = [0,1,2,3];
+ if (isNil {_array select 4}) then {hint "Element does not exist";};$/Code$
+ $Code$if ( isNil { missionNamespace getVariable "MY_VARIABLE"})$/Code$
+ When trying to test array elements, you can only test elements that are 1 element out of range. Testing elements 2 or more elements out of range will result in a script error.
+
+ (June 25, 2017)
+ isNil in combination with code will execute that code so be aware.
+
+ (July 18, 2017)
+ isNil CODE will execute the code in unscheduled environment
- Array
+ Boolean - Boolean
+
- backpackMagazines
+ addWeapon
- Get array with all magazines from backpack of the given unit.
+ Add a weapon to a unit. The unit must be local to the computer where command is executed. For a global version of this command see addWeaponGlobal.
+ Infantry units can only carry a specific number of weapons, once the weapon slots are filled, any further addWeapon commands are ignored.
- https://community.bistudio.com/wiki/backpackMagazines
+ https://community.bistudio.com/wiki/addWeapon
- backpackMagazines Object
+ Object addWeapon String
- backpackMagazines unit
+ unit addWeapon weapon
- $Code$backpackMagazines player ;[
- "Titan AT Missile(1/1)[id/cr:16/0](2x)"
- ]$/Code$
+ $Code$player addMagazine "30Rnd_556x45_Stanag";
+ player addWeapon "BAF_L85A2_RIS_SUSAT";$/Code$
+
+ $Code$An_2 addMagazine "100Rnd_762x51_M240";
+ An_2 addWeapon "M240_veh";$/Code$
- undefined / undefined
+ local / global
+ (August 2, 2006)
+ Notes from before the conversion:
+ To ensure that the weapon is loaded at the start of the mission, add at least one magazine ( addMagazine ) before adding the weapon. To remove weapons use the removeAllWeapons or the removeWeapon commands.
+
+ When adding a weapon in-game, a bug means that sometimes the weapon can't be fired. Swap to a different weapon and swap back again to enable the newly added weapon to fire; or drop and pick up the weapon again.
- Array
+ Nothing
+
- backpack
+ listVehicleSensors
- Returns a class of a backpack.
+ Returns an array of the sensors in the given vehicle's config (configfile CfgVehicles vehicle Components SensorsManagerComponent Components).
- https://community.bistudio.com/wiki/backpack
+ https://community.bistudio.com/wiki/listVehicleSensors
- backpack Object
+ listVehicleSensors Object
- backpack unit
+ listVehicleSensors vehicle
- $Code$_classname = backpack player ;$/Code$
+ $Code$_sensors = listVehicleSensors ( vehicle player );
+ hint str _sensors;$/Code$
undefined / undefined
@@ -6423,236 +6760,284 @@
- String
+ Array
+
- backpackSpaceFor
+ cheatsEnabled
- Returns how much space is in backpack for given weapon or magazine
+ Checks whether cheats are enabled (whether the designers' version is running).
- https://community.bistudio.com/wiki/backpackSpaceFor
+ https://community.bistudio.com/wiki/cheatsEnabled
- Object backpackSpaceFor String
+ cheatsEnabled
- backpack backpackSpaceFor weaponName
+ cheatsEnabled
- $Code$( backpack player ) backpackSpaceFor "m16"; // [weapons, magazines]$/Code$
-
+
undefined / undefined
- Array
+ Boolean
+
- behaviour
+ boundingBox
- Return the behaviour of a unit. For Arma 3 behaviour explanation see Arma_3_AI_Behavior
+ Returns a bounding box of given object in model coordinate space. This command is rather generous on the size estimation, for more precise coordinates use boundingBoxReal
- https://community.bistudio.com/wiki/behaviour
+ https://community.bistudio.com/wiki/boundingBox
- behaviour Object
+ boundingBox Object
- behaviour unitName
+ boundingBox model
- $Code$_soldier setBehaviour "CARELESS";
- _b = behaviour _soldier; //returns "CARELESS"$/Code$
+ $Code$_box = boundingBox _abrams$/Code$
- global / undefined
+ undefined / undefined
- (14 Feb 2010)
- Although behaviour is called on an individual unit, what you are really getting back is the behaviour of that unit's group. Behaviour is a group setting.
- String
+ Array
+
- benchmark
+ ctrlModelDirAndUp
- Returns the value of "3D Performance" in OFP Preferences (flashpoint.cfg). This can be used to estimate the computer performance to adapt CPU and GPU demanding settings like view distance dynamically in missions.
+ Returns vectorDir and vectorUp of the model used in 3D Dialog Control.
- https://community.bistudio.com/wiki/benchmark
+ https://community.bistudio.com/wiki/ctrlModelDirAndUp
- benchmark
+ ctrlModelDirAndUp Control
- benchmark
+ ctrlModelDirAndUp control
- $Code$? (benchmark 2000) : setViewDistance 2000$/Code$
+ $Code$_vectorDirAndUp = ctrlModelDirAndUp _control3D;$/Code$
undefined / undefined
- (14 March 2014)
- The command is obsolete, it was used in OFP to measure PC performance. In A3 it returns 2000.
- Number
+ Array
+
- binocular
+ vectorMagnitudeSqr
- Returns class name of currently used binocular weapon.
+ Squared magnitude of a 3D vector.
- https://community.bistudio.com/wiki/binocular
+ https://community.bistudio.com/wiki/vectorMagnitudeSqr
- binocular Object
+ vectorMagnitudeSqr Array
- binocular unit
+ vectorMagnitudeSqr vector
- $Code$_binocs = binocular player ; //Rangefinder$/Code$
+ $Code$_sizeSqr = vectorMagnitudeSqr [0,3,4]; //25$/Code$
undefined / undefined
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector = [x,y,z];
+ Result = (x ^ 2) + (y ^ 2) + (z ^ 2)
+ $/Code$
+ It is recommended to use vectorMagnitudeSqr instead of BIS_fnc_magnitudeSqr.
- String
+ Number
+
- blufor
+ isLightOn
- Pre-defined variable for the blufor side.
- Alias for west.
+ Returns true if vehicle headlights are on otherwise false.
- https://community.bistudio.com/wiki/blufor
+ https://community.bistudio.com/wiki/isLightOn
- blufor
+ isLightOn Object
- blufor
+ isLightOn vehicle
- $Code$if ( side player == blufor ) then {
- hint "BLUFOR";
- };$/Code$
+ $Code$_lightsOn = isLightOn vehicle player ;$/Code$
+
+ $Code$_pilotLightOn = isLightOn heli;$/Code$
- undefined / undefined
+ global / undefined
- Side
+ Boolean
+
- boundingBoxReal
+ setWaypointStatements
- Returns a bounding box of given object in model coordinates space. This command is similar to boundingBox but gives more precise measurements.
+ The waypoint is done only when the condition is fulfilled. When the waypoint is done, the statement expression is executed.
+ Within the Condition & Statement code string:
+ this refers to the group leader
+ thisList refers to an array containing each unit in the group
- https://community.bistudio.com/wiki/boundingBoxReal
+ https://community.bistudio.com/wiki/setWaypointStatements
- boundingBoxReal Object
+ Array setWaypointStatements Array
- boundingBoxReal obj
+ waypoint setWaypointStatements [condition, statement]
- $Code$_bbr = boundingBoxReal vehicle player ;
- _p1 = _bbr select 0;
- _p2 = _bbr select 1;
- _maxWidth = abs ((_p2 select 0) - (_p1 select 0));
- _maxLength = abs ((_p2 select 1) - (_p1 select 1));
- _maxHeight = abs ((_p2 select 2) - (_p1 select 2));$/Code$
+ $Code$new_wp setWaypointStatements [" true ", " hint 'hello'; hint 'goodbye'"];$/Code$
+
+ $Code$new_wp setWaypointStatements [" true ", " diag_log ['GroupLeader: ', this ]; diag_log ['Units: ', thislist ]"];$/Code$
undefined / undefined
+ (May 21, 2016)
+ Within the completion statement currentWaypoint will give the index of the waypoint being completed (as opposed to the following one).
+ This is particularly useful if you need a self deleting waypoint: $Code$ setWaypointStatements [" true "," deleteWaypoint [ group this, currentWaypoint ( group this)]"]$/Code$
+
+ (May 9, 2017)
+ The condition block carries the same rules as functions which return a value. The return value must be of type Boolean. I can bypass the use of triggers in this manner.
+ $Code$_wp setWaypointStatements [" code code code; _returnBool ", " onActivation block; "];$/Code$
- Array
+ Nothing
+
- boundingBox
+ tvSetData
- Returns a bounding box of given object in model coordinate space. This command is rather generous on the size estimation, for more precise coordinates use boundingBoxReal
+ Sets string data to item on given path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/boundingBox
+ https://community.bistudio.com/wiki/tvSetData
- boundingBox Object
+ tvSetData Array
+
+ Control tvSetData Array
- boundingBox model
+ tvSetData [idc, [path], data]
+
+ _ctrl tvSetData [ [path], data]
- $Code$_box = boundingBox _abrams$/Code$
+ $Code$tvSetData [101, [0], "Test data"];$/Code$
+
+ $Code$_ctrl tvSetData [ [0,0,0], "Test data"];$/Code$
- undefined / undefined
+ local / local
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Array
+ Nothing - Nothing
+
- boundingCenter
+ shownMap
- Returns the position of original (loaded) center of object in model coordinates.
+ Checks if client has Map enabled in description.ext ( showMap param) or force enabled with showMap command.
- https://community.bistudio.com/wiki/boundingCenter
+ https://community.bistudio.com/wiki/shownMap
- boundingCenter Object
+ shownMap
- boundingCenter object
+ shownMap
- $Code$_center = boundingCenter TruckOne$/Code$
+ $Code$if ( shownMap ) then { hint "You have Map enabled"};$/Code$
undefined / undefined
@@ -6660,867 +7045,818 @@
- Array
+ Boolean
+
- breakOut
+ setWeaponReloadingTime
- Breaks the code execution out of scope {} named name. nil is returned. Scope name can be assigned using scopeName command.
- Since Arma 3 v1.47, breakOut can be used to return a value. It is the closest SQF comes to having "return" like operation.
+ Sets states and/or makes an action of/on weapon. Reload time is between 0 and 1 inclusive, where 1 is 100% of maximum reloading time.
- https://community.bistudio.com/wiki/breakOut
+ https://community.bistudio.com/wiki/setWeaponReloadingTime
- breakOut String
-
- Anything breakOut String
+ Object setWeaponReloadingTime Array
- breakOut name
-
- value breakOut name
+ vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime]
- $Code$scopeName "main";
- while { true } do {
- scopeName "loop1";
- while { true } do {
- scopeName "loop2";
- if (condition1) then { breakTo "main"}; // Breaks all scopes and return to "main"
- if (condition2) then { breakOut "loop2"}; // Breaks scope named "loop2"
- sleep 1;
- };
- sleep 1;
- };$/Code$
-
- $Code$call {
- scopeName "main";
- call {
- 123 breakOut "main"
- };
- 345
- }; // call returns 123$/Code$
+ $Code$_done = _vehicle setWeaponReloadingTime [ gunner ( vehicle player ), currentMuzzle ( gunner ( vehicle player )), 0.5];$/Code$
undefined / undefined
- (19 Aug, 2008)
- When "name" is nil, the command is ignored.
- When "name" is an undefined scope name or "", the script quits current scope.
- $Code$if (true) then {
- hint "1";
- breakOut nil;
- hint "2";
- }; //result "2"
- if (true) then {
- hint "1";
- breakOut "";
- hint "2";
- }; //result "1"
- if (true) then {
- hint "1";
- breakOut "dskfhdsklfh";
- hint "2";
- }; //result "1"
- $/Code$
+ (January 15, 2012)
+ The description is confusing to me. What the command essential does is to set the reloading state/time of the given weapon. For example you can fire a missile, and make the weapon available to fire again instantly if you apply 0.
+ Or you can delay or stop the reload event indefinitely. The 0-1 range is a percentage - the reload time is taken from the weapons's config value (either reloadTime or magazineReloadTime - not sure). The effect is one time only each - it does not modify the weapon's general reload time.
+ Works also for infantry weapons - probably useful weapons with longer reload time like sniper weapons or launchers:
+ player setWeaponReloadingTime [player,currentWeapon player,0];
+ No idea what's point of the return value.
- (August 27, 2015)
- breakOut can still be used if multiple scopes share identical names. It will simply break out of the nearest scope that matches the name parameter you've used. For example:
- $Code$call {
- scopeName "Main"; //Parent Main
- call {
- scopeName "Main"; //Child Main
- "String" breakOut "Main"; //Will break out of child main and return "String" to parent main
- };
+ (May 14, 2017)
+ Note that setWeaponReloadingTime is only having effect on a current weapon state (loaded projectile) so since the projectile is fired the next one will be reverted to a weapon config defaults. To keep the fire rate speed changed over time, use this code:
+ $Code$player addEventHandler ["FiredMan",{
+ params ["","_weapon","_muzzle"];
+ private _type = _weapon call BIS_fnc_itemType;
+ private _time = -1;
+ switch (_type select 1) do {
+ case 'SniperRifle' : {_time = 0.5};
+ case 'AssaultRifle' : {};
+ case 'Handgun' : {};
+ case 'Rifle' : {};
+ case 'SubmachineGun' : {};
+ case 'MachineGun' : {};
+ case 'Mortar' : {};
+ case 'GrenadeLauncher' : {};
+ case 'BombLauncher' : {};
+ case 'MissileLauncher' : {};
+ case 'RocketLauncher' : {};
+ case 'Cannon' : {};
+ case 'Throw' : {};
};
+ if (_time isEqualTo -1) exitWith {};
+ (vehicle player) setWeaponReloadingTime [(vehicle player), _muzzle, _time];
+ }];
$/Code$
- Therefore you are able to consistently reuse scope names such as "Main", "Child", "Primary", "Secondary", etc throughout functions without worrying about having to ensure you create unique names for each scope.
+ This Event Handler makes the gun of specific type shoot at a desired rate on each weapon state (sniper rifle will shoot 50% faster in this example). For more information about weapon kinds are there, visit BIS_fnc_itemType.
- Nothing - Anything
+ Boolean
+
- breakTo
+ enableDynamicSimulation
- Breaks block to scope named name. Nil is returned.
- Scope name can be assigned using scopeName command.
+ Enables or disables Arma_3_Dynamic_Simulation for given non AI object
- https://community.bistudio.com/wiki/breakTo
+ https://community.bistudio.com/wiki/enableDynamicSimulation
- breakTo String
+ Object/Group enableDynamicSimulation Boolean
- breakTo name
+ object enableDynamicSimulation enable
- $Code$scopeName "main";
- while { true } do {
- scopeName "loop1";
- while { true } do {
- scopeName "loop2";
- if (condition1) then { breakTo "main"}; // Breaks all scopes and return to "main"
- if (condition2) then { breakOut "loop2"}; // Breaks scope named "loop2"
- sleep 1;
- };
- sleep 1;
- };$/Code$
+ $Code$_myObject enableDynamicSimulation true ;$/Code$
undefined / undefined
- (May 18, 2017)
- This command can not be used to re-execute scopes in which command is inside of. Example:
- $Code$scopeName "whatever";
- if true then {
- breakTo "whatever"
- };
- $/Code$
- The example above will not make the engine jump back to line 1 and re-execute the 2nd line. Instead, it will just jump across line 2 to line 5 if it [ line 5 ] exists.
- Nothing
+ Nothing
+
- briefingName
+ preprocessFile
- Returns the name of the current briefing/scenario name.
+ Reads and processes the content of the specified file. Preprocessor is C-like, supports comments using // or /* and */ and PreProcessor Commands. Due to the hard-drive access this command executes (and the lack of caching) this command should not be used in time-critical script loops.
- https://community.bistudio.com/wiki/briefingName
+ https://community.bistudio.com/wiki/preprocessFile
- briefingName
+ preprocessFile String
- briefingName
+ preprocessFile fileName
- $Code$_name = briefingName ;$/Code$
+ $Code$_content = preprocessFile "myFunction.sqf";$/Code$
undefined / undefined
+ (March 4, 2008)
+ File path is always relative to mission directory. If script dir\a.sqf includes dir\b.sqf, use "dir\b.sqf" and not "b.sqf".
+
+ (July 8, 2011)
+ Use preprocessFileLineNumbers instead as it provides more context information on error.
+
+ (December 17, 2013)
+ The main difference between preprocessFile and preprocessFileLineNumbers is that the latter adds #line directive to the target file, which allows to log the __LINE__ error happened at and the __FILE__ error happened in.
+
+ (July 25, 2014)
+ Essentially what the preprocessFile command does is it refers to the contents of a file as a string:
+ Example 1:
+ boop.html:
+ $Code$ t align = 'center' valign = 'middle' shadow = '0' size = '2' structured text /t $/Code$
+ init.sqf:
+ $Code$_text = parseText preprocessFile "boop.html";
+ hint _text;
+ $/Code$
+ This is especially useful for long strings, and it works on files with any file extension as long as they can be edited with a text editor.
+ Example 2:
+ init.sqf:
+ $Code$ hint preprocessFile "description.ext";
+ copyToClipboard preprocessFile "mission.sqm";
+ $/Code$
+ The above is all valid. However, using *.jpg or any other files saved in an image format is not possible.
- String
+ String
+
- buildingExit
+ menuClear
- Returns the given indexed exit in a building. The returned value is in format Position.
+ Removes all entries from given menu strip.
- https://community.bistudio.com/wiki/buildingExit
+ https://community.bistudio.com/wiki/menuClear
- Object buildingExit Number
+ menuClear Number
- building buildingExit index
+ menuClear idc
- $Code$_building buildingExit 0$/Code$
-
+
undefined / undefined
- Array
+ Nothing
+
- buildingPos
+ getAnimAimPrecision
- Returns PositionAGL of a given indexed position in a building. The index is 0-based (i.e. the first possible position would be 0. So if a building has 5 positions listed in the editor, 4 would be the highest position index usable with this command). Command will return [0,0,0] if buildingPos with given index is non-existent.
- Since Arma 3 v.155.133934 if index -1 is supplied, the command will return array with all available positions.
+ Returns aim precision for current animation
- https://community.bistudio.com/wiki/buildingPos
+ https://community.bistudio.com/wiki/getAnimAimPrecision
- Object buildingPos Number
+ getAnimAimPrecision Object
- building buildingPos index
+ getAnimAimPrecision unit
- $Code$_soldier setPosATL (_house1 buildingPos 2);$/Code$
-
- $Code$_allpositions = nearestBuilding player buildingPos -1;$/Code$
+ $Code$getAnimAimPrecision player;$/Code$
- global / undefined
+ undefined / undefined
- (August 2, 2006)
- Notes from before the conversion:
- These examples will move a unit to the 1st position specified in a buildings model, in the second example - bunker1.
- $Code$this move (building buildingPos 1);
- this move (bunker1 buildingPos 1);$/Code$
- In the default game buildings, the buildingPos is usually right behind a window. This can make it easy to place units in the windows of buildings, by putting the unit near a building and putting this in its init field:
- $Code$this setPosATL (( nearestBuilding this) buildingPos 1);$/Code$
- The location returned by buildingPos is not reliable after the player has exited and then resumed the mission. For code that is executed immediately after the mission starts there is no problem.
- If buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts.
-
- (January 26, 2007)
- The highest index is not necessarily the highest position in a building! Check the z-value to find out the absolute height of a position.
-
- (February 16, 2007)
- (building buildingPos 1) will return [0,0,0] if buildingPos with this index does not exist.
-
- (January 08, 2011)
- Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model).
- Array
+ Number
+
- buttonAction
+ setIdentity
- Return the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Dialog Control for more information about user dialogs and controls.
+ Set identity of person.
+ Identities are defined in Description.ext of the mission or campaign. For a list of available faces, glasses and speakers check Category:CfgIdentities.
- https://community.bistudio.com/wiki/buttonAction
+ https://community.bistudio.com/wiki/setIdentity
- buttonAction Number
-
- buttonAction Control
+ Object setIdentity String
- buttonAction idc
-
- buttonAction control
+ person setIdentity identity
- $Code$buttonSetAction [100, {player exec "reply.sqs"}]
- _action = buttonAction 100
- returns {player exec "reply.sqs"}$/Code$
+ $Code$_soldier1 setIdentity "MyLittleSoldier";$/Code$
- local / undefined
+ undefined / undefined
+ (August 28, 2013)
+ For ArmA3 the definition format in the Description.ext file is:
+ class CfgIdentities
+ {
+ class MyLittleSoldier
+ {
+ name = "Givens";
+ nameSound = "Givens";
+ face="WhiteHead_06";
+ glasses="None";
+ speaker="Male05ENG";
+ pitch=1.1;
+ };
+ };
+ nameSound can be any preset BIS recorded name value. By default units will be called out in voice by their number. By using nameSound you can call them out by name using the following values:
+ Default:
+ Armstrong
+ Nichols
+ Tanny
+ Frost
+ Lacey
+ Larkin
+ Kerry
+ Jackson
+ Miller
+ McKendrick
+ Levine
+ Reynolds
+ BLUFOR:
+ Adams
+ Bennett
+ Campbell
+ Dixon
+ Everett
+ Franklin
+ Givens
+ Hawkins
+ Lopez
+ Martinez
+ O'Connor
+ Ryan
+ Patterson
+ Sykes
+ Taylor
+ Walker
+ OPFOR:
+ Amin
+ Masood
+ Fahim
+ Habibi
+ Kushan
+ Jawadi
+ Nazari
+ Siddiqi
+ Takhtar
+ Wardak
+ Yousuf
+ INDEPENDENT:
+ Anthis
+ Costa
+ Dimitirou
+ Elias
+ Gekas
+ Kouris
+ Leventis
+ Markos
+ Nikas
+ Nicolo
+ Panas
+ Petros
+ Rosi
+ Samaras
+ Stavrou
+ Thanos
+ Vega
+ CODE NAMES:
+ Ghost
+ Stranger
+ Fox
+ Snake
+ Razer
+ Jester
+ Nomad
+ Viper
+ Korneedler
+ face can be any of the following:
+ AfricanHead_01
+ AfricanHead_02
+ AfricanHead_03
+ AsianHead_A3_01
+ AsianHead_A3_02
+ AsianHead_A3_03
+ GreekHead_A3_01
+ GreekHead_A3_02
+ GreekHead_A3_03
+ GreekHead_A3_04
+ GreekHead_A3_05
+ GreekHead_A3_06
+ GreekHead_A3_07
+ GreekHead_A3_08
+ GreekHead_A3_09
+ PersianHead_A3_01
+ PersianHead_A3_02
+ PersianHead_A3_03
+ NATOHead_01
+ WhiteHead_02
+ WhiteHead_03
+ WhiteHead_04
+ WhiteHead_05
+ WhiteHead_06
+ WhiteHead_07
+ WhiteHead_08
+ WhiteHead_09
+ WhiteHead_10
+ WhiteHead_11
+ WhiteHead_12
+ WhiteHead_13
+ WhiteHead_14
+ WhiteHead_15
+ speaker can be any of the following:
+ Male01ENG
+ Male01ENGB
+ Male01GRE
+ Male01PER
+ Male02ENG
+ Male02ENGB
+ Male02GRE
+ Male02PER
+ Male03ENG
+ Male03ENGB
+ Male03GRE
+ Male03PER
+ Male04ENG
+ Male04ENGB
+ Male04GRE
+ Male05ENG
+ Male06ENG
+ Male07ENG
+ Male08ENG
+ Male09ENG
+ In ArmA 3 1.04+ these settings can also be set individually without description.ext editing by using the following commands: setFace, setName, setNameSound, setSpeaker, setPitch
+
+ (August 4, 2006)
+ Notes from before the conversion:
+ The definition format in the Description.ext file is:
+ class CfgIdentities
+ {
+ class John_Doe
+ {
+ name = "John Bartholemew Doe";
+ face = "Face20";
+ glasses = "None";
+ speaker = "Dan";
+ pitch = 1.1;
+ };
+ };
+ In Operation Flashpoint,
+ Name can be any string.
+ Face can take any of the following values:
+ Male: "Face1"... to "Face52", "Face99" & "FaceR01" to "Face R04"
+ Female: "Eva", "Kamila", "Lada", "Lucie", "Marketa" & "Nada"
+ Glasses can take the following values: "None", "Spectacles" & "Sunglasses"
+ Speaker determines which voice is used and can take any of the following values:
+ "Adam"
+ "Dan"
+ "George"
+ "Greg"
+ "John"
+ "Jonah"
+ "Marc"
+ "Patrick"
+ "Paul"
+ "Peter"
+ "Rich"
+ "Rob"
+ "Ted"
+ "Tom"
+ "Nikolai"
+ "Vitaliy"
+ "Sergey"
+ "Oleg"
+ "Ruslan"
+ "Aleksei"
+ "Andrei"
+ "Boris"
+ "Georgiy"
+ "Vadim"
+ "Vladimir"
+ "Ivan"
+ Pitch sets the tone of voice. 1.0 for normal; 1.0 for deep; 1.0 for high pitched
+
+ (November 18, 2006)
+ Preview of all faces in Armed Assault can be found on Czech Biki
+
+ (May 10, 2008)
+ Glasses and Female faces do not work as of Arma patch 1.12beta.
- String - String
+ Nothing
+
- buttonSetAction
+ velocityModelSpace
- Set the action of a control of the currently active user dialog. Can be used for buttons and active texts. See Dialog Control for more information about user dialogs. Works with:
- CT_BUTTON
- CT_XBUTTON
- CT_ACTIVETEXT
- CT_SHORTCUTBUTTON
- The action code is expected to be in SQS format
+ Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z]. Vector is in model space.
- https://community.bistudio.com/wiki/buttonSetAction
+ https://community.bistudio.com/wiki/velocityModelSpace
- buttonSetAction Array
-
- Control buttonSetAction String
+ velocityModelSpace Object
- buttonSetAction [idc, action]
-
- control buttonSetAction action
+ velocityModelSpace vehicle
- $Code$buttonSetAction [100, " player exec ""reply.sqs"""];$/Code$
-
- $Code$_ctrl buttonSetAction " if ( alive bob) then { hint 'alive'} else { hint 'dead'}"; // SQF but SQS compatible, see SQS$/Code$
+ $Code$velocityModelSpace _chopper;
+ comment "Returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]";$/Code$
- local / local
+ undefined / undefined
- (October 5, 2009)
- When using buttonSetAction for an ActiveText control from a script, you cannot use any variables local to the script in it.
- /* This will print 'any bar' in the hint box,
- since _foo has no value according to buttonSetAction */
- _foo = "foo";
- buttonSetAction [100, "hint format[""%1 bar"", _foo];"];
-
- (February 15, 2016)
- This command does not overwride the buttonaction which was set via "action" in the hpp of the dialog
+ (December 11, 2014)
+ This function is useful for helicopters as it returns Z vector like an indicator of thrust/load ratio. More or less climb (+) or descent (-) tendency but:
+ As X,Y,Z vectors are relative to vehicle attitude, this function doesn't return a climb or descend rate (as the attitude of the vehicle can be far from horizontal). You can get negative Z vector, in jets, while climbing fast, peeling off in the sky!
+ More or less, you can use as a Z accelerometer factor but invert the sign: +G acceleration (negative vector below the jet) is -Z here.
+ If not "physically" correct, the behavior is sufficient enough for Arma flight model.
- (June 11, 2016)
- To use variables local to the defining script, a syntax like the one below needs to be used:
- $Code$_foo = "foo";
- buttonSetAction [100, format["hint '%1 bar'", _foo]];
- $/Code$
- works! thanks to Kronzky for commenting this workaround in the VBS wiki
+ (June 21, 2015)
+ Previous note is physically incorrect. Velocity can not be used to give information about Thrust/Load ratio or G-Forces/acceleration. To get acceleration you have to create the derivative of velocity after time dv/dt - the difference of velocity between 2 timesteps divided by the time that passed between the 2 steps.
- Nothing - Nothing
+ Array
+
- cadetMode
+ importAllGroups
- Returns if the player is currently playing in cadet or veteran mode.
+ Imports all groups into the RTE.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/cadetMode
+ https://community.bistudio.com/wiki/importAllGroups
- cadetMode
+ importAllGroups Control
- cadetMode
+ importAllGroups map
- $Code$? ( cadetMode ) : _AIsoldier setSkill 0.1 //sqs$/Code$
-
- $Code$if ( cadetMode ) then {_AIsoldier setSkill 0.1}; //sqf$/Code$
-
+
undefined / undefined
- (December 1, 2009)
- In ArmA II, this command will return true if the difficulty level is set to "Recruit" or "Regular". It returns false for the "Veteran" and "Expert" difficulty levels.
- Boolean
+ Nothing
+
- callExtension
+ menuData
- Calls custom.dll also known as Extension. The name of the extension is the name of the extension.dll without ".dll" part (or without "_x64.dll" part on 64-bit Arma). For example if the file is 'myExtension.dll' the name of the extension will be "myExtension". For 64-bit extensions, the name of the extension doesn't need to change and is still "myExtension". The game will automatically look for 'myExtension_x64.dll' when you use 64-bit Arma exe.
- This command is blocking, meaning that the game will wait for the extension to return before continuing. This may cause FPS drop if extension is not optimised. If extension takes too long, consider making asynchronous extension, where the result of the work of the extension is collected in a separate call.
- Currently there is no limit how much data you can send to the extension. However there is a limit on how much data you can return from extension in one call. The limit is known to the extension and is passed in int outputSize. The limit may or may not change in the future and is currently 10240 bytes. It is up to extension designer to handle multipart results if returned data exceeds output limit.
- Since Arma 3 v1.67 it is possible to pass array of arguments to extensions. The array of arguments could be anything and all elements will be converted to strings, however you might want to only send simple types like Booleans, Strings, Numbers and Arrays of all of the above. There is currently a limit on how many arguments can be sent and it is 1024. However an argument could be an Array itself, in this case extension maker will have to provide additional methods for parsing such arguments.
- Possible error codes:
- 101: SYNTAX_ERROR_WRONG_PARAMS_SIZE
- 102: SYNTAX_ERROR_WRONG_PARAMS_TYPE
- 201: PARAMS_ERROR_TOO_MANY_ARGS
- 301: EXECUTION_WARNING_TAKES_TOO_LONG
- Each error will have entry in.rpt file with more details.
- Since Arma 3 v1.69, RVExtensionVersion interface (see source code example below) has been added, which is called by the engine on extension load and expects extension version. This interface is designed to work with both, Linux and Windows. The max buffer size is 32 bytes. The version information will then appear in. rpt file like so:
- $Code$19:06:36 CallExtension loaded: test_extension (.\test_extension.dll) [1.0.0.1]$/Code$
- For more information see Extensions.
+ Returns data stored in menu entry on given path.
- https://community.bistudio.com/wiki/callExtension
+ https://community.bistudio.com/wiki/menuData
- String callExtension String
-
- String callExtension Array
+ menuData Array
- extension callExtension function
-
- extension callExtension [function, arguments]
+ menuData [idc, path]
- $Code$_return = "myExtension" callExtension "stringToBeParsed";$/Code$
-
- $Code$_result = "test_extension" callExtension str weapons player ;
- _result = "test_extension" callExtension ["fnc1", getUnitLoadout player ];
- _result = "test_extension" callExtension ["fnc2", magazinesAmmoFull player ];
- _result = "test_extension" callExtension ["fnc1", [ weapons player, magazines player ]];$/Code$
-
- $Code$_result = "test_extension" callExtension ["fnc1", [1,"two", true,[4,"five", false ]]];
- parseSimpleArray (_result select 0) params ["_number","_string","_boolean","_array"];
- systemChat str [_number,_string,_boolean,_array];
- // Source Code ( Download.dll )
- //This is an example of an extension compatible with both syntaxes. When using 1st syntax, the data is just copied from input to output. When using alt syntax, the arguments are parsed and then assembled back into string array in 2 ways: fnc1 and fnc2. fnc1 is a fraction faster.
- //#include string
- //#include vector
- //#include iterator
- //#include sstream
- //#define CURRENT_VERSION "1.0.0.1"
- //extern "C"
- //{
- ////--- Engine called on extension load
- //__declspec ( dllexport ) void __stdcall RVExtensionVersion ( char * output, int outputSize ) ;
- ////--- STRING callExtension STRING
- //__declspec ( dllexport ) void __stdcall RVExtension ( char * output, int outputSize, const char * function ) ;
- ////--- STRING callExtension ARRAY
- //__declspec ( dllexport ) int __stdcall RVExtensionArgs ( char * output, int outputSize, const char * function, const char ** args, int argsCnt ) ;
- //}
- ////--- Extension version information shown in.rpt file
- //void __stdcall RVExtensionVersion ( char * output, int outputSize )
- //{
- ////--- max outputSize is 32 bytes
- //strncpy_s ( output, outputSize, CURRENT_VERSION, _TRUNCATE ) ;
- //}
- ////--- name callExtension function
- //void __stdcall RVExtension ( char * output, int outputSize, const char * function )
- //{
- //std :: string str = function ;
- //strncpy_s ( output, outputSize, ( "Input Was: " + str ). c_str ( ), _TRUNCATE ) ;
- //}
- ////--- name callExtension [function, args]
- //int __stdcall RVExtensionArgs ( char * output, int outputSize, const char * function, const char ** args, int argsCnt )
- //{
- //if ( strcmp ( function, "fnc1" ) == 0 )
- //{
- ////--- Manually assemble output array
- //int i = 0 ;
- //std :: string str = "[" ;
- ////--- Each argument can be accessed via args[n]
- //if ( argsCnt 0 )
- //str + = args [ i ++ ] ;
- //while ( i argsCnt )
- //{
- //str + = "," ;
- //str + = args [ i ++ ] ;
- //}
- //str + = "]" ;
- ////--- Extension result
- //strncpy_s ( output, outputSize, str. c_str ( ), _TRUNCATE ) ;
- ////--- Extension return code
- //return 100 ;
- //}
- //else if ( strcmp ( function, "fnc2" ) == 0 )
- //{
- ////--- Parse args into vector
- //std :: vector std :: string vec ( args, std :: next ( args, argsCnt ) ) ;
- //std :: ostringstream oss ;
- //if ( ! vec. empty ( ) )
- //{
- ////--- Assemble output array
- //std :: copy ( vec. begin ( ), vec. end ( ) - 1, std :: ostream_iterator std :: string ( oss, "," ) ) ;
- //oss vec. back ( ) ;
- //}
- ////--- Extension result
- //strncpy_s ( output, outputSize, ( "[" + oss. str ( ) + "]" ). c_str ( ), _TRUNCATE ) ;
- ////--- Extension return code
- //return 200 ;
- //}
- //else
- //{
- //strncpy_s ( output, outputSize, "Avaliable Functions: fnc1, fnc2", outputSize - 1 ) ;
- //return - 1 ;
- //}
- //}$/Code$
-
+
undefined / undefined
- String - Array
+ String
+
- call
+ overcast
- Executes given set of compiled instructions with an option to pass arguments to the executed Code. In OFP this command used to accept String for the code.
+ Return the current overcast level. Zero is clear skies, one is maximum cloud cover.
- https://community.bistudio.com/wiki/call
+ https://community.bistudio.com/wiki/overcast
- call Code
-
- Anything call Code
+ overcast
- call code
-
- args call code
+ overcast
- $Code$call { hint str 123};$/Code$
-
- $Code$123 call { hint str _this};$/Code$
-
- $Code$_sum = [1, 2] call {(_this select 0) + (_this select 1)};
- hint str _sum; //3$/Code$
-
- $Code$123 call compile " hint str _this";$/Code$
-
- $Code$_result = 123 call compile preprocessFileLineNumbers "myfile.sqf";$/Code$
+ $Code$_cloudLevel = overcast$/Code$
undefined / undefined
- (July 5, 2014)
- A called function may only use suspension ( sleep, uiSleep, waitUntil ) if it originates in a scheduled environment. If the called function originates in a non-scheduled environment it will return a generic error.
- $Code$// *** non-scheduled origin ***
- [] spawn {
- // *** scheduled scope ***
- [] call {
- // *** scheduled scope ***
- sleep 3; // - OK
- hintSilent "Hello World!";
- };
- };
- $/Code$
- $Code$// *** non-scheduled origin ***
- [] call {
- // *** non-scheduled scope***
- [] call {
- // *** non-scheduled scope ***
- sleep 3; // - NOT OK
- hintSilent "Hello World!";
- };
- };
- $/Code$
- $Code$// *** scheduled origin ***
- [] spawn {
- // *** scheduled scope ***
- [] call {
- // *** scheduled scope ***
- sleep 3; // - OK
- hintSilent "Hello World!";
- };
- };
- $/Code$
- $Code$// *** scheduled origin ***
- [] call {
- // *** scheduled scope***
- [] call {
- // *** scheduled scope ***
- sleep 3; // - OK
- hintSilent "Hello World!";
- };
- };
- $/Code$
-
- (February 17, 2015)
- If the code is in non-scheduled scope and contains while-do statement, the code runs only 10,000 times at the maximum, even if the statement makes infinite loop. (ARMA3 Ver. 1.38.128937)
- $Code$// *** non-scheduled origin ***
- [] call {
- // *** non-scheduled scope***
- [] call {
- // *** non-scheduled scope ***
- _a=0;
- while{_a 15000} do{
- _a=_a+1;
- };
- hint str(_a);//10000
- };
- };$/Code$
- Anything - Anything
+ Number
+
- camCommand
+ copyToClipboard
- Executes a command on the given camera / actor object. Known commands for:
- All camera types - "manual on", "manual off"
- "camera" - "inertia on", "inertia off"
- "seagull" - "landed", "airborne"
- When you execute camCommand "landed" on a flying seagull, it will land and sit on the floor until you call camCommand "airborne". The camCommand changes are conducted immediately, the command doesn't wait for camCommit.
+ Copy text string to the clipboard.
+ In MP available only on the client that is server
- https://community.bistudio.com/wiki/camCommand
+ https://community.bistudio.com/wiki/copyToClipboard
- Object camCommand String
+ copyToClipboard String
- camera camCommand command
+ copyToClipboard text
- $Code$_camera camCommand "manual on";$/Code$
+ $Code$copyToClipboard str _data;$/Code$
- local / local
+ undefined / undefined
- (May 23, 2017)
- In Arma 3 with the addition of the curator camera type, the following commands are supported:
- $Code$_camera = "CamCurator" camCreate [0,0,0];
- _camera camCommand "maxPitch 89";
- _camera camCommand "minPitch -89";
- _camera camCommand "speedDefault 0.1";
- _camera camCommand "speedMax 2";
- _camera camCommand "ceilingHeight 5000";
- _camera camCommand "atl off";
- _camera camCommand "surfaceSpeed off";
+ (October 12, 2014)
+ To add a line break in output text do this:
+ $Code$_br = toString [13,10];//(carriage return & line feed)
+ _string = "Line 1" + _br + "Line 2";
+ copyToClipboard _string;
$/Code$
+ Paste into text editor of choice, you get:
+ $Code$Line 1
+ Line 2$/Code$
+ (A3 1.30 Stable executed inside.sqf via execVM )
- Nothing
+ Nothing
+
- camCommitPrepared
+ cos
- Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately.
+ Cosine of a number, argument in degrees.
- https://community.bistudio.com/wiki/camCommitPrepared
+ https://community.bistudio.com/wiki/cos
- Object camCommitPrepared Number
+ cos Number
- camera camCommitPrepared time
+ cos x
- $Code$//create a camera object
- _cam = "camera" camCreate [5600,4800,10];
- _cam camPrepareTarget player ;
- _cam cameraEffect ["internal", "BACK"];
- _cam camCommitPrepared 0;
- //smoothly move the camera to its new position in 6 seconds.
- _cam camPreparePos [5680,4720,20];
- _cam camCommitPrepared 6;
- waitUntil { camCommitted _cam};
- //proceed$/Code$
+ $Code$cos 60;//returns 0.5$/Code$
- local / local
+ undefined / undefined
+ (August 8, 2006)
+ Be aware that there might be rounding errors in the results of this command.
+ cos 90
+ for example doesn't return the expected '0', but '-4.37114e-008'. So, if you want to compare results of Cosinus, don't use the compare operator
+ (cos 90)==0
+ but rather use less than.
+ (cos 90) 0.00001
- Nothing
+ Number
+
- camCommitted
+ fuel
- Checks if the conduction of the last camCommit call already finished.
+ Checks how much fuel is left in the gas tank of a vehicle.
- https://community.bistudio.com/wiki/camCommitted
+ https://community.bistudio.com/wiki/fuel
- camCommitted Object
+ fuel Object
- camCommitted camera
+ fuel vehicle
- $Code$// SQS:
- ; create a camera object
- _cam = "camera" camCreate [5600,4800,10]
- _cam camSetTarget player
- _cam cameraEffect ["internal", "BACK"]
- _cam camCommit 0
- ; smoothly move the camera to its new position in 6 seconds
- _cam camSetPos [5680,4720,20]
- _cam camCommit 6
- @ camCommitted _cam
- ; proceed$/Code$
+ $Code$if ( fuel vehicle player == 0) then { hint "The vehicle is out of fuel!"};$/Code$
- undefined / undefined
+ global / undefined
+ Vehicles refuelled in game with the Fuel trucks e.t.c never get completely refuelled. After refuelling, rather than returning a value of 1 when the fuel command is called. They return a value greater than 0.98 and less than 1.
- Boolean
+ Number
+
- camCommit
+ setDetailMapBlendPars
- Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately.
+ Sets the detail texture map blend pars. Allows for smooth transition between detailed and undetailed terrain texture at distance. If noDetail fullDetail, the texture detail will incur smooth transition in the area between the thresholds. If noDetail = fullDetail there will be obvious visible edge between texture detail changes at fullDetail distance.
- https://community.bistudio.com/wiki/camCommit
+ https://community.bistudio.com/wiki/setDetailMapBlendPars
- Object camCommit Number
+ setDetailMapBlendPars Array
- camera camCommit time
+ setDetailMapBlendPars [fullDetail, noDetail]
- $Code$// SQS
- ; create a camera object
- _cam = "camera" camCreate [5600,4800,10]
- _cam camSetTarget player
- _cam cameraEffect ["internal", "BACK"]
- _cam camCommit 0
- ; smoothly move the camera to its new position in 6 seconds
- _cam camSetPos [5680,4720,20]
- _cam camCommit 6
- @ camCommitted _cam
- ; proceed$/Code$
+ $Code$setDetailMapBlendPars [20, 50];$/Code$
- $Code$// SQF
- private "_cam";
- comment "create a camera object";
- _cam = "camera" camCreate [ position player select 0, position player select 1, 2];
- _cam camSetTarget player ;
- _cam cameraEffect ["internal", "BACK"];
- _cam camCommit 0;
- comment "smoothly move the camera to its new position in 6 seconds";
- _cam camSetPos [ position player select 0, ( position player select 1) + 10, 20];
- _cam camCommit 6;
- waitUntil { camCommitted _cam; };$/Code$
+ $Code$setDetailMapBlendPars ( if ( currentWeapon player in [
+ "Binocular",
+ "Rangefinder",
+ "Laserdesignator"
+ ]) then [
+ {[300,600]},
+ {[20,50]}
+ ]);$/Code$
- local / local
+ undefined / local
- Nothing
+ Nothing
+
- camConstuctionSetParams
+ setFSMVariable
- Sets construction camera parameters. To work with "camconstruct" object.
+ Set variable to given value in the variable space of given FSM.
+ The FSM handle is the number returned by the execFSM command.
- https://community.bistudio.com/wiki/camConstuctionSetParams
+ https://community.bistudio.com/wiki/setFSMVariable
- Object camConstuctionSetParams Array
+ Number setFSMVariable Array
- camera camConstuctionSetParams [[x,y,z], radius, maxAboveLand]
+ handle setFSMVariable [name, value]
- $Code$_camera camConstuctionSetParams [ getPos player, 50, 20];$/Code$
+ $Code$_handle = execFSM "test.fsm";
+ _handle setFSMVariable ["_foo", 23];
+
+ // sets variable _foo in the FSM to 23$/Code$
undefined / undefined
+ (March 23, 2014)
+ If the variable is not yet defined within the FSM it will be created.
- Nothing
+ Nothing
+
- camCreate
+ isAutonomous
- Create a camera or a seagull object on the given position. Also other objects can be created this way, but vehicles created with camCreate cannot be entered. Any units created with camCreate will remain static. Differently to createVehicle, objects are created without consideration of the collision detection with surrounding objects, thus the objects are spawned exactly at the given position. camCreate is conducted immediately, the command doesn't wait for camCommit.
+ Returns true if UAV is in autonomous mode.
- https://community.bistudio.com/wiki/camCreate
+ https://community.bistudio.com/wiki/isAutonomous
- String camCreate Array
+ isAutonomous Object
- type camCreate position
+ isAutonomous uav
- $Code$_cam = "camera" camCreate ( position player )$/Code$
+ $Code$bool = isAutonomous uav;$/Code$
- undefined / local
+ global / undefined
- (August 3, 2006)
- Notes from before the conversion:
- (CWR 1.91) createVehicle is a valid replacement (with special consideration to locality).
- You can also use camCreate to create objects.
- $Code$flare1 = "flare" camCreate getPos gameLogic_1$/Code$
- However, soldier units created in this way have little or no AI.
- Object
+ Boolean
+
- camDestroy
+ airplaneThrottle
- Destroy an object created with camCreate. camDestroy is conducted immediately, the command doesn't wait for camCommit.
- NOTE: Destroying camera object does not terminate camera effect automatically.
+ Returns throttle position. Works only on player's vehicle.
- https://community.bistudio.com/wiki/camDestroy
+ https://community.bistudio.com/wiki/airplaneThrottle
- camDestroy Object
+ airplaneThrottle Object
- camDestroy object
+ airplaneThrottle airplane
- $Code$camDestroy _cam;$/Code$
-
- $Code$_cam cameraEffect ["terminate","back"];
- camDestroy _cam;$/Code$
+ $Code$_trottle = airplaneThrottle myPlane$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Number
+
- camPreloaded
+ setPylonLoadOut
- Checks whether the camera has finished preloading.
+ Will add missile to vehicle pylon, TransportPylonsComponent in config is required
- https://community.bistudio.com/wiki/camPreloaded
+ https://community.bistudio.com/wiki/setPylonLoadOut
- camPreloaded Object
+ Object setPylonLoadOut Array
- camPreloaded camera
+ vehicle setPylonLoadOut [pylon nameindex, magazine name, forced, turret]
- $Code$?(camPreloaded _camera) : exit$/Code$
+ $Code$( vehicle player ) setPylonLoadOut ["pylon1", ""];$/Code$
undefined / undefined
@@ -7528,56 +7864,110 @@
- Boolean
+ Boolean
+
- camPreload
+ logEntities
- Preload the scene for the prepared camera. Time gives timeout, zero means no (infinite) timeout.
+ Creates a log file containing the list of all game entities in scene.
+ File is created in the same directory as.rpt file.
+ Special: BattlEye's RCON variant of this command is #logEntities (see also Multiplayer_Server_Commands )
- https://community.bistudio.com/wiki/camPreload
+ https://community.bistudio.com/wiki/logEntities
- Object camPreload Number
+ logEntities
- camera camPreload time
+ logEntities
- $Code$_camera camPreload 5$/Code$
+ $Code$logEntities ;$/Code$
undefined / undefined
+ File name example:
+ logEntities_4688_12-04-2014_12-19-39.log
+ File content example:
+ ====================== Vehicles =======================
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:1, Out: 0, NetID:2:3, Pos: [2476.243896][73.782043], N:B_Soldier_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2471.500977][62.477680], N:Snake_random_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2489.192383][73.935181], N:Snake_random_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2487.953857][73.828362], N:Snake_random_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2800.174805][96.234093], N:Rabbit_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2825.378418][2.068635], N:Rabbit_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2888.919434][6.837101], N:Rabbit_F
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2910.756104][16.089361], N:Rabbit_F
+ Loc:0, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 1, AnyPl:0, Out: 0, NetID:2:0, Pos: [9.000000][9.000000], N:Logic
+ Total objects: 9
+ Statistics objects: 9
+ IsLocal: 8
+ IsMarkedToDelete: 0
+ IsDestroyed: 0
+ IsDamageDestroyed: 0
+ IsDamageDead: 0
+ IsNotSimulated: 9
+ IsVisible: 1
+ IsAnyPlayer: 1
+ IsOutsideMap: 0
+ =================== Slow vehicles =====================
+ Total objects: 214
+ Statistics objects: 0
+ Static objects are accounted in total object count but not included in statistics
+ IsLocal: 0
+ IsMarkedToDelete: 0
+ IsDestroyed: 0
+ IsDamageDestroyed: 0
+ IsDamageDead: 0
+ IsNotSimulated: 0
+ IsVisible: 0
+ IsAnyPlayer: 0
+ IsOutsideMap: 0
+ =================== Out vehicles ====================
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:1, Pos: [2476.243896][73.782043], N:Supply40
+ Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:2, Pos: [2476.243896][73.782043], N:Supply140
+ Total objects: 2
+ Statistics objects: 2
+ IsLocal: 2
+ IsMarkedToDelete: 0
+ IsDestroyed: 0
+ IsDamageDestroyed: 0
+ IsDamageDead: 0
+ IsNotSimulated: 2
+ IsVisible: 0
+ IsAnyPlayer: 0
+ IsOutsideMap: 0
- Nothing
+ Nothing
+
- camPrepareBank
+ radioVolume
- Prepares the camera bank angle.
- This command is non-functional !
+ Checks the current radio volume (set by fadeRadio ).
- https://community.bistudio.com/wiki/camPrepareBank
+ https://community.bistudio.com/wiki/radioVolume
- Object camPrepareBank Number
+ radioVolume
- camera camPrepareBank bank
+ radioVolume
- $Code$_camera camPrepareBank -0.1$/Code$
+ $Code$_volume = radioVolume;$/Code$
undefined / undefined
@@ -7585,57 +7975,59 @@
- Nothing
+ Number
+
- camPrepareDir
+ unlinkItem
- Prepares the camera heading.
- This command is non-functional !
+ Unassign and delete existing item from its assigned slot. If item does not exist or is not in the assigned slot, command simply fails.
- https://community.bistudio.com/wiki/camPrepareDir
+ https://community.bistudio.com/wiki/unlinkItem
- Object camPrepareDir Number
+ Object unlinkItem String
- camera camPrepareDir direction
+ unit unlinkItem item
- $Code$_camera camPrepareDir 150$/Code$
+ $Code$bluforUnit unlinkItem "NVGoggles";
+ opforUnit unlinkItem "NVGoggles_OPFOR";
+ independentUnit unlinkItem "NVGoggles_INDEP";$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- camPrepareDive
+ members
- Prepares the camera dive angle.
- This command is non-functional !
+ Return a list of members in given team.
- https://community.bistudio.com/wiki/camPrepareDive
+ https://community.bistudio.com/wiki/members
- Object camPrepareDive Number
+ members Team_Member
- camera camPrepareDive dive
+ members team
- $Code$_camera camPrepareDive -0.1$/Code$
+ $Code$_members = members _team$/Code$
undefined / undefined
@@ -7643,28 +8035,34 @@
- Nothing
+ Array
+
- camPrepareFocus
+ west
- focusRange is in format [distance,blur]. Prepares the camera focus blur.
- [-1,1] will reset default values (auto focusing), [-1,-1] will disable postprocessing (all is focused).
+ West side.
- https://community.bistudio.com/wiki/camPrepareFocus
+ https://community.bistudio.com/wiki/west
- Object camPrepareFocus Array
+ west
- camera camPrepareFocus focusRange
+ west
- $Code$_camera camPrepareFocus [50, 1]$/Code$
+ $Code$// SQS:
+ ?((side _unit) == west ) : hint "This is a western unit!"$/Code$
+
+ $Code$// SQF:
+ if (( side _unit) == west ) then {
+ hint "This is a western unit!";
+ };$/Code$
undefined / undefined
@@ -7672,28 +8070,42 @@
- Nothing
+ Side
+
- camPrepareFovRange
+ nearestLocations
- Prepares the camera field of view range for auto zooming.
- This command is non-functional !
+ Returns an array of locations of chosen type(s) within the given radius of the given position, sorted from nearest to farthest.
- https://community.bistudio.com/wiki/camPrepareFovRange
+ https://community.bistudio.com/wiki/nearestLocations
- Object camPrepareFovRange Array
+ nearestLocations Array
- camera camPrepareFovRange fovRange
+ nearestLocations [position, [locationType,], radius, sortPosition]
- $Code$_camera camPrepareFovRange [0.1, 0.5]$/Code$
+ $Code$_nearbyLocations = nearestLocations [ position player, ["RockArea","VegetationFir"], 100];$/Code$
+
+ $Code$// Find any of nearest locations:
+ allLocationTypes = [];
+ "allLocationTypes pushBack configName _x" configClasses (
+ configFile "CfgLocationTypes"
+ );
+ {
+ systemChat format [
+ "%1 (%2) - %3m",
+ _x,
+ text _x,
+ position player distance _x
+ ];
+ } forEach nearestLocations [ player, allLocationTypes, 500];$/Code$
undefined / undefined
@@ -7701,27 +8113,28 @@
- Nothing
+ Array
+
- camPrepareFov
+ shownHUD
- Prepares the camera field of view (zoom). The default zoom level is 0.75, 0.01 is the nearest and 2 the furthest zoom value. The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio. Needs the call of camCommitPrepared to be conducted.
+ Returns array of Booleans corresponding to the visibility of various HUD elements (see extended showHUD ).
- https://community.bistudio.com/wiki/camPrepareFov
+ https://community.bistudio.com/wiki/shownHUD
- Object camPrepareFov Number
+ shownHUD
- camera camPrepareFov fieldOfView
+ shownHUD
- $Code$_camera camPrepareFov 0.1$/Code$
+ $Code$_hudStatus = shownHUD ;$/Code$
undefined / undefined
@@ -7729,27 +8142,32 @@
- Nothing
+ Array
+
- camPreparePos
+ sliderSpeed
- Prepares the camera position (format Position ).
+ Return speed, as an Array [min, max] of slider idc of topmost user dialog.
- https://community.bistudio.com/wiki/camPreparePos
+ https://community.bistudio.com/wiki/sliderSpeed
- Object camPreparePos Array
-
+ sliderSpeed Number
+
+ sliderSpeed Control
+
- camera camPreparePos position
+ sliderSpeed idc
+
+ sliderSpeed control
- $Code$_camera camPreparePos getPos player$/Code$
+ $Code$_slidespeed1 = sliderSpeed 105;$/Code$
undefined / undefined
@@ -7757,27 +8175,29 @@
- Nothing
+ Array - Array
+
- camPrepareRelPos
+ add3DENEventHandler
- Prepares the camera position relative to the current position of the currect target (see camPrepareTarget ).
+ Add code to be run when a Eden Editor event is triggered.
+ See the list of all Eden Editor Event Handlers.
- https://community.bistudio.com/wiki/camPrepareRelPos
+ https://community.bistudio.com/wiki/add3DENEventHandler
- Object camPrepareRelPos Array
+ add3DENEventHandler Array
- camera camPrepareRelPos position
+ add3DENEventHandler [type,code]
- $Code$_camera camPrepareRelPos [10,5,-2]$/Code$
+ $Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];$/Code$
undefined / undefined
@@ -7785,33 +8205,29 @@
- Nothing
+ Number
+
- camPrepareTarget
+ emptyPositions
- Prepares the camera target to a position or to a target.
+ Returns the number of given positions in the vehicle.
+ Positions can be "Commander", "Driver", "Gunner" or "Cargo"
- https://community.bistudio.com/wiki/camPrepareTarget
+ https://community.bistudio.com/wiki/emptyPositions
- Object camPrepareTarget Array
-
- Object camPrepareTarget Object
+ Object emptyPositions String
- camera camPrepareTarget position
-
- camera camPrepareTarget target
+ vehicle emptyPositions position
- $Code$_camera camPrepareTarget getPos player$/Code$
-
- $Code$_camera camPrepareTarget player$/Code$
+ $Code$_freeCargoPositions = vehicle player emptyPositions "cargo";$/Code$
undefined / undefined
@@ -7819,355 +8235,533 @@
- Nothing - Nothing
+ Number
+
- camSetBank
+ assignItem
- Sets camera bank angle. Does not commit changes.
- This command is non-functional !
+ Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. If the slot is occupied by another item, it gets replaced.
- https://community.bistudio.com/wiki/camSetBank
+ https://community.bistudio.com/wiki/assignItem
- Object camSetBank Number
+ Object assignItem String
- camera camSetBank bank
+ unit assignItem item
- $Code$_camera camSetBank -0.1$/Code$
+ $Code$bluforUnit addItem "NVGoggles";
+ bluforUnit assignItem "NVGoggles";
+ opforUnit addItem "NVGoggles_OPFOR";
+ opforUnit assignItem "NVGoggles_OPFOR";
+ independentUnit addItem "NVGoggles_INDEP";
+ independentUnit assignItem "NVGoggles_INDEP";$/Code$
- undefined / undefined
+ global / global
- (Apr 15, 2010)
- Command is non-functional. Instead, use fn vbs setPitchBank in VBS2, or setVectorUp or this user function in Arma.
- Nothing
+ Nothing
+
- camSetDir
+ tvSetColor
- Sets the orientation of the given camera in the direction of the given vector. Needs camCommit.
+ Sets text color on given Tree View Item
- https://community.bistudio.com/wiki/camSetDir
+ https://community.bistudio.com/wiki/tvSetColor
- Object camSetDir Array
+ tvSetColor Array
+
+ Control tvSetColor Array
- camera camSetDir direction
+ tvSetColor [idc, path, color]
+
+ control tvSetColor [path, color]
- $Code$pos1 = player modelToWorld [0,5,5];
- cam = "camera" camCreate pos1;
- cam cameraEffect ["INTERNAL", "BACK"];
- pos2 = player modelToWorld [0,50,50];
- cam camSetPos pos2;
- cam camSetDir (pos2 vectorFromTo pos1);
- cam camCommit 5;
- 0 = [] spawn
- {
- waitUntil { camCommitted cam};
- cam camSetPos pos1;
- cam camCommit 5;
- };$/Code$
+ $Code$tvSetColor [101, [0,0], [1,0,0,1]];$/Code$
+
+ $Code$_ctrl tvSetColor [[0,0], [1,0,0,1]];$/Code$
- local / local
+ undefined / undefined
- (May 9, 2016)
- cameraEffect "INTERNAL" works better than "EXTERNAL" with this command.
- Nothing
+ Nothing - Nothing
+
- camSetDive
+ waypointScript
- Sets camera dive angle. Does not commit changes.
- This command is non-functional !
+ Gets the waypoint script.
- https://community.bistudio.com/wiki/camSetDive
+ https://community.bistudio.com/wiki/waypointScript
- Object camSetDive Number
+ waypointScript Array
- camera camSetDive dive
+ waypointScript waypoint
- $Code$_camera camSetDive -0.1$/Code$
+ $Code$waypointScript [groupOne,1]$/Code$
undefined / undefined
- (Apr 15, 2010)
- Command is non-functional. Instead, use fn vbs setPitchBank in VBS2, or setVectorUp or this user function in Arma.
- Nothing
+ String
+
- camSetFocus
+ globalChat
- Sets camera focus range in format [distance, blur]. blur param - sets the camera focus blur. It does not automatically commit changes (see camCommit ). Use [-1, -1] to disable focus completely.
+ Types text to the global radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
- https://community.bistudio.com/wiki/camSetFocus
+ https://community.bistudio.com/wiki/globalChat
- Object camSetFocus Array
+ Object globalChat String
- camera camSetFocus focusRange
+ unitName globalChat chatText
- $Code$_camera camSetFocus [50, 1];$/Code$
+ $Code$_soldierOne globalChat "Show this text";$/Code$
+
+ $Code$driver vehicle player sideChat "sideChat";
+ driver vehicle player globalChat "globalChat";
+ driver vehicle player groupChat "groupChat";
+ vehicle player vehicleChat "vehicleChat";
+ driver vehicle player commandChat "commandChat";
+ driver vehicle player customChat [1, "customChat"];
+ systemChat "systemChat";$/Code$
- undefined / undefined
+ global / local
+ In OFP 1.96, this command can be used by a Game_Logic unit, which will result in the text being displayed on screen without any indication of the side of radio source, or quotation marks. For example : gamelogic1 globalchat "hello world" will create the text hello world in the radio log.
- Nothing
+ Nothing
+
- camSetFovRange
+ ctrlParent
- Set the zoom level ( F ield O f V iew) start and end values for automatical zooming.
- The default zoom level is 0.7 where 0 is the nearest and 1 is the most far zoom value.
- This command is non-functional !
+ Returns container of the given control.
- https://community.bistudio.com/wiki/camSetFovRange
+ https://community.bistudio.com/wiki/ctrlParent
- Object camSetFovRange Array
+ ctrlParent Control
- camera camSetFovRange fovRange
+ ctrlParent controlName
- $Code$_cam camSetFovRange [0.1, 0.7];$/Code$
+ $Code$_display = ctrlParent _control$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Display
+
- camSetFov
+ setNameSound
- Set the zoom level ( F ield O f V iew) of the given camera.
- The zoom level is from 0.01 for the nearest and 2 for the furthest zoom value, with a default zoom level of 0.75
- The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio.
+ Sets the nameSound of a person. By default, when giving orders, the units are addressed by their number. When nameSound is set, it will be used instead to address the unit. For example: "Two, hold fire!", one can have: "Miller, hold fire!"
- https://community.bistudio.com/wiki/camSetFov
+ https://community.bistudio.com/wiki/setNameSound
- Object camSetFov Number
+ Object setNameSound String
- camera camSetFov level
+ person setNameSound name
- $Code$_cam camSetFov 0.75;$/Code$
+ $Code$unit1 setNameSound "dixon";$/Code$
+
+ $Code$unit1 setNameSound ""; // will reset to default behaviour$/Code$
+
+ $Code$_name = "Masood";
+ unit1 setNameSound _name;
+ unit1 setName _name;$/Code$
- local / local
+ undefined / undefined
+ (September 19, 2013)
+ nameSound can be any preset BIS recorded name value. By default units will be called out in voice by their number. By using nameSound you can call them out by name using the following values:
+ Default:
+ Armstrong
+ Nichols
+ Tanny
+ Frost
+ Lacey
+ Larkin
+ Kerry
+ Jackson
+ Miller
+ McKendrick
+ Levine
+ Reynolds
+ BLUFOR:
+ Adams
+ Bennett
+ Campbell
+ Dixon
+ Everett
+ Franklin
+ Givens
+ Hawkins
+ Lopez
+ Martinez
+ OConnor
+ Ryan
+ Patterson
+ Sykes
+ Taylor
+ Walker
+ OPFOR:
+ Amin
+ Masood
+ Fahim
+ Habibi
+ Kushan
+ Jawadi
+ Nazari
+ Siddiqi
+ Takhtar
+ Wardak
+ Yousuf
+ INDEPENDENT:
+ Anthis
+ Costa
+ Dimitirou
+ Elias
+ Gekas
+ Kouris
+ Leventis
+ Markos
+ Nikas
+ Nicolo
+ Panas
+ Petros
+ Rosi
+ Samaras
+ Stavrou
+ Thanos
+ Vega
+ CODE NAMES:
+ Ghost
+ Stranger
+ Fox
+ Snake
+ Razer
+ Jester
+ Nomad
+ Viper
+ Korneedler
+
+ (December 22, 2013)
+ setting an incorrect value like "0" or "randomString" will remove the callsign (" /* 2, */ fall back")
+
+ (April 25, 2015)
+ While kylania listed available names, you can use any word you want. Available words for english can be found in configfile "RadioProtocolENG" "Words".
- Nothing
+ Nothing
+
- camSetPos
+ disableAI
- Sets the position of the given camera or seagull (see camCreate ). It is worth mentioning that camera position can also be set with setPos, in which case it would be instant. With camSetPos it is possible to make smooth position transition in time, defined with camCommit, which is required in this case.
+ Disable parts of the AI behaviour to get a better control over the actions of a unit. Must be executed where AI unit is local. If unit changes locality, it might need to be executed again at the new locality to maintain effect.
+ Possible values are:
+ "TARGET" - stop the unit to watch the assigned target / group commander may not assign targets
+ "AUTOTARGET" - prevent the unit from assigning a target independently and watching unknown objects / no automatic target selection
+ "MOVE" - disable the AI's movement / do not move
+ "ANIM" - disable ability of AI to change animation. Available only since ArmA: Cold War Assault (OFP 1.99).
+ "TEAMSWITCH" - AI disabled because of Team Switch
+ "FSM" - disable the execution of AI behavior scripts. Available only since Operation Arrowhead v1.60.
+ "WEAPONAIM" - no weapon aiming
+ "AIMINGERROR" - prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed/lost target Available only since Arma 3 v1.42.
+ "SUPPRESSION" - prevents AI from being suppressed Available only since Arma 3 v1.42.
+ "CHECKVISIBLE" - disables visibility raycasts Available only since Arma 3 v1.54.
+ "COVER" - disables usage of cover positions by the AI Available only since Arma 3 v1.56.
+ "AUTOCOMBAT" - disables autonomous switching to COMBAT when in danger Available only since Arma 3 v1.56.
+ "PATH" - stops the AI’s movement but not the target alignment Available only since Arma 3 v1.61.
+ "MINEDETECTION" - disable Ai mine detection.
+ "ALL" - all of the above Available since Arma 3 v1.65
+ Note: In OFP there is no way to undo this command.
- https://community.bistudio.com/wiki/camSetPos
+ https://community.bistudio.com/wiki/disableAI
- Object camSetPos Array
+ Object disableAI String
- camera camSetPos position
+ unitName disableAI section
- $Code$_cam camSetPos [2300,1000,130];
- _cam camCommit 10;$/Code$
+ $Code$_soldier1 disableAI "AUTOTARGET";$/Code$
- local / local
+ local / global
+ (26.9.2013)
+ After substantial testing in ArmA3 1.01, the AI sections are as follows:
+ MOVE: disabling this will stop units from turning and moving. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Unit will watch enemies that are in their line of sight, but won't turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can't be controlled by a script either, you have to re-enable movement for that. Unit will still be able to aim within his cone of fire.
+ AUTOTARGET: Essentially makes single units without a group, "deaf". The unit still goes prone and combat ready if he hears gunfire. They won't turn around when gunfire comes from the behind, but if an enemy walks in front they will target the enemy and fire as normal. WON'T WORK FOR GROUPED UNITS WITH A LEADER, the leader will assign targets to the units and effectively enables the AI back on.
+ TARGET: Will prevent units from engaging the target. Units still move around for cover etc...but won't hunt down the player. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by.
+ ANIM: completely freezes the unit, including breathing. Won't even blink. No move command works until the unit is unfrozen.
+ FSM: Essentially makes the enemy "dumber". Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM, can give the impression of untrained units as they react slower and are more disorganized than when FSM is enabled. Good for rebel fighters and when enabled better for professional armies.
+
+ (August 3, 2006)
+ Notes from before the conversion:
+ The "TARGET" section of the AI is likely different than what you would think. Normally, when an AI group is standing still and sees an enemy, the group will break formation and start moving towards the enemy. If you disable the "TARGET" AI, then the AI units will stay where they are at. Even if you disable the "MOVE" AI, the units will still move out to attack the enemy, unless you disable the "TARGET" AI. Disabling both these AI sections is useful when placing units in defensive positions. This way, you can have them stay behind their cover, and not run out into the open.
+ This command has also a bug: after mission save or load the effect will be no longer active and you must set it again. It's also good way to detect number of saves and loads (loads can be recognized using time command).
+
+ (Feb 7, 2009)
+ Multiplayer Use as of ArmA v1.14:
+ Contrary to the post above, using this command WILL disable A.I. movement ability if used with the "MOVE" parameter. Works even when the A.I. is grouped with other units. I use this command to set up stationary targets at objectives all the time. Works on a dedicated server.
+
+ (September 19, 2015)
+ Beware that disabling "TARGET" AI to units in the player's group will disable the ability to execute engage orders issued by the player.
+
+ (August 24, 2016)
+ As of version 1.65 dev., disableAI "MOVE" will also stop vehicles driven by AI.
+
+ (September 26, 2016)
+ Command is buggy in version 1.64.138497 as it disables the ability to drive vehicles for players. Tested with $Code$player disableAI "move"$/Code$. Entering a vehicle is possible, but not starting the engine. $Code$player enableAI "move"$/Code$ enables the player to drive again.
+ Already in the feedback tracker: https://feedback.bistudio.com/T120346
+
+ (Januaary 21, 2017)
+ Does not lower CPU usage of still AI without enemies in range
- Nothing
+ Nothing
+
- camSetRelPos
+ onGroupIconClick
- Sets the position of the given camera relative to its target, set with camSetTarget. Needs a call to camCommit to be conducted. Note, that since it sets relative position to the target, the camSetTarget command should be executed already, before camSetRelPos.
+ Defines an action performed when player clicked on group marker (3D or in a map). The code executed once. This EH, unlike onGroupIconOverEnter and onGroupIconOverLeave, has one more param which returns 1 if RMB was pressed, 0 otherwise.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: GroupIconClick
- https://community.bistudio.com/wiki/camSetRelPos
+ https://community.bistudio.com/wiki/onGroupIconClick
- Object camSetRelPos Array
+ onGroupIconClick String/Code
- camera camSetRelPos position
+ onGroupIconClick command
- $Code$_cam camSetTarget _car;
- _cam camSetRelPos [0,10,8];$/Code$
+ $Code$onGroupIconClick
+ {
+ // Passed values for _this are:
+ _is3D = _this select 0;
+ _group = _this select 1;
+ _wpID = _this select 2;
+ _RMB = _this select 3;
+ _posx = _this select 4;
+ _posy = _this select 5;
+ _shift = _this select 6;
+ _ctrl = _this select 7;
+ _alt = _this select 8;
+ _message = format ["____ Info ____"];
+ {_message = _message + format ["\n %1",_x]} forEach _this;
+ hint _message;
+ }$/Code$
- local / local
+ undefined / undefined
- The location of the camera will depend on the direction the target object is facing.
- The camera does not bank with the target (bug?).
- Nothing
+ Nothing
+
- camSetTarget
+ diag_log
- Set the target object or position where the given camera should point at. Needs the call of camCommit to be conducted.
+ Dumps the argument's value to the report file. Each call creates a new line in the file.
- https://community.bistudio.com/wiki/camSetTarget
+ https://community.bistudio.com/wiki/diag_log
- Object camSetTarget Object
-
- Object camSetTarget Array
+ diag_log Anything
- camera camSetTarget target
-
- camera camSetTarget position
+ diag_log anything
- $Code$_camera camSetTarget player ;$/Code$
+ $Code$diag_log time ;$/Code$
- $Code$_camera camSetTarget [2540,1503,26];$/Code$
+ $Code$diag_log format ["%1, %2", player, time ];$/Code$
- $Code$_cam = "camera" camCreate ( player modelToWorld [0,100,10]);
- _cam camSetTarget player ;
- _cam camSetRelPos [0, 0.5, 1.5];
- _cam cameraEffect ["internal", "back"];
- _cam camCommit 1;
- player setRandomLip true ;$/Code$
+ $Code$_arr = [1, "foo", player, "bar"];
+ {
+ diag_log _x ;
+ } forEach _arr; // Creates 4 entries on 4 lines$/Code$
+
+ $Code$_arr = [1, "foo", player, "bar"];
+ diag_log _arr;
+ // Creates one entry of e.g. [1,"foo",B Alpha 1-1:1 (Player Name),"bar"]$/Code$
- local / local
+ undefined / undefined
+ To dump a string without "" use text.
+ Posted 23:35, 19 April 2011
+
+ in patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044.
- Nothing - Nothing
+ Nothing
+
- camTarget
+ tvData
- Returns camera's target.
+ Returns string data from item on given path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/camTarget
+ https://community.bistudio.com/wiki/tvData
- camTarget Object
+ tvData Array
+
+ Control tvData Array
- camTarget camera
+ tvData [idc, [path]]
+
+ control tvData [path]
-
+ $Code$tvData [101, [0]];$/Code$
+
+ $Code$(_display displayCtrl 101) tvData [0];$/Code$
+
- undefined / undefined
+ local / local
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Object
+ String - String
+
- camUseNVG
+ setSimpleTaskDestination
- Set / clear using of night vision during cutscenes. This command only works with camCreate created camera that is currently the main camera for the player (see example).
+ Attach a destination to the simple task. Overrides setSimpleTaskTarget
- https://community.bistudio.com/wiki/camUseNVG
+ https://community.bistudio.com/wiki/setSimpleTaskDestination
- camUseNVG Boolean
+ Task setSimpleTaskDestination Array
- camUseNVG set
+ task setSimpleTaskDestination pos
- $Code$camUseNVG true ;$/Code$
-
- $Code$setDate [2000,12,31,0,0];
- _cam = "camera" camCreate [0,0,0];
- _cam camSetTarget player ;
- _cam camSetRelPos [0,-5,3];
- _cam cameraEffect ["Internal","Back"];
- _cam camCommit 0;
- camUseNVG true ;$/Code$
+ $Code$_tskGoHere setSimpleTaskDestination ( getMarkerPos "obj1");$/Code$
undefined / undefined
@@ -8175,236 +8769,320 @@
- Nothing
+ Nothing
+
- cameraEffectEnableHUD
+ shownArtilleryComputer
- Enable / disable showing of in-game UI during currently active camera effect.
+ Checks whether the player has the artillery computer currently open.
- https://community.bistudio.com/wiki/cameraEffectEnableHUD
+ https://community.bistudio.com/wiki/shownArtilleryComputer
- cameraEffectEnableHUD Boolean
+ shownArtilleryComputer
- cameraEffectEnableHUD enable
+ shownArtilleryComputer
- $Code$cameraEffectEnableHUD true ;$/Code$
+ $Code$if ( shownArtilleryComputer ) then { hint "Artillery Computer shown on screen"; };$/Code$
undefined / undefined
- (November 3, 2015)
- Must be executed after camCommit.
- Nothing
+ Boolean
+
- cameraEffect
+ kbTell
- Sets the given effect on the given camera. If you want to switch the screen directly to the first-person, aiming, third-person or group view of an object, use switchCamera instead. The effect type "Terminate" is used to exit the current camera view and switch back to the player's view. Does not need camCommit.
- Since Arma 3 v1.73.142217, it is possible to terminate individual r2t source. For example: $Code$cam cameraEffect ["terminate", "back", "rtt1"]; // would terminate "rtt1" r2t source
- cam cameraEffect ["terminate", "back"]; // would terminate all r2t sources$/Code$
+ Make the person tell to the receiver the sentence. See Conversations for more details.
- https://community.bistudio.com/wiki/cameraEffect
+ https://community.bistudio.com/wiki/kbTell
- Object cameraEffect Array
+ Object kbTell Array
- camera cameraEffect [effectName, effectPosition, r2tName]
+ person kbTell [receiver, topicName, sentenceClass]
- $Code$_cam cameraEffect ["internal", "BACK"];$/Code$
-
- $Code$_cam cameraEffect ["internal", "back", "rendersurface"];$/Code$
+ $Code$player kbTell [BIS_HQ, "myTopic", "playerSentence1"];$/Code$
- $Code$cam = "seagull" camCreate ( player modelToWorld [0,0,100]);
- cam cameraEffect ["FIXED", "LEFT TOP"];
- cam camCommand "MANUAL ON";$/Code$
+ $Code$player kbTell [
+ BIS_HQ, // to
+ "Airstrike", // topic
+ "AirstrikeRequest", // sentence
+ ["Team", {}, "Anvil", ["Anvil"]], // argument 1
+ ["Location", {}, "Strelka", ["Strelka"]], // argument 2
+ true]; // use radio
+ // bikb reference:
+ /*
+ class AirstrikeRequest
+ {
+ text = "%team requesting close air support at grid %location ";
+ speech[] = { %Team, RequestingCloseAirSupportAtGrid, %Location };
+ class Arguments
+ {
+ class Team { type = "simple"; };
+ class Location { type = "simple"; };
+ };
+ };*/$/Code$
- local / local
+ undefined / undefined
- (October 30, 2016)
- Types of camera for CfgCameraEffects config:
- CamExternal (CamInterpolated) type = 0; // linked directly with object
- CamStatic type = 1; // fixed point in space
- CamStaticWithZoom type = 2; // fixed point in space
- CamChained type = 3; // chained
- CamTerminate type = 4; // terminate
- CamInternal type = 5; // internal view
+ (may 02, 2010)
+ Jezuro's helping topic on BIforum : link
- Nothing
+ Nothing
+
- cameraInterest
+ try
- Return camera interest for given entity, as set by setCameraInterest, or as autodetected.
+ Defines a try-catch structure. This sets up an exception handling block. Any thrown exception in a try block is caught in a catch block. The structured exception block has the following form:
+ $Code$ try //begin of try-catch block
+ { //block, that can throw exception }
+ catch
+ { //block, that process an exception. Exception is described in _exception variable };$/Code$
- https://community.bistudio.com/wiki/cameraInterest
+ https://community.bistudio.com/wiki/try
- cameraInterest Object
+ try Code
+
+ Anything try Code
- cameraInterest entity
+ try code
+
+ args try code
- $Code$camInterest = cameraInterest myUnit;$/Code$
-
+
undefined / undefined
+ (June 9, 2015)
+ Do not expect this behave like Javascript try catch and ignore all errors. But it does have one useful behaviour. Normally when runtime error occurs in SQF (unlike when there is compile error) it continues to execute till the end. But if the script is placed in try {} scope and throw is used upon error, the script immediately terminates, exits the try {} scope and enters catch {} scope. This way it is possible to process possible exceptions in civilised manner.
- Number
+ Exception - Exception
+
- cameraOn
+ camCreate
- Returns the vehicle to which the camera is attached.
+ Create a camera or a seagull object on the given position. Also other objects can be created this way, but vehicles created with camCreate cannot be entered. Any units created with camCreate will remain static. Differently to createVehicle, objects are created without consideration of the collision detection with surrounding objects, thus the objects are spawned exactly at the given position. camCreate is conducted immediately, the command doesn't wait for camCommit.
- https://community.bistudio.com/wiki/cameraOn
+ https://community.bistudio.com/wiki/camCreate
- cameraOn
+ String camCreate Array
- cameraOn
+ type camCreate position
-
+ $Code$_cam = "camera" camCreate ( position player )$/Code$
+
- undefined / undefined
+ undefined / local
- (November 2, 2015)
- $Code$ _MyScreenPos = getPos cameraOn; code
- This would getPos for the current player or vehicle that the client's camera is attached to.
- code _CameraOnSetPos = cameraOn setPos _pos; code
- This would do setPos for the current player or vehicle that the client's camera is attached to.
- /dd
- /dl
- $/Code$
+ (August 3, 2006)
+ Notes from before the conversion:
+ (CWR 1.91) createVehicle is a valid replacement (with special consideration to locality).
+ You can also use camCreate to create objects.
+ $Code$flare1 = "flare" camCreate getPos gameLogic_1$/Code$
+ However, soldier units created in this way have little or no AI.
- Object
+ Object
+
- cameraView
+ createSoundSource
- Returns mode of active camera view. Mode is one of:
- "INTERNAL" (1st person)
- "EXTERNAL" (3rd person)
- "GUNNER" (optics / sights)
- "GROUP" (commander view)
+ Creates a sound source of the given type (type is the name of the subclass of CfgVehicles which is pointing to the sound defined in CfgSFX ). If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used. The sound source is placed inside a circle with this position as its center and placement as its radius. Some of the vanilla classes pre-configured in Arma 3:
+ "Sound_Alarm"
+ "Sound_Alarm2"
+ "Sound_BattlefieldExplosions"
+ "Sound_BattlefieldFirefight"
+ "Sound_Fire"
+ "Sound_SmokeWreck1"
+ "Sound_SparklesWreck1"
+ "Sound_SparklesWreck2"
+ "Sound_Stream"
+ Since Arma 3 v1.69.141183 it is possible to define sounds for use with createSoundSource in mission config. As mentioned earlier, the sounds needed for this command should be defined inside CfgVehicles class, which itself references CfgSFX class. If given class searched in main config and is not found, the search will continue in description.ext. Here is an example of suitable mission config definition:
+ // description.ext
+ class CfgSFX
+ {
+ class MyOwl
+ {
+ sound0 [] = { "@A3\Sounds_F\environment\animals\birds\owl1", db - 10, 1.0, 1000, 0.2, 0, 15, 30 }; // path to addon sound
+ sound1 [] = { "@A3\Sounds_F\environment\animals\birds\owl2", db - 10, 1.0, 1000, 0.2, 0, 15, 30 }; // path to addon sound
+ sound2 [] = { "@A3\Sounds_F\environment\animals\birds\owl3", db - 10, 1.0, 1000, 0.2, 0, 15, 30 }; // path to addon sound
+ sounds [] = { sound0, sound1, sound2 };
+ empty [] = { "", 0, 0, 0, 0, 0, 0, 0 };
+ };
+ };
+ class CfgVehicles
+ {
+ class MyOwlSound // class name to be used with createSoundSource
+ {
+ sound = "MyOwl" ; // reference to CfgSFX class
+ };
+ };
+ $Code$_owl = createSoundSource ["MyOwlSound", position player, [], 0];$/Code$
+ Note that the sound created by createSoundSource will always be looping. Also when CfgSFX sound definition contains more than 1 sound, there is no guarantee that the sound played will be the same on every PC in Multiplayer.
- https://community.bistudio.com/wiki/cameraView
+ https://community.bistudio.com/wiki/createSoundSource
- cameraView
+ createSoundSource Array
- cameraView
+ createSoundSource [type, position, markers, placement]
- $Code$if ( cameraOn == _vehicle && cameraView == "External") then
+ $Code$_soundSource = createSoundSource ["LittleDog", position player, [], 0]$/Code$
+
+ $Code$[] spawn
{
- _vehicle switchCamera "Internal";
+ _alarm = createSoundSource ["Sound_Alarm", position player, [], 0]; //starts alarm
+ sleep 10;
+ deleteVehicle _alarm; //stops alarm
};$/Code$
- undefined / undefined
+ global / global
- String
+ Object
+
- campaignConfigFile
+ lnbSetPicture
- Return root of campaign description.ext entries hierarchy.
+ Sets the picture in the item with the given position of the 2D listbox.
+ Name is the picture name.
+ The picture is searched in the mission, directory, the dtaExt subdirectory of the campaign directory, and the dtaExt directory and the data bank (or directory).
- https://community.bistudio.com/wiki/campaignConfigFile
+ https://community.bistudio.com/wiki/lnbSetPicture
- campaignConfigFile
+ lnbSetPicture Array
+
+ Control lnbSetPicture Array
- campaignConfigFile
+ lnbSetPicture [IDC, [Row, Column], PicturePathOrPictureName]
+
+ _ctrl lnbSetPicture [ [Row, Column], PicturePathOrPictureName]
-
+ $Code$lnbSetPicture [1, [0, 0], "Picture"];$/Code$
+
+ $Code$_ctrl lnbSetPicture [ [0, 0], "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa"];$/Code$
+
- undefined / undefined
+ local / local
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Config
+ Nothing - Nothing
+
- canAddItemToBackpack
+ selectRandom
- Checks if given object can be stored into soldier's backpack.
+ Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom
- https://community.bistudio.com/wiki/canAddItemToBackpack
+ https://community.bistudio.com/wiki/selectRandom
- Object canAddItemToBackpack String
-
- Object canAddItemToBackpack Array
+ selectRandom Array
- unit canAddItemToBackpack item
-
- unit canAddItemToBackpack [item, count]
+ selectRandom array
- $Code$_item = "HandGrenade";
- _fits = player canAddItemToBackpack _item;
- if (_fits) then {
- player addItemToBackpack _item;
- } else {
- hint "no room!";
- };$/Code$
+ $Code$_randomElement = selectRandom [1,2,3,4,5];$/Code$
undefined / undefined
@@ -8412,37 +9090,29 @@
- Boolean - Boolean
+ Anything
+
- canAddItemToUniform
+ copyFromClipboard
- Checks if given object can be stored into soldier's uniform.
+ Return the content of the (text) clipboard.
+ Disabled in Multiplayer for security reasons
- https://community.bistudio.com/wiki/canAddItemToUniform
+ https://community.bistudio.com/wiki/copyFromClipboard
- Object canAddItemToUniform String
-
- Object canAddItemToUniform Array
+ copyFromClipboard
- unit canAddItemToUniform item
-
- unit canAddItemToUniform [item, count]
+ copyFromClipboard
- $Code$_item = "HandGrenade";
- _fits = player canAddItemToUniform _item;
- if (_fits) then {
- player addItemToUniform _item;
- } else {
- hint "no room!";
- };$/Code$
+ $Code$hint copyFromClipboard ;$/Code$
undefined / undefined
@@ -8450,286 +9120,238 @@
- Boolean - Boolean
+ String
+
- canAddItemToVest
+ vectorCos
- Checks if given object can be stored into soldier's vest.
+ Cosine of angle between two 3D vectors.
- https://community.bistudio.com/wiki/canAddItemToVest
+ https://community.bistudio.com/wiki/vectorCos
- Object canAddItemToVest String
-
- Object canAddItemToVest Array
+ Array vectorCos Array
- unit canAddItemToVest item
-
- unit canAddItemToVest [item, count]
+ vector1 vectorCos vector2
- $Code$_item = "HandGrenade";
- _fits = player canAddItemToVest _item;
- if (_fits) then {
- player addItemToVest _item;
- } else {
- hint "no room!";
- };$/Code$
+ $Code$_cos = getPos player vectorCos [0,0,2];$/Code$
undefined / undefined
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+ Result = ((x1 * x2) + (y1 * y2) + (z1 * z2))/(( sqrt (x1 ^ 2 + y1 ^ 2 + z1 ^ 2))*( sqrt (x2 ^ 2 + y2 ^ 2 + z2 ^ 2)))
+ $/Code$
+ Given two vectors of attributes, A and B, the cosine similarity, cos(θ), is represented using a dot product and magnitude. The resulting similarity values indicating intermediate similarity or dissimilarity between two vectors.
- Boolean - Boolean
+ Number
+
- canAdd
+ units
- Checks if given object can be stored in inventory of given object or any inventory container ( uniform, vest, backpack ) of given unit.
+ Returns an array with all the units in the group or group of the unit. For a destroyed object an empty array is returned.
- https://community.bistudio.com/wiki/canAdd
+ https://community.bistudio.com/wiki/units
- Object canAdd String
-
- Object canAdd Array
+ units Group/Object
- object canAdd item
-
- object canAdd [item, count]
+ units groupOrUnit
- $Code$if ( player canAdd "FirstAidKit") then {
- player addItem "FirstAidKit";
- } else {
- hint "Not enough space";
- };$/Code$
-
- $Code$if (_box canAdd "FirstAidKit") then {
- _box addWeaponCargo ["FirstAidKit", 1];
- } else {
- hint "Not enough space";
- };$/Code$
+ $Code$_myUnitCount = count units group player ;$/Code$
- $Code$car canAdd [ currentWeapon player, 50];$/Code$
+ $Code$_isInMyGroup = _soldier1 in units player ;$/Code$
undefined / undefined
- (November 29, 2015)
- Can also be used on any object that has inventory, not only player inventory containers.
- Where _box is B_supplyCrate_F :
- $Code$// Empty
- _box canAdd "FirstAidKit";
- - true
- // Full
- _box canAdd "FirstAidKit";
- - false
- $/Code$
-
- (February 11, 2017)
- This can also be used as alternative to canAddItemToBackpack, canAddItemToUniform, canAddItemToVest where container might not be strictly defined.In some cases it might be a good optimisation for your code, where you also don't need to perform checks on which type of player container this is. Example:
- $Code$_i = [(uniformContainer player),(vestContainer player),(backpackContainer player)] call BIS_fnc_selectRandom;
- if (_i canAdd "Rangefinder") then {
- _i addItemCargoGlobal ["Rangefinder",1];
- };
- $/Code$
+ (September 24, 2009)
+ The returned array on MP clients is not updated when team members die (only when they are deleted). ( Tested on VBS2 )
- Boolean - Boolean
+ Array
+
- canFire
+ setDammage
- Returns true if the given vehicle is still able to fire. For the command to return true, vehicle must be alive, have weapon operator and the weapon cannot be damaged = 0.9 but can be empty due to running out of ammo. If mission starts with vehicle having no ammo or setVehicleAmmo 0 command is executed on the vehicle, then canFire will always report false for it.
+ Damage / repair object.
+ Damage 0 means fully functional, damage 1 means completely destroyed / dead.
+ Alias of setDamage, which was introduced to fix a spelling error in this operator's name.
- https://community.bistudio.com/wiki/canFire
+ https://community.bistudio.com/wiki/setDammage
- canFire Object
+ Object setDammage Number
- canFire unitName
+ object setDammage damage
- $Code$// SQS:
- ?!( canFire _tank) : player sideChat "Tank disabled!"$/Code$
-
- $Code$// SQF:
- if ( ! ( canFire _tank)) then {
- player sideChat "Tank disabled!";
- };$/Code$
+ $Code$_soldier1 setDammage 1;$/Code$
- global / undefined
+ global / global
- (07:16, 20 January 2007 (CEST))
- true even if unit is out of ammo. Only false if gun is damaged.
-
- (05:20, 24 August 2008 (CEST))
- False if there is no gunner in the vehicle, regardless of damage level.
-
- (07:20, 23 April 2018 (UTC))
- This command seems to have evolved. Returns "true" (on Hunter, Ifrit) even if Gun's damage is set to 1 and turret also, as far there is a gunner. The only way to obtain a canFire "false" is to make the crew disembark (2 burned tires for example). Then no matter the gun state, if the gunner disembarks without order, the vehicle can't fire. In this case: can't move can't fire.
- NB: if you jump into a hunter HMG after having setHitPointDamage(d) "hitTurret" and "hitGun" to 1, the turret can't rotate any more, the gun is pitched down but you can fire (trigger) to the ground. Difficult to check the behavior for each vehicles.
+ In OFP, setting a unit's damage to a negative value will set it's health to full, but impair their aim.
- Boolean
+ Nothing
+
- canMove
+ taskState
- Returns if the given vehicle is still able to move. This command checks only the damage value, not the amount of fuel!
+ Returns the current state of a task.
+ Possible return values are:
+ None
+ Created
+ Assigned
+ Succeeded
+ Failed
+ Canceled
- https://community.bistudio.com/wiki/canMove
+ https://community.bistudio.com/wiki/taskState
- canMove Object
+ taskState Task
- canMove unitName
+ taskState task
- $Code$// SQS :
- ?!( canMove _tank) : player sideChat "He's nailed on the ground! Now hurry!"$/Code$
-
- $Code$if (! canMove _tank) then
- {
- player sideChat "He's nailed on the ground! Now hurry!";
- };$/Code$
+ $Code$tskSomeTask = player createSimpleTask ["NewTask"];
+ hint format["Taskstate: %1", taskState tskSomeTask];$/Code$
- global / undefined
+ undefined / undefined
- (08:17, 22 Juil 2016 (UTC))
- This command will return true for a car or a tank out of fuel, but false for an helicopter or a plane for the same condition.
- Boolean
+ String
+
- canSlingLoad
+ addMusicEventHandler
- Returns true if it is possible to sling load cargo
+ Adds playMusic event handler. Returns id of the handler or -1 when failed. Just like addMissionEventHandler, music EH is also attached to the mission.
- https://community.bistudio.com/wiki/canSlingLoad
+ https://community.bistudio.com/wiki/addMusicEventHandler
- Object canSlingLoad Object
+ addMusicEventHandler Array
- vehicle canSlingLoad cargo
+ addMusicEventHandler [type, function]
- $Code$_slingable = veh1 canSlingLoad veh2;$/Code$
+ $Code$_ehID = addMusicEventHandler ["MusicStart", { hint str _this}];$/Code$
- $Code$hint str (( vehicle player ) canSlingLoad veh1);$/Code$
+ $Code$_ehID = addMusicEventHandler ["MusicStop", { hint str _this}];$/Code$
undefined / undefined
+ (March 4, 2013)
+ There are these two types at this time:
+ MusicStart - It is triggered when the music is started (command playMusic ). In variable _this is stored class name from CfgMusic.
+ MusicStop - It is triggered when the music is ended (command playMusic ). In variable _this is stored class name from CfgMusic.
- Boolean
+ Number
+
- canStand
+ setRank
- Returns if the given soldier is able to stand up.
+ Sets rank of given unit.
+ Possible values: PRIVATE, CORPORAL, SERGEANT, LIEUTENANT, CAPTAIN, MAJOR or COLONEL.
+ Since Arma 3 v1.67 this command is
- https://community.bistudio.com/wiki/canStand
+ https://community.bistudio.com/wiki/setRank
- canStand Object
+ Object setRank String
- canStand unitName
+ unitName setRank rank
- $Code$// SQS :
- ?!( canStand player ) : player groupChat "My legs! They hit my legs!"$/Code$
-
- $Code$if (! canStand player ) then
- {
- player groupChat "My legs! They hit my legs!";
- };$/Code$
+ $Code$player setRank "COLONEL"$/Code$
- global / undefined
+ global / local
- The command may return true for dead units.
+ (Mar 26, 2009)
+ Changing a unit's rank using either setUnitRank or setRank will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc). That is to say REPLACE, not add to: the unit's old rating will disappear with the rank change.
+
+ (April 12, 2014)
+ Behavior when used on players in multiplayer seems unpredictable. (ArmA 3 1.00)
- Boolean
+ Nothing
+
- canSuspend
+ isNumber
- Returns true if sleep, uiSleep or waitUntil commands can be used in current scope. Usually when suspension is not allowed but used, for example when code is executed in unscheduled environment, the script engine would ignore any suspension command and throw error: "Suspending not allowed in this context". Using canSuspend command allows to detect the correct environment for the code.
- Note : The definition of scheduled and unscheduled environment is not the same as whether or not the script execution can or cannot be suspended. For example while. sqs and. fsm scripts are scheduled (i.e. added to the scheduler : diag_activeSQSScripts, diag_activeMissionFSMs ), they cannot use sleep or be suspended like execVM or spawn scripts can, therefore canSuspend for these types of scripts will return false.
+ Check if config entry represents number.
- https://community.bistudio.com/wiki/canSuspend
+ https://community.bistudio.com/wiki/isNumber
- canSuspend
+ isNumber Config
- canSuspend
+ isNumber config
- $Code$onEachFrame
- {
- systemChat str canSuspend ; //false
- [] spawn { hint str canSuspend }; //true
- onEachFrame {};
- };$/Code$
-
- $Code$// Make sure the function code is always spawned even when called:
- mysleep =
- {
- if (! canSuspend ) exitWith {_this spawn mysleep};
- sleep _this;
- hint ("slept " + str _this);
- };
- 5 call mysleep;$/Code$
+ $Code$_ok = isNumber (configFile "CfgVehicles")
+ // Result is false$/Code$
undefined / undefined
@@ -8737,27 +9359,29 @@
- Boolean
+ Boolean
+
- canTriggerDynamicSimulation
+ diag_enable
- A getter for triggerDynamicSimulation
+ Used to enable/disabled various diagnostics.
+ Only available in the Arma 3 Diagnostic exe
- https://community.bistudio.com/wiki/canTriggerDynamicSimulation
+ https://community.bistudio.com/wiki/diag_enable
- canTriggerDynamicSimulation Object
+ String diag_enable Boolean
- canTriggerDynamicSimulation unit
+ diag_mode diag_enable state
- $Code$hint str canTriggerDynamicSimulation player ;$/Code$
+ $Code$"All" diag_enable true$/Code$
undefined / undefined
@@ -8765,191 +9389,300 @@
- Boolean
+ Nothing
+
- canUnloadInCombat
+ fireAtTarget
- Check if cargo of this vehicle want to get out when in combat.
+ Remotely forces a unit to fire the given weapon. See also: BIS_fnc_fire
- https://community.bistudio.com/wiki/canUnloadInCombat
+ https://community.bistudio.com/wiki/fireAtTarget
- canUnloadInCombat Object
+ Object fireAtTarget Array
- canUnloadInCombat vehicle
+ sourceVehicle fireAtTarget [targetVehicle, weaponMuzzleName]
- $Code$if (canUnloadInCombat _vehicle) then {...};$/Code$
+ $Code$_handle = this fireAtTarget [groundtarget1,"HellfireLauncher"];$/Code$
+
+ $Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [_helicopter, currentWeapon Igla_AA_pod_TK_EP1];$/Code$
+
+ $Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [helicopter];$/Code$
undefined / undefined
+ (Sep 16, 2010)
+ Most likely only for missiles and for interaction with player only.
+
+ (Apr 8, 2014)
+ (A3 1.14) Source vehicle is only limited to manned vehicle while any other types won’t be able to active fireAtTarget handle, e.g.
+ $Code$
+ _handle = _InfantryUnit fireAtTarget [_Infnatrytarget,( weapons _Infantryunit select 0)];
+ //false & no bullet shoot
+ $/Code$
+ Target has no limitation and can be any object:
+ $Code$
+ _handle = ( vehicle _veh) fireAtTarget [ObjNull,( weapons ( vehicle _veh) select 0)];
+ //true & a bullet shoot
+ $/Code$
+ Handle returns false if weapon class name is inaccurate, e.g.
+ $Code$
+ _Handle = ( vehicle _veh) fireAtTarget [ObjNull,”UnknownWeapon”];
+ //false & no bullet shoot.
+ $/Code$
+ Handle still returns true even though the vehicle is unavailable to shoot any bullet:
+ $Code$
+ _weapon = weapons ( vehicle _veh) select 0;
+ ( vehicle _veh) setAmmo [_weapon,0];
+ _Handle = ( vehicle _veh) fireAtTarget [ObjNull,_weapon];
+ //true & no bullet shoot
+ $/Code$
+ difference
+ command
+ Source
+ Target
+ Behavior
+ Workaround templets
+ fire
+ Either Unit or manned vehicle
+ N/A
+ Fired aiming at air for infantry rifle
+ Together with selectWeapon,
+ suggested to work with "throw","put" weapon type
+ for infantry, or vehicle entity indeed.
+ fireAtTarget
+ Manned vehicle only
+ Any object
+ Normal shoot, won’t aim at target automatically
+ _veh doWatch _target;
+ waitUntil {_veh aimedAtTarget [_target] 0};
+ _veh fireAtTarget [_target];
+ forceWeaponFire
+ Either Unit or manned aircraft (weapon operator)
+ N/A
+ Normal shoot, can change fire mode
+ //E.g. unit won't shoot until he is facing the target.
+ _unit doWatch _tar;
+ waitUntil {
+ _dir = direction _unit;
+ _relative = [_unit,_tar] call BIS_fnc_relativeDirTo ;
+ if (_dir == _relative) exitWith {
+ _unit forceWeaponFire [ currentWeapon _unit,"single"];
+ };
+ false
+ };
+ doFire
+ Unit only
+ Either unit or vehicle
+ automatic aiming and shooting
+ No special example.
+ commandFire
+ Unit only
+ Either unit or vehicle
+ automatic aiming and shooting
+ No special example.
+ action ["UseWeapon"]
+ Either unit or manned vehicle
+ N/A
+ unexpected behavior
+ N/A
- Boolean
+ Boolean
+
- canVehicleCargo
+ sideChat
- Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle
+ Types text to the side radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
- https://community.bistudio.com/wiki/canVehicleCargo
+ https://community.bistudio.com/wiki/sideChat
- Object canVehicleCargo Object
+ Object sideChat String
+
+ Array sideChat String
- vehicle canVehicleCargo cargo
+ unitName sideChat chatText
+
+ [side, identity] sideChat chatText
- $Code$// Blackfish with no vehicle cargo loaded
- _result = blackfish canVehicleCargo offroad; //[true, true]$/Code$
+ $Code$_soldierOne sideChat "Show this text";$/Code$
- $Code$// Blackfish with one vehicle cargo called offroad already loaded
- _result = blackfish canVehicleCargo offroad; //[false, false]
-
- // Even if the Blackfish was empty offroad can't be loaded because it's already in a cargo space$/Code$
+ $Code$[ west, "HQ"] sideChat "Hi there";$/Code$
- $Code$// Blackfish with one vehicle cargo called offroad already loaded
- _result = blackfish canVehicleCargo offroad2; //[false, true]
-
- // offroad2 can't be loaded because there isn't enough space in the Blackfish, but if there was space offroad2 could be loaded into the Blackfish$/Code$
+ $Code$driver vehicle player sideChat "sideChat";
+ driver vehicle player globalChat "globalChat";
+ driver vehicle player groupChat "groupChat";
+ vehicle player vehicleChat "vehicleChat";
+ driver vehicle player commandChat "commandChat";
+ driver vehicle player customChat [1, "customChat"];
+ systemChat "systemChat";$/Code$
- undefined / undefined
+ global / local
+ In OFP v1.96, sideChat messages can be sent from 2 abstract sources: "Papa_Bear" and "Base FireFly". Use sideChat on an array in the form [SIDE,"base"],[SIDE,"HQ"],[SIDE,"Papa_bear"] or [SIDE,"airbase"], where SIDE is the side broadcasting. "HQ", "base" and "Papa_bear" seem to be the same object. The callsign strings can be re-defined using a stringTable.csv file, using STR_CFG_PAPABEAR and STR_CFG_FIREFLYBASE. Example : [EAST,"base"] sideChat "Return to base!".
- Array
+ Nothing - Nothing
+
- cancelSimpleTaskDestination
+ land
- Cancels a simple task destination.
+ Force helicopter landing. Landing mode may be:
+ "LAND" (complete stop)
+ "GET IN" (hovering very low, for another unit to get in)
+ "GET OUT" (hovering low,for another unit to get out)
+ "NONE" (cancel a landing) Available since ArmA 2 57463 build.
- https://community.bistudio.com/wiki/cancelSimpleTaskDestination
+ https://community.bistudio.com/wiki/land
- cancelSimpleTaskDestination Task
+ Object land String
- cancelSimpleTaskDestination task
+ helicopter land mode
- $Code$cancelSimpleTaskDestination myTask;$/Code$
+ $Code$_cobraOne land "LAND"$/Code$
- undefined / undefined
+ local / global
+ (August 4, 2006)
+ Notes from before the conversion:
+ Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in ArmA).
+
+ To make a helicopter LAND correctly and not hovering over the landing position use unitReady to check if the helicopter already has reached his destination.
+ You can fix a landing bug by using a short delay bevore checking the unitReady command.
+ _helicopter move (getPos _destination);
+ sleep 3;
+ while { ( (alive _helicopter) && !(unitReady _helicopter) ) } do
+ {
+ sleep 1;
+ };
+ if (alive _helicopter) then
+ {
+ _helicopter land "LAND";
+ };
- Nothing
+ Nothing
+
- captiveNum
+ vectorWorldToModelVisual
- Checks whether the unit is a captive. If the unit is a vehicle, its commander is checked instead.
- If a unit's captivity level was set as a Boolean, then the returned number is either 0 (for false ) or 1 (for true ).
+ Converts vector direction from world to model space in render time scope.
- https://community.bistudio.com/wiki/captiveNum
+ https://community.bistudio.com/wiki/vectorWorldToModelVisual
- captiveNum Object
+ Object vectorWorldToModelVisual Array
- captiveNum unit
+ object vectorWorldToModelVisual worldDir
- $Code$_captivity = captiveNum _unit;$/Code$
-
- $Code$_unit setCaptive 1024;
- hint str captive _unit; //true
- hint str captiveNum _unit; //1024$/Code$
+ $Code$// Convert world space vector [0,-10,4] to model space of object _airplane:
+ _airplane vectorWorldToModelVisual [0,-10,4];$/Code$
- global / undefined
+ undefined / undefined
- Number
+ Array
+
- captive
+ getObjectType
- Returns if the given unit is captive. "captive" means that enemies will not shoot at the unit.
+ Returns object type as a number:
+ 1 - Primary - Normal object placed in Visitor, part of landscape
+ 2 - Network - Road placed in Visitor, part of landscape
+ 4 - Temporary - Temporary object (like tracks)
+ 8 - TypeVehicle - Some entity added by game
+ 16 - TypeTempVehicle - Temporary entity
+ 32 - LandDecal - Land decal
- https://community.bistudio.com/wiki/captive
+ https://community.bistudio.com/wiki/getObjectType
- captive Object
+ getObjectType Object
- captive object
+ getObjectType object
- $Code$if (! captive _general) then {_general setCaptive true };$/Code$
+ $Code$_objType = getObjectType player ;$/Code$
+
+ $Code$_objType = getObjectType cursorObject ;$/Code$
- global / undefined
+ undefined / undefined
- (August 3, 2006)
- Notes from before the conversion:
- Use setCaptive to make a unit captive.
- Boolean
+ Number
+
- case
+ floor
- This command is used inside a switch do construct. Although the syntax below states that this operator takes only one argument, that is most likely not true. It seems like it needs two arguments of which the left one is some sort of hidden variable that gets defined inside a switch do construct. That is the reason why this operator can not be used outside a switch do construct. (see https://foxhound.international/arma-3-sqf-grammar.html for further explaination)
- Also note that it is not possible to store the returned Switch Type in a variable and use that variable in another switch do construct. It will never lead to an execution of the corresponding code block.
+ Returns the next lowest integer in relation to x.
- https://community.bistudio.com/wiki/case
+ https://community.bistudio.com/wiki/floor
- case Anything
+ floor Number
- case b
+ floor x
- $Code$switch (_condition) do {
- case 1: { hint "1" };
- case 2: { hint "2" };
- default { hint "default" };
- };$/Code$
+ $Code$floor 5.25
+ Result is 5$/Code$
+
+ $Code$floor -5.25
+ Result is -6$/Code$
undefined / undefined
@@ -8957,54 +9690,62 @@
- Switch_Type
+ Number
+
- catch
+ direction
- Processes code when an exception is thrown in a try block. The exception caught can be found in the _exception variable.
+ Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).
- https://community.bistudio.com/wiki/catch
+ https://community.bistudio.com/wiki/direction
- Exception catch Code
+ direction Object/Location
- try-block catch code
+ direction object
-
+ $Code$player setDir 90;
+ _d = direction player ;//returns 90$/Code$
+
- undefined / undefined
+ global / undefined
- Anything
+ Number
+
- cbChecked
+ collect3DENHistory
- Returns the current state of a checkbox (CT_CHECKBOX type 77 of Dialog Control ).
+ Execute a block of code in which all Eden Editor operations will be recorded as one history step. For example creating an entity, setting its attributes and then connections would normally be recorded as three different steps. Calling them all within single collect3DENHistory block will group them together and the user will need to undo only once to revert the changes.
- https://community.bistudio.com/wiki/cbChecked
+ https://community.bistudio.com/wiki/collect3DENHistory
- cbChecked Control
+ collect3DENHistory Code
- cbChecked control
+ collect3DENHistory code
- $Code$_checked = cbChecked _myCheckBox;$/Code$
+ $Code$collect3DENHistory {
+ _logic = create3DENEntity ["Logic", "Logic", position player ];
+ add3DENConnection ["Sync", [_logic], player ];
+ };
+ // Creates a logic and connects it to player in one history step.$/Code$
undefined / undefined
@@ -9012,31 +9753,30 @@
- Boolean
+ Nothing
+
- cbSetChecked
+ slingLoadAssistantShown
- Sets the current state of a checkbox (CT_CHECKBOX type 77 of Dialog Control ).
+ Returns true of Sling Load Assistant is open
- https://community.bistudio.com/wiki/cbSetChecked
+ https://community.bistudio.com/wiki/slingLoadAssistantShown
- Control cbSetChecked Boolean
+ slingLoadAssistantShown
- control cbSetChecked state
+ slingLoadAssistantShown
- $Code$_myCheckBox cbSetChecked true ;$/Code$
-
- $Code$_disp = findDisplay 46 createDisplay "RscDisplayEmpty";
- _chk = _disp ctrlCreate ["RscCheckBox", -1];
- _chk cbSetChecked true ;$/Code$
+ $Code$waitUntil { slingLoadAssistantShown };
+ hint "You lack rudimentary motor skills and basic eye-hand coordination.";
+ //scold user for unethical practices$/Code$
undefined / undefined
@@ -9044,125 +9784,153 @@
- Nothing
+ Boolean
+
- ceil
+ publicVariableServer
- The ceil value of x.
+ Send the variable value to the server - same limitations regarding variable type as publicVariable.
+ In Arma 3 it is possible to broadcast nil value
- https://community.bistudio.com/wiki/ceil
+ https://community.bistudio.com/wiki/publicVariableServer
- ceil Number
+ publicVariableServer String
- ceil x
+ publicVariableServer varName
- $Code$ceil 5.25
- Result is 6$/Code$
-
- $Code$ceil -5.25
- Result is -5$/Code$
+ $Code$publicVariableServer "CTFscoreOne";$/Code$
undefined / undefined
+ (24 Aug, 2012)
+ publicVariableServer (run on client)
+ publicVariableClient (run on server)
+ Publishers the variable (name as STRING) to the server only. Useful when you want to synchronize a variable with the server but not any other clients. - Rocket
- Number
+ Nothing
+
- channelEnabled
+ splitString
- Returns true or false depending on whether the given channel is enabled or disabled. For more information about enabling/disabling of chat channels see enableChannel. Channel / Number correspondence:
- 0 = Global
- 1 = Side
- 2 = Command
- 3 = Group
- 4 = Vehicle
- 5 = Direct
- 6-15 = Custom Radio (Is not supported by channelEnabled )
- Please note that since Arma 3 v1.59.135661 the output of this command was changed from Boolean to Array in format [ Boolean, Boolean ]
+ An SQF version of C++ strtok. Splits given string str into an array of tokens according to given delimiters. In addition, if empty string "" is used for delimiters, str is split by each character.
- https://community.bistudio.com/wiki/channelEnabled
+ https://community.bistudio.com/wiki/splitString
- channelEnabled Number
+ String splitString String
- channelEnabled channel
+ str splitString delimiters
- $Code$_isGlobalChatEnabled = ( channelEnabled 0) select 0; // Check if user can use text on global channel$/Code$
+ $Code$_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"]
+ _str joinString " "; // "This is a sample string"$/Code$
- $Code$_isGlobalVoiceEnabled = ( channelEnabled 0) select 1; // Check if user can use the VoN on global channel$/Code$
+ $Code$"\A3\ui_f\data\map\vehicleicons\iconLogic_ca.paa" splitString "\.";
+ // ["A3","ui_f","data","map","vehicleicons","iconLogic_ca","paa"]$/Code$
+
+ $Code$"1:2:3" splitString ":"; // ["1","2","3"]$/Code$
+
+ $Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
+
+ $Code$"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"$/Code$
+
+ $Code$_cmd = currentMagazineDetail player ; //"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]"
+ _cmd splitString "([ ]/:)"; //["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]$/Code$
+
+ $Code$// Remove all \r\n from file:
+ loadFile "somefile.txt" splitString toString [13,10] joinString " "$/Code$
undefined / undefined
+ (May 17, 2016)
+ This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 1.58):
+ $Code$"Mörser" splitString ""
+ - ["M"," "," ","r","s","e","r"]
+ "Mörser" splitString "ö"
+ - ["M","rser"]
+ "Mörser" splitString "ä"
+ - ["M"," rser"]$/Code$
+
+ (October 17, 2016)
+ This commands works only with ASCII chars, any chars with codes 127, also used in different languages, will be converted to [" ", " "]. Use toArray to preserve special characters:
+ $Code$_spaced = toArray "Mörser" apply { toString [_x]} joinString " "; // M ö r s e r$/Code$
- Array
+ Array
+
- cheatsEnabled
+ skillFinal
- Checks whether cheats are enabled (whether the designers' version is running).
+ Returns final, recalculated sub skill value of given unit. (with regard to AI Level coefficient (Difficulty settings)).
- https://community.bistudio.com/wiki/cheatsEnabled
+ https://community.bistudio.com/wiki/skillFinal
- cheatsEnabled
+ Object skillFinal String
- cheatsEnabled
+ unit skillFinal skillName
-
+ $Code$_unitTrueEndurance = unit1 skillFinal "endurance";$/Code$
+
undefined / undefined
+ Since 1.40 the command works also in MP environment
+
+ (January 31, 2015)
- Boolean
+ Number
+
- checkAIFeature
+ uniformMagazines
- Check if given AI feature is currently enabled. Feature may be one of:
- "AwareFormationSoft", "CombatFormationSoft".
+ Get array with all magazines from uniform of the given unit.
- https://community.bistudio.com/wiki/checkAIFeature
+ https://community.bistudio.com/wiki/uniformMagazines
- checkAIFeature String
+ uniformMagazines Object
- checkAIFeature feature
+ uniformMagazines unit
- $Code$_featureUsed = checkAIFeature "AwareFormationSoft"$/Code$
+ $Code$uniformMagazines player ;[
+ "6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](3x)"
+ ]$/Code$
undefined / undefined
@@ -9170,91 +9938,83 @@
- Boolean
+ Array
+
- checkVisibility
+ setCompassOscillation
- Checks if one position is visible from another position and how much. The results can be affected by getTerrainGrid value, especially if position is near the ground. Particle effects such as smoke can also affect the results.
+ Sets compass oscillation.
- https://community.bistudio.com/wiki/checkVisibility
+ https://community.bistudio.com/wiki/setCompassOscillation
- Array checkVisibility Array
+ setCompassOscillation Array
- [ignore, LOD, ignore2] checkVisibility [beg, end]
+ setCompassOscillation [angle, frequencyMin, frequencyMax]
- $Code$_cansee = [ objNull, "VIEW"] checkVisibility [ eyePos player, eyePos unit1];$/Code$
+ $Code$setCompassOscillation [1, 1, 1];$/Code$
undefined / undefined
- (August 8, 2016)
- Particles that have blockAIVisibility set to 1 will influence the result, but will not make checkVisibility return 0. Instead an extremly small number will be returned.
- Distance, fog, overcast, rain and nighttime have no effect on the result.
- Number
+ Nothing
+
- civilian
+ getPilotCameraRotation
- Pre-defined variable for the civilian side.
- When used in a format statement ( hint format ["%1",civilian] ), the string returned is "CIV".
+ Returns rotation (relative to the centered camera position) of the object airplane or helicopter pilotCamera.
- https://community.bistudio.com/wiki/civilian
+ https://community.bistudio.com/wiki/getPilotCameraRotation
- civilian
+ getPilotCameraRotation Object
- civilian
+ getPilotCameraRotation object
- $Code$// SQS:
- ?((side _unit) == civilian ) : hint "This is a civilian unit!"$/Code$
-
- $Code$// SQF:
- if (( side _unit) == civilian ) then {
- hint "This is a civilian unit!";
- };$/Code$
+ $Code$_pilotCamRot = getPilotCameraRotation vehicle player$/Code$
- undefined / undefined
+ local / undefined
- In OFP v1.96, empty vehicles, objects and dead soldiers are on side civilian.
- Side
+ Array
+
- className
+ menuSize
- Returns short name of location.
+ Returns how many sub entries is in item on given path.
- https://community.bistudio.com/wiki/className
+ https://community.bistudio.com/wiki/menuSize
- className Location
+ menuSize Array
- className loc
+ menuSize [idc, path]
@@ -9264,675 +10024,825 @@
- String
+ Number
+
- clearAllItemsFromBackpack
+ setDestination
- Removes all items from the backpack.
+ Set the destination for path planning of the pilot.
+ Possible values for planningMode are:
+ "DoNotPlan" - used when not moving
+ "DoNotPlanFormation" - used in formation when simple path testing is used
+ "LEADER PLANNED" - used for formation leader (full path finding used)
+ "LEADER DIRECT" - used for DirectGo (like getin, supply)
+ "FORMATION PLANNED" - used in formation when full path finding is used
+ "VEHICLE PLANNED" - used for vehicle driver
+ Works best when used on agents
- https://community.bistudio.com/wiki/clearAllItemsFromBackpack
+ https://community.bistudio.com/wiki/setDestination
- clearAllItemsFromBackpack Object
+ Object setDestination Array
- clearAllItemsFromBackpack unit
+ object setDestination [position, planningMode, forceReplan]
-
+ $Code$bob setDestination [ screenToWorld [0.5,0.5], "LEADER PLANNED", true ]$/Code$
+
- undefined / undefined
+ local / global
- Nothing
+ Nothing
+
- clearBackpackCargo
+ setWaypointHousePosition
- Removes all backpacks from ammo box (or any general weapon holder container).
+ For waypoints attached to a house, this defines the target house position.
- https://community.bistudio.com/wiki/clearBackpackCargo
+ https://community.bistudio.com/wiki/setWaypointHousePosition
- clearBackpackCargo Object
+ Array setWaypointHousePosition Number
- clearBackpackCargo box
+ waypoint setWaypointHousePosition pos
- $Code$clearBackpackCargo myBox;$/Code$
+ $Code$[_grp, 2] setWaypointHousePosition 1;$/Code$
undefined / undefined
- (July 6, 2017)
- This will remove not only backpacks, but vests and uniforms as well.
- Nothing
+ Nothing
+
- clearBackpackCargoGlobal
+ boundingCenter
- Removes all backpacks from the vehicle cargo space. MP synchronized.
+ Returns the position of original (loaded) center of object in model coordinates.
- https://community.bistudio.com/wiki/clearBackpackCargoGlobal
+ https://community.bistudio.com/wiki/boundingCenter
- clearBackpackCargoGlobal Object
+ boundingCenter Object
- clearBackpackCargoGlobal unit
+ boundingCenter object
- $Code$clearBackpackCargoGlobal jeepOne;$/Code$
+ $Code$_center = boundingCenter TruckOne$/Code$
- global / global
+ undefined / undefined
- (July 6, 2017)
- This will remove not only backpacks, but vests and uniforms as well.
- Nothing
+ Array
+
- clearGroupIcons
+ getTotalDLCUsageTime
- Removes all icon from group.
+ Returns total DLC usage time in this game session
- https://community.bistudio.com/wiki/clearGroupIcons
+ https://community.bistudio.com/wiki/getTotalDLCUsageTime
- clearGroupIcons Group
+ getTotalDLCUsageTime
- clearGroupIcons group
+ getTotalDLCUsageTime
-
+ $Code$_dlcTime = getTotalDLCUsageTime ;$/Code$
+
undefined / undefined
- Nothing
+ Number
+
- clearItemCargoGlobal
+ switchLight
- Removes all items from ammo box (or any general weapon holder container).
+ Controls whether a lamp is lit or not. For working with CfgNonAIVehicles class "StreetLamp" only.
- https://community.bistudio.com/wiki/clearItemCargoGlobal
+ https://community.bistudio.com/wiki/switchLight
- clearItemCargoGlobal Object
+ Object switchLight String
- clearItemCargoGlobal box
+ lamp switchLight mode
-
+ $Code$( object 12345) switchLight "OFF"$/Code$
+
+ $Code$nearestObject [player, "Streetlamp"] switchLight "OFF"$/Code$
+
- global / global
+ undefined / undefined
+ (January 23, 2010)
+ If you want turn street lamp off in ArmA2, the syntax is:
+ ID959522=position player nearestObject 959522
+ ID959522 switchLight "off"
+
+ (September 16, 2013)
+ In ArmA3 use setHit instead:
+ $Code$_lamp = nearestObject [ player, "Lamps_base_F"];
+ _lamp setHit ["light_1_hitpoint", 0.97]; //off
+ _lamp setHit ["light_1_hitpoint", 0]; //on$/Code$
+ Switch all lights off in the 500 radius of player:
+ $Code${
+ for "_i" from 0 to count getAllHitPointsDamage _x - 1 do
+ {
+ _x setHitIndex [_i, 0.97];
+ };
+ }
+ forEach nearestObjects
+ [
+ player,
+ [
+ "Lamps_base_F",
+ "PowerLines_base_F",
+ "PowerLines_Small_base_F"
+ ],
+ 500
+ ];$/Code$
- Nothing
+ Nothing
+
- clearItemCargo
+ tvExpandAll
- Removes all items from ammo box (or any general weapon holder container).
+ Expands all tree items for the given Tree View.
- https://community.bistudio.com/wiki/clearItemCargo
+ https://community.bistudio.com/wiki/tvExpandAll
- clearItemCargo Object
+ tvExpandAll Number
+
+ tvExpandAll Control
- clearItemCargo box
+ tvExpandAll idc
+
+ tvExpandAll control
- $Code$clearItemCargo myBox;$/Code$
+ $Code$tvExpandAll 101;$/Code$
+
+ $Code$tvExpandAll _ctrl;$/Code$
- undefined / undefined
+ local / local
- Nothing
+ Nothing - Nothing
+
- clearItemPool
+ lbSetPictureColor
- Removes all items from ammo box (or any general weapon holder container)
+ Sets the color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
- https://community.bistudio.com/wiki/clearItemPool
+ https://community.bistudio.com/wiki/lbSetPictureColor
- clearItemPool Object
+ lbSetPictureColor Array
+
+ Control lbSetPictureColor Array
- clearItemPool box
+ lbSetPictureColor [idc, index, color]
+
+ control lbSetPictureColor [index, color]
- $Code$clearItemPool jeepOne$/Code$
+ $Code$lbSetPictureColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+
+ $Code$_ctrl lbSetPictureColor [0, [1, 1, 1, 1]];$/Code$
undefined / undefined
+ More information on the LB command family can be found here
+
+ (August 18, 2015)
+ (ArmA 3 1.48) To give an image on the right side of a listbox item:
+ $Code$_ctrl lbSetPictureRightColor [_index, [1,1,1,0.7]];$/Code$
- Nothing
+ Nothing - Nothing
+
- clearMagazineCargoGlobal
+ weaponInertia
- Removes all magazines from the vehicle cargo space. MP synchronized.
+ Returns current rate of how much the weapon view is distorted because of quick aiming
- https://community.bistudio.com/wiki/clearMagazineCargoGlobal
+ https://community.bistudio.com/wiki/weaponInertia
- clearMagazineCargoGlobal Object
+ weaponInertia Object
- clearMagazineCargoGlobal unit
+ weaponInertia unit
- $Code$clearMagazineCargoGlobal jeepOne;$/Code$
+ $Code$_inertia = weaponInertia player ;$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Array
+
- clearMagazineCargo
+ hideObjectGlobal
- Remove all magazines from the given vehicle's magazine cargo space.
+ This command is designed for MP. Hides object on all connected clients as well as JIP. Call on the server only. Can be used on all objects with class names, i.e. ( typeOf object != ""). In SP this command behaves just like hideObject.
- https://community.bistudio.com/wiki/clearMagazineCargo
+ https://community.bistudio.com/wiki/hideObjectGlobal
- clearMagazineCargo Object
+ hideObjectGlobal Object
+
+ Object hideObjectGlobal Boolean
- clearMagazineCargo vehicleName
+ hideObjectGlobal object
+
+ object hideObjectGlobal hidden
- $Code$clearMagazineCargo _truck;$/Code$
+ $Code$hideObjectGlobal nearestBuilding [2500,2500,0];$/Code$
+
+ $Code$objectname hideObjectGlobal true;$/Code$
- global / local
+ global / global
- (11:02, 24 October 2009 (CEST))
- Effect is local, run on each client for global effect.
-
-
- Nothing
-
-
-
-
- clearMagazinePool
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (June 27, 2015)
+ hideObject and hideObjectGlobal disable object collision in addition to rendering. A3 1.45.131175
+ (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
+
+ (September 1, 2016)
+ As of A3 1,62.134494 running hideObjectGlobal in big loop may cause some objects not to be hidden for a players already connected or passed JIP. To avoid players rendering desync consider running that in preInit schedule of a server.
+
+ (August 7, 2017)
+ In A3 1.72.142342 when you hide object via hideObjectGlobal, model sounds still be audible.
+ For e.g. if you delete apex house from map, you still hear a conditioner sound at this spot
+
+
+ Nothing - Nothing
+
+
+
+
+
+ ctValue
- Remove all magazines from the magazine pool, of which the player may choose in the following missions. Available in campaigns only.
+ Returns metadata (number) associated with a particular row of RscControlsTable.
- https://community.bistudio.com/wiki/clearMagazinePool
+ https://community.bistudio.com/wiki/ctValue
- clearMagazinePool
+ ctValue Control
- clearMagazinePool
+ ctValue Control
-
+ $Code$_number = ctValue _control;$/Code$
+
- undefined / undefined
+ local / local
- Nothing
+ Number
+
- clearOverlay
+ hasPilotCamera
- Clear the current overlay.
- i
- Some Old Editor Command
+ Returns true if the object airplane or helicopter has a pilotCamera.
- https://community.bistudio.com/wiki/clearOverlay
+ https://community.bistudio.com/wiki/hasPilotCamera
- clearOverlay Control
+ hasPilotCamera Object
- clearOverlay map
+ hasPilotCamera object
- $Code$clearOverlay _map,$/Code$
+ $Code$hasPilotCamera vehicle player$/Code$
- undefined / undefined
+ global / undefined
- Nothing
+ Boolean
+
- clearRadio
+ sliderSetRange
- Clean up the content of radio protocol history.
+ Set limits of slider idc of topmost user dialog.
- https://community.bistudio.com/wiki/clearRadio
+ https://community.bistudio.com/wiki/sliderSetRange
- clearRadio
+ sliderSetRange Array
+
+ Control sliderSetRange Array
- clearRadio
+ sliderSetRange [idc, min, max]
+
+ control sliderSetRange [min, max]
- $Code$clearRadio;$/Code$
+ $Code$sliderSetRange [101, 0, 100];$/Code$
- undefined / local
+ undefined / undefined
- Use $Code$ enableRadio false;$/Code$ to disable the chat.
- Nothing
+ Nothing - Nothing
+
- clearWeaponCargoGlobal
+ removeAllItemsWithMagazines
- Removes all weapons from the vehicle cargo space. MP synchronized.
+ Removes all itemsWithMagazines from the uniform, vest and backpack.
- https://community.bistudio.com/wiki/clearWeaponCargoGlobal
+ https://community.bistudio.com/wiki/removeAllItemsWithMagazines
- clearWeaponCargoGlobal Object
+ removeAllItemsWithMagazines Object
- clearWeaponCargoGlobal unit
+ removeAllItemsWithMagazines unit
- $Code$clearWeaponCargoGlobal jeepOne;$/Code$
+ $Code$removeAllItemsWithMagazines player ;$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Nothing
+
- clearWeaponCargo
+ current3DENOperation
- Remove all weapons from the given vehicle's weapon cargo space.
+ Returns the currently performed editing operation in Eden Editor.
- https://community.bistudio.com/wiki/clearWeaponCargo
+ https://community.bistudio.com/wiki/current3DENOperation
- clearWeaponCargo Object
+ current3DENOperation
- clearWeaponCargo vehicleName
+ current3DENOperation
- $Code$clearWeaponCargo _truck$/Code$
+ $Code$if ( current3DENOperation == "Move") then { hint "Moving";};$/Code$
- global / local
+ undefined / undefined
- (October 24, 2009)
- Only works on clients.
- Nothing
+ String
+
- clearWeaponPool
+ setUnitLoadout
- Remove all weapons from the weapon pool, of which the player may choose in the following missions. Available in campaigns only.
+ Creates a loadout from given inventory structure and applies it to a unit.
+ This command is not final and might be changed in a near future.
- https://community.bistudio.com/wiki/clearWeaponPool
+ https://community.bistudio.com/wiki/setUnitLoadout
- clearWeaponPool
+ Object setUnitLoadout Array
- clearWeaponPool
+ unit setUnitLoadout [loadout, rearm]
-
+ $Code$_loadout = getUnitLoadout player_1 ;
+ player_2 setUnitLoadout _loadout;//Copies loadout from player_1 and applies it to player_2$/Code$
+
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- clientOwner
+ clearAllItemsFromBackpack
- Returns the client's owner id
+ Removes all items from the backpack.
- https://community.bistudio.com/wiki/clientOwner
+ https://community.bistudio.com/wiki/clearAllItemsFromBackpack
- clientOwner
+ clearAllItemsFromBackpack Object
- clientOwner
+ clearAllItemsFromBackpack unit
- $Code$_id = clientOwner ;$/Code$
-
+
undefined / undefined
- (February 17, 2016)
- On hosted server there could be some inconsistency between clientOwner, owner and object creator id, especially in missions started from save. On the dedicated server this command however works reliably.
- Number
+ Nothing
+
- closeDialog
+ createDisplay
- Close the currently active user dialog with exit code. Most common exit codes are:
- $Code$#define IDC_OK 1 //emulate "Ok" button$/Code$
- $Code$#define IDC_CANCEL 2 //emulate "Cancel" button$/Code$
+ Creates child display of given display and loads from "resourceName". The notable difference between createDisplay and createDialog is that with createDisplay the player would be able to move whilst having control of the mouse pointer.
+ Since Arma 3 v1.49.131653 createDisplay returns Display and will first look in description.ext for resourceName config, if not found, it will then look in main config.
+ Displays created with both createDisplay and createDialog will take control of the mouse pointer and will close when user presses Esc.
+ $Code$_emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty";$/Code$
+ If display is needed which exists independently, it can be created in IGUI layer with cutRsc command.
+ $Code$"someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
+ _emptyDisplay = uiNamespace getVariable "RscTitleDisplayEmpty";$/Code$
+ Such display can be closed with closeDisplay command or by overwriting the same cut layer with another output. Note that "Unload" EH for some reason does not work with such display.
- https://community.bistudio.com/wiki/closeDialog
+ https://community.bistudio.com/wiki/createDisplay
- closeDialog Number
+ Display createDisplay String
- closeDialog exitcode
+ parent createDisplay resourceName
- $Code$closeDialog 2;$/Code$
-
- $Code$#define IDC_CANCEL 2
- closeDialog IDC_CANCEL;$/Code$
+ $Code$findDisplay 46 createDisplay "RscCredits";$/Code$
- local / local
+ undefined / undefined
+ (August 23, 2014)
+ Do not simply createDisplay from UI context code such as "ButtonDown" UI Event handler, as it will crash the game. Instead use spawn scope:
+ $Code$[] spawn { findDisplay 46 createDisplay "RscCredits"};$/Code$
+
+ (November 15, 2014)
+ Arma3 v1.34
+ When using CreateDisplay instead of CreateDialog, all the commands for working with the controls of the display only work with the control version, not the IDC version.
+ EXAMPLE:
+ $Code$LbAdd [1234, "item"]; // does not work on displays, and won't error either
+ _ctrl LbAdd "item"; // does work with displays$/Code$
+ So you have to use the control(DisplayCtrl) and not the IDC.
+
+ (July 29, 2017)
+ A user dialog created with createDisplay over mission display ( findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work.
- Nothing
+ Nothing/Display
+
- closeDisplay
+ getText
- Close given display with exit code. Most common exit codes are:
- $Code$#define IDC_OK 1 //emulate "Ok" button$/Code$
- $Code$#define IDC_CANCEL 2 //emulate "Cancel" button$/Code$
+ Extract text from config entry.
- https://community.bistudio.com/wiki/closeDisplay
+ https://community.bistudio.com/wiki/getText
- Display closeDisplay Number
+ getText Config
- display closeDisplay exitcode
+ getText config
- $Code$_display closeDisplay 1;$/Code$
-
- $Code$#define IDC_OK 1
- _display closeDisplay IDC_OK;$/Code$
+ $Code$_text = getText ( configFile "CfgVehicles" "Thing" "icon");$/Code$
undefined / undefined
- (November 18, 2015)
- closeDisplay does not instantly close the display but does it on next display simulation cycle (when display becomes active)
+ (Mar 28, 2014)
+ (ArmA3 1.14) It's recommended to use BIS_fnc_GetCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.
+ Traditional workaround:
+ $Code$
+ _cfg = configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type"
+ switch ( true ) do
+ {
+ case ( isNumber _cfg): { getNumber _cfg};
+ case ( isText _cfg): { getText _cfg};
+ case ( isArray _cfg): { getArray _cfg;};
+ default { nil };
+ };
+ $/Code$
+ Recommended workaround:
+ $Code$
+ ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_GetCfgData ;
+ $/Code$
+ To return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_GetCfgData. e.g.
+ $Code$
+ [( configFile "CannonFire" "LightExp"),"lifeTime",0] call BIS_fnc_returnConfigEntry ;//0.5
+ $/Code$
+ To compose collected String into Array, use BIS_fnc_getCfgDataArray instead. E.g.
+ $Code$
+ ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_getCfgDataArray ;
+ $/Code$
- Nothing
+ String
+
- closeOverlay
+ triggerAttachObject
- Closes the current overlay without committing.
- i
- Some Old Editor Command
+ Assigns a static object to the trigger. The activation source is changed to "STATIC".
- https://community.bistudio.com/wiki/closeOverlay
+ https://community.bistudio.com/wiki/triggerAttachObject
- closeOverlay Control
+ Object triggerAttachObject Number
- closeOverlay map
+ triggerName triggerAttachObject objectId
-
+ $Code$_trigger triggerAttachObject 1234;$/Code$
+
undefined / undefined
+ (October 31, 2013)
+ This command doesn't quite work in Arma 3 [1]
+ Further investigation reveals that objectId param for this command is some kind of map id and not the id you can see in the editor. This map id could be seen in multiplayer when looking at netId of the static objects, for example "1:-23984219837", the -23984219837 would be the objectId. Unfortunately it still doesn't work.
- Nothing
+ Nothing
+
- collapseObjectTree
+ hasInterface
- Collapse the object tree.
- i
- Some Old Editor Command
+ Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.
- https://community.bistudio.com/wiki/collapseObjectTree
+ https://community.bistudio.com/wiki/hasInterface
- collapseObjectTree Control
+ hasInterface
- collapseObjectTree map
+ hasInterface
- $Code$collapseObjectTree _map,$/Code$
+ $Code$headless = !( hasInterface || isDedicated );$/Code$
+
+ $Code$_isHC = ! hasInterface && ! isDedicated ;$/Code$
undefined / undefined
+ (December 21, 2014)
+ $Code$ if ( isDedicated ) then {
+ //run on dedicated server only
+ };
+ if ( isServer ) then {
+ //run on dedicated server or player host
+ };
+ if ( hasInterface ) then {
+ //run on all player clients incl. player host
+ };
+ if (! isDedicated ) then {
+ //run on all player clients incl. player host and headless clients
+ };
+ if (! isServer ) then {
+ //run on all player clients incl. headless clients but not player host
+ };
+ if (! hasInterface ) then {
+ //run on headless clients and dedicated server
+ };
+ if (! hasInterface && ! isDedicated ) then {
+ //run on headless clients only
+ };$/Code$
- Nothing
+ Boolean
+
- collect3DENHistory
+ removeMagazineGlobal
- Execute a block of code in which all Eden Editor operations will be recorded as one history step. For example creating an entity, setting its attributes and then connections would normally be recorded as three different steps. Calling them all within single collect3DENHistory block will group them together and the user will need to undo only once to revert the changes.
+ Removes the magazine from the unit.
- https://community.bistudio.com/wiki/collect3DENHistory
+ https://community.bistudio.com/wiki/removeMagazineGlobal
- collect3DENHistory Code
+ Object removeMagazineGlobal String
- collect3DENHistory code
+ unit removeMagazineGlobal magazineName
- $Code$collect3DENHistory {
- _logic = create3DENEntity ["Logic", "Logic", position player ];
- add3DENConnection ["Sync", [_logic], player ];
- };
- // Creates a logic and connects it to player in one history step.$/Code$
+ $Code$player removeMagazineGlobal "30Rnd_65x39_caseless_mag";$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- combatMode
+ setUnloadInCombat
- Returns the combat mode of the given unit. See setCombatMode for more information about combat modes.
+ If cargo or turret units should get out of vehicle when in combat. If true, vehicle will stop and units will dismount. Vehicle must be local.
- https://community.bistudio.com/wiki/combatMode
+ https://community.bistudio.com/wiki/setUnloadInCombat
- combatMode Object/Group
+ Object setUnloadInCombat Array
- combatMode grp
+ vehicle setUnloadInCombat [allowCargo, allowTurrets]
- $Code$if (( combatMode _grp1) == "BLUE") then {_grp1 setCombatMode "GREEN"};$/Code$
+ $Code$_veh setUnloadInCombat [ true, false ];$/Code$
- global / undefined
+ local / global
- (August 3, 2006)
- Notes from before the conversion:
- Use setCombatMode to set the combat mode. The definitions of the colours are given under that command.
-
- In OFP v1.96, combatMode return value does not change when unit's combat mode is set with radio commands, ie troops under the player's command.
- String
+ Nothing
+
- commandArtilleryFire
+ airportSide
- Orders a unit to reload defined magazine commence fire burst on the given position (via the radio).
+ Checks a side of the airport. ID is the number to identify which airport on the island you want to check.
+ Possible values for sara are:
+ 0 - Paraiso
+ 1 - Rahmadi
+ 2 - Pita
+ 3 - Antigua
- https://community.bistudio.com/wiki/commandArtilleryFire
+ https://community.bistudio.com/wiki/airportSide
- Object commandArtilleryFire Array
+ airportSide Number
+
+ airportSide Object
- unit commandArtilleryFire [position, type, rounds]
+ airportSide id
+
+ airportSide target
- $Code$mortar1 commandArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];$/Code$
+ $Code$airportSide 0;$/Code$
undefined / undefined
@@ -9940,906 +10850,863 @@
- Nothing
+ Side - Side
+
- commandChat
+ setCurrentChannel
- Types text to the command radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
+ Sets given channel as current chat channel. Scripted way of selecting desired channel on the UI. The given channel may be disabled (see enableChannel ), this is why this command returns boolean, true on success or false on failure. Correspondence between channel and number:
+ 0 = Global
+ 1 = Side
+ 2 = Command
+ 3 = Group
+ 4 = Vehicle
+ 5 = Direct
+ 6-15 = Custom Radio (see radioChannelCreate )
- https://community.bistudio.com/wiki/commandChat
+ https://community.bistudio.com/wiki/setCurrentChannel
- Object commandChat String
-
- Array commandChat String
+ setCurrentChannel Number
- unitName commandChat chatText
-
- [side, identity] commandChat chatText
+ setCurrentChannel channel
- $Code$_soldierOne commandChat "Show this text";$/Code$
-
- $Code$[ playerSide, "HQ"] commandChat "Do this! That's an order!";$/Code$
-
- $Code$driver vehicle player sideChat "sideChat";
- driver vehicle player globalChat "globalChat";
- driver vehicle player groupChat "groupChat";
- vehicle player vehicleChat "vehicleChat";
- driver vehicle player commandChat "commandChat";
- driver vehicle player customChat [1, "customChat"];
- systemChat "systemChat";$/Code$
+ $Code$_isDirectSelected = setCurrentChannel 5; // sets Direct channel as current active$/Code$
- global / local
+ undefined / local
+ (December 9, 2015)
+ This command can be used together with custom radio channels, but an offset of 5 must be added to the index from radioChannelCreate.
+ $Code$_index = radioChannelCreate [[1, 0, 0, 1], "Custom Channel 1", "%UNIT_NAME", [player]];
+ setCurrentChannel (_index + 5);
+ $/Code$
- Nothing - Nothing
+ Boolean
+
- commandFSM
+ isEqualTypeAll
- Orders a unit to process command defined by FSM file (via the radio).
+ Compares types of all elements of an array to the type of a single value.
- https://community.bistudio.com/wiki/commandFSM
+ https://community.bistudio.com/wiki/isEqualTypeAll
- Object/Array commandFSM Array
+ Array isEqualTypeAll Anything
- unitName commandFSM [fsm name, position, target]
+ arr isEqualTypeAll val
- $Code$_soldierOne commandFSM ["move.fsm", position player, player]$/Code$
+ $Code$_arr = [1,2,3,4,5,6,7,8,9,0];
+ _arr isEqualTypeAll ""; //false
+ _arr isEqualTypeAll 0; //true$/Code$
undefined / undefined
+ (November 25, 2015)
+ This command will return false if the array on the left side is empty ([]) regardless of the sample value.
+ $Code$[] isEqualTypeAll ""
+ - false
+ $/Code$
- Nothing
+ Boolean
+
- commandFire
+ assignedCommander
- Order the given unit to fire on the given target (via the radio).
- If the target is objNull, the unit is ordered to fire on its current target (set with doTarget or commandTarget ).
+ Returns the soldier assigned to the given vehicle as a commander.
- https://community.bistudio.com/wiki/commandFire
+ https://community.bistudio.com/wiki/assignedCommander
- Object/Array commandFire Object
+ assignedCommander Object
- unitName commandFire target
+ assignedCommander vehicle
- $Code$_ESoldier1 commandFire _WSoldier1$/Code$
+ $Code$_commander = assignedCommander vehicleName$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Object
+
- commandFollow
+ ctrlTextHeight
- Order the given unit to follow the given other unit (via the radio).
+ Returns the control text height. Supported control types are:
+ CT_STATIC 0
+ CT_EDIT 2 ( Since Arma 3 v1.57.135040 )
+ CT_STRUCTURED_TEXT 13
- https://community.bistudio.com/wiki/commandFollow
+ https://community.bistudio.com/wiki/ctrlTextHeight
- Object/Array commandFollow Object
+ ctrlTextHeight Control
- unitName commandFollow followedunit
+ ctrlTextHeight control
- $Code$_soldier1 commandFollow _soldier2$/Code$
+ $Code$_h = ctrlTextHeight _ctrl;$/Code$
- local / undefined
+ undefined / undefined
+ (May 24, 2017)
+ in ArmA 3 v.1.70.141764, this command always returns 0 if the control has no width.
- Nothing
+ Number
+
- commandGetOut
+ isForcedWalk
- Orders the unit to get out from the vehicle (via the radio).
+ Returns true if player is forced to walk with forceWalk.
- https://community.bistudio.com/wiki/commandGetOut
+ https://community.bistudio.com/wiki/isForcedWalk
- commandGetOut Object/Array
+ isForcedWalk Object
- commandGetOut unitName
+ isForcedWalk unitName
- $Code$commandGetOut _unitOne$/Code$
+ $Code$_bool = isForcedWalk player ;$/Code$
- local / global
+ undefined / undefined
- Nothing
+ Boolean
+
- commandMove
+ lbSetPictureColorDisabled
- Order the given unit(s) to move to the given location (via the radio). Exactly the same as doMove, except this command displays a radio message.
+ Sets the disabled color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
- https://community.bistudio.com/wiki/commandMove
+ https://community.bistudio.com/wiki/lbSetPictureColorDisabled
- Object/Array commandMove Array
+ lbSetPictureColorDisabled Array
+
+ Control lbSetPictureColorDisabled Array
- unitName commandMove position
+ lbSetPictureColorDisabled [idc, index, color]
+
+ control lbSetPictureColorDisabled [index, color]
- $Code$_soldier1 commandMove ( getMarkerPos "Marker1")$/Code$
+ $Code$lbSetPictureColorDisabled [101, 0, [1, 1, 1, 0.25]];$/Code$
+
+ $Code$_ctrl lbSetPictureColorDisabled [0, [1, 1, 1, 0.25]];$/Code$
- local / global
+ undefined / undefined
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- commandRadio
+ currentMagazineDetailTurret
- Sends the audio message to the command radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
- Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
+ Returns the class name of currently used magazine on specified turret. Use turret path [-1] for driver's turret. Note that a turret is not loaded until unit enters it, so this command will return "".
- https://community.bistudio.com/wiki/commandRadio
+ https://community.bistudio.com/wiki/currentMagazineDetailTurret
- Object commandRadio String
-
- Array commandRadio String
+ Object currentMagazineDetailTurret Array
- unit commandRadio radioName
-
- [side, identity] commandRadio radioName
+ vehicle currentMagazineDetailTurret [turret path]
- $Code$_soldierOne commandRadio "messageOne";$/Code$
-
- $Code$player commandRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
-
- $Code$[ west, "Base"] commandRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+ $Code$_magazineDetail = MBT_Kuma currentMagazineDetailTurret [0];$/Code$
- global / local
+ undefined / undefined
- (June 24, 2010)
- example: $Code$ _unit commandRadio "SentCmdHide";$/Code$
- radio command from CA_Dubbing config should work
-
- (December 3, 2016)
- To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
- $Code$ player commandRadio "#MySound.ogg";$/Code$
- Nothing - Nothing
+ String
+
- commandStop
+ addMagazineAmmoCargo
- Order the given unit(s) to stop (via the radio). A stop command will never finish, the unit will never be ready.
+ Adds magazines with specified ammo count to the cargo space of a vehicle or a container.
- https://community.bistudio.com/wiki/commandStop
+ https://community.bistudio.com/wiki/addMagazineAmmoCargo
- commandStop Object/Array
+ Object addMagazineAmmoCargo Array
- commandStop unitName
+ cargospace addMagazineAmmoCargo [magazine, quantity, ammocount]
- $Code$commandStop _soldier1;$/Code$
-
- $Code$commandStop [_soldier1, _soldier2];$/Code$
-
- $Code$commandStop ( units player );$/Code$
+ $Code$_ammobox addMagazineAmmoCargo ["30Rnd_65x39_caseless_mag", 2, 5];$/Code$
global / global
- In ArmA 1.14, this command will not stop a unit that has been given a move order by means of selecting the unit, then clicking on the in game map (or ground).
- Nothing
+ Nothing
+
- commandSuppressiveFire
+ cursorTarget
- Order the given unit to suppress a given position or target (via the radio).
+ Returns the target pointed at by the player (usually with cross-hairs). The target has to be known to the player to some degree ( knowsAbout 0). If target is completely unknown, command returns objNull.
+ A valid target could belong to an enemy or a friendly side. Buildings are normally known to player and so are valid targets. Try nearTargets to see what else is considered a target. While friendly targets are usually known to the player, enemy targets can be totally unknown, especially if "auto-spotting" (or sometimes called "auto-reporting") is switched off. To check if auto-spotting is enabled: difficultyEnabled "autospot"
+ cursorTarget also returns locked target for the duration of the lock even if there is another target under the cursor. As soon as missile is fired, cursorTarget switches to current known target under cursor or objNull. Targeting (currently "T" in Arma 3) works regardless of the state of "auto-spotting".
+ Adding a target to the known list could be done with reveal command. When auto-spotting is enabled, zooming on the enemy target with cross-hairs usually reveals the target. As friendly targets are always known, zooming on friendly target could improve knowsAbout value.
+ Side relations can also influence target knowledge. For example east target is unknown target for civilian, but making them friends with setFriend instantly improves civilian knowledge of the east.
- https://community.bistudio.com/wiki/commandSuppressiveFire
+ https://community.bistudio.com/wiki/cursorTarget
- Object/Array commandSuppressiveFire Object/Array
+ cursorTarget
- unitName commandSuppressiveFire target
+ cursorTarget
- $Code$_soldier commandSuppressiveFire [1869.508,5760.962,0.000]$/Code$
-
- $Code$_soldier commandSuppressiveFire cursorTarget$/Code$
+ $Code$alive cursorTarget ;$/Code$
- local / local
+ undefined / undefined
- (October 8, 2016)
- Command expects position as second argument in format ASL in A3 1.64.138497.
+ (01:25, 18 February 2011 (CET))
+ If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it's in sight or not.
+
+ (11 March 2011)
+ Addition to Myke's note:
+ It also works for infantry with launchers that canLock, like Javelin or AA.
+ Only the lock cursor must be visible on the target - not a full lock necessarily.
+
+ (13:09, 11 July 2009 (CEST))
+ Player must knows about what he is pointing to for this command to return something other than NULL-OBJECT
+ This command doesn't work through building windows
+ This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things
+
+ (22:11, 23 August 2013 (CEST))
+ To add to Lou Montana's note, use reveal command on the object you want to be detected with cursorTarget when pointing at it. Without it, distant units are most likely to return objNull even if you shoot and hit them. Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: $Code${ player reveal _x} forEach allUnits ;$/Code$
+
+ (December 3, 2014)
+ cursorTarget seems to change when your cursor enters an object's boundingBox. Because of this, if the player is inside the boundingBox, the object will always be the current cursorTarget if the player is not looking at another object, although sometimes the object will remain the cursorTarget even if the player does.
+
+ (April 21, 2015)
+ Cursortarget will not return enemy units, even very close, if "autoreport" is disabled in game difficulty settings, and if player is alone.
+ However, when enemy units open fire on player, the cursortarget becomes functional on these units. If player is in a group, cursortarget is also functional (report by other units).
+
+ (February 5, 2016)
+ CursorTarget will return a Null_Object for all of thus which have a disabled simulation (_object enableSimulation false).
- Nothing
+ Object
+
- commandTarget
+ inputAction
- Order the given unit(s) to target the given target (via the radio). Command given to the player, puts a red square with words Target and Distance on player's HUD at target location. If player in vehicle and has radar facilities, it also adds target marker to the radar.
+ Return the state of input devices mapped to given input action.
+ For Arma 3 inputActions see: inputAction/actions.
+ For Arma 3 inputActions bindings see: inputAction/actions/bindings.
+ For earlier Arma editions see Category:Key Actions.
- https://community.bistudio.com/wiki/commandTarget
+ https://community.bistudio.com/wiki/inputAction
- Object commandTarget Object
+ inputAction String
- unitName commandTarget target
+ inputAction name
- $Code$_ESoldier1 commandTarget _WSoldier1;$/Code$
+ $Code$inputAction "leanLeft"
+ // Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.$/Code$
- $Code$player commandTarget bob;$/Code$
+ $Code$[] spawn {
+ waitUntil { inputAction "reloadMagazine" 0};
+ hint "Reload Key Pressed";
+ };$/Code$
- local / global
+ undefined / undefined
+ (07:38, 15 October 2010 (CEST))
+ This command also returns values other than 0 and 1 (like 0.02 or 1.3). Any value greater than zero usually signals that the key or button is pressed. inputAction does not work reliably when used in RscDisplayMission's onKeyDown event handler (the same is probably true for other input related event handlers).
+
+ (May 8, 2014)
+ inputAction does not return the actual state of the queried key when a dialog screen is open. Instead, it will always return 0.
+
+ (July 31, 2015)
+ inputAction is capable of returning the state of analog inputs. This includes mouse, joystick, and even TrackIR. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be 1.
+ Right mouse click is currently not supported, but right mouse hold is. http://feedback.arma3.com/view.php?id=25015
- Nothing
+ Number
+
- commandWatch
+ setSpeedMode
- Orders the unit(s) to watch the given position or target (via the radio). Use objNull as the target to order a unit to stop watching a position/target
+ Set group speed mode. Mode may be one of:
+ "LIMITED" (half speed)
+ "NORMAL" (full speed, maintain formation)
+ "FULL" (do not wait for any other units in formation)
- https://community.bistudio.com/wiki/commandWatch
+ https://community.bistudio.com/wiki/setSpeedMode
- Object/Array commandWatch Array
-
- Object/Array commandWatch Object
+ Object/Group setSpeedMode String
- unitName commandWatch position
-
- unitName commandWatch target
+ groupName setSpeedMode mode
- $Code$_soldierOne commandWatch markerPos "MarkerMoveOne"$/Code$
-
- $Code$[s1,s2] commandWatch player$/Code$
+ $Code$_groupOne setSpeedMode "LIMITED"$/Code$
local / global
-
-
- Nothing - Nothing
-
-
-
-
- commander
-
-
- In OFP it returns the commander of a vehicle. Since ArmA and VBS2 it returns the primary observer. The commander of a vehicle can be found with effectiveCommander.
-
-
- https://community.bistudio.com/wiki/commander
-
-
- commander Object
-
-
- commander vehicleName
-
-
- $Code$moveOut commander _tank;$/Code$
-
- $Code$// Detect if player is in commander turret of a vehicle:
- _isVehicleCommander = player isEqualTo commander objectParent player ;$/Code$
-
-
- global / undefined
-
-
- (August 3, 2006)
- Notes from before the conversion:
- It is also possible to find the commander of a vehicle by placing a C after the name of the vehicle so Tank1C and commander Tank1 both refer to the same unit, providing the original commander has not got out of the tank.
- The difference between the two is Tank1C is always the unit that was commander of the tank when the mission started, whilst commander Tank1 is the commander which is now there.
+ (14 Feb 2010)
+ Although setSpeedMode can be called on an individual unit, the entire group will be affected.
- (August 3, 2006)
- WARNING about Hardrock note:
- Take very care about this : if you give a vehiculeVarName to one crew, so his referent will not be Tank1x anymore ! Also, if in the mission editor, you put something in the name field, when this soldier will getin a vehicle, it will not be a Tank1x too. So do not take consideration about Hardrock note, if you don't want to have bad surprise. It Is better to force names by using setVehicleVarName command.
- $Code$(( crew tank) select 0) setVehicleVarName "Tankcrew0"$/Code$
+ (17 May 2008)
+ In Multiplayer, this command is overwritten by itself to NORMAL or FULLSPEED (i don't know which one, but it's fast move) when you ask the unit to move via script (ex : _unit doMove (getMarkerPos "destination"); )
+ The solution to solve this problem is to initialize the setSpeedMode after your order the unit to move.
+ So basically it gives you :
+ _unit doMove (getMarkerPos "destination");
+ _unit setSpeedMode "LIMITED";
+ If you plan to move the unit again after it reaches its destination, you will have to set the speed mode to LIMITED again like i did just above.
- Object
+ Nothing
+
- commandingMenu
+ isVehicleCargo
- Return the name of the player actual topmost commanding menu.
+ Return transporting vehicle if vehicle is loaded in one.
- https://community.bistudio.com/wiki/commandingMenu
+ https://community.bistudio.com/wiki/isVehicleCargo
- commandingMenu
+ isVehicleCargo Object
- commandingMenu
+ isVehicleCargo vehicle
- $Code$waitUntil { commandingMenu == "RscStatus"}; hint "Press 4, I'm bleeding !";$/Code$
+ $Code$// Blackfish with given variable name blackfish, with a vehicle inside called quad
+ _transportingVehicle = isVehicleCargo quad; //returns blackfish
+ //Vehicle called quad that is not being transported as cargo
+ _transportingVehicle = getVehicleCargo quad; //returns objNull$/Code$
undefined / undefined
- (July 15, 2009)
- Possible values are :
- "" - means menu is closed
- "RscMainMenu" - Main menu, by pressing backspace
- "RscMoveHigh" - Move menu (1)
- "#WATCH" - Watch menu (2)
- "#WATCH0" - Watch menu - next page (2-0)
- "RscWatchDir" - Engage menu (3)
- "RscWatchMoreDir" - Engage menu - watch a direction (3-8)
- "#GET_IN" - Mount menu (4)
- "RscStatus" - Status menu (5)
- "RscCallSupport" - Mount menu - call support (5-1)
- "#ACTION" - Action menu (6)
- "RscCombatMode" - Combat mode menu (7)
- "RscFormations" - Formation menu(8)
- "RscTeam" - Team menu (9)
- "RscSelectTeam" - Team menu - select team (0-5)
- "RscReply" - Reply menu (0)
- "#User:BIS_Menu_GroupCommunication" - Communication menu (0-8)
- "#CUSTOM_RADIO" - Custom sounds menu (0-9)
- "RscRadio" - Radio menu (0-0)
- "RscGroupRootMenu" - "simplified" menu
- String
+ Object
+
- comment
+ items
- Define a comment.
- Mainly used in SQF Syntax, as you're able to introduce comment lines with semicolons in a SQS script.
+ Returns an array of names of all special items of a vehicle or a soldier.
- https://community.bistudio.com/wiki/comment
+ https://community.bistudio.com/wiki/items
- comment String
+ items Object
- comment commentMsg
+ items unit
- $Code$// script.sqs
- comment "This is a commented line"$/Code$
+ $Code$_itemsplayer = items player ;$/Code$
- $Code$// function.sqf
- comment "This is a commented line";$/Code$
+ $Code$player sideChat format ["%1", items player ];$/Code$
- undefined / undefined
+ global / undefined
- (September 12, 2009)
- Like ArmA, you can't use brackets to make a multi-lines comment. But, in a sqf file, you can make a comment as follow :
- $Code$ comment "
- first line
- seconde line";$/Code$
-
- (November 4, 2016)
- If a file is loaded with preprocessFile, execVM or spawn (but not loadFile), you may also define C-like comments using //... and /*...*/.
-
- (November 4, 2016)
- comment can also be used to create comments inside trigger activation fields where // or */...*/ does not work.
+ (June 18, 2013)
+ Arma 3, version 0.70 - magazines, explosives, grenades and all items currently linked on the unit are not returned now.
- Nothing
+ Array
+
- commitOverlay
+ preprocessFileLineNumbers
- Commit the current overlay.
- i
- Some Old Editor Command
+ Returns the preprocessed content of the given file. The preprocessor is C-like, it supports comments using /* */ and PreProcessor_Commands. The preprocessor also adds a default debug entrypoint for compiler at the begining of script: #line 1 "aFilename"
+ The #line keyword can be used in any script that are not preprocess, or with preprocess script with extra macro to protect reserverd sharp character. The format is:
+ #line number " name "
+ followed by new line. number could be only positive integer and name could be any name. This will be used only if an error occurs in the script. The error will contain the line:
+ File filename, line linenumber
+ where filename will be the name you set and linenumber will be number + how many lines it is from the #line line. If the error happened on the line right under #line it will add 0 to number, if on second line, it will add 1 etc.
+ It is possible to use more than one #line keywords, but it seems having just one at the top for little script is enough to pinpoint position of the error easily.
- https://community.bistudio.com/wiki/commitOverlay
+ https://community.bistudio.com/wiki/preprocessFileLineNumbers
- commitOverlay Control
+ preprocessFileLineNumbers String
- commitOverlay map
+ preprocessFileLineNumbers fileName
- $Code$commitOverlay _map,$/Code$
+ $Code$_string = preprocessFileLineNumbers "A3\ui_f\scripts\IGUI\RscUnitInfo.sqf"
+ // Result is:
+ //#line 1 "A3\ui_f\scripts\IGUI\RscUnitInfo.sqf"
+ //disableserialization;
+ //........$/Code$
undefined / undefined
+ (December 17, 2013)
+ The main difference between preprocessFile and preprocessFileLineNumbers is that the latter adds #line keyword to the target file, which allows to log the __LINE__ error happened at and the __FILE__ error happened in.
+
+ (November 4, 2017)
+ The #line directive get's removed from the output.
+ So to add a custom #line directive before while using preprocessFileLineNumbers, you have to use a preprocessor macro like this:
+ #define DEBUG(sharp,name) sharp##line 0 name
+ and add this at the right place in your code
+ DEBUG(#,"your filename");
+ This way you can have custom filenames in error messages.
- Nothing
+ String
+
- compileFinal
+ setLightAmbient
- Compile expression and makes it final, preventing it from:
- repeated compile or compileFinal
- removal by nil
- remote rewrite using publicVariable, publicVariableClient and publicVariableServer
+ Set ambient color of light. This includes surfaces that face away from the light, unlike setLightColor.
- https://community.bistudio.com/wiki/compileFinal
+ https://community.bistudio.com/wiki/setLightAmbient
- compileFinal String
+ Object setLightAmbient Array
- compileFinal expression
+ light setLightAmbient [r, g, b]
- $Code$myCode = compileFinal "a = a + 1";
- call myCode;
- //--- Repeated compile won't have any effect
- myCode = compileFinal "a = a + 2";
- //--- Duplicate code will be final as well
- myDuplicateCode = myCode;$/Code$
+ $Code$myLight setLightAmbient [0.5,0,0]; //produces red light around the origin source$/Code$
- undefined / local
+ local / local
- (August 14, 2013)
- When broadcasting a compileFinal'ed variable using publicVariable or its variants, the variable also becomes final on the other client(s) and/or the server.
- Also, compileFinal does not prevent event handlers from being removed or overwritten.
+ (Dec 1, 2006)
+ Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
+ for example:
+ $Code$_light = "#lightpoint" createVehicleLocal pos;
+ _light setLightBrightness 1.0;
+ _light setLightAmbient [0.0, 1.0, 0.0];
+ _light setLightColor [0.0, 1.0, 0.0];
+ _light lightAttachObject [_object, [0,0,0]];
+ $/Code$
- (May 27, 2017)
- in ArmA 3 1.70.141838, compileFinal also works for profileNamespace and uiNamespace. But be careful with that.
+ (Aug 17, 2007)
+ To clarify:
+ setLightAmbient - Terrain and surrounding objects are bathed in this colour.
+ setLightColor - Controls the "haze" seen around the lightsource (ex flares).
+
+ (Mar 25, 2014)
+ When both setLightAmbient and setLightColor were [0,0,0], there won’t be any visual presentation on the light source.
- Code
+ Nothing
+
- compile
+ getPosASLW
- Compile expression.
+ Returns the object position height above sea surface (waves included).
- https://community.bistudio.com/wiki/compile
+ https://community.bistudio.com/wiki/getPosASLW
- compile String
+ getPosASLW Object
- compile expression
+ getPosASLW obj
- $Code$_string = "a = a + 1";
- _code = compile _string;
- call _code;$/Code$
-
- $Code$hint str compile "a = b";
- //Result: {a=b}$/Code$
+ $Code$_pos = getPosASLW _diver;$/Code$
- undefined / undefined
+ global / undefined
- Code
+ Array
+
- completedFSM
+ getPosWorld
- Check whether the given FSM completes.
- The FSM handle is the number returned by the execFSM command.
+ Returns PositionWorld, which is PositionASL of the model centre [0,0,0] of an object, rather than transformed boundingCenter or LandContact vertices.
- https://community.bistudio.com/wiki/completedFSM
+ https://community.bistudio.com/wiki/getPosWorld
- completedFSM Number
+ getPosWorld Object
- completedFSM fsmHandle
+ getPosWorld object
- $Code$_completed = completedFSM _fsmHandle;$/Code$
+ $Code$_obj setPosWorld getPosWorld _obj;$/Code$
+
+ $Code$ATLToASL (_groundObj modelToWorld [0,0,0]) isEqualTo getPosWorld _groundObj; //true$/Code$
+
+ $Code$// Wave height under a boat:
+ _h = ((boat modelToWorld [0,0,0]) vectorDiff getPosWorld boat) select 2;$/Code$
- undefined / undefined
+ global / undefined
- Boolean
+ Array
+
- composeText
+ menuHover
- Creates a structured text by joining the given structured or plain texts.
+ Returns path to menu entry mouse is currently hovering over.
- https://community.bistudio.com/wiki/composeText
+ https://community.bistudio.com/wiki/menuHover
- composeText Array
+ menuHover Number
- composeText [text1, text2,]
+ menuHover idc
- $Code$_txt = composeText ["First line", image "data\isniper.paa", lineBreak, "Second line"];$/Code$
-
+
undefined / undefined
- Structured_Text
+ Array
+
- configClasses
+ ctrlSetFontSecondary
- Returns an array of config entries which meet criteria in condition code. Command iterates through all available config sub classes of the given config class. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at config to be added to the resulting array. Slightly faster than configProperties, but doesn't account for config properties or inherited entries.
- The condition code passed to configClasses should only be used for simple filter expressions and nothing more
+ Sets the font size of the secondary text of given control.
- https://community.bistudio.com/wiki/configClasses
+ https://community.bistudio.com/wiki/ctrlSetFontSecondary
- String configClasses Config
+ Control ctrlSetFontSecondary String
- condition configClasses config
+ ctrl ctrlSetFontSecondary fontClass
- $Code$// collect all CfgVehicles configs:
- _configs = " true " configClasses ( configFile "CfgVehicles");$/Code$
-
- $Code$// Return all classes that can transport 10 and more soldiers:
- _transporters = " getNumber (_x 'transportSoldier') = 10" configClasses ( configFile "CfgVehicles");$/Code$
-
- $Code$// Return all classes that inherit from 'RscText':
- hint str (" inheritsFrom _x == ( configFile 'RscText')" configClasses configFile );$/Code$
+ $Code$_control ctrlSetFontSecondary "TahomaB";$/Code$
undefined / undefined
- (oct 19, 2014)
- A fantastic way to filter stuff. eg; Create an array of west vehicles and spawn then in front of the player in rows of 5
- $Code$
- private ["_cfgArray","_xPos","_yPos","_veh"];
- _cfgArray = "(
- (getNumber (_x 'scope') = 2) &&
- {getNumber (_x 'side') == 1 &&
- {getText (_x 'vehicleClass') in ['Armored', 'Car', 'Air']
- }
- }
- )" configClasses (configFile "CfgVehicles");
- _xPos = 0;
- _yPos = 0;
- {
- _yPos = _yPos + 20;
- _veh = createVehicle [ ( configName _x ), player modelToWorld [_xPos, _yPos, 0], [], 0, "None"];
- if (_yPos = 100) then {
- _yPos = 0;
- _xPos = _xPos + 20;
- };
- } forEach _cfgArray;
- $/Code$
-
- (May 28, 2016)
- configClasses does not account for inherited subclasses, use configProperties with isClass filter instead
- $Code$ configProperties [_config, " isClass _x", true ];$/Code$
-
- (May 28, 2017)
- this will get a list of ALL locations on the currently loaded world
- $Code$( "true" configClasses ( configFile "CfgWorlds" worldName "names" ) ) apply {
- // change each config entry into a location
- nearestLocation [
- getArray ( _x "position" ),
- getText ( _x "type" )
- ]
- };$/Code$
- Array
+ Nothing
+
- configFile
+ setPilotCameraRotation
- Return root of config entries hierarchy.
- See AllInOne Config for a full config extract as example.
+ Sets rotation (relative to the centered camera position) of the object airplane or helicopter pilotCamera.
- https://community.bistudio.com/wiki/configFile
+ https://community.bistudio.com/wiki/setPilotCameraRotation
- configFile
+ Object setPilotCameraRotation Array
- configFile
+ object setPilotCameraRotation rotation
- $Code$_isMyClassActive = isClass ( configFile / "CfgPatches" / "MyClass");$/Code$
+ $Code$vehicle player setPilotCameraRotation [ rad 90, rad 45 ]$/Code$
- undefined / undefined
+ local / undefined
- (Jul 19, 2014)
- (ArmA3 1.24) It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection.
- $Code$
- _faces = " true " configClasses ( configFile "Cfgfaces");
- //same as: _faces = (configfile "CfgFaces") call BIS_fnc_getCfgSubClasses ;
- $/Code$
- $Code$
- //Extract all animals:
- animals = "(( configName _x) isKindOf 'animal')" configClasses ( configFile "CfgVehicles");
- /*same as:
- aniamls = [];
- [( configFile "CfgVehicles"),{
- if (( configName _this) isKindOf “animal”) then {
- animals set [ count animals, _this]
- }
- }
- ] call BIS_fnc_uniqueClasses ;*/
- $/Code$
- Return nested subclasses, currently still BIS_fnc_returnChildren
- $Code$
- //Return all nested config classes.
- [( configFile "CfgFaces"),1, true, true ] call BIS_fnc_returnChildren ;
- $/Code$
- Config
+ Nothing
+
- configHierarchy
+ setPlayable
- Returns hierarchy of the given config class. Just like with inheritsFrom, only complete config classes are supported
+ Create MP role for the unit. The roles created this way are used for Join In Progress and Team Switch.
+ NOTE: Currently in Arma 3 this command does nothing.
+ Doesn't work as intended
- https://community.bistudio.com/wiki/configHierarchy
+ https://community.bistudio.com/wiki/setPlayable
- configHierarchy Config
+ setPlayable Object
- configHierarchy configClass
+ setPlayable unitName
- $Code$_hierarchy = configHierarchy ( configFile "CfgVehicles" "Car");
- //[bin\config.bin,bin\config.bin/CfgVehicles,bin\config.bin/CfgVehicles/Car]$/Code$
+ $Code$setPlayable _aPerson$/Code$
undefined / undefined
+ (december 19, 2009)
+ if you want to add a TeamSwitchable unit (at least in Arma2), better use addSwitchableUnit
- Array
+ Nothing
+
- configName
+ teamSwitch
- Returns name of config entry.
+ Invoke the Team Switch dialog (force it even when conditions are not met). There has to be at least one playable unit for team switch to work, and for this command to work in MP, respawn type in description.ext should be 5 (SIDE).
+ NOTE: When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it _unit enableAI "TeamSwitch" so that the unit continues with waypoints
- https://community.bistudio.com/wiki/configName
+ https://community.bistudio.com/wiki/teamSwitch
- configName Config
+ teamSwitch
- configName config
+ teamSwitch
- $Code$_name = configName ( configFile "CfgVehicles");
- // Result is "CfgVehicles"$/Code$
-
+
undefined / undefined
- String
+ Nothing
+
- configNull
+ screenshot
- A non-existing Config.
- configNull == configNull ; // true
- isNull configNull ; // true
- configNull isEqualTo configNull ; // true
+ Captures a screenshot and stores it to given filename. PNG is the only available format and the file must have.png extension.
+ The file is saved into Screenshots folder in the Profile directory. The folder is by default limited to 250 MB to prevent abuse.
+ To increase the limit, add the following line at the end of the profile file:
+ $Code$maxScreenShotFolderSizeMB = 2000;$/Code$
+ 2000 can be replaced by any value in MB.
- https://community.bistudio.com/wiki/configNull
+ https://community.bistudio.com/wiki/screenshot
- configNull
+ screenshot String
- configNull
+ screenshot filename
- $Code$_config = missionNamespace getVariable ["myConfig", configNull ];$/Code$
+ $Code$screenshot "";$/Code$
- $Code$str configNull ; // ""$/Code$
+ $Code$screenshot "testFile.png";$/Code$
+
+ $Code$// The following code will result in the screenshot being placed in \Documents\Arma 3\Screenshots\any\where\you\want.png
+ screenshot "any\where\you\want.png";$/Code$
undefined / undefined
+ (July 18, 2016)
+ This command only captures the rendered picture (including ppEffects). GUI nor the mouse are visible on the screenshot. (ArmA 3 1.62.137494)
+
+ (December 3, 2017)
+ Change Sampling on Video Options to make bigger picture than your screen.
+ For example, 200% sampling on 1920x1080 screen and take screenshot via this command, it will generate a 3840x2160 picture.
+
+ (March 20, 2018)
+ The command will silently fail if your profiles folder is configured to be somewhere else (-profiles parameter), or if your HDR setting is below 16 (configurable in arma3.cfg or medium and above in in-game settings)
+ For full reference on recommended settings consult Eden Editor: Configuring Asset Previews
- Config
+ Nothing
+
- configProperties
+ attachedObjects
- Returns an array of config entries which meet criteria in condition code. Command iterates through available classes and config properties for given config entry. If 3rd param is true the search also includes inherited properties. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at property to be added to the resulting array. A bit slower than configClasses but allows to access inherited entires.
- The condition code passed to configProperties should only be used for simple filter expressions and nothing more
+ Returns a list of attached objects.
- https://community.bistudio.com/wiki/configProperties
+ https://community.bistudio.com/wiki/attachedObjects
- configProperties Array
+ attachedObjects Object
- configProperties [config, condition, inherit]
+ attachedObjects obj
- $Code$_configs = configProperties [ configFile "CfgVehicles" "O_Truck_02_box_F"];$/Code$
-
- $Code$_configs = configProperties [ configFile "RscText", " true ", true ];$/Code$
+ $Code${
+ detach _x;
+ } forEach attachedObjects player ;$/Code$
- $Code$// Get all hitpoints of a truck:
- _hitPoints = [];
- _hitPointsCfgs = configProperties [
- configFile "CfgVehicles" "O_Truck_02_box_F" "HitPoints",
- " true ",
- true
- ];
- hint str _hitPointsCfgs;$/Code$
+ $Code$if ( count attachedObjects player == 0) then {
+ hint "There are no objects attached to player";
+ };$/Code$
undefined / undefined
@@ -10847,145 +11714,232 @@
- Array
+ Array
+
- configSourceAddonList
+ animateSource
- Returns an array of addons ( CfgPatches ) in which the given config class is defined.
-
-
- https://community.bistudio.com/wiki/configSourceAddonList
+ Process an animation of the object. If animate uses class name from CfgModels Animations, animateSource uses name defined by source property. This allows to use just one command on a bunch of animations related to the same source simultaneously. Since Arma 3 v1.65.138459 speed of animation can be altered with coefficient.
+ A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:
+ house animate ["Door_1_rot", 1];
+ house animate ["Door_Handle_1_rot", 1];
+ With animateSource this would require only 1 (provided everything is configured correctly):
+ house animateSource ["Door_1_sound_source", 1];
+ // model.cfg
+ ....
+ class Animations
+ {
+ class Door_1_rot
+ {
+ type = rotation ;
+ source = Door_1_sound_source ;
+ selection = Door_1 ;
+ axis = Door_1_axis ;
+ memory = 1 ;
+ minValue = 0.1 ;
+ maxValue = 1 ;
+ angle0 = 0 ;
+ angle1 = ( rad 110 );
+ };
+ class Door_Handle_1_rot
+ {
+ type = rotation ;
+ source = Door_1_noSound_source ;
+ selection = Door_Handle_1 ;
+ axis = Door_Handle_1_axis ;
+ memory = 1 ;
+ minValue = 0 ;
+ maxValue = 0.1 ;
+ angle0 = 0 ;
+ angle1 = ( rad - 50 );
+ };
+ };
+ ...
+ // config.cpp
+ ...
+ class AnimationSources
+ {
+ class Door_1_sound_source
+ {
+ source = "user" ;
+ initPhase = 0 ;
+ animPeriod = 1 ;
+ sound = "GenericDoorsSound" ;
+ soundPosition = "Door_1_trigger" ;
+ };
+ };
+ ...
+ If you don't know much about model config you can use this page createVehicle/vehicles for reference. Some of the AnimationSources are listed with the class names of the available assets in Arma 3. If it says "user", the chances are it could work with animateSource (see example 2).
+ It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP
+ Mixing animateSource command with animate command to animate the same part can lead to unexpected behavior
+
+
+ https://community.bistudio.com/wiki/animateSource
- configSourceAddonList Config
+ Object animateSource Array
- configSourceAddonList config
+ object animateSource [source, phase, speed]
- $Code$_addons = configSourceAddonList ( configFile "CfgVehicles" "Man");
- hint str _addons; // ["A3_Data_F","A3_Characters_F","A3_Data_F_Curator","A3_Air_F_Heli"]$/Code$
+ $Code$house animateSource ["Door_1_source", 1, true ];$/Code$
+
+ $Code$// Create UGV and manipulate its turret (Currently not possible to do with animate command. See createVehicle/vehicles for reference)
+ ugv = "B_UGV_01_F" createVehicle ( player getRelPos [5, 0]);
+ ugv addAction ["Show Turret",
+ {
+ ugv animateSource ["Turret", 0];
+ ugv animateSource ["MainTurret", rad 0, true ];
+ ugv animateSource ["MainGun", rad 0, true ];
+ }];
+ ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}];
+ ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}];
+ ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", - rad 90]}];
+ ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}];
+ ugv addAction ["Turret Down", {ugv animateSource ["MainGun", - rad 20]}];$/Code$
+
+ $Code$barGate animateSource ["Door_1_source",0]; //Close
+ barGate animateSource ["Door_1_source",1]; //Open$/Code$
- undefined / undefined
+ global / global
- Array
+ Nothing
+
- configSourceMod
+ enableVehicleCargo
- Returns modDir of the mod that given config class was loaded from.
+ Enable/disable option to transport other vehicles (if configured) or be transported.
- https://community.bistudio.com/wiki/configSourceMod
+ https://community.bistudio.com/wiki/enableVehicleCargo
- configSourceMod Config
+ Object enableVehicleCargo Boolean
- configSourceMod config
+ vehicle enableVehicleCargo enable
- $Code$configSourceMod ( configFile "CfgVehicles" "Heli_Transport_04_base_F"); //Returns "heli"$/Code$
-
- $Code$configSourceMod ( configFile "CfgVehicles" "Car"); //Returns "A3"$/Code$
+ $Code$vehicle enableVehicleCargo true ;$/Code$
undefined / undefined
+ (June 20, 2016)
+ Setting enableVehicleCargo to true does not mean a vehicle can now load vehicles as cargo. They are still required to be correctly setup as shown on the Vehicle in Vehicle Transport page.
- String
+ Nothing
+
- configSourceModList
+ moveInCommander
- Returns an array of mods (CfgMods) in which the given config class is defined.
+ Move soldier into vehicle commander position (Immediate, no animation).
- https://community.bistudio.com/wiki/configSourceModList
+ https://community.bistudio.com/wiki/moveInCommander
- configSourceModList Config
+ Object moveInCommander Object
- configSourceModList config
+ unitName moveInCommander vehicle
- $Code$_mods = configSourceModList ( configFile "CfgVehicles" "Man");
- hint str _mods; // ["A3","curator","heli"]$/Code$
+ $Code$_soldierOne moveInCommander _tankOne$/Code$
- undefined / undefined
+ local / global
+ (August 4, 2006)
+ Notes from before the conversion:
+ MP Note Functions MoveInCommander can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
+
+ In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Commander" action command.
- Array
+ Nothing
+
- confirmSensorTarget
+ switchMove
- Sets for which Side the entity becomes a "confirmed hostile" target - a target that becomes highlighted red on the sensors display.
+ When used on a person, the given move is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.
+ List of moves in ArmA 2
+ List of moves in Armed Assault
+ List of moves in Operation Flashpoint: Resistance
- https://community.bistudio.com/wiki/confirmSensorTarget
+ https://community.bistudio.com/wiki/switchMove
- Object confirmSensorTarget Array
+ Object switchMove String
- vehicle confirmSensorTarget [side, isConfirmed]
+ person switchmove movename
- $Code$( vehicle player ) confirmSensorTarget [ west, true ];$/Code$
+ $Code$_loon1 switchMove "FXStandDip"$/Code$
- undefined / undefined
+ global / local
+ (March 25, 2007)
+ In some cases the movement won't stay. I.e. AI hostages that put their hands behind their heads (_hostage switchMove "AmovPercMstpSsurWnonDnon") won't hold their hands up, unless you first use disableAI "autoTarget" on them. They mostly put their hands down because they 'noticed' unknown objects.
+
+ (August 03, 2008)
+ This command will not cause an AnimChanged or AnimDone event. However, playMove will.
+
+ (November 12, 2016)
+ When using this command on the player unit outside unscheduled UI contexts, it will cause a minor camera glitch for a single frame.
+ For example, Draw3D and KeyDown are UI contexts and so are not affected by the glitch, but EachFrame and scheduled scripts are not UI contexts and are affected by the glitch.
- Nothing
+ Nothing
+
- connectTerminalToUAV
+ removeVest
- Connect person with UAV terminal to UAV unit. UAV Terminal item needs to be assigned to GPS slot. If UAV is already connected to another terminal, this new connection will fail.
+ Removes vest from unit.
- https://community.bistudio.com/wiki/connectTerminalToUAV
+ https://community.bistudio.com/wiki/removeVest
- Object connectTerminalToUAV Object
+ removeVest Object
- person connectTerminalToUAV uav
+ removeVest unit
- $Code$bool = player connectTerminalToUAV uav1;$/Code$
-
- $Code$player connectTerminalToUAV objNull ; //disconnect$/Code$
+ $Code$removeVest player ;$/Code$
global / global
@@ -10993,32 +11947,28 @@
- Boolean
+ Nothing
+
- controlNull
+ forgetTarget
- A non-existing Control. To compare non-existent objects use isNull or isEqualTo :
- controlNull == controlNull ; // false
- isNull controlNull ; // true
- controlNull isEqualTo controlNull ; // true
+ Resets info group has about target
- https://community.bistudio.com/wiki/controlNull
+ https://community.bistudio.com/wiki/forgetTarget
- controlNull
+ Group/Object forgetTarget Object
- controlNull
+ group forgetTarget target
- $Code$! isNull controlNull ; // false$/Code$
-
- $Code$str controlNull ; // No control$/Code$
+ $Code$soldier1 forgetTarget soldier2;$/Code$
undefined / undefined
@@ -11026,27 +11976,30 @@
- Control
+ Nothing
+
- controlsGroupCtrl
+ isEqualTypeAny
- Returns a child control with specified idc from a controls group
+ Compares type of given value to every type in the given array and if match is found, true is returned.
- https://community.bistudio.com/wiki/controlsGroupCtrl
+ https://community.bistudio.com/wiki/isEqualTypeAny
- Control controlsGroupCtrl Number
+ Anything isEqualTypeAny Array
- ctrlgrp controlsGroupCtrl idc
+ val isEqualTypeAny types
- $Code$_control = _controlsGroup controlsGroupCtrl 101;$/Code$
+ $Code$_var = [1,2,3];
+ _var isEqualTypeAny [0,"", objNull ]; //false
+ _var isEqualTypeAny [0,"", objNull,[]]; //true$/Code$
undefined / undefined
@@ -11054,28 +12007,32 @@
- Control
+ Boolean
+
- copyFromClipboard
+ currentThrowable
- Return the content of the (text) clipboard.
- Disabled in Multiplayer for security reasons
+ Returns currently selected throwable, which will be launched if user presses "G".
+ Please note: The weapon/magazine id system is W.I.P. and may change without notice.
- https://community.bistudio.com/wiki/copyFromClipboard
+ https://community.bistudio.com/wiki/currentThrowable
- copyFromClipboard
+ currentThrowable Object
- copyFromClipboard
+ currentThrowable player
- $Code$hint copyFromClipboard ;$/Code$
+ $Code$currentThrowable player ; //["SmokeShellGreen","SmokeShellGreenMuzzle",[1.00002e+007,0]]$/Code$
+
+ $Code$_ct = currentThrowable player ; //["HandGrenade","HandGrenadeMuzzle",[1e+007,0]]
+ _id = (_ct select 2 select 0) - 10000000; //18$/Code$
undefined / undefined
@@ -11083,66 +12040,65 @@
- String
+ Array
+
- copyToClipboard
+ lbSetColor
- Copy text string to the clipboard.
- In MP available only on the client that is server
+ Sets the color of the item (left) with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
+ Colour is in format Color.
- https://community.bistudio.com/wiki/copyToClipboard
+ https://community.bistudio.com/wiki/lbSetColor
- copyToClipboard String
+ lbSetColor Array
+
+ Control lbSetColor Array
- copyToClipboard text
+ lbSetColor [idc, index, color]
+
+ control lbSetColor [index, color]
- $Code$copyToClipboard str _data;$/Code$
+ $Code$lbSetColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+
+ $Code$_control lbSetColor [0, [0, 1, 0, 0.5]];$/Code$
- undefined / undefined
+ local / local
- (October 12, 2014)
- To add a line break in output text do this:
- $Code$_br = toString [13,10];//(carriage return & line feed)
- _string = "Line 1" + _br + "Line 2";
- copyToClipboard _string;
- $/Code$
- Paste into text editor of choice, you get:
- $Code$Line 1
- Line 2$/Code$
- (A3 1.30 Stable executed inside.sqf via execVM )
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- copyWaypoints
+ setSimpleTaskTarget
- Copy the chain of waypoints from source to target group. The target group will start to process waypoints from the first one.
+ Attach a target to the simple task. Overrides setSimpleTaskDestination.
- https://community.bistudio.com/wiki/copyWaypoints
+ https://community.bistudio.com/wiki/setSimpleTaskTarget
- Group copyWaypoints Group
+ Task setSimpleTaskTarget Array
- groupTo copyWaypoints groupFrom
+ task setSimpleTaskTarget [target, precisePosition]
- $Code$group1 copyWaypoints group2;$/Code$
+ $Code$task setSimpleTaskTarget [targetVehicle, true];$/Code$
undefined / undefined
@@ -11150,325 +12106,257 @@
- Nothing
+ Nothing
+
- cos
+ uniformItems
- Cosine of a number, argument in degrees.
+ Get array with all items (of any kind, even weapons) from uniform.
- https://community.bistudio.com/wiki/cos
+ https://community.bistudio.com/wiki/uniformItems
- cos Number
+ uniformItems Object
- cos x
+ uniformItems unit
- $Code$cos 60;//returns 0.5$/Code$
+ $Code$uniformItems player ;[
+ "FirstAidKit",
+ "30Rnd_65x39_caseless_mag",
+ "30Rnd_65x39_caseless_mag",
+ "30Rnd_65x39_caseless_mag"
+ ]$/Code$
undefined / undefined
- (August 8, 2006)
- Be aware that there might be rounding errors in the results of this command.
- cos 90
- for example doesn't return the expected '0', but '-4.37114e-008'. So, if you want to compare results of Cosinus, don't use the compare operator
- (cos 90)==0
- but rather use less than.
- (cos 90) 0.00001
- Number
+ Array
+
- countEnemy
+ visiblePosition
- Count how many units in the array are considered enemy to the given unit.
+ Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual
- https://community.bistudio.com/wiki/countEnemy
+ https://community.bistudio.com/wiki/visiblePosition
- Object countEnemy Array
+ visiblePosition Object
- unitName countEnemy arrayName
+ visiblePosition object
- $Code$_num = player countEnemy list _triggerOne;$/Code$
+ $Code$playerRenderedPos = visiblePosition player;$/Code$
- global / undefined
+ undefined / undefined
- (August 3, 2006)
- Notes from before the conversion:
- The countEnemy command seem to count the number of units from the array that are considered to be of the given type by the whole side, not just the specified unit.
-
- (December 15, 2006)
- The unit that's checking (left side of the command) needs a certain level of knowledge about the target (about.1) before the enemy units are actually counted. (OFP & ArmA)
+ (February 4, 2015)
+ Z (visiblePosition select 2) works but if unit/object is in a building, Z remains at ground level. If you need Z depending on building floors/stages, use getPosAtl select 2 instead.
- Number
+ Array
+
- countFriendly
+ nearEntities
- Count how many units in the array are considered friendly to the given unit.
+ Find entities in the sphere with given radius. If typeName(s) is (are) given, only entities of given type (or its subtype) are listed.
+ This command returns only alive entities. If you need to return dead entities as well use entities command.
- https://community.bistudio.com/wiki/countFriendly
+ https://community.bistudio.com/wiki/nearEntities
- Object countFriendly Array
+ Object/Array nearEntities Number
+
+ Object/Array nearEntities Array
- unitName countFriendly arrayName
+ position nearEntities radius
+
+ position nearEntities [typeName, radius]
- $Code$_num = player countFriendly list _triggerOne;$/Code$
+ $Code$_list = player nearEntities 20;
+ _list = ( position player ) nearEntities 50;
+ _list = player nearEntities ["Man", 1000];
+ _list = ( position player ) nearEntities ["LaserTarget", 3000];
+ _list = player nearEntities [["Car", "Motorcycle", "Tank"], 50];
+ _list = ( position player ) nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], 200];$/Code$
global / undefined
- (August 3, 2006)
- Notes from before the conversion:
- The countFriendly command seem to count the number of units from the array that are considered to be of the given type by the whole side, not just the specified unit.
+ (27 Mar, 2014)
+ According to Code Optimisation, this function is the fastest and should be used instead of nearestObjects when suitable.
- Number
+ Array - Array
+
- countSide
+ setVehicleArmor
- Count how many units in the given array belong to given side. If the object in passed array is a Group, the leader of the group will be counted.
+ Sets the armor (or health for men) state of the vehicle (a value from 0 to 1).
+ Works like setDamage only in reverse: player setVehicleArmor 1 is the same as player setDamage 0, and player setVehicleArmor 0 is the same as player setDamage 0.97
- https://community.bistudio.com/wiki/countSide
+ https://community.bistudio.com/wiki/setVehicleArmor
- Side countSide Array
+ Object setVehicleArmor Number
- side countSide arrayName
+ vehicleName setVehicleArmor value
- $Code$_num = west countSide list _triggerOne;$/Code$
-
- $Code$_numCivPlayable = civilian countSide playableUnits ;$/Code$
+ $Code$player setVehicleArmor 0.5;$/Code$
- global / undefined
+ local / global
- (July 4, 2014)
- The countSide command will also accept an array of groups. Tested in ARMA 3 v1.22
-
- (October 19, 2014)
- This command considers captive units as civilians, regardless of their group's side.
- Number
+ Nothing
+
- countType
+ sideFriendly
- Count how many objects in the array are of given type. This command also works with parent classes like "Air", "Tank", and "Car". For a full class reference see Classes.
+ The Friendly side (used for captives).
- https://community.bistudio.com/wiki/countType
+ https://community.bistudio.com/wiki/sideFriendly
- String countType Array
+ sideFriendly
- type countType objects
+ sideFriendly
- $Code$_count = "Tank" countType list _triggerOne;$/Code$
-
- $Code$_count = "B_medic_F" countType units player ;$/Code$
-
+
- global / undefined
+ undefined / undefined
- (April 23, 2007)
- This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc.)
-
- (May 4, 2016)
- To complement Kronzky's note, if one needs to count exact types, countType is not suitable for this, use count instead:
- $Code$_count = { typeOf _x == "B_medic_F"} count units player ;$/Code$
- Number
+ Side
+
- countUnknown
+ disableUAVConnectability
- Count how many units in the array are unknown to the given unit.
+ Disables unit's AV terminal(s) connecting to UAV.
- https://community.bistudio.com/wiki/countUnknown
+ https://community.bistudio.com/wiki/disableUAVConnectability
- Object countUnknown Array
+ Object disableUAVConnectability Array
- unitName countUnknown arrayName
+ object disableUAVConnectability [uav, checkAllItems]
- $Code$_num = player countUnknown list _triggerOne;$/Code$
+ $Code$unit disableUAVConnectability [uav,true];$/Code$
- global / undefined
+ undefined / local
- Number
+ Nothing
+
- count
+ curatorEditingAreaType
- Can be used to count:
- the number of elements in array
- the number of elements in array with condition
- the number of sub-entries in a config object
- the number of characters in a string (since ["Arma 3","Arma3",127,126674,"Development"])
+ Returns type of edit areas assigned to curator (blacklist/whitelist).
- https://community.bistudio.com/wiki/count
+ https://community.bistudio.com/wiki/curatorEditingAreaType
- count Array
-
- Code count Array
-
- count Config
-
- count String
+ curatorEditingAreaType Object
- count array
-
- condition count array
-
- count configname
-
- count string
+ curatorEditingAreaType obj
- $Code$_cnt = count [0,0,1,2]; // returns 4
- _cnt = count units group player ; // returns number of units in player group$/Code$
-
- $Code$_cnt = { _x == 4} count [1,9,8,3,4,4,4,5,6]; // returns 3
- _cnt = { alive _x } count allUnits ; // returns the number of alive units$/Code$
-
- $Code$_cnt = count ( configFile "CfgVehicles");$/Code$
-
- $Code$hint str count "japa is the man!"; //16$/Code$
-
+
- local / undefined
+ undefined / undefined
- (April 28, 2007)
- This conditional count command only works if all the elements in the tested array are of the same type as the tested element.
- For example, the following code will created an error, since the elements are of different types (object, number, string):
- $Code$_arr = [ player,100,"one"]; {_x == "one"} count _arr;$/Code$
- Alternatively, to avoid the error use isEqualTo instead of ==. --KK
- This one, on the other hand, where all elements are strings, just like the tested element, will return the correct result of 1:
- $Code$_arr = ["one","two","three"]; {_x == "one"} count _arr;$/Code$
-
- (August 3, 2006)
- Notes from before the conversion:
- Use this to calculate how many "M16" mags a soldier has left.
- $Code${_x == "M16"} count magazines soldier1;$/Code$
- Take care when using count to determine how many units are left alive in a group: count units group player or count units groupname Will return the number of units the leader of the group thinks are alive. If some units have been killed out of sight of other members of the group then it may take sometime for this to be the actual numbers in the group. To determine exactly how many units are really alive in a group use:
- $Code${ alive _x} count units group player ;$/Code$
- or
- $Code${ alive _x} count units groupname;$/Code$
-
- (December 15, 2014)
- count can be (ab)used for a very fast and simple check if at least one element in an array fulfills a certain condition:
- $Code$if({if( _x fulfills condition ) exitWith {1}; false} count _array isEqualTo 1) then
- {
- //do whatever here
- };$/Code$
- This code will exit the count loop as soon as it finds an element fulfilling the condition, leaving the count with the value of 1, hence make the larger if-condition be true.
- If no array element fulfills the condition, the count will be 0 and the if-condition will be false.
-
- (December 29, 2014)
- Quit loop at first fulfilled condition (same as above but faster):
- $Code$0 = { if (_x == 4) exitWith {
- //do something when we reach 4
- }} count [1,2,3,4,5,6];$/Code$
-
- (January 2, 2015)
- Using exitWith inside a count loop will overwrite the default functionality and make count return whatever the exitWith returns:
- $Code$_result = {
- if(_x isEqualTo 3) exitWith {"Hello"}
- } count [1,2,3,4,5];
- //_result = "Hello"$/Code$
-
- (August 22, 2016)
- With the alternative syntax each iteration should result in an interior return of bool or nothing. Example:
- $Code$createDialog "RscFunctionsViewer";
- { lbAdd [292901,_x]; } count ["first","second","third"];$/Code$
- lbAdd returns a number, so this throws "Error Type Number, expected Bool". Tested in A2OA 1.63.131129
- Number - Number - Number - Number
+ Boolean
+
- create3DENComposition
+ drawPolygon
- Create new Composition. To create individual entities, use create3DENEntity.
+ Draws given polygon on the given map control with given color. The polygon must consist of at least 3 points. Unlike with other draw shape commands and due to complexity, this command does not support filling of the polygon with color. Use drawTriangle command to construct and fill polygon shape as a workaround.
- https://community.bistudio.com/wiki/create3DENComposition
+ https://community.bistudio.com/wiki/drawPolygon
- create3DENComposition Array
+ Control drawPolygon Array
- create3DENComposition [configPath, position]
+ map drawPolygon [polygon, color]
- $Code$myComposition = create3DENComposition [
- configFile "CfgGroups" "West" "BLU_F" "Infantry" "BUS_InfSquad",
- screenToWorld [0.5,0.5]
- ];$/Code$
+ $Code$test_polygon = [];
+ for "_i" from 1 to 12 do
+ {
+ test_polygon pushBack ( player getPos [10 + random 100, 360/_i]);
+ };
+ findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
+ {
+ _this select 0 drawPolygon [test_polygon, [0,0,1,1]];
+ }];$/Code$
undefined / undefined
@@ -11476,384 +12364,328 @@
- Array
+ Nothing
+
- create3DENEntity
+ addCuratorEditableObjects
- Create new Eden Entity. Used for creating individual entities; to create a composition (e.g., infantry squad), use create3DENComposition.
- This is the only way how to add new editable entities to Eden Editor scenario. Other 'create' commands like createVehicle or createUnit will still work, but the resulting entity won't be editable.
+ Register objects which can be edited by a curator.
- https://community.bistudio.com/wiki/create3DENEntity
+ https://community.bistudio.com/wiki/addCuratorEditableObjects
- create3DENEntity Array
-
- Group create3DENEntity Array
+ Object addCuratorEditableObjects Array
- create3DENEntity [mode, class, position, ]
-
- group create3DENEntity [mode, class, position, ]
+ curatorObj addCuratorEditableObjects [objects,addCrew]
- $Code$dude1 = create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];$/Code$
-
- $Code$dude2 = ( group dude1) create3DENEntity ["Object","B_Soldier_AR_F", screenToWorld [0.5,0.5]];$/Code$
-
- $Code$myMarker = create3DENEntity ["Marker","mil_warning", position player ];$/Code$
-
- $Code$mytrigger = create3DENEntity ["Trigger","EmptyDetectorArea10x10", position player ];$/Code$
+ $Code$curatorModule addCuratorEditableObjects [[car], true ];$/Code$
undefined / undefined
- (March 29, 2016)
- The classnames for triggers can be found in the config class CfgNonAIVehicles
-
- (June 14, 2016)
- Mode can also be "Logic". Not sure if it's a replacement for "System" or a it's a completely separate mode.
+ This scripting command must be executed on the server to work properly in multiplayer
- EdenEntity - EdenEntity
+ Nothing
+
- createAgent
+ lightnings
- Creates an (independent) agent (person) of the given type (type is a name of a subclass of CfgVehicles ). An agent does not have a group or leader or the standard soldier FSM associated with it -- for instance, an enemy soldier spawned as an agent has limited AI and will stand stupidly when fired upon -- which can be useful to limit the amount of AI processing being done in a mission with very large numbers of "AI". If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used. The unit is placed inside a circle with this position as its center and placement as its radius.
- Players assigned to an agent using setPlayable will be able to control the agent, operate weapons and other actions, but will not be able to access their inventory using the gear screen.
- Special properties can be: "NONE", "CAN_COLLIDE" and "FORM".
+ Return the current lightnings value.
- https://community.bistudio.com/wiki/createAgent
+ https://community.bistudio.com/wiki/lightnings
- createAgent Array
+ lightnings
- createAgent [type, position, markers, placement, special]
+ lightnings
- $Code$agent = createAgent ["SoldierWB", position player, [], 0, "FORM"];$/Code$
+ $Code$// Get the current lightnings value:
+ _lightningsVal = lightnings ;$/Code$
undefined / undefined
- (September 29, 2014)
- In Arma 3, default FSM is calling BIS_fnc_animalBehaviour script upon agent creation, which takes on some animal behavioural logic. The problem here is that it is almost impossible to make animal do what is told. Until now. Since Arma 3 v1.31.127383 you can set BIS_fnc_animalBehaviour_disable variable on the agent at the moment of agent creation, to override the function.
- $Code$tr = createTrigger ["EmptyDetector", player modelToWorld [0, 10, 0]];
- tr setTriggerArea [5, 5, 0, true ];
- tr setTriggerActivation ["CIV", "PRESENT", true];
- rabbits = [];
- private "_r";
- for "_i" from 1 to 10 do {
- _r = createAgent ["Rabbit_F", position tr, [], 0, "NONE"];
- _r setVariable ["BIS_fnc_animalBehaviour_disable", true ];
- rabbits pushBack _r;
- };
- tr setTriggerStatements [
- " if (rabbits isEqualTo thisList) exitWith {
- _r = thisList select floor random count thisList;
- _r moveTo (_r modelToWorld [2.5 - random 5, 2.5 - random 5, 0]);
- };
- _esc = rabbits - thisList;
- doStop _esc;
- {_x moveTo position thisTrigger} forEach _esc;
- systemChat str [ time, _esc];
- false ",
- "",
- ""
- ];$/Code$
-
- (April 18, 2015)
- Agents seem to use the same collision model that the player uses, unlike normal AI. Normal AI don't collide with objects, but agents are physically stopped by obstacles the same way players are. This also probably means agents cost more resources than normal AI.
- Object
+ Number
+
- createCenter
+ setMarkerDirLocal
- In a nutshell, this command creates game Side. Without side it is not possible to create Groups. So if center for particular side is undefined, no groups can be created for this side. A Unit needs a group to be able to spawn in. So if no center for particular side exists, no groups for this side can be created and therefore no units for this side can be spawned. In Arma 3, the centers for all sides are created for you. An attempt to create center for existing side is ignored. Center can only be created for: east, west, resistance, civilian and sideLogic. These are the only sides groups can be created for.
- Old description : Creates a new AI HQ for the given side. An 'HQ ' is something each side needs to have to be able to communicate. By default, all centers for units which are present in the mission are created before the mission is started. This command can be used to initialize a side which has no units present in the Mission.sqm, so that you can spawn groups and units for it.
- For the available sides see Side.
+ Sets the orientation of the marker. Angle is in degrees.
- https://community.bistudio.com/wiki/createCenter
+ https://community.bistudio.com/wiki/setMarkerDirLocal
- createCenter Side
+ String setMarkerDirLocal Number
- createCenter side
+ markerName setMarkerDirLocal angle
- $Code$_SideHQ = createCenter east$/Code$
+ $Code$"Marker1" setMarkerDirLocal 90;$/Code$
- undefined / global
+ undefined / local
- (17:15, 22 June 2007 (CEST))
- You need to set the new sides friendly status using the setFriend command, once you have created your Center. Otherwise the newly created AI will not engage you, if you're on the opposing side.
- Side
+ Nothing
+
- createDialog
+ disableUserInput
- Create a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.
+ Disable and enable the keyboard and mouse input, usually used during cutscenes.
+ Be careful with the usage of this command, always remember to enable the user input again, as once the user input is disabled, you can only shut down OFP but not exit the mission with escape.
- https://community.bistudio.com/wiki/createDialog
+ https://community.bistudio.com/wiki/disableUserInput
- createDialog String
+ disableUserInput Boolean
- createDialog dialogName
+ disableUserInput state
- $Code$_ok = createDialog "RscDisplayGame";
- if (!_ok) then { hint "Dialog couldn't be opened!"};$/Code$
+ $Code$disableUserInput true
+ ; cutscene
+ disableUserInput false$/Code$
undefined / local
- (July 29, 2017)
- A user dialog created with createDisplay over mission display ( findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work.
+ (14 March 2014)
+ Sometimes, when disableUserInput true command is invoked while the user is holding a button, when disableUserInput false is called and the user is no longer holding the button, the input will resume as if the user is still holding the button. To reset this behaviour, disable and enable user input again in the same frame:
+ $Code$ disableUserInput true ;
+ //do something
+ disableUserInput false ;
+ disableUserInput true ;
+ disableUserInput false ;$/Code$
+ Unfortunately, if the user is moving mouse when disableUserInput true command is invoked, the mouse input will get stuck for the whole duration of disabled user input but will reset as soon as disableUserInput false is called. I was unable to find workaround for this one.
- Boolean
+ Nothing
+
- createDiaryLink
+ landAt
- Create a link to the section of diary given by subject. Record is selected based on given object (diary record,task or unit).
+ Order an AI airplane to land at a given airport. ID is the number to identify which map airport you want the airplane to land at. Since Arma 3 v1.68 it is possible to also make the airplane land at a dynamic airport object (e.g. aircraft carrier, makeshift runway...).
- https://community.bistudio.com/wiki/createDiaryLink
+ https://community.bistudio.com/wiki/landAt
- createDiaryLink Array
+ Object landAt Number
+
+ Object landAt Object
- createDiaryLink [subject,object,text]
+ plane landAt id
+
+ _plane1 landAt _dynamicAirport1
- $Code$_link = createDiarySubject ["Group", player,"Player"]$/Code$
-
- $Code$diaryRec1 = player createDiaryRecord ["diary", ["Record 1", "We can't refer to next record (("]];
- diaryRec2 = player createDiaryRecord ["diary", ["Record 2", "Got to " + ( createDiaryLink ["Diary", diaryRec1, "record 1"])]];
- diaryRec3 = player createDiaryRecord ["diary", ["Record 3", "Got to " + ( createDiaryLink ["Diary", diaryRec2, "record 2"])]];$/Code$
+ $Code$_plane1 landAt 1;$/Code$
- $Code$funcProcessDiaryLink = {
- processDiaryLink createDiaryLink ["diary", _this, ""];
- };
- diaryRec1 = player createDiaryRecord ["diary", ["Record 1",
- "In this example, we can go to any next record: go to execute expression='diaryRec2 call funcProcessDiaryLink' Record 2 /execute "
- ]];
- diaryRec2 = player createDiaryRecord ["diary", ["Record 2",
- "Go to execute expression='diaryRec3 call funcProcessDiaryLink' Record 3 /execute "
- ]];
- diaryRec3 = player createDiaryRecord ["diary", ["Record 3",
- "Go to execute expression='diaryRec1 call funcProcessDiaryLink' Record 1 /execute "
- ]];$/Code$
+ $Code$_dynamicAirport1 = "DynamicAirport_01_F" createVehicle position player ;
+ _plane1 landAt _dynamicAirport1;$/Code$
- undefined / undefined
+ local / global
+ ARMA 3:
+ Altis :
+ 0 = Airbase
+ 1 = AAC Airfield
+ 2 = Krya Nera Airstrip
+ 3 = Selakeno Airfield
+ 4 = Molos Airfield
+ 5 = Almyra Salt Lake Airstrip
+ Posted 17:56, 21 September 2010 (CEST)
+
+ ARMA 2 OA:
+ Takistan :
+ 0 = Airport NorthWest
+ 1 = Airport SouthEast
+ Planes approach all airports from South West
+ ARMA 2:
+ Utes :
+ 0 = There is only one airport
+ Chernarus :
+ 0 = Airport NorthWest close to Grishno
+ 1 = Airport NorthEast close to Kranostav
+ 2 = Airport SouthWest close to Balota
+ 3 = Nearest Airport
+ Planes approach all airports from South East
+ ARMA:
+ Sahrani :
+ 0: - Paraiso
+ 1: - Rahmadi
+ 2: - Pita
+ 3: - Antigua
+
+ (November 8, 2014)
+ In Arma 3 (1.34) landAt only works for fixed-wing aircraft. Rotary-wing craft ignore this command.
+
+ (June 19, 2016)
+ ARMA 3 : Tanoa
+ 0 = Aeroport de Tanoa
+ 1 = Tuvanaka Airbase
+ 2 = Saint-George Airstrip
+ 3 = Bala Airstrip
+ 4 = La Rochelle Aerodome
+ ARMA 3 : Stratis
+ 0 = Stratis Airbase
- String
+ Nothing - Nothing
+
- createDiaryRecord
+ waypointsEnabledUAV
- creates a diary entry.
- Supported tags and their parameters:
- All
- image : String - path to image. When present, any element with it will be displayed as image.
- width : Number - image width in pixels.
- height : Number - image height in pixels.
- font
- color : String - HTML color in format #aarrggbb or #rrggbb
- size : Number - font height in pixels.
- face : String - font type (class from CfgFontFamilies)
- br
- marker
- name : String - marker name
- execute
- expression : String - executed code
- executeClose
- expression : String - executed code, diary is closed afterwards
- log
- subject : String - subject name.
- record : String - record name (e.g. "Record6" or "Unit1059524")
- gear
- unit : Number - unit ID
- teamSwitch
- unit : Number - unit ID
- kick
- id : Number - player ID
- ban
- id : Number - player ID
- mute
- id : Number - player ID
- currentTask
- id : Number - task ID
+ Checks if the UAV has waypoints enabled.
- https://community.bistudio.com/wiki/createDiaryRecord
+ https://community.bistudio.com/wiki/waypointsEnabledUAV
- Object createDiaryRecord Array
+ waypointsEnabledUAV Object
- unitName createDiaryRecord [subject, text, task, state]
-
- unitName createDiaryRecord [subject, [title, text], task, state]
+ waypointsEnabledUAV uav
- $Code$player createDiaryRecord ["Diary", ["Intel", "Enemy base is on grid marker name='enemyBase' 161170 /marker "]]$/Code$
-
- $Code$player createDiaryRecord ["Diary", "Information gathered. br / img image='wellDone_ca.paa' / "]$/Code$
+ $Code$_uav enableUAVWaypoints false ;
+ hint str waypointsEnabledUAV _uav; // returns false$/Code$
- undefined / local
+ undefined / undefined
- (14:54, 15 January 2011)
- To insert a link into a diary record that executes code instead of jumping to a marker, use the tag
- execute expression=" Code to execute " Text /execute
-
- (March 24, 2017)
- When adding multiple diary records, be aware that they appear in reverse order. ie the first one you add will appear last and the last one you add will be first.
- String
+ Boolean
+
- createDiarySubject
+ selectWeaponTurret
- Create a new subject page in a log.
+ Selects the given weapon on specified turret. Use turret path [-1] for driver's turret. Since ver. 1.63.136864 this command supports both weapon name and muzzle name.
- https://community.bistudio.com/wiki/createDiarySubject
+ https://community.bistudio.com/wiki/selectWeaponTurret
- Object createDiarySubject Array
+ Object selectWeaponTurret Array
- person createDiarySubject [subject, displayName, picture]
+ vehicle selectWeaponTurret [weapon, turretPath]
- $Code$_index = player createDiarySubject ["myPage","My page"];$/Code$
+ $Code$MBT_Kuma selectWeaponTurret ["LMG_coax",[0]];$/Code$
undefined / undefined
+ (February 13, 2017)
+ The command will treat weapon or muzzle param like a weapon first. If no such weapon is found then it will try to find muzzle with such name. For example AMV-7 Marshall APC has main gun "autocannon_40mm_CTWS" which has 2 muzzles "HE" and "AP". Default muzzle is "HE". So if you try to select weapon by the name "autocannon_40mm_CTWS" you will always get "HE" muzzle selected. However if you pass "AP" as param, it will correctly select "AP" muzzle, since no "AP" weapon exists on this turret it will continue searching for a muzzle with this name and will find it eventually.
- Number
+ Nothing
+
- createDisplay
+ setLightFlareMaxDistance
- Creates child display of given display and loads from "resourceName". The notable difference between createDisplay and createDialog is that with createDisplay the player would be able to move whilst having control of the mouse pointer.
- Since Arma 3 v1.49.131653 createDisplay returns Display and will first look in description.ext for resourceName config, if not found, it will then look in main config.
- Displays created with both createDisplay and createDialog will take control of the mouse pointer and will close when user presses Esc.
- $Code$_emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty";$/Code$
- If display is needed which exists independently, it can be created in IGUI layer with cutRsc command.
- $Code$"someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
- _emptyDisplay = uiNamespace getVariable "RscTitleDisplayEmpty";$/Code$
- Such display can be closed with closeDisplay command or by overwriting the same cut layer with another output. Note that "Unload" EH for some reason does not work with such display.
+ Sets max distance where the flare is visible.
- https://community.bistudio.com/wiki/createDisplay
+ https://community.bistudio.com/wiki/setLightFlareMaxDistance
- Display createDisplay String
+ Object setLightFlareMaxDistance Number
- parent createDisplay resourceName
+ light setLightFlareMaxDistance distance
- $Code$findDisplay 46 createDisplay "RscCredits";$/Code$
+ $Code$myLight setLightFlareMaxDistance 500;$/Code$
- undefined / undefined
+ local / local
- (August 23, 2014)
- Do not simply createDisplay from UI context code such as "ButtonDown" UI Event handler, as it will crash the game. Instead use spawn scope:
- $Code$[] spawn { findDisplay 46 createDisplay "RscCredits"};$/Code$
-
- (November 15, 2014)
- Arma3 v1.34
- When using CreateDisplay instead of CreateDialog, all the commands for working with the controls of the display only work with the control version, not the IDC version.
- EXAMPLE:
- $Code$LbAdd [1234, "item"]; // does not work on displays, and won't error either
- _ctrl LbAdd "item"; // does work with displays$/Code$
- So you have to use the control(DisplayCtrl) and not the IDC.
-
- (July 29, 2017)
- A user dialog created with createDisplay over mission display ( findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work.
- Nothing/Display
+ Nothing
+
- createGearDialog
+ allMines
- Opens gear dialog for given unit. Alternatively use action command:
- $Code$ player action ["Gear", player ];$/Code$
+ Returns an array of all mines in the mission
- https://community.bistudio.com/wiki/createGearDialog
+ https://community.bistudio.com/wiki/allMines
- createGearDialog Array
+ allMines
- createGearDialog [unit, resource]
+ allMines
- $Code$createGearDialog [player];$/Code$
+ $Code$allMines$/Code$
+
+ $Code$( allMines select 0) mineDetectedBy west ;$/Code$
undefined / undefined
@@ -11861,77 +12693,62 @@
- Nothing
+ Array
+
- createGroup
+ ctrlAddEventHandler
- Creates a new Group for the given Side. An HQ (center) for that side must already be in the Mission.sqm or have been initialized with createCenter. For the available sides see Side.
- NOTES
- The default limit of groups created per side was 144. Since Arma 3 v1.67 it is increased to 288.
- Since Arma 3 v 1.67 it is possible to mark created group for automatic deletion when the group becomes empty (see Alt Syntax). When group is set to be automatically deleted when empty, when group becomes empty it may take up to a minute for it to get deleted.
- In Arma 3 when last unit leaves its group, the group usually gets immediately auto deleted, regardless of whether or not if it was set for auto deletion manually
+ Add an event handler ( User Interface Event Handlers ) to the given control. Returns id of the handler or -1 when failed.
+ NOTE: Control EHs are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.
- https://community.bistudio.com/wiki/createGroup
+ https://community.bistudio.com/wiki/ctrlAddEventHandler
- createGroup Side
-
- createGroup Array
+ Control ctrlAddEventHandler Array
- createGroup side
-
- createGroup [side, deleteWhenEmpty]
+ control ctrlAddEventHandler [handler,function]
- $Code$_group = createGroup east$/Code$
+ $Code$_map ctrlAddEventHandler ["draw","_this call BIS_fnc_strategicMapOpen_draw"];$/Code$
- $Code$_group = createGroup [ east, true ];$/Code$
+ $Code$_map ctrlAddEventHandler ["draw",{ hintSilent str _this}];$/Code$
- undefined / global
+ undefined / undefined
- (December 15, 2006)
- The group limit is 144 groups groups per side. If you attempt to create a group, and there is no room for another, it simply doesn't create, and it doesn't error.
-
- (July 10,2007)
- In Armed Assault, empty groups are not automatically deleted - if you created 144 groups, you will not be able to create new group even if all units in all those groups died, because all the 144 groups still exists - you will have to delete some groups manually.
-
- (January 04, 2011)
- A group created with createGroup will get a waypoint at [0,0,0]. When you use createUnit to fill it with units, it will get an additional waypoint at the position the first unit is created. This new waypoint will also be set as currentWaypoint. However keep these two waypoints in mind when you do some scripting involving this groups' waypoints.
+ (October 30, 2013)
+ As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
- Group - Group
+ Number
+
- createGuardedPoint
+ saveGame
- Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in Editor ). A closest AI group in the given side with assigned "GUARD" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules:
- Given "position" is always considered. It could be Object, Group, Position2D or Position3D. In every case, z coordinate will be ignored and point will be placed on nearest surface.
- If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact.
- If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). objNull to ignore. z of the vehicle position will be intact.
- For use with "GUARD" waypoint. How does "GUARD" waypoint work: Waypoint:Guard
+ Autosave game (used for Retry).
- https://community.bistudio.com/wiki/createGuardedPoint
+ https://community.bistudio.com/wiki/saveGame
- createGuardedPoint Array
+ saveGame
- createGuardedPoint [side, position, objectMapID, vehicle]
+ saveGame
- $Code$createGuardedPoint [ east, [0,0], -1, vehicle player ];$/Code$
+ $Code$saveGame ;$/Code$
undefined / undefined
@@ -11939,227 +12756,224 @@
- Nothing
+ Nothing
+
- createLocation
+ compile
- Creates a location of the specified class and dimensions at the specified position. Classes are defined in CfgLocationTypes.
+ Compile expression.
- https://community.bistudio.com/wiki/createLocation
+ https://community.bistudio.com/wiki/compile
- createLocation Array
+ compile String
- createLocation [className, position, sizeX, sizeY]
+ compile expression
- $Code$_location = createLocation [ "NameVillage", [4035,2151,10], 100, 100];$/Code$
+ $Code$_string = "a = a + 1";
+ _code = compile _string;
+ call _code;$/Code$
- $Code$_location = createLocation [ "NameVillage", [4035,2151,10], 30, 30];
- _location setText "Player town";$/Code$
+ $Code$hint str compile "a = b";
+ //Result: {a=b}$/Code$
- undefined / local
+ undefined / undefined
- (12:25, 12 February 2010)
- Possible location types, see: Location Types
- For the actual name text of the location, use setText.
- Location
+ Code
+
- createMPCampaignDisplay
+ getEditorObjectScope
- Create a MP campaign display. The class name must be a mission collection declared in the configs; in example, configFile /"CfgMissions"/"MPMissions"/"Apex"/
- If the class doesn't exist or isn't a mission collection, the display will be created empty.
+ Returns the editor object scope of the specified editor object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/createMPCampaignDisplay
+ https://community.bistudio.com/wiki/getEditorObjectScope
- Display createMPCampaignDisplay String
+ Control getEditorObjectScope String
- display createMPCampaignDisplay class
+ map getEditorObjectScope object
- $Code$findDisplay 46 createMPCampaignDisplay "Apex";$/Code$
-
+
undefined / undefined
- (July 14, 2016)
- $Code$ findDisplay 46 createMPCampaignDisplay "123";$/Code$
- Nothing
+ String
+
- createMarker
+ tvSetTooltip
- Creates a new marker at the given position. The marker name has to be unique.
+ Sets the tooltip text associated with the specified tree view path.
- https://community.bistudio.com/wiki/createMarker
+ https://community.bistudio.com/wiki/tvSetTooltip
- createMarker Array
+ tvSetTooltip Array
+
+ Control tvSetTooltip Array
- createMarker [name, position]
+ tvSetTooltip [idc, path, text]
+
+ ctrl tvSetTooltip [path, text]
- $Code$_marker1 = createMarker ["Marker1", position player ];$/Code$
+ $Code$tvSetTooltip [101, [0,2], "This is a tooltip"];$/Code$
- $Code$_marker2 = createMarker ["Marker2", player ];$/Code$
+ $Code$_tree tvSetTooltip [[0,2], "This is a tooltip"];$/Code$
- undefined / global
+ undefined / undefined
- $Code$_markerstr = createMarker ["markername",[_Xpos,_Ypos]];
- _markerstr setMarkerShape "ICON";
- _markerstr setMarkerType "hd_dot";$/Code$
-
- (September 19, 2015)
- createMarker accepts an object as position parameter as well (A3 - 1.50.131969). You could try this with the following code (both SP/MP)
- $Code$_markerstr = createMarker ["markername", player];
- _markerstr setMarkerShape "RECTANGLE";
- _markerstr setMarkerSize [100,100];$/Code$
- String
+ Nothing - Nothing
+
- createMarkerLocal
+ unitIsUAV
- Creates a local marker at the given position. Marker exists only on PC that created it. The marker name has to be unique.
- NOTE: Local markers have own set of local commands "XXXXLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker.
+ Returns true if the unit type is UAV - coresponding to transport param "isUAV"
- https://community.bistudio.com/wiki/createMarkerLocal
+ https://community.bistudio.com/wiki/unitIsUAV
- createMarkerLocal Array
+ unitIsUAV Object
- createMarkerLocal [name, position]
+ unitIsUAV unit
- $Code$_marker = createMarkerLocal ["Marker1", position player ];$/Code$
+ $Code$_isUAV = unitIsUAV veh;$/Code$
- undefined / local
+ undefined / undefined
- To create a marker which is visible on the map you need to define at least the following three settings:
- $Code$_markerstr = createMarkerLocal ["markername",[_Xpos,_Ypos]];
- _markerstr setMarkerShapeLocal "ICON";
- _markerstr setMarkerTypeLocal "DOT";$/Code$
- String
+ Boolean
+
- createMenu
+ currentWeapon
- Creates a previously added menu.
- i
- Some Old Editor Command
+ Return the name of the currently selected weapon (on the primary turret for vehicles).
- https://community.bistudio.com/wiki/createMenu
+ https://community.bistudio.com/wiki/currentWeapon
- Control createMenu Number
+ currentWeapon Object
- map createMenu index
+ currentWeapon vehicle
-
+ $Code$_weaponClass = currentWeapon (vehicle player);//Example: "M16A2GL"$/Code$
+
+ $Code$_weaponClass = currentWeapon player;$/Code$
+
undefined / undefined
+ (July 15, 2009)
+ You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string.
+
+ (July 15, 2009)
+ It seems it's not working in 1.02 for other unit than player.
+
+ (May 4, 2010)
+ This works for vehicles providing there is a gunner
- Nothing
+ String
+
- createMine
+ queryMagazinePool
- Creates a mine of the given type (type is the name of the subclass of CfgVehicles). If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used. The mine is placed inside a circle with this position as its center and placement as its radius.
+ Return number of magazines of type name in magazine pool (used in campaign to transfer magazines into next mission).
- https://community.bistudio.com/wiki/createMine
+ https://community.bistudio.com/wiki/queryMagazinePool
- createMine Array
+ queryMagazinePool String
- createMine [type, position, markers, placement]
+ queryMagazinePool name
- $Code$_mine = createMine ["MineMine", position player, [], 0];$/Code$
+ $Code$_num = queryMagazinePool "M16";$/Code$
undefined / undefined
- (June 5, 2017)
- Note that this command uses AGL (very similar to ASL) positions, so if you want to use the moored or seabed mine, you'll have to find the appropriate negative z value that is underwater and convert that to ASL.
- Also note that you can't adjust the positions of sea mines after they've been created. The command is either ignored or not propagated across the network to clients.
- Object
+ Number
+
- createMissionDisplay
+ taskMarkerOffset
- Create single missions display as a child of given display. The mission dialog will be set to the directory given as an argument "root".
+ Returns model space position for the task marker
- https://community.bistudio.com/wiki/createMissionDisplay
+ https://community.bistudio.com/wiki/taskMarkerOffset
- Display createMissionDisplay String
+ taskMarkerOffset Object
- display createMissionDisplay string
+ taskMarkerOffset unit
- $Code$_ChildDisplay = _Rootdisplay createMissionDisplay "Tutorial";$/Code$
-
- $Code$// In Arma 3 this would create scenarios UI
- findDisplay 46 createMissionDisplay "";$/Code$
+ $Code$_offset = taskMarkerOffset player ;$/Code$
undefined / undefined
@@ -12167,975 +12981,845 @@
- Display
+ Array
+
- createSimpleObject
+ is3DENMultiplayer
- Create object with given shape defined as path to.p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI pathfinding (causes walking through walls), and built in lights.
- Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: createSimpleObject/objects
- Guide: https://community.bistudio.com/wiki/Arma_3_Simple_Objects
- One cannot attach actions to a simple object via addAction.
- NOTES :
- Objects created with Syntax 1 cannot be textured. Some objects may also have inverted default direction.
- Objects created with Syntax 2 can be textured. The default direction should match the direction of the object if it was created with createVehicle.
- Since Arma 3 v1.67 simple objects support setVariable and getVariable
+ Returns true if the Eden Editor is in multiplayer mode. Returns true in the following cases:
+ Multiplayer Preview launched directly from 3DEN - true in preview and only for the creator
+ MP mission is chosen for editing when creating a server: Multiplayer - Server Browser - Host Server. When 3D EDITOR button is clicked for selected mission and 3DEN is launched, command returns true within the editor environment. (see also is3DEN )
- https://community.bistudio.com/wiki/createSimpleObject
+ https://community.bistudio.com/wiki/is3DENMultiplayer
- createSimpleObject Array
+ is3DENMultiplayer
- createSimpleObject [shapeName, positionWorld]
-
- createSimpleObject [className, positionASL]
+ is3DENMultiplayer
- $Code$_pos = player getRelPos [10, 0];
- _tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
- _tank setPos (_pos vectorAdd ( getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));
- _tank hideSelection ["zasleh", true ];
- _tank hideSelection ["zasleh2", true ];
- _tank hideSelection ["clan", true ];
- _tank animate ["Wheel_podkoloL3", 0.5, true ];
- _tank animate ["Wheel_podkoloL6", 0.5, true ];$/Code$
-
- $Code$_pos = player getRelPos [10, 0];
- _tank = createSimpleObject ["B_APC_Tracked_01_CRV_F", AGLtoASL _pos];
- _tank setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,0.01)"];
- _tank hideSelection ["zasleh", true ];
- _tank hideSelection ["zasleh2", true ];
- _tank hideSelection ["clan", true ];
- _tank animate ["Wheel_podkoloL3", 0.5, true ];
- _tank animate ["Wheel_podkoloL6", 0.5, true ];$/Code$
+ $Code$if is3DENMultiplayer then { systemChat "Your hosting a test server!"};$/Code$
- undefined / global
+ undefined / undefined
- (April 18, 2016)
- The easiest way to correctly place simple object is to create normal object of the same shape from class (if possible), then copy getPosWorld, vectorDir and vectorUp from it. Then create the simple object and apply copied values to it, this will position simple object exactly as normal object was positioned:
- $Code$_heli = "B_Heli_Light_01_F" createVehicleLocal ( player getRelPos [10, 0]);
- _position = getPosWorld _heli;
- _vectorDirUp = [ vectorDir _heli, vectorUp _heli];
- _model = getModelInfo _heli select 1;
- deleteVehicle _heli;
- _simpleHeli = createSimpleObject [_model, _position];
- _simpleHeli setVectorDirAndUp _vectorDirUp;$/Code$
-
- (April 28, 2016)
- Models from within the mission file/folder can be created, but full system path is needed. Use:
- $Code$( str missionConfigFile select [0, count str missionConfigFile - 15]) + "myModel.p3d"
- //mission folder path code from: http://killzonekid.com/arma-scripting-tutorials-mission-root/ $/Code$
-
- (May 11, 2016)
- simulationEnabled returns false.
-
- (September 5, 2016)
- There is a section in function library dedicated to simple object creation and interaction. It's purpose is to simplify the operations:
- BIS_fnc_createSimpleObject
- creates simple object according to the supplied data
- you can supply p3d path, class name or data you get from scanning a non-simple object
- BIS_fnc_simpleObjectData
- gathers and returns data about the non-simple object
- data can be then used to create simple object
- BIS_fnc_replaceWithSimpleObject
- replaces non-simple object with simple object on the scene
- do not use it in large scale in MP missions as it is not network efficient
- BIS_fnc_adjustSimpleObject
- adjusts simple object to looks as close to the non-simple object as possible
- function is internally called from the 'bis_fnc_createSimpleObject', you won't probably need to call this function directly
- Check the function headers for more info about the input parameters and possibilities.
- Object
+ Boolean
+
- createSimpleTask
+ removeAll3DENEventHandlers
- Creates a new Task. The task effect is local, it will only exist on PC it was added.
+ Removes all Eden Editor event handlers of given type.
+ See the list of all Eden Editor Event Handlers.
- https://community.bistudio.com/wiki/createSimpleTask
+ https://community.bistudio.com/wiki/removeAll3DENEventHandlers
- Object createSimpleTask Array
+ removeAll3DENEventHandlers String
- person createSimpleTask [name, parentTask ]
+ removeAll3DENEventHandlers type
- $Code$_currentTask = player createSimpleTask ["NewTask"];$/Code$
-
- $Code$_childTask = player createSimpleTask ["ChildTask", _currentTask];$/Code$
+ $Code$removeAll3DENEventHandlers "onUndo";$/Code$
- global / local
+ undefined / undefined
- (July 02, 2011)
- Creating child will position the new task just under the parent task.
- Creating another "normal" (parent) task will create a new line above the others. Think of it if you want ordered objectives.
- Succeeding parent task will automatically succeed childs, whatever their taskState was set to. (I.E. If a task is set as a child to another, it will be completed when its parent is complete.. no matter if the child task really was or not).
- This command has to be executed again for it to be applied for JIP players - no server sync
- Full step by step code from beginning to end:
- Step 1: create a new simpleTask
- $Code$
- A_SIMPLE_TASK = player createSimpleTask [( localize "STR_aSimpleTask")];
- $/Code$
- You may create a task at any given point in time. You just need to be aware of the fact, that you've created the task for a single unit (the player). So if you make use of teamSwitch, respawn or similiar, you need to think about how to manage this, so all of these units will have up to date tasks assigned to them.
- Second, it's a good practice to use a stringtable, even if you do not plan (yet) to offer translations.
- Step 2: task destination
- $Code$
- A_SIMPLE_TASK setSimpleTaskDestination _destination;
- $/Code$
- variable/pointer-to-your-task setSimpleTaskDestination some-position. That's it.
- Step 3: task description
- $Code$
- A_SIMPLE_TASK setSimpleTaskDescription [
- ( localize "STR_aSimpleTaskLongText"),
- ( localize "STR_aSimpleTask"),
- ( localize "STR_aSimpleTaskWaypointLabel")
- ];
- $/Code$
- Again, no magic involved here. You take your task, the command setSimpleTaskDescription an pass an array with three strings in it. The first string is the long description text, the second is the name/title of the task and the last one will show up on-screen on the waypoint in cadet mode.
- Step 4: set and update task states
- $Code$
- A_SIMPLE_TASK setTaskState "CREATED";
- $/Code$
- And that's it. Here a minimal working example:
- $Code$
- A_SIMPLE_TASK = player createSimpleTask ["simple task title"];
- A_SIMPLE_TASK setSimpleTaskDestination ( position player );
- A_SIMPLE_TASK setSimpleTaskDescription [
- "simple task long description",
- "simple task title",
- "simple task waypoint label"
- ];
- A_SIMPLE_TASK setTaskState "CREATED";
- $/Code$
- And then later in the mission:
- $Code$
- A_SIMPLE_TASK setTaskState "SUCCEEDED";
- $/Code$
- If you want to keep the player in the loop about the status of tasks, you may always do this:
- $Code$
- [ objNull, objNull, A_SIMPLE_TASK, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
- $/Code$
- Task
+ Nothing
+
- createSite
+ setEditorObjectScope
- Create a new site.
- This command is considered deprecated and is no longer supported
+ This command defines the level of access a user has to editor objects.
+ "objects" is an array of either Editor Objects (eg ["_unit_0"]) or actual Game Objects (eg [player]). If the array is empty then the command will automatically parse all editor objects.
+ "editorType" is the editor type to effect (eg "unit", "vehicle", "center") or "" for all types.
+ "condition" is an executable string that must evaluate to true or false. If true, the scope of the evaluated editor object will be modified. "_x" can be used in the string as reference to the ingame representation of the currently processed array member.
+ "scope" is one of "HIDE", "VIEW", "SELECT", "LINKTO", "LINKFROM", "ALLNODRAG", "ALLNOTREE", "ALLNOCOPY", "ALLNOSELECT" or "ALL".
+ "subordinatesAlso" is a boolean value. If true then subordinates in the editor will be assigned the same scope as the parent.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/createSite
+ https://community.bistudio.com/wiki/setEditorObjectScope
- String createSite Position
+ Control setEditorObjectScope Array
- type createSite pos
+ map setEditorObjectScope [objects, editorType, condition, scope, subordinatesAlso]
-
+ $Code$_map setEditorObjectScope [ [],"vehicle", "side effectiveCommander _x != side player", "HIDE", false]$/Code$
+
+ $Code$((findDisplay 128) displayCtrl 51) setEditorObjectScope [ ["_unit_0"], "", "true", "ALLNODRAG", false]$/Code$
+
undefined / undefined
- (February 18, 2014)
- "CreateSite is an obsolete command from the time in development when Sites were handled separately from other modules. Now they use the modules framework.
- If you want a specific Site to be activated during the mission, place it in the editor and use the Condition line in its parameters (the last one)." - Jezuro [1]
- Object
+ Nothing
+
- createSoundSource
+ diag_codePerformance
- Creates a sound source of the given type (type is the name of the subclass of CfgVehicles which is pointing to the sound defined in CfgSFX ). If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used. The sound source is placed inside a circle with this position as its center and placement as its radius. Some of the vanilla classes pre-configured in Arma 3:
- "Sound_Alarm"
- "Sound_Alarm2"
- "Sound_BattlefieldExplosions"
- "Sound_BattlefieldFirefight"
- "Sound_Fire"
- "Sound_SmokeWreck1"
- "Sound_SparklesWreck1"
- "Sound_SparklesWreck2"
- "Sound_Stream"
- Since Arma 3 v1.69.141183 it is possible to define sounds for use with createSoundSource in mission config. As mentioned earlier, the sounds needed for this command should be defined inside CfgVehicles class, which itself references CfgSFX class. If given class searched in main config and is not found, the search will continue in description.ext. Here is an example of suitable mission config definition:
- // description.ext
- class CfgSFX
- {
- class MyOwl
- {
- sound0 [ ] = { "@A3\Sounds_F\environment\animals\birds\owl1", db - 10, 1.0, 1000, 0.2, 0, 15, 30 } ; // path to addon sound
- sound1 [ ] = { "@A3\Sounds_F\environment\animals\birds\owl2", db - 10, 1.0, 1000, 0.2, 0, 15, 30 } ; // path to addon sound
- sound2 [ ] = { "@A3\Sounds_F\environment\animals\birds\owl3", db - 10, 1.0, 1000, 0.2, 0, 15, 30 } ; // path to addon sound
- sounds [ ] = { sound0, sound1, sound2 } ;
- empty [ ] = { "", 0, 0, 0, 0, 0, 0, 0 } ;
- } ;
- } ;
- class CfgVehicles
- {
- class MyOwlSound // class name to be used with createSoundSource
- {
- sound = "MyOwl" ; // reference to CfgSFX class
- } ;
- } ;
- $Code$_owl = createSoundSource ["MyOwlSound", position player, [], 0];$/Code$
- Note that the sound created by createSoundSource will always be looping. Also when CfgSFX sound definition contains more than 1 sound, there is no guarantee that the sound played will be the same on every PC in Multiplayer.
+ Attempts to run given code with given arguments given number of cycles in unscheduled environment and returns average time it took to run the code as well as actual number of executions performed. The command will return as soon as possible if the tested code is slow and the duration of the command exceeds 1 second. Engine alternative to BIS_fnc_codePerformance
+ NOTE: For security purposes, this command will only run for 1 cycle in MP, unless in-game debug console is available via description.ext option or Eden attribute setting.
- https://community.bistudio.com/wiki/createSoundSource
+ https://community.bistudio.com/wiki/diag_codePerformance
- createSoundSource Array
+ diag_codePerformance Array
- createSoundSource [type, position, markers, placement]
+ diag_codePerformance [code, arguments, cycles]
- $Code$_soundSource = createSoundSource ["LittleDog", position player, [], 0]$/Code$
-
- $Code$[] spawn
- {
- _alarm = createSoundSource ["Sound_Alarm", position player, [], 0]; //starts alarm
- sleep 10;
- deleteVehicle _alarm; //stops alarm
- };$/Code$
+ $Code$_result = diag_codePerformance [{ private _a = 123;}, 0, 10000];$/Code$
- global / global
+ undefined / undefined
- Object
+ Array
+
- createTask
+ didJIP
- Create a new AI task (subtask of parentTask). Type is name of registered task type.
+ Checks if the current client Joined In Progress.
- https://community.bistudio.com/wiki/createTask
+ https://community.bistudio.com/wiki/didJIP
- Team_Member createTask Array
+ didJIP
- teamMember createTask [[type, parentTask], priority, name1, value1nameN, valueN]
+ didJIP
-
+ $Code$clientDidJIP = didJIP ;$/Code$
+
undefined / undefined
+ (February 23, 2016)
+ reports false in CfgFunctions with preInit = 1; even when the client joined in progress.
- Task
+ Boolean
+
- createTeam
+ findDisplay
- Create a team and name it.
+ Find display by its IDD (which is defined in the description.ext or config).
+ If the specified display can't be found displayNull ("No display") is returned, (which can be tested with the isNull command.)
+ The primary display uses IDD 46. (eg: findDisplay 46). This will return displayNull on a dedicated server (so be sure to check isDedicated if using this in a waitUntil condition).
- https://community.bistudio.com/wiki/createTeam
+ https://community.bistudio.com/wiki/findDisplay
- createTeam Array
+ findDisplay Number
- createTeam [type, name]
+ findDisplay idd
- $Code$_team = createTeam ["USMC_Team", "Fire Team Red"];$/Code$
+ $Code$_display = findDisplay 1;$/Code$
undefined / undefined
+ (15 June 2008)
+ findDisplay does not find displays defined under RscTitles (even when they are visible).
+ To access those types of displays, either assign the resource to a global variable, or pass its this value to a script, during the onLoad event:
+ e.g. class RscTitles {
+ class MyRsc {
+ onLoad = "myDisplay = (_this select 0)"; // or
+ // onLoad = "_this execVM 'myDialog.sqf'";
+ ...
+ You can then use the stored value as you would for regular dialogs:
+ $Code$(myDisplay displayCtrl 1111) ctrlSetText "hello there");$/Code$
+
+ (17 March 2010)
+ I posted a tutorial on finding and using displays here.
+
+ (07 March 2014)
+ The Zeus Display uses IDD 312
+
+ (March 25, 2015)
+ Display 12 is map
+
+ (June 25, 2017)
+ I have tested the behavior of this command and I found out that it [ findDisplay ] appears to only return the display AFTER any onLoad event handler of that display is done. So, using findDisplay inside an onLoad event handler is useless.
+
+ (August 14, 2017)
+ There are some specific cases, where findDisplay will not be able to find an existing display. Here's the cases and how to act on them:
+ $Code$//Your display has IDD= -1.
+ class RscDisplayNew
+ {
+ idd=-1;
+ scriptName = "RscDisplayNew";
+ ...
+ };$/Code$
+ $Code$//Your display doesn't have IDD
+ class RscDisplayNew
+ {
+ scriptName = "RscDisplayNew";
+ ...
+ };$/Code$
+ $Code$//Your display doesn't have scriptname with IDD = -1
+ class RscDisplayNew
+ {
+ idd=-1;
+ ...
+ };$/Code$
+ $Code$//Your display doesn't have scriptname, neither IDD
+ class RscDisplayNew
+ {
+ ...
+ };$/Code$
+ 1.
+ You actually can find a -1 display, but this means finding a display with this IDD might be a problem, when there are a few displays marked as -1.
+ So as you can see, theres an entry called scriptName. You can get a reference to this display by using uiNamespace :
+ $Code$(uiNamespace getVariable "RscDisplayNew")$/Code$
+ NOTE : Variables are overwritten with a reference of the last declared display under the same scriptName entry. Take a look at case 3 for solution.
+ 2.
+ Displays without IDD's can actually exist. They can be manipulated only in a way described in the first case using uiNamespace.
+ 3.
+ You can really have this display seeking it manually in a allDisplays return. This is experimental, but working option.
+ 4.
+ You will have a problem finding this display, since this display doesn't exist even in allDisplays (?) return. Behaviour unknown.
- Team_Member
+ Display
+
- createTrigger
+ setParticleParams
- Creates a sensor ( trigger ) of the given type and at the given position. The type must be a class name in CfgNonAIVehicles or CfgVehicles with simulation = detector. An array containing all units that have activated the trigger is available via list triggerobj. Created triggers can be deleted using deleteVehicle.
- NOTE1: Since Arma 3 v1.43.129935 triggers can be created locally on clients setting optional param makeGlobal to false
- NOTE2: Since Arma 3 v1.53.132440 triggers can be disabled/enabled using enableSimulation command
- Triggers are created with default params, which are:
- a: 50.0
- b: 50.0
- c: -1
- angle: 0
- rectangular: false
- activationBy: None
- activationType: Present
- repeating: false
- timeoutMin: 0
- timeoutMid: 0
- timeoutMax: 0
- interruptable: true
- type: None
- text: ""
- name: ""
- expCond: "this"
- expActiv: ""
- expDesactiv: ""
+ Set parameters to particle source. Array is in format ParticleArray.
+ Since Arma 3 version 1.11.114706 you can use this command to overwrite many values set by setParticleClass, particularity those defined in ParticleArray. Correspondence between CfgCloudlets class param names and command array of params:
+ $Code$particleSource setParticleParams
+ [
+ /* String or Array - If string then the name of the particleShape. And following default values are used:
+ particleFSNtieth = 1
+ particleFSIndex = 0
+ particleFSFrameCount = 1
+ particleFSLoop = true
+ */
+ [
+ particleShape, /* String */
+ particleFSNtieth, /* Number */
+ particleFSIndex, /* Number */
+ particleFSFrameCount, /* Number */
+ particleFSLoop /*Optional - Boolean. Default: true */
+ ],
+ animationName, /* String */
+ particleType, /* String - Enum: Billboard, SpaceObject*/
+ timerPeriod, /* Number */
+ lifeTime, /* Number */
+ position, /*3D Array of numbers as relative position to particleSource or (if object at index 18 is set) object.
+ Or (if object at index 18 is set) String as memoryPoint of object.*/
+ moveVelocity, /*3D Array of numbers.*/
+ rotationVelocity, /* Number */
+ weight, /* Number */
+ volume, /* Number */
+ rubbing, /* Number */
+ size, /* Array of Number */
+ color, /* Array of Array of RGBA Numbers */
+ animationSpeed, /* Array of Number */
+ randomDirectionPeriod, /* Number */
+ randomDirectionIntensity, /* Number */
+ onTimerScript, /* String */
+ beforeDestroyScript, /* String */
+ this, /* Object */
+ angle, /*Optional Number - Default: 0*/
+ onSurface, /*Optional Boolean */
+ bounceOnSurface, /*Optional Number */
+ emissiveColor /*Optional Array of Array of RGBA Numbers */
+ ];$/Code$
- https://community.bistudio.com/wiki/createTrigger
+ https://community.bistudio.com/wiki/setParticleParams
- createTrigger Array
+ Object setParticleParams Array
- createTrigger [type, position, makeGlobal]
+ particleSource setParticleParams array
- $Code$_trg = createTrigger ["EmptyDetector", getPos player ];
- _trg setTriggerArea [5, 5, 0, false ];
- _trg setTriggerActivation ["CIV", "PRESENT", true ];
- _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"];$/Code$
+ $Code$see ParticleArray$/Code$
undefined / undefined
- (March 6, 2013)
- Calling list immediately after creating a trigger this way (and setting up activation, area, statements, timeout, etc..), will return null instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array.
- Object
+ Nothing
+
- createUnit
+ debugFSM
- Create unit of a class that's defined in CfgVehicles.
- The Group parameter MUST be an existing group or the unit won't be created.
+ Dump (something about FSM) to debugging output. This command is (assumed to be) non-functional in the retail version.
+ Non functional in retail
- https://community.bistudio.com/wiki/createUnit
+ https://community.bistudio.com/wiki/debugFSM
- Group createUnit Array
-
- String createUnit Array
+ Number debugFSM Boolean
- group createUnit [type, position, markers, placement, special]
-
- type createUnit [position, group, init, skill, rank]
+ FSMhandle debugFSM true
- $Code$_unit = group player createUnit ["SoldierWB", position player, [], 0, "FORM"];$/Code$
-
- $Code$"SoldierWB" createUnit [ position player, group player ];$/Code$
-
- $Code$"soldierWB" createUnit [ getMarkerPos "barracks", _groupAlpha];$/Code$
-
- $Code$"soldierWB" createUnit [ getMarkerPos "marker_1", _groupAlpha, "loon1 = this;
- this addWeapon 'BAF_L85A2_RIS_SUSAT'", 0.6, "corporal"];$/Code$
-
+
- undefined / global
+ undefined / undefined
- (August 13, 2006)
- To give a newly created unit a name, put "newUnit = this" in the init field.
-
- (18:41, 5 April 2007 (CEST))
- The eventhandlers added with addEventHandler in the init parameter will only fire locally on the machine where this creation command is called from.
-
- (December 24, 2007)
- If you do not wish it to be in a group, you can create a gamelogic and group it to that. Note: The unit will deny to move away from the gamelogic.
-
- (August 27, 2015)
- In order to solve the above problem you can simply group it to the game logic as stated, then group it to grpNull
- e.g
- $Code$myUnit join myGroupLogic;
- myUnit join grpNull
- $/Code$
-
- (21 December 2006)
- Although this command takes a group as an argument, you need to use the join command if you want the created units to perform actions such as move. For example:
- $Code$ comment "Create a new soldier within 100m of the player and cause them to run towards the player" ;
- _grp = createGroup west ;
- unit = _grp createUnit ["SoldierWB", position player, [], 100, "FORM"] ;
- [unit] join _grp ;
- unit move position player ;
- $/Code$
- However, some commands such as setUnitPos only work if run before the join.
-
- (11 March 2011)
- Comment above about 'an additional join required' is no longer true for Operation Arrowhead.
-
- (27th Nov 2016)
- (A3 v1.64)The side of created unit by this command fallows the fraction from its config and won’t be affected by the side of the passed group parameter which is created by createGroup on the fly without entities.
- $Code$
- _grp = createGroup east ; // O Alpha 1-1
- _ap = _grp createUnit [ “C_man_p_beggar_F”, position player, [], 0, "FORM"];
- //the side of _ap is still CIV not EAST.
- $/Code$
- We can use join command family or fill the _grp with entities in advance to set _ap to our desired side.
- Object - Nothing
+ Nothing
+
- createVehicleCrew
+ distributionRegion
- Creates crew to given empty vehicle. Crew members are default crew defined in config. Crew side will also correspond to vehicle's faction. This command does not addVehicle to the created crew in the same way this normally happens when crewed vehicle created in the editor.
+ Returns the numerical index for the distribution region of this copy of ArmA.
+ 1 - US
+ 2 - Rest of the world
- https://community.bistudio.com/wiki/createVehicleCrew
+ https://community.bistudio.com/wiki/distributionRegion
- createVehicleCrew Object
+ distributionRegion
- createVehicleCrew vehicle
+ distributionRegion
- $Code$// Spawn a flying UAV with crew.
- myUAV = [ getPos player, 0, "B_UAV_02_F", west ] call BIS_fnc_spawnVehicle ;
- createVehicleCrew (myUAV select 0);$/Code$
-
- $Code$_veh = createVehicle ["O_MRAP_02_hmg_F", position player, [], 0, "NONE"];
- createVehicleCrew _veh;
- {
- diag_log [_x, faction _x, side _x, side group _x];
- } forEach crew _veh;[O Alpha 1-1:1,"OPF_F",EAST,EAST]
- [O Alpha 1-1:2,"OPF_F",EAST,EAST]$/Code$
+ $Code$distributionRegion == 1$/Code$
undefined / undefined
- (August 20, 2014)
- As of ARMA 3 v1.26 the command will work on non-empty vehicles. If any of the crew defined in config are missing they will be added.
-
- (November 8, 2014)
- This command creates drivers/copilots, commanders and gunners where appropriate, but it never creates cargo crew.
- So a gunship Huron will get a pilot and copilot plus 2 door gunners, but nobody in the back.
-
- (December 22, 2015)
- createVehicleCrew does not work with Transport Unload waypoints for helicopters. You need to spawn the pilots separately and then get them into the helicopter in order to get Transport Unload waypoints to work.
-
- (July 2, 2017)
- The particular seats to which units are added depend on the dontCreateAI property, the hasDriver property of the base class, and the hasGunner propery of turret classes.
- For instance, the following snippet calculates how many seats will be occupied by the created crew:
- $Code$private _vehCfg = configFile "CfgVehicles" typeOf _vehicle;
- private _crewCount = {round getNumber (_x "dontCreateAI") 1 &&
- ((_x == _vehCfg && {round getNumber (_x "hasDriver") 0}) ||
- (_x != _vehCfg && {round getNumber (_x "hasGunner") 0}))} count ([_vehicle, configNull] call BIS_fnc_getTurrets);
- $/Code$
- Also, I've written a function to create a UAV crew for a specific side: https://gist.github.com/AgentRev/cb25d30e464f2239b6cee51fa0110c78
- Nothing
+ Number
+
- createVehicleLocal
+ hintSilent
- Creates an object of the given type. Created object is not transferred through network in MP games. netId of such vehicle in multiplayer will be "0:0". To disable local vehicle creation, use CfgDisabledCommands to blacklist this command
+ Same as hint, but without a sound.
- https://community.bistudio.com/wiki/createVehicleLocal
+ https://community.bistudio.com/wiki/hintSilent
- String createVehicleLocal Position
+ hintSilent String/Structured_Text
- type createVehicleLocal position
+ hintSilent text
- $Code$_lightsource = "#lightpoint" createVehicleLocal _pos;$/Code$
+ $Code$hintSilent "You texte comes here !"$/Code$
undefined / local
- (07:18, 5 June 2008 (CEST))
- If the object that is created is of the type ammo, then it will created on all clients ( tested only on VBS2 ).
-
- (18:04, 5 September 2013 (CEST))
- Indeed the type of Ammo is transfered to ALL clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on Arma 1 - Arma 2 OA (latest patch).
- Object
+ Nothing
+
- createVehicle
+ posWorldToScreen
- Creates an empty object of given classname type (See Arma 3 Assets or createVehicle/vehicles )
- For a class reference from older games see Classes.
- Some special 'Scripted' vehicle classes:
- DemoCharge_Remote_Ammo_Scripted - same as DemoCharge_Remote_Ammo but will explode when destroyed or setDamage 1;
- SatchelCharge_Remote_Ammo_Scripted - same as SatchelCharge_Remote_Ammo but will explode when destroyed or setDamage 1;
- ClaymoreDirectionalMine_Remote_Ammo_Scripted - same as ClaymoreDirectionalMine_Remote_Ammo but will explode when destroyed or setDamage 1;
- GroundWeaponHolder_Scripted - same as GroundWeaponHolder but will not be auto-deleted when empty
- WeaponHolderSimulated_Scripted - same as WeaponHolderSimulated but will not be auto-deleted when empty
- Randomization:
- In Arma 3 many vehicles will get randomized in appearance by default in order to add some variety to the game. It is possible to override this default behavior by setting BIS_enableRandomization variable to false in the vehicle namespace:
- $Code$_veh = "C_Offroad_01_F" createVehicle position player ;
- _veh setVariable ["BIS_enableRandomization", false ];$/Code$
- or
- $Code$this setVariable ["BIS_enableRandomization", false ];$/Code$
- if done in mission editor init field.
+ Convert world coordinates to screen coordinates in map.
- https://community.bistudio.com/wiki/createVehicle
+ https://community.bistudio.com/wiki/posWorldToScreen
- String createVehicle Position
-
- createVehicle Array
+ Control posWorldToScreen Array
- type createVehicle position
-
- createVehicle [type, position, markers, placement, special]
+ map posWorldToScreen position
- $Code$_jeep = "Jeep" createVehicle position player ;$/Code$
-
- $Code$_heli = "AH1Z" createVehicle getMarkerPos "hspawn";$/Code$
-
- $Code$_veh = createVehicle ["ah1w", position player, [], 0, "FLY"];$/Code$
-
- $Code$_veh = createVehicle ["2S6M_Tunguska", getMarkerPos "marker1", ["marker2","marker3"], 0, "NONE"];$/Code$
-
- $Code$// Objects such as
- //test_EmptyObjectForBubbles
- //test_EmptyObjectForFireBig
- //test_EmptyObjectForSmoke
- //create additional emitters, which are stored in "effects" variable on the object. Since Arma 3 v1.71 these emitters are automatically deleted when object is deleted
- [] spawn
- {
- _fire = "test_EmptyObjectForFireBig" createVehicle position player ;
- sleep 5;
- deleteVehicle _fire;
- };$/Code$
-
- $Code$// The following explosives (with ending _Scripted)
- //DemoCharge_Remote_Ammo_Scripted
- //SatchelCharge_Remote_Ammo_Scripted
- //ClaymoreDirectionalMine_Remote_Ammo_Scripted
- //can be set off by applying setDamage 1 to them for ease of scripting:
- _claymore = "ClaymoreDirectionalMine_Remote_Ammo_Scripted" createVehicle position player ;
- 0 = _claymore spawn
- {
- uiSleep 5;
- _this setDamage 1;
- };$/Code$
-
- $Code$// How to add inventory to objects without inventory:
- _boxes = "Land_Pallet_MilBoxes_F" createVehicle position player ;
- _cargo = "Supply500" createVehicle [0,0,0];
- _cargo attachTo [_boxes, [0,0,0.85]];
- // optional for objects that can take damage
- _boxes addEventHandler ["Killed",
- {
- {
- detach _x,
- deleteVehicle _x;
- }
- forEach attachedObjects (_this select 0);
- }];$/Code$
-
- $Code$// Drop weapon:
- _wh = "GroundWeaponHolder_Scripted" createVehicle position player ;
- player action ["DropWeapon", _wh, currentWeapon player ];$/Code$
-
+
- undefined / global
+ undefined / undefined
- (August 13, 2006)
- Using main syntax of this command sets the created vehicle not exactly at the given position, you have to setPos it there, if accuracy counts.
-
- (Jan 20, 2006)
- Using main syntax of this command sets the created vehicle in the nearest possible position. You can create a dozen of tanks with it - they will appear side by side.
-
- (December 13, 2006)
- Observe that buildings with the default destrType will not work correctly in multiplayer in Armed Assault when created with this command. The Destruction effect will only be displayed where the building is local.
-
- (Oct 18, 2009)
- As of Arma2, this command cannot be used to create game logics (source). Use createUnit instead.
-
- (January 14, 2011)
- In multiplayer, only run this command on one machine. It will create a the vehicle on all machines every time it is called on any machine.
-
- (January 26 2014)
- Using getPosATL should work, if otherwise you are struggling to get a the proper position coordinates.
-
- (September 12, 2014)
- "vehclass" createVehicle pos is the same if not faster than createVehicle ["vehclass", pos, [], 0, "NONE"]
-
- (August 22, 2015)
- GroundWeaponHolder class is automatically deleted when empty after 0.5 to 1 seconds in A3 1.48. The exact delay is random but never lower than 0.50 secs after creation. You can stop deletion by adding something (cargo) to it within 0.5 seconds.
-
- (December 1, 2015)
- The short syntax creates vehicles at ground level ignoring the Z in pos
- $Code$"vehclass" createVehicle pos$/Code$ This is equivalent to $Code$createVehicle ["vehclass", [pos select 0, pos select 1, 0], [], 0, "NONE"]$/Code$
-
- (May 16, 2017)
- For the alternative syntax, if the vehicle has canFloat = 1; in its config class (e.g. boats and wheeled APCs), the command expects PositionAGL, and otherwise always PositionATL.
- Object - Object
+ Array
+
- crew
+ lbValue
- Returns the crew (both dead and alive) of the given vehicle.
+ Returns the additional integer value in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- https://community.bistudio.com/wiki/crew
+ https://community.bistudio.com/wiki/lbValue
- crew Object
+ lbValue Array
+
+ Control lbValue Number
- crew vehicleName
+ lbValue [idc, index]
+
+ control lbValue index
- $Code$player in ( crew _tank);$/Code$
+ $Code$_value = lbValue [101, 0];$/Code$
+
+ $Code$_value = _control lbValue 0;$/Code$
- global / undefined
+ local / local
- (3 February, 2010)
- The crew command will return crew in order [driver,gunner,commander,turrets,cargo]
-
- (1 June, 2014)
- The crew command will return an empty array if the object has no crew - this includes objects that can't hold crew. If used on a unit (man, module, etc.) it will return an array containing that unit.
+ More information on the LB command family can be found here
- Array
+ Number - Number
+
- ctAddHeader
+ setVectorDir
- Adds a header line of controls according to the HeaderTemplate class. It returns an array containing header index and array of created controls in a format [ headerIndex, [ control0, control1... control n ]].
- Note that rows and headers are indexed separately.
+ Set object's direction vector. Up vector will remain unchanged.
- https://community.bistudio.com/wiki/ctAddHeader
+ https://community.bistudio.com/wiki/setVectorDir
- ctAddHeader Control
+ Object setVectorDir Array
- ctAddHeader Control
+ object setVectorDir [x,y,z]
- $Code$_array = ctAddHeader _control;$/Code$
-
+
- local / local
+ local / global
+ (March 16, 2008)
+ Command can be also used to rotate camera in all three axis.
+
+ (21:06, 3 March 2009 (CET))
+ setVectorDir can only influence an object's pitch. It can not influence bank. Example:
+ $Code$player setVectorDir [0,0,1]$/Code$
+ If the player is facing 0 degrees (north), then this will do NOTHING.
+ If the player is facing 90 degrees (east), then this will make him pitch 90 degrees up.
+ You can't directly pitch an object beyond 90 degrees, because this would change its facing direction. You must first flip it's direction using setDir, then you must bank the object 180 degrees, THEN you pitch the object appropriately.
+
+ (August 17, 2015)
+ In Arma 3, setVectorDir does not control an object's pitch or bank, in fact, it is not possible to change either of those solely using setVectorDir. This command can only affect horizontal rotation along the x-plane, unless an object first has it's vectorUp changed to something other than [0,0,1]. Correct input to setVectorDir should be calculated using the trigonometric functions sin and cos.
+ examples:
+ $Code$
+ 0 degrees (north)
+ player setVectorDir
+ [
+ sin 0, //equals 0
+ cos 0, //equals 1
+ 1
+ ];
+ 45 degrees (north-east)
+ player setVectorDir
+ [
+ sin 45, //equals 0.707
+ cos 45, //equals 0.707
+ 1
+ ];$/Code$
+ If you are doing trigonometric calculations, it may be better to use setVectorDir rather than setDir, since sine and cosine have already been calculated and will not need to be re-calculated
+ (also, setDir probably uses setVectorDir anyway.)
- Array
+ Nothing
+
- ctAddRow
+ sideEnemy
- Adds one row of controls according to the RowTemplate class. It returns an array containing row index and array of created controls in a format [ rowIndex, [ control0, control1... control n ]].
- Note that rows and headers are indexed separately.
+ The enemy side (used for renegades). Unit of this side is enemy to everyone.
+ To become one, you can attack members of your own side or use addRating.
+ When below a rating of -2000 units switch automatically to this side.
- https://community.bistudio.com/wiki/ctAddRow
+ https://community.bistudio.com/wiki/sideEnemy
- ctAddRow Control
+ sideEnemy
- ctAddRow Control
+ sideEnemy
- $Code$_array = ctAddRow _control;$/Code$
+ $Code$if ( side player == sideEnemy ) then {
+ hint "We've got a renegade!";
+ };$/Code$
- local / local
+ undefined / undefined
- Array
+ Side
+
- ctClear
+ triggerActivation
- Removes all the lines from the RscControlsTable. Returns Nothing.
+ Returns trigger activation in the form [by, type, repeating].
+ Note: The trigger could be local or remote but the result returned by this command will be for the trigger condition set up locally on the client that executed the command. See createTrigger for more info.
- https://community.bistudio.com/wiki/ctClear
+ https://community.bistudio.com/wiki/triggerActivation
- ctClear Control
+ triggerActivation Object
- ctClear Control
+ triggerActivation trigger
- $Code$ctClear _control;$/Code$
-
+
- local / local
+ global / local
- Nothing
+ Array
+
- ctCurSel
+ allPlayers
- Returns index of the selected row. Will take only rows, but not headers into account.
+ Returns a list of all human players including dead players. The command also returns all connected headless clients. To filter headless clients out:
+ $Code$_justPlayers = allPlayers - entities "HeadlessClient_F";$/Code$
+ NOTES:
+ In player hosted game, the complete array of allPlayers may get delayed at the start. Use BIS_fnc_listPlayers if you need it earlier
+ The order of players in the return array may differ from server to clients
- https://community.bistudio.com/wiki/ctCurSel
+ https://community.bistudio.com/wiki/allPlayers
- ctCurSel Control
+ allPlayers
- ctCurSel Control
+ allPlayers
- $Code$_curSel = ctCurSel _control;$/Code$
+ $Code${
+ systemChat format [
+ "Player %1 is %2",
+ name _x,
+ ["dead", "alive"] select alive _x
+ ];
+ } forEach allPlayers ;$/Code$
+
+ $Code$_bluNums = west countSide allPlayers ;$/Code$
+
+ $Code$// Find all human players if headless clients are used:
+ _allHCs = entities "HeadlessClient_F";
+ _allHPs = allPlayers - _allHCs;$/Code$
- local / local
+ undefined / undefined
- Number
+ Array
+
- ctData
+ markerColor
- Returns metadata (string) associated with a particular row of RscControlsTable.
+ Returns marker color for given marker. See setMarkerColor. Note: This function is identical to getMarkerColor.
- https://community.bistudio.com/wiki/ctData
+ https://community.bistudio.com/wiki/markerColor
- ctData Control
+ markerColor String
- ctData Control
+ markerColor markerName
- $Code$ctData _control;$/Code$
+ $Code$if ( markerColor "Marker1" == "ColorRed") then { hint "Marker1 is red!"}$/Code$
- local / local
+ undefined / undefined
- String
+ String
+
- ctFindHeaderRows
+ removeCuratorEditingArea
- Takes index of a header as a parameter. Returns array of indices of rows under this header.
+ Removes editing area for given curator.
- https://community.bistudio.com/wiki/ctFindHeaderRows
+ https://community.bistudio.com/wiki/removeCuratorEditingArea
- Control ctFindHeaderRows Number
+ Object removeCuratorEditingArea Number
- Control ctFindHeaderRows Number
+ curatorObj removeCuratorEditingArea editAreaID
- $Code$_array = _control ctFindHeaderRows 0;$/Code$
+ $Code$myCurator removeCuratorEditingArea 3;$/Code$
- local / local
+ undefined / undefined
- Array
+ Nothing
+
- ctFindRowHeader
+ createTrigger
- Takes index of a row as a parameter. Returns index of the closest header above this row.
+ Creates a sensor ( trigger ) of the given type and at the given position. The type must be a class name in CfgNonAIVehicles or CfgVehicles with simulation = detector. An array containing all units that have activated the trigger is available via list triggerobj. Created triggers can be deleted using deleteVehicle.
+ NOTE1: Since Arma 3 v1.43.129935 triggers can be created locally on clients setting optional param makeGlobal to false
+ NOTE2: Since Arma 3 v1.53.132440 triggers can be disabled/enabled using enableSimulation command
+ Triggers are created with default params, which are:
+ a: 50.0
+ b: 50.0
+ c: -1
+ angle: 0
+ rectangular: false
+ activationBy: None
+ activationType: Present
+ repeating: false
+ timeoutMin: 0
+ timeoutMid: 0
+ timeoutMax: 0
+ interruptable: true
+ type: None
+ text: ""
+ name: ""
+ expCond: "this"
+ expActiv: ""
+ expDesactiv: ""
- https://community.bistudio.com/wiki/ctFindRowHeader
+ https://community.bistudio.com/wiki/createTrigger
- Number ctFindRowHeader Number
+ createTrigger Array
- Control ctFindRowHeader Number
+ createTrigger [type, position, makeGlobal]
- $Code$_index = _control ctFindRowHeader 0;$/Code$
+ $Code$_trg = createTrigger ["EmptyDetector", getPos player ];
+ _trg setTriggerArea [5, 5, 0, false ];
+ _trg setTriggerActivation ["CIV", "PRESENT", true ];
+ _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"];$/Code$
- local / local
+ undefined / undefined
+ (March 6, 2013)
+ Calling list immediately after creating a trigger this way (and setting up activation, area, statements, timeout, etc..), will return null instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array.
- Number
+ Object
+
- ctHeaderControls
+ is3DEN
- Returns array of controls on the header with the given index.
+ Returns true if the Eden Editor is currently being used. true when inside editor environment, false during preview. (see also is3DENMultiplayer )
- https://community.bistudio.com/wiki/ctHeaderControls
+ https://community.bistudio.com/wiki/is3DEN
- Control ctHeaderControls Number
+ is3DEN
- Control ctHeaderControls Number
+ is3DEN
- $Code$_array = _control ctHeaderControls 0;$/Code$
+ $Code$if is3DEN then { systemChat "Welcome to Eden Editor!"};$/Code$
- local / local
+ undefined / undefined
- Array
+ Boolean
+
- ctHeaderCount
+ lbSetSelected
- Returns number of headers (rows not included) in the RscControlsTable.
+ Set the selection state of the given row of the given listbox of style LB_MULTI. For single selection listbox use lbSetCurSel instead.
- https://community.bistudio.com/wiki/ctHeaderCount
+ https://community.bistudio.com/wiki/lbSetSelected
- ctHeaderCount Control
+ Control lbSetSelected Array
- ctHeaderCount Control
+ control lbSetSelected [index, selected]
- $Code$ctHeaderCount _control;$/Code$
+ $Code$_control lbSetSelected [0, true ];$/Code$
- local / local
+ undefined / undefined
+ (April 10, 2016)
+ This command works fine with listboxs of style LB_MULTI and should not be marked as obsolete as lbSetCurSel does not provide the same functionality.
- Number
+ Nothing
+
- ctRemoveHeaders
+ tvSetPictureColor
- Takes array of header indices as a parameter and removes headers with those indices. Indices of remaining headers will be recomputed.
+ Sets the colour of the picture (set via tvSetPicture ) under the specified tree view path.
- https://community.bistudio.com/wiki/ctRemoveHeaders
+ https://community.bistudio.com/wiki/tvSetPictureColor
- Control ctRemoveHeaders Array
+ tvSetPictureColor Array
+
+ Control tvSetPictureColor Array
- Control ctRemoveHeaders Array
+ tvSetPictureColor [idc, path, color]
+
+ ctrl tvSetPictureColor [path, color]
- $Code$_control ctRemoveHeaders [0, 1, 2];$/Code$
+ $Code$tvSetPictureColor [101, [0,2], [1,0,1,1]];$/Code$
+
+ $Code$_tree tvSetPictureColor [[0,2], [1,0,1,1]];$/Code$
local / local
@@ -13143,279 +13827,312 @@
- Nothing
+ Nothing - Nothing
+
- ctRemoveRows
+ getAmmoCargo
- Takes array of row indices as a parameter and removes rows with those indices. Indices of remaining rows will be recomputed.
+ Returns the amount of ammo resources in the cargo space of a rearm vehicle.
- https://community.bistudio.com/wiki/ctRemoveRows
+ https://community.bistudio.com/wiki/getAmmoCargo
- Control ctRemoveRows Array
+ getAmmoCargo Object
- Control ctRemoveRows Array
+ getAmmoCargo vehicle
- $Code$_control ctRemoveRows [0, 1, 2];$/Code$
+ $Code$value = getAmmoCargo myVehicleName;$/Code$
- local / local
+ global / undefined
+ (December 22, 2014)
+ If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.
+ If the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite.
- Nothing
+ Number
+
- ctRowControls
+ diag_fpsMin
- Returns array of controls on the row with the given index.
+ Returns minimal framerate. Calculated from the longest frame over last 16 frames.
- https://community.bistudio.com/wiki/ctRowControls
+ https://community.bistudio.com/wiki/diag_fpsMin
- Control ctRowControls Number
+ diag_fpsMin
- Control ctRowControls Number
+ diag_fpsMin
- $Code$_array = _control ctRowControls 0;$/Code$
+ $Code$_minfps = diag_fpsMin ;$/Code$
- local / local
+ undefined / undefined
- Array
+ Number
+
- ctRowCount
+ difficultyEnabledRTD
- Returns number of rows (headers not included) in the RscControlsTable.
+ Returns true if rotorlib simulation is enabled. Forcing by mission is included
- https://community.bistudio.com/wiki/ctRowCount
+ https://community.bistudio.com/wiki/difficultyEnabledRTD
- ctRowCount Control
+ difficultyEnabledRTD
- ctRowCount Control
+ difficultyEnabledRTD
- $Code$ctRowCount _control;$/Code$
+ $Code$_rtdOn = difficultyEnabledRTD$/Code$
- local / local
+ undefined / undefined
- Number
+ Boolean
+
- ctSetCurSel
+ fadeSpeech
- Selects the line with the given index. Will take only rows, but not headers into account. -1 deselects all. Returns Nothing.
+ Cause a smooth change in the master speech volume. The change duration is given by time, the target volume by volume. The default master is 1.0.
- https://community.bistudio.com/wiki/ctSetCurSel
+ https://community.bistudio.com/wiki/fadeSpeech
- Control ctSetCurSel Number
+ Number fadeSpeech Number
- Control ctSetCurSel Number
+ time fadeSpeech volume
- $Code$_control ctSetCurSel 0;$/Code$
+ $Code$5 fadeSpeech 0.1;$/Code$
- local / local
+ undefined / local
- Nothing
+ Nothing
+
- ctSetData
+ canAddItemToVest
- Associates metadata (string) with the row determined by the index. Returns Nothing.
+ Checks if given object can be stored into soldier's vest.
- https://community.bistudio.com/wiki/ctSetData
+ https://community.bistudio.com/wiki/canAddItemToVest
- Control ctSetData Array
+ Object canAddItemToVest String
+
+ Object canAddItemToVest Array
- Control ctSetData [[[Number]], String ]
+ unit canAddItemToVest item
+
+ unit canAddItemToVest [item, count]
- $Code$_control ctSetData [0, "Test"];$/Code$
+ $Code$_item = "HandGrenade";
+ _fits = player canAddItemToVest _item;
+ if (_fits) then {
+ player addItemToVest _item;
+ } else {
+ hint "no room!";
+ };$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Boolean - Boolean
+
- ctSetHeaderTemplate
+ setTriggerActivation
- Takes config path to the new header template. Clears the whole RscControlsTable and sets the new header template.
+ Defines the trigger activation type.
+ See ArmA:Mission Editor - Triggers for a thorough overview of triggers and its fields for activation, effects, etc. Since Arma 3 v1.67, "ANYPLAYER" activation can be used to detect any player.
- https://community.bistudio.com/wiki/ctSetHeaderTemplate
+ https://community.bistudio.com/wiki/setTriggerActivation
- Control ctSetHeaderTemplate Config
+ Object setTriggerActivation Array
- Control ctSetHeaderTemplate Config
+ trigger setTriggerActivation [by, type, repeating]
- $Code$_control ctSetHeaderTemplate _configPath;$/Code$
+ $Code$_trigger setTriggerActivation ["WEST", "EAST D", true ]$/Code$
- local / local
+ global / local
- Nothing
+ Nothing
+
- ctSetRowTemplate
+ getEditorMode
- Takes config path to the new row template. Clears the whole RscControlsTable and sets the new row template (Deleting all rows and headers is easier to implement than replacing the rows and filling them with new data. IDCs could overflow etc.).
+ Returns the current mode of the editor.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/ctSetRowTemplate
+ https://community.bistudio.com/wiki/getEditorMode
- Control ctSetRowTemplate Config
+ getEditorMode Control
- Control ctSetRowTemplate Config
+ getEditorMode map
- $Code$_control ctSetRowTemplate _configPath;$/Code$
-
+
- local / local
+ undefined / undefined
- Nothing
+ String
+
- ctSetValue
+ deleteIdentity
- Associates metadata (number) with the row determined by the index. Returns Nothing.
+ Delete an identity (created with saveIdentity ) from the campaign's progress file.
- https://community.bistudio.com/wiki/ctSetValue
+ https://community.bistudio.com/wiki/deleteIdentity
- Control ctSetValue Number
+ deleteIdentity String
- Control ctSetValue Number
+ deleteIdentity identityName
- $Code$_control ctSetValue 0;$/Code$
+ $Code$?deleteIdentity "playerIdentity":hint "Delete ok"$/Code$
- local / local
+ undefined / local
- Nothing
+ Boolean
+
- ctValue
+ inflame
- Returns metadata (number) associated with a particular row of RscControlsTable.
+ Control fireplace burning. Set inflame to true (on) or false (off).
- https://community.bistudio.com/wiki/ctValue
+ https://community.bistudio.com/wiki/inflame
- ctValue Control
+ Object inflame Boolean
- ctValue Control
+ fireplace inflame burn
- $Code$_number = ctValue _control;$/Code$
+ $Code$_fireplaceOne inflame true ;$/Code$
- local / local
+ global / global
- Number
+ Nothing
+
- ctrlActivate
+ endl
- Launch actions attached to given (button based) control.
+ Creates a string containing a line break, similar to lineBreak for text. The name is inspired by c++ std::endl (line end). The command returns "\r\n", which contains control characters rather than printable characters:
+ hint str count "\r\n"; // 4
+ hint str count endl ; // 2
+ The line break works for diag_log and ctrlSetText. It doesn't work with the hint because hint interprets printable "\n" as line break instead. Alternatively one can use toString command to get other characters.
- https://community.bistudio.com/wiki/ctrlActivate
+ https://community.bistudio.com/wiki/endl
- ctrlActivate Control
+ endl
- ctrlActivate controlName
+ endl
- $Code$ctrlActivate _control$/Code$
+ $Code$diag_log ("line1" + endl + "line2");$/Code$
+
+ $Code$_ctrl = findDisplay 46 ctrlCreate ["RscTextMulti", -1];
+ _ctrl ctrlSetPosition [0,0,1,1];
+ _ctrl ctrlCommit 0;
+ _ctrl ctrlSetText format ["line1%1line2%1line3", endl ];$/Code$
undefined / undefined
@@ -13423,89 +14140,103 @@
- Nothing
+ String
+
- ctrlAddEventHandler
+ getObjectTextures
- Add an event handler ( User Interface Event Handlers ) to the given control. Returns id of the handler or -1 when failed.
- NOTE: Control EHs are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.
+ Gets all custom textures (hiddenSelectionsTextures) associated with the object.
- https://community.bistudio.com/wiki/ctrlAddEventHandler
+ https://community.bistudio.com/wiki/getObjectTextures
- Control ctrlAddEventHandler Array
+ getObjectTextures Object
- control ctrlAddEventHandler [handler,function]
+ getObjectTextures obj
- $Code$_map ctrlAddEventHandler ["draw","_this call BIS_fnc_strategicMapOpen_draw"];$/Code$
-
- $Code$_map ctrlAddEventHandler ["draw",{ hintSilent str _this}];$/Code$
+ $Code$_textures = getObjectTextures player ;$/Code$
- undefined / undefined
+ global / undefined
- (October 30, 2013)
- As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
- Number
+ Array
+
- ctrlAngle
+ addWeaponGlobal
- Gets rotation info of an ST_PICTURE control.
+ Add a weapon to a unit. Infantry units can only carry weapons in their respective slots (primary, secondary and handgun), the addWeaponGlobal command will replace the weapon currently in a slot with the added weapon if it shares the same slot.
+ To make sure the added weapon is loaded and ready, add the magazine first.
+ This command is broken when used on dedicated server
- https://community.bistudio.com/wiki/ctrlAngle
+ https://community.bistudio.com/wiki/addWeaponGlobal
- ctrlAngle Control
+ Object addWeaponGlobal String
- ctrlAngle control
+ unit addWeaponGlobal weapon
- $Code$ctrlAngle _control;$/Code$
+ $Code${
+ _x addMagazineGlobal "Laserbatteries";
+ _x addWeaponGlobal "Laserdesignator";
+ } forEach allUnits ;$/Code$
+
+ $Code${
+ if ( typeOf _x == "O_Heli_Attack_02_black_F") then {
+ _x addMagazineGlobal "38Rnd_80mm_rockets";
+ _x addWeaponGlobal "rockets_Skyfire";
+ };
+ } forEach vehicles ;$/Code$
- undefined / undefined
+ global / global
+ (July 7, 2015)
+ If you do not remove weapon first, using this command from dedicated server will duplicate weapon.
- Array
+ Nothing
+
- ctrlAutoScrollDelay
+ sideLogic
- Returns number of seconds auto-scroll will wait before scroll and/or rewind. -2 if scrollbar not present.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ The Logic side.
+ Side of Game Logics and Modules.
- https://community.bistudio.com/wiki/ctrlAutoScrollDelay
+ https://community.bistudio.com/wiki/sideLogic
- ctrlAutoScrollDelay Control
+ sideLogic
- ctrlAutoScrollDelay control
+ sideLogic
- $Code$_ctrlDelay = ctrlAutoScrollDelay _ctrlGroup;$/Code$
+ $Code$if ( side _obj == sideLogic ) then {
+ hint "It's a logic!";
+ };$/Code$
undefined / undefined
@@ -13513,159 +14244,163 @@
- Number
+ Side
+
- ctrlAutoScrollRewind
+ setCaptive
- Returns true if auto-scroll should move back to start after it reaches the end.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ Mark a unit as captive. If unit is a vehicle, commander is marked. A captive is neutral to everyone (belong to civilian side ), and will not trigger "detected by" conditions for its original side.
+ Using a number (instead of a boolean) for the status has no further effect on the engine's behavior, but can be used by captiveNum to keep track of the captivity status at a finer resolution (e.g. handcuffed, grouped, etc.). The numbered status syntax was introduced in Arma 2.
- https://community.bistudio.com/wiki/ctrlAutoScrollRewind
+ https://community.bistudio.com/wiki/setCaptive
- ctrlAutoScrollRewind Control
-
+ Object setCaptive Boolean
+
+ Object setCaptive Number
+
- ctrlAutoScrollRewind control
+ unitName setCaptive status
+
+ unitName setCaptive status
- $Code$_ctrlRewind = ctrlAutoScrollRewind _ctrlGroup;$/Code$
+ $Code$_soldier1 setCaptive true ;$/Code$
+
+ $Code$_soldier1 setCaptive 1;$/Code$
- undefined / undefined
+ local / global
+ (August 4, 2006)
+ This function does not remove unit's weapons.
+ If you make a unit captive, that unit will still fire on the enemy, but the enemy will not fire back.
+
+ (January 1, 2011)
+ If you change a unit from captive to no longer captive (for example, to "reveal" an undercover unit), enemy units that already have prior knowledge of the unit as a captive will only partially engage, making it very easy for the undercover unit. This seems to be a bug.
+ However other enemy unit the unit later encounters will engage freely with full force.
+
+ (November 19, 2017)
+ Talkingtoaj note doesn't apply to Arma 3 anymore (earlier than 1.76)
+ A captive unit will immediately be shot (after a normal "human" reaction time from the AI)
- Boolean
+ Nothing - Nothing
+
- ctrlAutoScrollSpeed
+ camSetFovRange
- Returns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ Set the zoom level ( F ield O f V iew) start and end values for automatical zooming.
+ The default zoom level is 0.7 where 0 is the nearest and 1 is the most far zoom value.
+ This command is non-functional !
- https://community.bistudio.com/wiki/ctrlAutoScrollSpeed
+ https://community.bistudio.com/wiki/camSetFovRange
- ctrlAutoScrollSpeed Control
+ Object camSetFovRange Array
- ctrlAutoScrollSpeed control
+ camera camSetFovRange fovRange
- $Code$_ctrlSpeed = ctrlAutoScrollSpeed _ctrlGroup;$/Code$
+ $Code$_cam camSetFovRange [0.1, 0.7];$/Code$
- undefined / undefined
+ local / local
- Number
+ Nothing
+
- ctrlChecked
+ forEachMemberAgent
- Returns the current state of given checkbox in checkboxes control (CT_CHECKBOXES, type = 7; ). Since Arma 3 v1.71.141591 it is possible to query multiple checkboxes by providing checkbox index. For more information see DialogControls-CheckBoxes.
- Note: The "onCheckBoxesSelChanged" control EH returns the control, index of changed checkbox and its current checked state. The checked state however is not a Boolean but Number 0 or 1. To convert ctrlChecked command output into number as well, use parseNumber command.
+ Executes the given command recursively for each agent that is a member of the given team. For just teams use forEachMemberTeam. For both teams and agents use forEachMember.
- https://community.bistudio.com/wiki/ctrlChecked
+ https://community.bistudio.com/wiki/forEachMemberAgent
- ctrlChecked Control
-
- Control ctrlChecked Number
+ Code forEachMemberAgent Team_Member
- ctrlChecked control
-
- control ctrlChecked index
+ command forEachMemberAgent team
- $Code$ctrlChecked _control;$/Code$
-
- $Code$_control ctrlChecked 3;$/Code$
-
+
undefined / undefined
- Boolean - Boolean
+ Nothing
+
- ctrlClassName
+ isLaserOn
- Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:
- $Code$_className = findDisplay 12 getVariable ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"$/Code$
+ Returns true if the vehicle has its laser turned on. Not to be confused with isIRLaserOn which is for units
- https://community.bistudio.com/wiki/ctrlClassName
+ https://community.bistudio.com/wiki/isLaserOn
- ctrlClassName Control
+ isLaserOn Object
- ctrlClassName control
+ isLaserOn vehicle
- $Code$// List class names of all controls present on display 46:
- _ctrls = "";
- for "_i" from -1 to 10000 do {
- with uiNamespace do {
- _ctrl = findDisplay 46 displayCtrl _i;
- if (! isNull _ctrl) then {
- _ctrls = _ctrls + format ["IDC: %1, Class Name: %2\n", _i, ctrlClassName _ctrl];
- };
- };
- };
- hint _ctrls;$/Code$
-
+
- undefined / undefined
+ local / global
- String
+ Boolean
+
- ctrlCommitted
+ set3DENLayer
- Check if the control animation is finished.
+ Set layer for Eden Entity.
- https://community.bistudio.com/wiki/ctrlCommitted
+ https://community.bistudio.com/wiki/set3DENLayer
- ctrlCommitted Control
+ EdenEntity set3DENLayer Number
- ctrlCommitted controlName
+ entity set3DENLayer layerID
- $Code$_done = ctrlCommitted _control$/Code$
+ $Code$_myLayer = -1 add3DENLayer "CTRG";
+ player set3DENLayer _myLayer;$/Code$
undefined / undefined
@@ -13673,248 +14408,200 @@
- Boolean
+ Boolean
+
- ctrlCommit
+ getMissionConfigValue
- Commit control animation.
+ Returns value of the given scenario attribute from the 1st tier. Since only config properties have values, the attribute should be config property. If it is not found or config class is given, the return is nil. If the attribute defined in multiple places, the command checks them in the following order:
+ External Description.ext file
+ Eden Editor scenario attribute
+ So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
- https://community.bistudio.com/wiki/ctrlCommit
+ https://community.bistudio.com/wiki/getMissionConfigValue
- Control ctrlCommit Number
+ getMissionConfigValue String
+
+ getMissionConfigValue Array
- controlName ctrlCommit time
+ getMissionConfigValue attribute
+
+ getMissionConfigValue [attribute, defaultValue]
- $Code$_control ctrlCommit 2$/Code$
+ $Code$_respawnDelay = getMissionConfigValue ["respawnDelay",0]
+ // Returns respawn delay value. Replaces the previous approach which would scan only the external Description.ext file, but ignore the value set in the Eden Editor:_respawnDelay = getNumber ( missionConfigFile "respawnDelay"); // Old approach$/Code$
undefined / undefined
- (April 11, 2015)
- Use this command if you want to for example change the position or size of a control.
- Nothing
+ Number/String/Array - Number/String/Array
+
- ctrlCreate
+ simulationEnabled
- Creates new control in given display. Some of the common controls that can be used with this command:
- RscText - simple text box
- RscTextMulti - simple multiline text box
- RscPicture - simple picture box
- RscPictureKeepAspect - picture box that doesn't stretch picture
- RscEdit - input box
- RscEditMulti - multiline input box
- RscTree - tree view control
- RscTreeSearch - searchable tree view control (see Example 4)
- RscVideo - picture control with autostart for video texture (see BIS_fnc_playVideo )
- RscVideoKeepAspect - picture control for video to keep original video aspect ratio
- NOTE : Since Arma 3 v1.69.141213 ctrlCreate will also search for control class in mission config, if search in the main config failed. This means one can now define classes in mission config and use them with ctrlCreate
+ Check if the entity has enabled simulation.
- https://community.bistudio.com/wiki/ctrlCreate
+ https://community.bistudio.com/wiki/simulationEnabled
- Display ctrlCreate Array
+ simulationEnabled Object
- display ctrlCreate [class, idc, controlsGroup]
+ simulationEnabled entity
- $Code$_display ctrlCreate ["RscText", 1234];$/Code$
-
- $Code$_map = findDisplay 46 ctrlCreate ["RscMapControl", -1];
- _multiLineText = findDisplay 46 ctrlCreate ["RscTextMulti", -1];
- _multiLineEdit = findDisplay 46 ctrlCreate ["RscEditMulti", -1];$/Code$
-
- $Code$myControl = findDisplay 0 ctrlCreate ["RscText", 1234, findDisplay 0 displayCtrl 2300];$/Code$
-
- $Code$// Create Tree View control with search. Available RscTreeSearch class is hardcoded to be used with RscEdit with idc 645. Example below demonstrates how to. After tree is generated, try typing something in the top box.
- [] spawn
- {
- disableSerialization ;
- _display = findDisplay 46 createDisplay "RscDisplayEmpty";
- _edit = _display ctrlCreate ["RscEdit", 645];
- _edit ctrlSetPosition [0,0,1,0.04];
- _edit ctrlSetBackgroundColor [0,0,0,1];
- _edit ctrlCommit 0;
- _tv = _display ctrlCreate ["RscTreeSearch", -1];
- _tv ctrlSetFont "EtelkaMonospacePro";
- _tv ctrlSetFontHeight 0.03;
- _tv ctrlSetPosition [0,0.06,1,0.94];
- _tv ctrlSetBackgroundColor [0,0,0,1];
- _tv ctrlCommit 0;
- _classes = "true" configClasses ( configFile "CfgVehicles");
- for "_i" from 0 to 5 do
- {
- _tv tvAdd [[], configName selectRandom _classes];
- for "_j" from 0 to 5 do
- {
- _tv tvAdd [[_i], configName selectRandom _classes];
- for "_k" from 0 to 5 do
- {
- _tv tvAdd [[_i, _j], configName selectRandom _classes];
- for "_n" from 0 to 5 do
- {
- _tv tvAdd [[_i, _j, _k], configName selectRandom _classes];
- };
- };
- };
- };
- };$/Code$
-
+
undefined / undefined
- (February 6, 2016)
- Although you can only dynamically create controls using BIS's configs, there are many commands to change certain aspects of each created control. See GUI Control
-
- (May 29, 2017)
- Since Arma 3 1.70 ListBoxes created thru ctrlCreate are no more encountering problems with max of 7 selections without scrolling the control.
- Control
+ Boolean
+
- ctrlDelete
+ vectorDiff
- Deletes given control.
- Returns whether the deletion was successful.
+ Subtracts one 3D vector from another. (vector1 - vector2)
- https://community.bistudio.com/wiki/ctrlDelete
+ https://community.bistudio.com/wiki/vectorDiff
- ctrlDelete Control
+ Array vectorDiff Array
- ctrlDelete control
+ vector1 vectorDiff vector2
- $Code$ctrlDelete (( findDisplay 20000) displayCtrl 20001);$/Code$
+ $Code$hint str ( velocity car vectorDiff velocity bike);$/Code$
undefined / undefined
- (April 18, 2015)
- ctrlDelete can only delete controls created with ctrlCreate. Use ctrlShow false and ctrlEnable false to disable existing controls.
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+ Result = [x1 – x2,y1 – y2,z1 – z2;]
+ $/Code$
+ It is recommended to use vectorDiff instead of BIS_fnc_vectorDiff.
- Boolean
+ Array
+
- ctrlEnabled
+ evalObjectArgument
- Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused.
- Read Dialog Control for more information about user dialogs and controls.
+ Return argument in mission editor of a given object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/ctrlEnabled
+ https://community.bistudio.com/wiki/evalObjectArgument
- ctrlEnabled Number
-
- ctrlEnabled Control
+ Control evalObjectArgument Array
- ctrlEnabled idc
-
- ctrlEnabled controlName
+ map evalObjectArgument [object, argument]
- $Code$if (!(ctrlEnabled 100)) then
- {
- ctrlEnable [100, true]
- };$/Code$
-
- $Code$_enabled = ctrlEnabled _control$/Code$
+ $Code$// returns string "[1009.0351, 1319.4928]"
+ ( findDisplay 128 displayCtrl 51) getObjectArgument ["_unit_1", "POSITION"]
+ // returns array [1009.0351, 1319.4928]
+ ( findDisplay 128 displayCtrl 51) evalObjectArgument ["_unit_1", "POSITION"]$/Code$
- local / undefined
+ undefined / undefined
- Boolean - Boolean
+ Any_Value
+
- ctrlEnable
+ clearBackpackCargoGlobal
- Enable or disable a control of the currently active user dialog. Disabled controls cannot be clicked onto.
- Read Dialog Control for more information about user dialogs and controls.
+ Removes all backpacks from the vehicle cargo space. MP synchronized.
- https://community.bistudio.com/wiki/ctrlEnable
+ https://community.bistudio.com/wiki/clearBackpackCargoGlobal
- ctrlEnable Array
-
- Control ctrlEnable Boolean
+ clearBackpackCargoGlobal Object
- ctrlEnable [idc, enable]
-
- controlName ctrlEnable enable
+ clearBackpackCargoGlobal unit
- $Code$ctrlEnable [100, false]$/Code$
-
- $Code$_ctrl ctrlEnable false$/Code$
+ $Code$clearBackpackCargoGlobal jeepOne;$/Code$
- local / local
+ global / global
- (July 20, 2017)
- Please do note that enabled controls can gain focus upon click. Therefore do not enable background controls or else they will cover any controls on top of them.
- As a general rule of thumb, enabled controls should only be already on the top of the GUI.
+ (July 6, 2017)
+ This will remove not only backpacks, but vests and uniforms as well.
- Nothing - Nothing
+ Nothing
+
- ctrlFade
+ pushBackUnique
- Returns the current fade factor of control.
+ Adds element to the back of the given array but only if it is unique to the array. The index of the added element is returned upon success, otherwise -1. This command modifies the original array.
- https://community.bistudio.com/wiki/ctrlFade
+ https://community.bistudio.com/wiki/pushBackUnique
- ctrlFade Control
+ Array pushBackUnique Anything
- ctrlFade controlName
+ array pushBackUnique element
- $Code$_scale = ctrlFade _control$/Code$
+ $Code$_arr = [1,2,3];
+ _index = _arr pushBackUnique 3;
+ hint str [_index, _arr]; //[-1,[1,2,3]]$/Code$
+
+ $Code$_arr = [1,2,3];
+ _index = _arr pushBackUnique 4;
+ hint str [_index, _arr]; //[3,[1,2,3,4]]$/Code$
undefined / undefined
@@ -13922,338 +14609,299 @@
- Number
+ Number
+
- ctrlHTMLLoaded
+ isCollisionLightOn
- Returns true when HTML content was successfully loaded.
+ Returns true if vehicle collision lights are on otherwise false.
- https://community.bistudio.com/wiki/ctrlHTMLLoaded
+ https://community.bistudio.com/wiki/isCollisionLightOn
- ctrlHTMLLoaded Control
+ isCollisionLightOn Object
- ctrlHTMLLoaded control
+ isCollisionLightOn vehicle
- $Code$_control htmlLoad "test.html";
- if (! ctrlHTMLLoaded _control) then {
- hint "Loading test.html failed!";
- };$/Code$
+ $Code$_collisionLightOn = isCollisionLightOn heli;$/Code$
- undefined / undefined
+ global / undefined
+ (April 6, 2015)
+ Bind Collision light action to UserAction 2
+ $Code$this addAction ["", {
+ _this select 1 action [
+ ["CollisionLightOn", "CollisionLightOff"] select isCollisionLightOn (_this select 0),
+ _this select 0
+ ];
+ }, "", -10, false, true, "User2", "_this == driver _target"];$/Code$
- Boolean
+ Boolean
+
- ctrlIDC
+ time
- Returns control IDC.
+ Returns time elapsed since mission started (in seconds). The value is different on each client. If you need unified time, use serverTime.
- https://community.bistudio.com/wiki/ctrlIDC
+ https://community.bistudio.com/wiki/time
- ctrlIDC Control
+ time
- ctrlIDC control
+ time
-
+ $Code$_future = time + 30;
+ waitUntil { time = _future}; /* continue after 30 seconds... */$/Code$
+
+ $Code$// Wait until mission fully started:
+ waitUntil { time 0};$/Code$
+
undefined / undefined
+ (August 4, 2006)
+ Notes from before the conversion:
+ Not to be confused with _time. Within a script, the reserved local variable _time returns the time elapsed since the script started running. Note that the value of time is not saved when the mission is saved and so will be reset to zero when a mission is restarted from a saved position. The value of _time is saved correctly and will resume from where it was.
+ _time has only special meaning in SQS scripts, in SQF script it is just another variable. -- Killzone_Kid
+
+ (January 5, 2007)
+ Notes from before the conversion:
+ time works properly in sqf called with execVM command. In an other hand, _time does not works in sqf called with execVM command.(Arma v1.02.5103GER)
+
+ (October 02, 2010)
+ On overloaded servers (below ~10 server FPS), time readings are unreliable. Seconds actually take longer. While the clients keep a steady tempo, server time lags behind, resulting in considerable offset between client and server time (easily 30 minutes for a 2 hour game). Client time is synchronised to server time during JIP, but other than that it runs independently.
+
+ (30 Oct 2013)
+ Arma 3 JIP bug:
+ As of Arma 3 v1.02, for JIP clients 'time' value will start off counting from 0, not the real 'time' value. After about 2.5sec (on average), it will then jump to a high value and synchronise with the real 'time' value, which could be 900, for example.
+ Therefore, do not use 'time' for any start of mission init timeouts; it's unreliable. (It's odd that it doesn't synchronise at the same time as public variables.)
+
+ (September 1, 2016)
+ In MP : Since per-client time and server time is unconsistant I strongly recommend execution of time-critical tasks from server-side scripts and with remoteExec or remoteExecCall ( Since only A3 1.50 alternative may be publicVariableClient with pre-defined handler) as this will eliminate any time calculation lags and make it reliable.
- Number
+ Number
+
- ctrlIDD
+ ctrlShow
- Returns display IDD.
+ Set if a control of the currently active user dialog is shown or not.
+ Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/ctrlIDD
+ https://community.bistudio.com/wiki/ctrlShow
- ctrlIDD Display
+ ctrlShow Array
+
+ Control ctrlShow Boolean
- ctrlIDD display
+ ctrlShow [idc, show]
+
+ controlName ctrlShow show
- $Code$ctrlIDD findDisplay 46; //46$/Code$
+ $Code$ctrlShow [100, false ];$/Code$
+
+ $Code$_control ctrlShow false ;$/Code$
- undefined / undefined
+ local / local
- Number
+ Nothing - Nothing
+
- ctrlMapAnimAdd
+ synchronizedTriggers
- Adds the next frame to the map animation.
+ Returns the list of triggers synchronized with a given waypoint.
- https://community.bistudio.com/wiki/ctrlMapAnimAdd
+ https://community.bistudio.com/wiki/synchronizedTriggers
- Control ctrlMapAnimAdd Array
+ synchronizedTriggers Waypoint
- map ctrlMapAnimAdd [time, zoom, position]
+ synchronizedTriggers waypoint
- $Code$_map ctrlMapAnimAdd [1, 0.1, getMarkerPos "anim1"];
- ctrlMapAnimCommit _map;$/Code$
-
- $Code$// Center map on player:
- _ctrl ctrlMapAnimAdd [0, 0.05, player ];
- ctrlMapAnimCommit _ctrl;$/Code$
-
+
- local / local
+ undefined / undefined
- (17:11, 9 March 2010)
- Besides Position2D, both Objects and Position3D work.
- Nothing
+ Array
+
- ctrlMapAnimClear
+ lockDriver
- Clears the map animation.
+ Lock the driver position of the vehicle. This command must be executed where vehicle is local.
- https://community.bistudio.com/wiki/ctrlMapAnimClear
+ https://community.bistudio.com/wiki/lockDriver
- ctrlMapAnimClear Control
+ Object lockDriver Boolean
- ctrlMapAnimClear controlName
+ vehicle lockDriver lock
-
+ $Code$vehicleName lockDriver true ;$/Code$
+
- local / local
+ local / global
- Nothing
+ Nothing
+
- ctrlMapAnimCommit
+ nearestLocation
- Plays the map animation.
+ Return the closest location of specified class to a given position. Checked range is unlimited (i.e. covers the whole map).
- https://community.bistudio.com/wiki/ctrlMapAnimCommit
+ https://community.bistudio.com/wiki/nearestLocation
- ctrlMapAnimCommit Control
+ nearestLocation Array
- ctrlMapAnimCommit controlName
+ nearestLocation [position, locationClass]
- $Code$// Center map on player:
- _ctrl ctrlMapAnimAdd [0, 0.05, player ];
- ctrlMapAnimCommit _ctrl;$/Code$
+ $Code$_nearestCity = nearestLocation [ getPos player, "nameCity"];$/Code$
+
+ $Code$_anyNearestLocation = nearestLocation [ player, ""];$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Location
+
- ctrlMapAnimDone
+ briefingName
- Checks whether the map animation has finished.
+ Returns the name of the current briefing/scenario name.
- https://community.bistudio.com/wiki/ctrlMapAnimDone
+ https://community.bistudio.com/wiki/briefingName
- ctrlMapAnimDone Control
+ briefingName
- ctrlMapAnimDone controlName
+ briefingName
-
+ $Code$_name = briefingName ;$/Code$
+
- local / local
+ undefined / undefined
- Boolean
+ String
+
- ctrlMapCursor
+ setLeader
- Changes the default cursor that appears when interacting with a map control to a custom one. Use an empty string to restore the default cursor. If the specified cursor does not exist, the default is used and no error is produced. ( NOT in case of ArmA 3. Using an empty string will result in an error: "No entry 'bin\config.bin/CfgWrapperUI/Cursors.' ). The cursor is the name of a config entry from CfgWrapperUI / Cursors. This command has the following specifics:
- When used on Main Map ( findDisplay 12 displayCtrl 51) it is possible to override multiple default cursors. For example, while leaving default "Arrow" intact, it is possible to just override "Scroll" with lets say "Wait" (Example 3)
- When used on a custom map, for example user made Mini Map, there is only one single cursor "" for everything, therefore only this cursor can be overridden (see Example 4 on how to override it)
- Some possible class names (for the whole list see ctrlMapCursor/cursors ):
- Arrow
- Track
- Move
- Scroll
- Rotate
- Track3D
- Move3D
- Rotate3D
- Raise3D
- Wait
- HC_move
- HC_overFriendly
- HC_overEnemy
- HC_overMission
- HC_unsel
- NOTE1 : Cursor names are case sensitive.
+ Set the leader of given team. Effect is local, unless both leader unit and team are local to PC on which command is executed, then effect is global.
- https://community.bistudio.com/wiki/ctrlMapCursor
+ https://community.bistudio.com/wiki/setLeader
- Control ctrlMapCursor Array
+ Team_Member setLeader Team_Member
- control ctrlMapCursor [defaultCursor, newCursor]
+ team setLeader leader
- $Code$_map ctrlMapCursor ["Track", "Arrow"];$/Code$
-
- $Code$uiNamespace setVariable ["_map", findDisplay 12 displayCtrl 51];
- ( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];$/Code$
-
- $Code$findDisplay 12 displayCtrl 51 ctrlMapCursor ["Scroll", "Wait"];$/Code$
-
- $Code$// Cycle through all available cursors over custom map:
- 0 = [] spawn
- {
- disableSerialization ;
- _map = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscMapControl", -1];
- _map ctrlSetPosition [0,0,1,1];
- _map ctrlCommit 0;
- {
- _map ctrlMapCursor ["", configName _x]; // -- the actual usage
- hint format ["Current cursor: %1", configName _x];
- sleep 1;
- }
- forEach ("true" configClasses ( configFile "CfgWrapperUI" "Cursors"));
- };$/Code$
-
+
- undefined / undefined
+ local / local
- (February 8, 2016)
- When using this command, the cursor will change for the whole display, resulting in visual glitches. Adding the onMouseMoving event handler can help solve this problem:
- $Code$
- _control ctrlAddEventHandler ["MouseMoving",{
- _this params [
- ["_mapCtrl", controlNull,[[[controlNull]]]],
- ["_xPos",-1,[0]],
- ["_yPos",-1,[0]],
- ["_mouseIn", false,[[[true]]]]
- ];
- if (_mouseIn) then {
- // Mouse is in control area
- _mapCtrl ctrlMapCursor ["","Track"];
- } else {
- // Mouse is out of control area, goes back to arrow
- _mapCtrl ctrlMapCursor ["","Arrow"];
- };
- }];
- $/Code$
- Nothing
+ Nothing
+
- ctrlMapMouseOver
+ isKeyActive
- Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.
+ Checks whether the given key is active in the current user profile.
+ See keys, keysLimit and doneKeys in the description.ext file of the missions.
- https://community.bistudio.com/wiki/ctrlMapMouseOver
+ https://community.bistudio.com/wiki/isKeyActive
- ctrlMapMouseOver Control
+ isKeyActive String
- ctrlMapMouseOver control
+ isKeyActive keyName
- $Code$( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];
- _mouseover = if ( count ( ctrlMapMouseOver (uiNamespace getVariable "_map")) 0) then
- {
- ctrlMapMouseOver ( uiNamespace getVariable "_map")
- }
- else
- {
- [""]
- };
- if (_mouseover select 0 == "task" && str (_logic getVariable "onTaskAssigned") != str {}) then
- {
- //--- Task
- ( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"];
- }
- else
- {
- //--- Waypoint
- ( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"];
- };$/Code$
-
- $Code$onEachFrame { hintSilent str ctrlMapMouseOver ( findDisplay 12 displayCtrl 51)};$/Code$
+ $Code$_ok = isKeyActive "Mission04Key"$/Code$
undefined / undefined
@@ -14261,300 +14909,346 @@
- Array
+ Boolean
+
- ctrlMapScale
+ tvCollapse
- Returns the current scale of given map control.
+ Collapses tree item pointed to by the path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/ctrlMapScale
+ https://community.bistudio.com/wiki/tvCollapse
- ctrlMapScale Control
+ tvCollapse Array
+
+ Control tvCollapse Array
- ctrlMapScale ctrl
+ tvCollapse [idc, path]
+
+ control tvCollapse path
- $Code$_control = ( findDisplay 12) displayCtrl 51; //Arma 3
- _scale = ctrlMapScale _control; //returns number from 1 to 0.001$/Code$
+ $Code$tvCollapse [101, [0]];$/Code$
+
+ $Code$_ctrl tvCollapse [0];$/Code$
- undefined / undefined
+ local / local
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Number
+ Nothing - Nothing
+
- ctrlMapScreenToWorld
+ setMarkerBrush
- Convert screen coordinates in map to world coordinates.
+ Selects the fill texture for the marker ("RECTANGLE" or "ELLIPSE"). Brush is the name of the subclass in CfgMarkerBrushes.
+ brush can be:
+ "Solid"
+ "SolidFull" (A3 only)
+ "Horizontal"
+ "Vertical"
+ "Grid"
+ "FDiagonal"
+ "BDiagonal"
+ "DiagGrid"
+ "Cross"
+ "Border"
+ "SolidBorder"
- https://community.bistudio.com/wiki/ctrlMapScreenToWorld
+ https://community.bistudio.com/wiki/setMarkerBrush
- Control ctrlMapScreenToWorld Array
+ String setMarkerBrush String
- map ctrlMapScreenToWorld [x, y]
+ markerName setMarkerBrush brush
- $Code$_WorldCoord = _Control ctrlMapScreenToWorld _ScreenCoord$/Code$
-
- $Code$_WorldCoord = _Control ctrlMapScreenToWorld [_x,_y]$/Code$
+ $Code$"Marker1" setMarkerBrush "DIAGGRID";$/Code$
- undefined / undefined
+ undefined / global
- (April 6, 2007)
- Notes:
- You can get the screen coordinates by the UI Event Handlers onMouseButtonDown, onMouseButtonUp, onMouseButtonClick, onMouseButtonDblClick.
- The return Array is in 2-D, you can use it with all set-position commands.
- _x = returnArray select 0;
- _y = returnArray select 1;
-
- (December 2, 2009)
- Notes:
- In VBS2 1.23 this command does not seem to work properly. Therefore when defining UI Event Handlers onMouseButtonClick and onMouseButtonDblClick the functions onMapSingleClick and onDoubleClick (VBS2) can be used instead, these already provide access to the world coordinates of the click event.
-
- The command parameters are screen position coordinates, which may not equate to to the map control's coordinates. A map control's screen coordinates and size can be found use the ctrlPosition command. This is an issue when using the Arma 3 in-game map, which is not fullscreen (all previous titles used full screen map controls, so map control coords did equate to screen coords).
- Array
+ Nothing
+
- ctrlMapWorldToScreen
+ AGLToASL
- Transfers a map control world position to screen coordinates.
+ Converts position from PositionAGL to PositionASL
- https://community.bistudio.com/wiki/ctrlMapWorldToScreen
+ https://community.bistudio.com/wiki/AGLToASL
- Control ctrlMapWorldToScreen Position
+ AGLToASL PositionAGL
- control ctrlMapWorldToScreen position
+ AGLToASL posAGL
- $Code$_screenCoord = _control ctrlMapWorldToScreen _worldCoord;$/Code$
+ $Code$_playerPosASL = AGLToASL ( player modelToWorld [0,0,0]);$/Code$
- $Code$_screenCoord = _control ctrlMapWorldToScreen position player ;$/Code$
+ $Code$_camPosASL = AGLToASL positionCameraToWorld [0,0,0];$/Code$
undefined / undefined
- (June 16, 2010)
- Notes:
- It returns a 2d array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.
- In other words you can make the actual world position (of an object for example), relative to your active map display.
- Array
+ PositionASL
+
- ctrlModelDirAndUp
+ triggerActivated
- Returns vectorDir and vectorUp of the model used in 3D Dialog Control.
+ Returns true if the trigger has been activated.
+ Note: The trigger could be local or remote but the result returned by this command will be for the trigger condition set up locally on the client that executed the command. See createTrigger for more info.
- https://community.bistudio.com/wiki/ctrlModelDirAndUp
+ https://community.bistudio.com/wiki/triggerActivated
- ctrlModelDirAndUp Control
+ triggerActivated Object
- ctrlModelDirAndUp control
+ triggerActivated trigger
- $Code$_vectorDirAndUp = ctrlModelDirAndUp _control3D;$/Code$
+ $Code$if ( triggerActivated trg1) then {
+ // Code
+ };$/Code$
- undefined / undefined
+ global / local
+ If trigger already activated at least once, triggerActivated will only return false if trigger is set to activate Repeatedly.
+ In other words, a trigger set to activate Once will always return true once activated at least once (even if trigger is no longer activated).
- Array
+ Boolean
+
- ctrlModelScale
+ getHideFrom
- Returns 3D control model scale
+ Returns the Position where object believes the enemy to be. If there is no direct line of sight between the object and the enemy, this position is extrapolated based on the last known position and speed of the enemy. A returned position of [0,0,0] implies that object does not knowAbout enemy. If enemy is null it is some position in front of the object or enemy position.
- https://community.bistudio.com/wiki/ctrlModelScale
+ https://community.bistudio.com/wiki/getHideFrom
- ctrlModelScale Control
+ Object getHideFrom Object
- ctrlModelScale control
+ object getHideFrom enemy
- $Code$_currentScale = ctrlModelScale _ctrl3D;$/Code$
-
+
undefined / undefined
+ (April 25, 2015)
+ This command is definatlely not broken, at least not in A3 1.42. It functions exactly as the description says it does. The reason why the Z value is elevated is because it represents the units torso. When the unit is prone and spotted, the Z value is much less. Here you can see a perfectly working example of this command Talk:getHideFrom#Operation Script Sample
- Number
+ Array
+
- ctrlModel
+ setParticleClass
- Returns model used in 3D Dialog Control.
+ Set parameters from existing config class. ClassName is name of the class from CfgCloudlets.
+ Since version 1.11.114706 you can use setParticleParams to overwrite many values set by config class, particularity those defined in ParticleArray.
- https://community.bistudio.com/wiki/ctrlModel
+ https://community.bistudio.com/wiki/setParticleClass
- ctrlModel Control
+ Object setParticleClass String
- ctrlModel control
+ source setParticleClass className
- $Code$_model = ctrlModel _control3D;$/Code$
+ $Code$_source01 = "#particlesource" createVehicleLocal _pos01;
+ _source01 setParticleClass "ObjectDestructionFire1Smallx";
+ _source01 attachTo [_object,[0,0,0]];$/Code$
undefined / undefined
+ (June 28, 2015)
+ This can be very useful for getting features that can't normally be added with commands, such as AI view blocking and particles that can only be above/underwater.
- String
+ Nothing
+
- ctrlParentControlsGroup
+ waypointAttachVehicle
- Returns the parent control of a given child control
+ Attaches a Unit to the given Waypoint.
- https://community.bistudio.com/wiki/ctrlParentControlsGroup
+ https://community.bistudio.com/wiki/waypointAttachVehicle
- ctrlParentControlsGroup Control
+ Array waypointAttachVehicle Object
- ctrlParentControlsGroup ctrl
+ waypoint waypointAttachVehicle vehicleName
- $Code$_ctrlCombo = _ctrl controlsGroupCtrl 100;//Control
- ctrlParentControlsGroup _ctrlCombo;//Parent control group (_ctrl)$/Code$
+ $Code$[_grp, 2] waypointAttachVehicle vehicle player$/Code$
+
+ $Code$[_grp, 2] waypointAttachVehicle _soldier1$/Code$
undefined / undefined
+ (June 19, 2010)
+ You can attach waypoint only to vehicle inserted from classic editor. Trying to attach it to dynamically spawned ( createUnit, createVehicle ) won't work. Engine will then try to find suitable target by itself, affecting game performance.
- Control
+ Nothing
+
- ctrlParent
+ synchronizedWaypoints
- Returns container of the given control.
+ Returns the list of waypoints synchronized with a given trigger or waypoint.
- https://community.bistudio.com/wiki/ctrlParent
+ https://community.bistudio.com/wiki/synchronizedWaypoints
- ctrlParent Control
+ synchronizedWaypoints Object/Waypoint
- ctrlParent controlName
+ synchronizedWaypoints obj
- $Code$_display = ctrlParent _control$/Code$
-
+
undefined / undefined
- Display
+ Array
+
- ctrlPosition
+ curatorCamera
- Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z].
+ Returns curator camera object.
- https://community.bistudio.com/wiki/ctrlPosition
+ https://community.bistudio.com/wiki/curatorCamera
- ctrlPosition Control
+ curatorCamera
- ctrlPosition controlName
+ curatorCamera
- $Code$_pos = ctrlPosition _control;$/Code$
-
+
undefined / undefined
- (May 22, 2017)
- If the ctrl is part of a CtrlGroup the returned position is relative to the ctrlGroups position.
- Array
+ Object
+
- ctrlRemoveAllEventHandlers
+ setRainbow
- Remove all event handlers from the given control.
+ Changes the rainbow value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
- https://community.bistudio.com/wiki/ctrlRemoveAllEventHandlers
+ https://community.bistudio.com/wiki/setRainbow
- Control ctrlRemoveAllEventHandlers String
+ Number setRainbow Number
- control ctrlRemoveAllEventHandlers handlerName
+ time setRainbow value
@@ -14562,218 +15256,266 @@
undefined / undefined
+ (April 24, 2015)
+ It should be known that this command does not create a rainbow in all conditions. As in real life, the rainbow can only appear after rainfall and opposite of the sun when it is low on the horizon.
- Nothing
+ Nothing
+
- ctrlRemoveEventHandler
+ squadParams
- Remove a given event handler from the given control.
+ Returns data about squad of given unit loaded from squad.xml.
+ All items in returned array are String.
- https://community.bistudio.com/wiki/ctrlRemoveEventHandler
+ https://community.bistudio.com/wiki/squadParams
- Control ctrlRemoveEventHandler Array
+ squadParams Object
- control ctrlRemoveEventHandler [handler name,id]
+ squadParams unit
- $Code$_map ctrlRemoveEventHandler ["Draw", _id];$/Code$
+ $Code$_info = squadParams player ;$/Code$
- undefined / undefined
+ global / undefined
+ (July 19, 2015)
+ Returns an empty array in singleplayer.
- Nothing
+ Array
+
- ctrlScale
+ engineOn
- Returns the current scale of the control.
+ Activates and deactivates the engine of a vehicle. This command has to be executed where vehicle is local.
+ NOTE: Executed on a remote vehicle this command may turn the engine on but then it will get turned off by itself after a short while.
- https://community.bistudio.com/wiki/ctrlScale
+ https://community.bistudio.com/wiki/engineOn
- ctrlScale Control
+ Object engineOn Boolean
- ctrlScale controlName
+ vehicle engineOn state
- $Code$_scale = ctrlScale _control$/Code$
+ $Code$if (! isEngineOn _jeep) then { _jeep engineOn true ; };$/Code$
+
+ $Code$waitUntil { player == driver _jeep; };
+ vehicle player engineOn true ;$/Code$
- undefined / undefined
+ local / global
+ (August 25, 2014)
+ To switch engine off can also use setFuel and fuel :
+ $Code$ private "_gas";
+ _gas = fuel heli;
+ heli setFuel 0;
+ sleep 0.01;
+ heli setFuel _gas;$/Code$
+ Also sets helicopter fuel back to original quantity. Works on every other vehicle.
- Number
+ Nothing
+
- ctrlSetActiveColor
+ lbSetPictureColorSelected
- Sets text color of given control when control is selected.
+ Sets the selected color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
- https://community.bistudio.com/wiki/ctrlSetActiveColor
+ https://community.bistudio.com/wiki/lbSetPictureColorSelected
- Control ctrlSetActiveColor Array
+ lbSetPictureColorSelected Array
+
+ Control lbSetPictureColorSelected Array
- display ctrlSetActiveColor color
+ lbSetPictureColorSelected [idc, index, color]
+
+ control lbSetPictureColorSelected [index, color]
- $Code$_control ctrlSetActiveColor [1, 0, 0, 1]$/Code$
+ $Code$lbSetPictureColorSelected [101, 0, [0, 1, 0, 0.5]];$/Code$
+
+ $Code$_ctrl lbSetPictureColorSelected [0, [1, 1, 1, 1]];$/Code$
undefined / undefined
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- ctrlSetAngle
+ actionKeysNamesArray
- Sets the rotation of an ST_PICTURE control. Rotation will be done within the control boundaries, so if the X and Y are given off center, the picture may get clipped by the control boundaries. Doesn't require ctrlCommit. Procedural textures filled controls do not rotate.
+ Returns a list of button names assigned to the given user action. You can find the action names in config class ControllerSchemes or user action names.
- https://community.bistudio.com/wiki/ctrlSetAngle
+ https://community.bistudio.com/wiki/actionKeysNamesArray
- Control ctrlSetAngle Array
+ actionKeysNamesArray String
+
+ actionKeysNamesArray Array
- control ctrlSetAngle [angle, centerX, centerY]
+ actionKeysNamesArray userAction
+
+ actionKeysNamesArray [userAction, maxKeys]
+
+ actionKeysNamesArray [userAction, maxKeys, inputDevicePriority]
- $Code$_control ctrlSetAngle [25, 0.5, 0.5];$/Code$
+ $Code$list = actionKeysNamesArray "ReloadMagazine";$/Code$
- $Code$with uiNamespace do
- {
- ctrl = findDisplay 46 ctrlCreate ["RscPictureKeepAspect", -1];
- ctrl ctrlSetPosition [0,0,1,1];
- ctrl ctrlSetText "A3\Missions_F_Exp\data\Img\lobby\ui_campaign_lobby_background_tablet_radial_left_ca.paa";
- ctrl ctrlCommit 0;
- angle = 0;
- onEachFrame
- {
- with uiNamespace do
- {
- if (angle 359) then {angle = 0};
- ctrl ctrlSetAngle [angle, 0.5, 0.5];
- angle = angle + 1;
- };
- };
- };$/Code$
+ $Code$list = actionKeysNamesArray ["ReloadMagazine", 1];$/Code$
undefined / undefined
+ (October 26, 2014)
+ inputDevicePriority 'Controler' is not a spelling mistake in description.
- Nothing
+ Array - Array
+
- ctrlSetAutoScrollDelay
+ allowCrewInImmobile
- Sets number of second before auto-scroll starts/rewinds. Setter for ctrlAutoScrollDelay.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ If true, units can be in a vehicle with broken tracks/wheels.
- https://community.bistudio.com/wiki/ctrlSetAutoScrollDelay
+ https://community.bistudio.com/wiki/allowCrewInImmobile
- Control ctrlSetAutoScrollDelay Number
+ Object allowCrewInImmobile Boolean
- control ctrlSetAutoScrollDelay delay
+ vehicle allowCrewInImmobile bool
- $Code$_ctrlGroup ctrlSetAutoScrollDelay 5;$/Code$
+ $Code$_vehicle allowCrewInImmobile true ;$/Code$
undefined / undefined
+ (April 27, 2015)
+ This will stop AI disembarking when immobile
+ $Code$KK_fnc_allowCrewInImmobile = {
+ _this allowCrewInImmobile true;
+ {
+ _x disableAI "FSM";
+ _x setBehaviour "CARELESS";
+ } forEach crew _this;
+ };
+ //example
+ car call KK_fnc_allowCrewInImmobile;$/Code$
- Nothing
+ Nothing
+
- ctrlSetAutoScrollRewind
+ fullCrew
- Defines if scroll should rewind when auto-scroll reach end. Setter for ctrlAutoScrollRewind.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.
+ NOTE that with introduction of person turrets, the cargo indexes listed in the return are true for moveInCargo command but incompatible with actions such as "GetInCargo" and "MoveToCargo". To find out seats compatible with cargo action commands, execute command with "cargo" filter:
+ $Code$ fullCrew [heli, "cargo", true ];$/Code$
+ The return array is ordered according to cargo index compatible with action cargo commands, i.e. 1st element has index 0, second - index 1, etc. For example armed WY-55 Hellcat reports:
+ [[ NULL-object,"cargo",2,[],false],[ NULL-object,"cargo",3,[],false],[ NULL-object,"cargo",4,[],false],[ NULL-object,"cargo",5,[],false]]
+ for cargo positions. The following commands will put player in the same seat:
+ $Code$ player moveInCargo [heli, 2];
+ player action ["GetInCargo", heli, 0];$/Code$
- https://community.bistudio.com/wiki/ctrlSetAutoScrollRewind
+ https://community.bistudio.com/wiki/fullCrew
- Control ctrlSetAutoScrollRewind Boolean
+ fullCrew Object
+
+ fullCrew Array
- control ctrlSetAutoScrollRewind set
+ fullCrew vehicle
+
+ fullCrew [vehicle, type, includeEmpty]
- $Code$_ctrlGroup ctrlSetAutoScrollRewind true ;$/Code$
+ $Code$_list = fullCrew vehicle player ;$/Code$
+
+ $Code$_list = fullCrew [ vehicle player, "turret"];$/Code$
- undefined / undefined
+ global / undefined
+ (December 13, 2014)
+ Be aware that the returned role may or may not be in lowercase. E.g. it's "driver" for the driver, but "Turret" for turret units.
+ As of Arma 3 version 1.36, the alternative syntax of this command returns all crew members if the filter is anything except "driver", "commander", "gunner", "turret" or "cargo"
+ The filter is not case sensitive.
- Nothing
+ Array - Array
+
- ctrlSetAutoScrollSpeed
+ priority
- Sets number of second required to scroll to next line. If speed 0, auto-scroll is disabled. Setter for ctrlAutoScrollSpeed.
- Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
+ Return the priority of the task.
- https://community.bistudio.com/wiki/ctrlSetAutoScrollSpeed
+ https://community.bistudio.com/wiki/priority
- Control ctrlSetAutoScrollSpeed Number
+ priority Task
- control ctrlSetAutoScrollSpeed speed
+ priority task
- $Code$_ctrlGroup ctrlSetAutoScrollSpeed 0.1;$/Code$
+ $Code$_prioTsk01 = priority task01$/Code$
undefined / undefined
@@ -14781,65 +15523,62 @@
- Nothing
+ Number
+
- ctrlSetBackgroundColor
+ camPrepareFovRange
- Sets background color of given control.
+ Prepares the camera field of view range for auto zooming.
+ This command is non-functional !
- https://community.bistudio.com/wiki/ctrlSetBackgroundColor
+ https://community.bistudio.com/wiki/camPrepareFovRange
- Control ctrlSetBackgroundColor Array
+ Object camPrepareFovRange Array
- control ctrlSetBackgroundColor color
+ camera camPrepareFovRange fovRange
- $Code$_control ctrlSetBackgroundColor [1, 0, 0, 1]$/Code$
+ $Code$_camera camPrepareFovRange [0.1, 0.5]$/Code$
undefined / undefined
- (May 10, 2017)
- According to https://feedback.bistudio.com/T78904
- This definetly doesn't work with RscButton's. \br
- According to ( https://resources.bisimulations.com/wiki/ctrlSetBackgroundColor ) this "Only affects Comboboxes, Static Text, Structured Text or Maps. "
- Nothing
+ Nothing
+
- ctrlSetChecked
+ onCommandModeChanged
- Sets checked state of a checkbox in checkboxes control (CT_CHECKBOXES, type = 7; ). Since Arma 3 v1.71.141591 it is possible to check checkbox with given index in multiple checkboxes set-up. For more information see DialogControls-CheckBoxes.
+ Defines code performed when hc command mode changes either because of (Left Ctrl + Space) shortcut or hcShowBar scripting command. Groups hc mode must contain at least one group for this command to work (see High Command ). Attached code receives _isHighCommand boolean.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: CommandModeChanged
- https://community.bistudio.com/wiki/ctrlSetChecked
+ https://community.bistudio.com/wiki/onCommandModeChanged
- Control ctrlSetChecked Boolean
-
- Control ctrlSetChecked Array
+ onCommandModeChanged Code/String
- control ctrlSetChecked checked
-
- control ctrlSetChecked [index, checked]
+ onCommandModeChanged code
- $Code$_control ctrlSetChecked true ;$/Code$
-
- $Code$_control ctrlSetChecked [3, true ];$/Code$
+ $Code$//Examples in-use can be found in:
+ //ca\modules\HC\data\scripts\HC_GUI.sqf
+ //A3\modules_f\HC\data\scripts\HC_GUI.sqf$/Code$
undefined / undefined
@@ -14847,159 +15586,173 @@
- Nothing - Nothing
+ Nothing
+
- ctrlSetEventHandler
+ animateBay
- Sets given event handler of given control.
- The provided function should return true/false indicating that the event has handled this event fully or not and whether the engine should execute it's default code or not afterwards.
- See User Interface Event Handlers for the full list of handler names.
- If applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.
+ Force animation of bay to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when bay state =1.
- https://community.bistudio.com/wiki/ctrlSetEventHandler
+ https://community.bistudio.com/wiki/animateBay
- Control ctrlSetEventHandler Array
+ Object animateBay Array
- controlName ctrlSetEventHandler [handlerName, function]
+ vehicle animateBay [pylon nameindex, anim phase]
- $Code$_control [[ctrlSetEventHandler]] ["KeyDown", ""]$/Code$
-
- $Code$(_display displayCtrl 108) [[ctrlSetEventHandler]] ["LBSelChanged","['ListChange',_this] call FireEvents"];$/Code$
+ $Code$( vehicle player ) animateBay ["pylonLeft1", 0.5];$/Code$
undefined / undefined
- The article User Interface Event Handlers contains a list of event handler names.
- Be aware though, that the preceding "on" in the listed names must be eliminated when used with the ctrlSetEventHandler command.
- e.g. instead of $Code$ _control ctrlSetEventHandler [" OnLBSelChanged ", ""]; // WRONG $/Code$
- use
- $Code$ _control ctrlSetEventHandler [" LBSelChanged ", ""]; // RIGHT $/Code$
- Nothing
+ Nothing
+
- ctrlSetFade
+ flagTexture
- Sets wanted transparency for control animation. Requires ctrlCommit to commit changes.
+ Returns texture of the local instance of the flag. A getter for setFlagTexture. It will not return flag textures applied using forceFlagTexture, use getForcedFlagTexture for that.
- https://community.bistudio.com/wiki/ctrlSetFade
+ https://community.bistudio.com/wiki/flagTexture
- Control ctrlSetFade Number
+ flagTexture Object
- controlName ctrlSetFade fade
+ flagTexture flagCarrier
- $Code$_control ctrlSetFade 1;
- _control ctrlCommit 5;$/Code$
+ $Code$_flagTexture = flagTexture _flag1;$/Code$
- undefined / undefined
+ global / local
- (March 10, 2015)
- This command sets the amount of fade. For example:
- $Code$
- _ctrl ctrlSetFade 1; // hides the control
- _ctrl ctrlSetFade 0.5; // control is 50% visible
- _ctrl ctrlSetFade 0; // control is fully visible
- $/Code$
- Nothing
+ String
+
- ctrlSetFocus
+ setVehicleAmmo
- Set the input focus on given control.
+ Sets how much ammunition (compared to a full state defined by the vehicle type) the vehicle has. Note that the ammo will be added only to local turrets. To check locality of turret use turretLocal.
+ The value ranges from 0 to 1.
- https://community.bistudio.com/wiki/ctrlSetFocus
+ https://community.bistudio.com/wiki/setVehicleAmmo
- ctrlSetFocus Control
+ Object setVehicleAmmo Number
- ctrlSetFocus controlName
+ vehicleName setVehicleAmmo value
- $Code$ctrlSetFocus _control$/Code$
+ $Code$player setVehicleAmmo 0;$/Code$
+
+ $Code$_vehicle setVehicleAmmo 1;$/Code$
- undefined / undefined
+ local / global
- (June 30, 2017)
- This command seems to only work on controls that accept any input from keyboard or mouse.
-
-
- Nothing
-
-
-
+ This command does not add magazines to vehicle weapons that normally start with more than one magazine. It can however, remove these magazines.
+
+ A2:OA v1.59 - Magazines of vehicle turrets are also refilled by this command.
+
+ If you 'unit/vehicle setVehicleAmmo 0;' an unit/vehicle first, you cannot refill it with 'unit/vehicle setVehicleAmmo 1;'.
+ You need to execute where the unit is local.
+ You need to execute on the effectiveCommander of a vehicle.
+
+ In ArmA 3, using this command seems correctly rearm the vehicle and its turrets in all situations (tested with beta 0.72).
+
+ In ArmA 3, when using this on a player, this command can only reduce the number of magazine in relation to the current ammo quantity of the unit. For example if player has 8 magazines, player setVehicleAmmo 0.5; will leave unit with 4 mags. Executing player setVehicleAmmo 0.5; again will leave unit with 2 mags. player setVehicleAmmo 0.5; again - 1 mag. player setVehicleAmmo 0; will remove all mags. If player had 10 mags with 30 bullets in each, player setVehicleAmmo 0.01; will leave player with loaded mag with 3 bullets in it (300 x 0.01 = 3)
+
+ (December 20, 2014)
+ This command does not operate compared to a full state defined by the vehicle type, but rather relative to a vehicle's current magazine loadout. To get the former behaviour use setVehicleAmmoDef, which utilizes the vehicles default magazine loadout (i.e. its CfgVehicles magazines[] values).
+
+
+ Nothing
+
+
+
+
- ctrlSetFontH1B
+ disableConversation
- Sets H1 bold font of given HTML control.
+ Disable the ability to talk to other people.
- https://community.bistudio.com/wiki/ctrlSetFontH1B
+ https://community.bistudio.com/wiki/disableConversation
- Control ctrlSetFontH1B String
+ Object disableConversation Boolean
- controlName ctrlSetFontH1B fontName
+ unitName disableConversation disable
- $Code$_control ctrlSetFontH1B "TahomaB"$/Code$
+ $Code$player disableConversation true$/Code$
+
+ $Code$soldier1 disableConversation true$/Code$
undefined / undefined
+ (July 10, 2009)
+ Note that this will also prevent you from using group radio.
+ If you just want player unable to speak to others (or one particular soldier),
+ use $Code$player setVariable ["BIS_noCoreConversations", true];$/Code$
+ or, for the other soldier,
+ $Code$unitName setVariable ["BIS_noCoreConversations", true];$/Code$
+
+ (August 18, 2010)
+ My previous note is incorrect now, you can use disableConversation and still use the group radio, at least in A2:OA !
- Nothing
+ Nothing
+
- ctrlSetFontH1
+ enginesTorqueRTD
- Sets H1 font of given HTML control.
+ Torque produced by engines in N·m (Newton*meter)
- https://community.bistudio.com/wiki/ctrlSetFontH1
+ https://community.bistudio.com/wiki/enginesTorqueRTD
- Control ctrlSetFontH1 String
+ enginesTorqueRTD Object
- controlName ctrlSetFontH1 fontName
+ enginesTorqueRTD RTD_helicopter
- $Code$_control ctrlSetFontH1 "TahomaB"$/Code$
+ $Code$_UH80_E1 = ( enginesTorqueRTD _UH80) select 0;//engine 1 Torque
+ _UH80_E2 = ( enginesTorqueRTD _UH80) select 1;//engine 2 Torque$/Code$
undefined / undefined
@@ -15007,195 +15760,248 @@
- Nothing
+ Array
+
- ctrlSetFontH2B
+ clientOwner
- Sets H2 bold font of given HTML control.
+ Returns the client's owner id
- https://community.bistudio.com/wiki/ctrlSetFontH2B
+ https://community.bistudio.com/wiki/clientOwner
- Control ctrlSetFontH2B String
+ clientOwner
- controlName ctrlSetFontH2B fontName
+ clientOwner
- $Code$_control ctrlSetFontH2B "TahomaB"$/Code$
+ $Code$_id = clientOwner ;$/Code$
undefined / undefined
+ (February 17, 2016)
+ On hosted server there could be some inconsistency between clientOwner, owner and object creator id, especially in missions started from save. On the dedicated server this command however works reliably.
- Nothing
+ Number
+
- ctrlSetFontH2
+ setFlagOwner
- Sets H2 font of given HTML control
+ Sets flag owner. When owner is set to objNull or any object other than a unit of class man or logic, flag is returned to the flagpole. A flag owned by a logic has no visual representation.
- https://community.bistudio.com/wiki/ctrlSetFontH2
+ https://community.bistudio.com/wiki/setFlagOwner
- Control ctrlSetFontH2 String
+ Object setFlagOwner Object
- controlName ctrlSetFontH2 fontName
+ flag setFlagOwner owner
- $Code$_control ctrlSetFontH2 "TahomaB"$/Code$
+ $Code$_flag1 setFlagOwner _soldier1;$/Code$
+
+ $Code$// To return the flag back to the flag pole:
+ //Method 1: (set owner null)
+ flag _flagCarrier setFlagOwner objNull ;
+ //Method 2: (set the flag mast as the owner)
+ flag _flagCarrier setFlagOwner flag _flagCarrier;$/Code$
- undefined / undefined
+ global / global
+ Since flags can not be owned by vehicles, use "flag setFlagOwner driver tank1" or "flag1 setFlagOwner tank1D" to assign the flag to the vehicle's driver. The second method will only work if tank1 is the name of a unit, not a variable refering to it. True for OFP&Arma
- Nothing
+ Nothing
+
- ctrlSetFontH3B
+ getGroupIcon
- Sets H3 bold font of given HTML control.
+ Get group icon properties.
- https://community.bistudio.com/wiki/ctrlSetFontH3B
+ https://community.bistudio.com/wiki/getGroupIcon
- Control ctrlSetFontH3B String
+ Group getGroupIcon Number
- controlName ctrlSetFontH3B fontName
+ group getGroupIcon ID
- $Code$_control ctrlSetFontH3B "TahomaB"$/Code$
+ $Code$_grpIconId = _group getVariable "BIS_MARTA_ICON_TYPE";
+ _grpIcon = _group getGroupIcon _grpIconId;$/Code$
- undefined / undefined
+ global / undefined
- Nothing
+ Array
+
- ctrlSetFontH3
+ playerSide
- Sets H3 font of given HTML control.
+ Returns the player's side. This is valid even when the player controlled person is dead (a difference from side player ).
- https://community.bistudio.com/wiki/ctrlSetFontH3
+ https://community.bistudio.com/wiki/playerSide
- Control ctrlSetFontH3 String
+ playerSide
- controlName ctrlSetFontH3 fontName
+ playerSide
- $Code$_control ctrlSetFontH3 "TahomaB"$/Code$
+ $Code$if ( side man1 == playerSide ) then {
+ hint "man1 is on your side!";
+ };$/Code$
+
+ $Code$switch ( playerSide ) do {
+ case west : {
+ hint "You are BLUFOR";
+ };
+ case east : {
+ hint "You are OPFOR";
+ };
+ };$/Code$
undefined / undefined
+ (27 Jan, 2008)
+ playerSide defaults to west for JIP players early on during initialization regardless of their side.
+ So if you are a JIP player on another side (like east ), you will need to cater for this for any early initializations.
+
+ (13 Oct, 2008)
+ playerSide also shows your starting side, even if your side changes to enemy due to a bad rating. In that case, playerSide != side player.
- Nothing
+ Side
+
- ctrlSetFontH4B
+ log
- Sets H4 bold font of given HTML control.
+ Base-10 logarithm of x.
- https://community.bistudio.com/wiki/ctrlSetFontH4B
+ https://community.bistudio.com/wiki/log
- Control ctrlSetFontH4B String
+ log Number
- controlName ctrlSetFontH4B fontName
+ log x
- $Code$_control ctrlSetFontH4B "TahomaB"$/Code$
+ $Code$_log = log 10; // 1$/Code$
undefined / undefined
+ (23:14, 16 Jun 2014)
+ (A3 1.20) To clarify:
+ $Code$y = 10 ^ x // x = log y$/Code$
+ People use logarithm at the purpose of simplifying multiplication via exponents plus years before.
+ $Code$23456*45634 = 1.07039e+009
+ log 23456 = 4.37025; log 45634 = 4.65929; ( log 23456) + ( log 45634) = 9.02954
+ 10^(( log 23456) + ( log 45634)) = 10 ^ 9.02954 // same as 23456*45634
+ $/Code$
+ As modern usage, for instance, to evaluate another exponent when multiple is known (Which magnitude is 4 times stronger than 8.3 earthquake?):
+ $Code$//_Unknown = log x; 8.3 = log y
+ // x = 10 ^_Unknown; y = 10 ^8.3
+ //x/y = (10 ^_Unknown)/(10 ^8.3) = log 4
+ // x/y = _Unknown – 8.3 = 0.6
+ //_result = 8.9 magnitude
+ _result = ( log 4) + 8.3
+ $/Code$
- Nothing
+ Number
+
- ctrlSetFontH4
+ isMultiplayerSolo
- Sets H4 font of given HTML control.
+ Returns true when playing a game in solo multiplayer (for example Apex coop campaign PLAY SOLO option).
- https://community.bistudio.com/wiki/ctrlSetFontH4
+ https://community.bistudio.com/wiki/isMultiplayerSolo
- Control ctrlSetFontH4 String
+ isMultiplayerSolo
- controlName ctrlSetFontH4 fontName
+ isMultiplayerSolo
- $Code$_control ctrlSetFontH4 "TahomaB"$/Code$
-
+
undefined / undefined
- Nothing
+ Boolean
+
- ctrlSetFontH5B
+ set3DENMissionAttribute
- Sets H5 bold font of given HTML control.
+ Set scenario attribute.
+ An attribute is identified by its property ( data when it's engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.
+ !
+ Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
- https://community.bistudio.com/wiki/ctrlSetFontH5B
+ https://community.bistudio.com/wiki/set3DENMissionAttribute
- Control ctrlSetFontH5B String
+ String set3DENMissionAttribute Array
- controlName ctrlSetFontH5B fontName
+ section set3DENMissionAttribute [ class, value ]
- $Code$_control ctrlSetFontH5B "TahomaB"$/Code$
+ $Code$"Multiplayer" set3DENMissionAttribute ["respawn",3];
+ // Set respawn type to 3$/Code$
undefined / undefined
@@ -15203,111 +16009,132 @@
- Nothing
+ Boolean
+
- ctrlSetFontH5
+ unlockAchievement
- Sets H5 font of given HTML control.
+ Unlock the given achievement.
- https://community.bistudio.com/wiki/ctrlSetFontH5
+ https://community.bistudio.com/wiki/unlockAchievement
- Control ctrlSetFontH5 String
+ unlockAchievement String
- controlName ctrlSetFontH5 fontName
+ unlockAchievement name
- $Code$_control ctrlSetFontH5 "TahomaB"$/Code$
-
+
undefined / undefined
+ (February 10, 2016)
+ This is an obsolete command used in the experimental Arma 2 Xbox 360 version.
+ https://forums.bistudio.com/topic/187873-unlockachievment-command/
- Nothing
+ Boolean
+
- ctrlSetFontH6B
+ formation
- Sets H6 bold font of given HTML control.
+ Returns the current formation of a group.
- https://community.bistudio.com/wiki/ctrlSetFontH6B
+ https://community.bistudio.com/wiki/formation
- Control ctrlSetFontH6B String
+ formation Object/Group
- controlName ctrlSetFontH6B fontName
+ formation grp
- $Code$_control ctrlSetFontH6B "TahomaB"$/Code$
+ $Code$formation group player$/Code$
- undefined / undefined
+ global / undefined
+ (January 9, 2007)
+ Additional ARMA Formations: "File" - Column Compact. "DIAMOND" - Delta.
- Nothing
+ String
+
- ctrlSetFontH6
+ handgunMagazine
- Sets H6 font of given HTML control.
+ Returns either single element array, containing class name of currently loaded in the handgun magazine, or an empty array if unit has no handgun or handgun is not loaded. This command is used for infantry weapons only.
- https://community.bistudio.com/wiki/ctrlSetFontH6
+ https://community.bistudio.com/wiki/handgunMagazine
- Control ctrlSetFontH6 String
+ handgunMagazine Object
- controlName ctrlSetFontH6 fontName
+ handgunMagazine unit
- $Code$_control ctrlSetFontH6 "TahomaB"$/Code$
+ $Code$hint handgunMagazine player ; //["16Rnd_9x21_Mag"]$/Code$
+
+ $Code$_array = handgunMagazine player ;
+ if ( count _array 0) then {
+ hint ("Handgun is loaded with " + (_array select 0) + "!");
+ } else {
+ if ( handgunWeapon player != "") then {
+ hint "Handgun is not loaded!";
+ } else {
+ hint "Player doesn't have a handgun!";
+ };
+ };$/Code$
- undefined / undefined
+ global / undefined
- Nothing
+ Array
+
- ctrlSetFontHeightH1
+ findNearestEnemy
- Sets H1 font size of given HTML control.
+ Finds the nearest enemy to the specified position. Returns a null object if the object's group does not know about any enemies. This command will return nearest object that is known to the unit and is considered enemy. An empty vehicle that is part of enemy group assets (see addVehicle ) can be returned as valid nearest target.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH1
+ https://community.bistudio.com/wiki/findNearestEnemy
- Control ctrlSetFontHeightH1 Number
+ Object findNearestEnemy Object/Array
- controlName ctrlSetFontHeightH1 height
+ object findNearestEnemy position
- $Code$_control ctrlSetFontHeightH1 0.05$/Code$
+ $Code$_myNearestEnemy = ( units _myGroup select 0) findNearestEnemy player ;$/Code$
+
+ $Code$_myNearestEnemy = player findNearestEnemy player ;$/Code$
undefined / undefined
@@ -15315,27 +16142,28 @@
- Nothing
+ Object
+
- ctrlSetFontHeightH2
+ showPad
- Sets H2 font size of given HTML control.
+ Shows or hides the notebook on the map screen, if enabled for the mission. (default true ). It is no longer relevant to Arma 2.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH2
+ https://community.bistudio.com/wiki/showPad
- Control ctrlSetFontHeightH2 Number
+ showPad Boolean
- controlName ctrlSetFontHeightH2 height
+ showPad show
- $Code$_control ctrlSetFontHeightH2 0.05$/Code$
+ $Code$showPad false$/Code$
undefined / undefined
@@ -15343,55 +16171,78 @@
- Nothing
+ Nothing
+
- ctrlSetFontHeightH3
+ onEachFrame
- Sets H3 font size of given HTML control.
+ Runs given statement every frame.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: EachFrame
+ In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH3
+ https://community.bistudio.com/wiki/onEachFrame
- Control ctrlSetFontHeightH3 Number
+ onEachFrame String/Code
- controlName ctrlSetFontHeightH3 height
+ onEachFrame statement
- $Code$_control ctrlSetFontHeightH3 0.05$/Code$
+ $Code$onEachFrame { hintSilent str position player }; //Hints position every frame$/Code$
+
+ $Code$// Private variables defined outside of onEachFrame scope are not inherited:
+ _myvar = "bob";
+ myvar = "bill";
+ onEachFrame { hintSilent str [_myvar, myvar]};
+ //Result: [any,"bill"]$/Code$
+
+ $Code$// Only one onEachFrame loop can exist at any time:
+ onEachFrame { player sideChat "first"};
+ onEachFrame { player sideChat "second"};
+ //Result: "second","second","second"..."second"
+ // Note how "first" never gets shown even though it precedes "second". This is because script thread is executing within the same frame and first onEachFrame is overwritten before it has a chance to execute its statement.$/Code$
+
+ $Code$// Script suspension is not permitted within onEachFrame scope:
+ onEachFrame { sleep 1};
+ //ERROR!!!$/Code$
undefined / undefined
+ (21 Dec, 2012)
+ $Code$ onEachFrame {}; //Reset event$/Code$
- Nothing
+ Nothing
+
- ctrlSetFontHeightH4
+ freeLook
- Sets H3 font size of given HTML control.
+ Returns true if freelook is active.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH4
+ https://community.bistudio.com/wiki/freeLook
- Control ctrlSetFontHeightH4 Number
+ freeLook
- controlName ctrlSetFontHeightH4 height
+ freeLook
- $Code$_control ctrlSetFontHeightH4 0.05$/Code$
+ $Code$systemChat (if freeLook then {"Quit looking around player!"} else {""});$/Code$
undefined / undefined
@@ -15399,111 +16250,123 @@
- Nothing
+ Boolean
+
- ctrlSetFontHeightH5
+ moveToCompleted
- Sets H5 font size of given HTML control.
+ Check if latest low level moveTo command is finished.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH5
+ https://community.bistudio.com/wiki/moveToCompleted
- Control ctrlSetFontHeightH5 Number
+ moveToCompleted Object
- controlName ctrlSetFontHeightH5 height
+ moveToCompleted person
- $Code$_control ctrlSetFontHeightH5 0.05$/Code$
-
+
undefined / undefined
- Nothing
+ Boolean
+
- ctrlSetFontHeightH6
+ setMarkerDir
- Sets H6 font size of given HTML control.
+ Sets the orientation of the marker. Angle is in degrees.
- https://community.bistudio.com/wiki/ctrlSetFontHeightH6
+ https://community.bistudio.com/wiki/setMarkerDir
- Control ctrlSetFontHeightH6 Number
+ String setMarkerDir Number
- controlName ctrlSetFontHeightH6 height
+ markerName setMarkerDir angle
- $Code$_control ctrlSetFontHeightH6 0.05$/Code$
+ $Code$"Marker1" setMarkerDir 90;$/Code$
- undefined / undefined
+ undefined / global
- Nothing
+ Nothing
+
- ctrlSetFontHeightSecondary
+ nearRoads
- Sets the font size of the secondary text of given control.
+ Find the road segments within the circle of given radius.
- https://community.bistudio.com/wiki/ctrlSetFontHeightSecondary
+ https://community.bistudio.com/wiki/nearRoads
- Control ctrlSetFontHeightSecondary Number
+ Object/Array nearRoads Number
- ctrl ctrlSetFontHeightSecondary value
+ pos nearRoads radius
- $Code$_control ctrlSetFontHeightSecondary 0.05;$/Code$
+ $Code$_list = player nearRoads 50;$/Code$
+
+ $Code$_list = ( position _unit) nearRoads 50;$/Code$
+
+ $Code$_list = [1800,5700] nearRoads 50;$/Code$
undefined / undefined
+ (26 Mar, 2011)
+ NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east.
+ Click below for picture.
+ [1]
- Nothing
+ Array
+
- ctrlSetFontHeight
+ isArray
- Sets the font size of given control.
+ Check if config entry represents array.
- https://community.bistudio.com/wiki/ctrlSetFontHeight
+ https://community.bistudio.com/wiki/isArray
- Control ctrlSetFontHeight Number
+ isArray Config
- controlName ctrlSetFontHeight height
+ isArray config
- $Code$_control ctrlSetFontHeight 0.05$/Code$
+ $Code$_ok = isArray (configFile "CfgVehicles")
+ // Result is false$/Code$
undefined / undefined
@@ -15511,85 +16374,91 @@
- Nothing
+ Boolean
+
- ctrlSetFontP
+ forceAddUniform
- Sets P font of given HTML control or its size.
+ Create a new uniform and hard link it into slot (without any restrictions).
- https://community.bistudio.com/wiki/ctrlSetFontP
+ https://community.bistudio.com/wiki/forceAddUniform
- Control ctrlSetFontP String/Number
+ Object forceAddUniform String
- control ctrlSetFontP fontOrSize
+ unit forceAddUniform type
- $Code$_control ctrlSetFontP "TahomaB"$/Code$
-
- $Code$_control ctrlSetFontP 0.05$/Code$
+ $Code$_unit forceAddUniform "U_B_CombatUniform_mcam";$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- ctrlSetFontPB
+ createMPCampaignDisplay
- Sets P bold font of given HTML control.
+ Create a MP campaign display. The class name must be a mission collection declared in the configs; in example, configFile /"CfgMissions"/"MPMissions"/"Apex"/
+ If the class doesn't exist or isn't a mission collection, the display will be created empty.
- https://community.bistudio.com/wiki/ctrlSetFontPB
+ https://community.bistudio.com/wiki/createMPCampaignDisplay
- Control ctrlSetFontPB String
+ Display createMPCampaignDisplay String
- controlName ctrlSetFontPB fontName
+ display createMPCampaignDisplay class
- $Code$_control ctrlSetFontPB "TahomaB"$/Code$
+ $Code$findDisplay 46 createMPCampaignDisplay "Apex";$/Code$
undefined / undefined
+ (July 14, 2016)
+ $Code$ findDisplay 46 createMPCampaignDisplay "123";$/Code$
- Nothing
+ Nothing
+
- ctrlSetFontSecondary
+ commitOverlay
- Sets the font size of the secondary text of given control.
+ Commit the current overlay.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/ctrlSetFontSecondary
+ https://community.bistudio.com/wiki/commitOverlay
- Control ctrlSetFontSecondary String
+ commitOverlay Control
- ctrl ctrlSetFontSecondary fontClass
+ commitOverlay map
- $Code$_control ctrlSetFontSecondary "TahomaB";$/Code$
+ $Code$commitOverlay _map,$/Code$
undefined / undefined
@@ -15597,69 +16466,58 @@
- Nothing
+ Nothing
+
- ctrlSetFont
+ clearMagazineCargoGlobal
- Sets the font for given control (see Fonts )
- Available Arma 3 fonts
- "EtelkaMonospacePro"
- "EtelkaMonospaceProBold"
- "EtelkaNarrowMediumPro"
- "LCD14"
- "LucidaConsoleB"
- "PuristaBold"
- "PuristaLight"
- "PuristaMedium"
- "PuristaSemibold"
- "RobotoCondensed"
- "RobotoCondensedBold"
- "RobotoCondensedLight"
- "TahomaB"
+ Removes all magazines from the vehicle cargo space. MP synchronized.
- https://community.bistudio.com/wiki/ctrlSetFont
+ https://community.bistudio.com/wiki/clearMagazineCargoGlobal
- Control ctrlSetFont String
+ clearMagazineCargoGlobal Object
- control ctrlSetFont fontName
+ clearMagazineCargoGlobal unit
- $Code$_control ctrlSetFont "TahomaB"$/Code$
+ $Code$clearMagazineCargoGlobal jeepOne;$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- ctrlSetForegroundColor
+ enableCamShake
- Sets foreground color of given control. Color is in format Color.
+ Allows camera shake effects via addCamShake. If set to false, then a currently active shake effect will stop immediately.
+ By default, shake effects are enabled, but once they have been disabled by this command, they will have to be enabled first, in order to be visible.
- https://community.bistudio.com/wiki/ctrlSetForegroundColor
+ https://community.bistudio.com/wiki/enableCamShake
- Control ctrlSetForegroundColor Array
+ enableCamShake Boolean
- control ctrlSetForegroundColor color
+ enableCamShake value
- $Code$_control ctrlSetForegroundColor [1, 0, 0, 1]$/Code$
+ $Code$enableCamShake false ;$/Code$
undefined / undefined
@@ -15667,27 +16525,29 @@
- Nothing
+ Nothing
+
- ctrlSetModel
+ vehicleCargoEnabled
- Sets model for 3D Dialog Control.
+ Check if the vehicle has enabled transporting other vehicles or not.
- https://community.bistudio.com/wiki/ctrlSetModel
+ https://community.bistudio.com/wiki/vehicleCargoEnabled
- Control ctrlSetModel String
+ vehicleCargoEnabled Object
- control ctrlSetModel model
+ vehicleCargoEnabled vehicle
- $Code$_control3D ctrlSetModel "\a3\Ui_f\objects\Compass.p3d";$/Code$
+ $Code$// Blackfish (Vehicle Transport) with given variable name blackfish
+ _canTransportVehicles = vehicleCargoEnabled blackfish; //returns true$/Code$
undefined / undefined
@@ -15695,55 +16555,56 @@
- Nothing
+ Boolean
+
- ctrlSetModelDirAndUp
+ kbReact
- Sets orientation of 3D control model. It is similar to setVectorDirAndUp command for an object.
+ Pass a non-verbal communication to the receiver. See Conversations for more details.
- https://community.bistudio.com/wiki/ctrlSetModelDirAndUp
+ https://community.bistudio.com/wiki/kbReact
- Control ctrlSetModelDirAndUp Array
+ Object kbReact Array
- control ctrlSetModelDirAndUp [dir, up]
+ person kbReact [receiver, topic, sentenceID, [argumentName, argumentValue, argumentText, argumentSpeech], ]
- $Code$_ctrl3D ctrlSetModelDirAndUp [[0,1,0],[0,0,1]]; //default orientation$/Code$
-
+
undefined / undefined
- Nothing
+ Nothing
+
- ctrlSetModelScale
+ safeZoneXAbs
- Sets 3D control model scale
+ Returns SafeZone left border (of all monitors, in case there's more than one)
- https://community.bistudio.com/wiki/ctrlSetModelScale
+ https://community.bistudio.com/wiki/safeZoneXAbs
- Control ctrlSetModelScale Number
+ safeZoneXAbs
- control ctrlSetModelScale scale
+ safeZoneXAbs
- $Code$_ctrl3D ctrlSetModelScale 1.5;$/Code$
+ $Code$_szX = safeZoneXAbs;$/Code$
undefined / undefined
@@ -15751,77 +16612,61 @@
- Nothing
+ Number
+
- ctrlSetPosition
+ setDefaultCamera
- Sets wanted position and size for 2D control animation. Width and height are optional. ctrlCommit is required to complete the operation. For 3D control, param is relative [x,y,z] and no ctrlCommit is required as it cannot be animated.
+ Sets the position and direction for the camera used after camera is set on no object (log out view when leaving MP game for example)
- https://community.bistudio.com/wiki/ctrlSetPosition
+ https://community.bistudio.com/wiki/setDefaultCamera
- Control ctrlSetPosition Array
+ setDefaultCamera Array
- controlName ctrlSetPosition [x, y]
-
- controlName ctrlSetPosition [x, y, w, h]
-
- controlName ctrlSetPosition [x, y, z]
+ setDefaultCamera [position, direction]
- $Code$// Move control:
- _control2D ctrlSetPosition [0, 0];
- _control2D ctrlCommit 0;$/Code$
-
- $Code$// Move control and resize:
- _control2D ctrlSetPosition [0, 0, 1, 1];
- _control2D ctrlCommit 0;$/Code$
+ $Code$setDefaultCamera [[5000,5000,200],[1,1,-1]];$/Code$
- $Code$_control3D ctrlSetPosition [0.5, 1, 0.5]; //centered and 1m away from screen$/Code$
+ $Code$// Lift camera 100m up above current player position and point downwards:
+ setDefaultCamera [ ATLtoASL ( player modelToWorld [0,0,100]),[0,0,-1]];$/Code$
undefined / undefined
- (January 27, 2007)
- IMPORTANT
- You have to use ctrlCommit command to apply this effect(Arma v1.02.5103GER)
-
- (May 22, 2017)
- If the target ctrl is part of a ctrlGroup, the position needs to be relative to the ctrlGroup position.
-
- (July 20, 2017)
- If the target control is a controls' group, all the child controls of that group will be moved automatically (as their position is relative to the control group rather than the display)
- Nothing
+ Nothing
+
- ctrlSetScale
+ toUpper
- Sets wanted scale for control animation. Top left corner remains same. This command requires ctrlCommit.
+ Converts the supplied string to all uppercase characters.
- https://community.bistudio.com/wiki/ctrlSetScale
+ https://community.bistudio.com/wiki/toUpper
- Control ctrlSetScale Number
+ toUpper String
- control ctrlSetScale scale
+ toUpper string
- $Code$_control ctrlSetScale 0.5;
- _control ctrlCommit 0;$/Code$
+ $Code$hint toUpper("AaBb1")
+ // returns "AABB1"$/Code$
undefined / undefined
@@ -15829,190 +16674,206 @@
- Nothing
+ String
+
- ctrlSetStructuredText
+ removeItemFromUniform
- Set the structured text which will be displayed in structured text control.
+ Removes item from soldier's uniform. Can be used with magazines and weapons too.
- https://community.bistudio.com/wiki/ctrlSetStructuredText
+ https://community.bistudio.com/wiki/removeItemFromUniform
- Control ctrlSetStructuredText Structured_Text
+ Object removeItemFromUniform String
- control ctrlSetStructuredText structuredText
+ unit removeItemFromUniform item
- $Code$_control ctrlSetStructuredText parseText "First line img image=data\isniper.paa / br / Second line"$/Code$
-
- $Code$// To center text vertically, add extra line above with blank space ( ) and set its size to adjust:
- with uiNamespace do {
- button = findDisplay 46 ctrlCreate ["RscShortcutButton", -1];
- button ctrlSetPosition [0,0,0.3,0.1];
- button ctrlCommit 0;
- button ctrlSetStructuredText parseText
- " t size='0.5' /t br/ t size='1' align='center' Button Text /t ";
- };$/Code$
-
+
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- ctrlSetTextColor
+ displaySetEventHandler
- Sets text color of given control. Color is in format Color. As of Arma 3 v1.40 this command could also be used to change fill colour or the DialogControls-ProgressBar.
+ Sets given event handler of given display.
+ The return code of the provided function should indicate whether this event was handled correctly. This implies telling the engine whether it's default code should be executed.
+ See User Interface Event Handlers for the full list of handler names.
+ If applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.
- https://community.bistudio.com/wiki/ctrlSetTextColor
+ https://community.bistudio.com/wiki/displaySetEventHandler
- Control ctrlSetTextColor Array
+ Display displaySetEventHandler Array
- display ctrlSetTextColor color
+ display displaySetEventHandler [handlerName, function]
- $Code$_control ctrlSetTextColor [1, 0, 0, 1]$/Code$
+ $Code$_control displaySetEventHandler ["KeyDown", ""]$/Code$
+
+ $Code$init.sqf
+ keyspressed = compile preprocessFile "keyspressed.sqf";
+ _display = findDisplay 46;
+ _display displaySetEventHandler ["KeyDown","_this call keyspressed"];
+ keyspressed.sqf
+ private['_handled'];
+ _handled = false;
+ switch (_this select 1) do
+ {
+ //F key
+ case 33:
+ {
+ // code here
+ _handled = true;
+ };
+ };
+ _handled;$/Code$
undefined / undefined
- (April 10, 2015)
- When used on a RscProgress control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
+ (Nov 25, 2009)
+ Always use displayAddEventHandler instead, as DSetEH overwrites other (peoples') DEH.
- Nothing
+ Nothing
+
- ctrlSetText
+ setDrawIcon
- Set the text of a control of the currently active user dialog or display. This command can be used for: static texts, buttons, edit lines and active texts as well as for images, where you can use it to set the image path.
- Read Dialog Control for more information about user dialogs and controls.
+ Set the icon to be shown in 2D editor for the specified editor object. If maintain size is false,icon will not scale depending on the scale,of the map. If maintain size is a number,the icon will maintain size,if map scale is below that number. is3D,show line and priority are,optional.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/ctrlSetText
+ https://community.bistudio.com/wiki/setDrawIcon
- ctrlSetText Array
-
- Control ctrlSetText String
+ Control setDrawIcon Array
- ctrlSetText [idc, text]
-
- controlName ctrlSetText text
+ map setDrawIcon [object,texture,color,offset,width,height,maintain size,angle,string identifier,shadow,is3D,draw line,priority]
- $Code$ctrlSetText [100, "Hello world"];//for Dialogs$/Code$
-
- $Code$_control ctrlSetText "Hello world.";// for Displays$/Code$
-
+
- local / local
+ undefined / undefined
- (16 Nov, 2011)
- For ArmA2 textured "shortcut" buttons (type = 16), you must use the alternative syntax.
-
- (October 16, 2016)
- When using ctrlSetText with picture control, the path to the texture is cached, so that if the new texture is from the same file as old one, the precious CPU cycles would not be wasted on reloading it.
- Nothing - Nothing
+ Nothing
+
- ctrlSetTooltipColorBox
+ setAperture
- Sets tooltip border color of given control. Color is in format Color.
+ Sets custom camera aperture (-1 to do it automatically).
- https://community.bistudio.com/wiki/ctrlSetTooltipColorBox
+ https://community.bistudio.com/wiki/setAperture
- Control ctrlSetTooltipColorBox Array
+ setAperture Number
- control ctrlSetTooltipColorBox color
+ setAperture aperture
- $Code$_control ctrlSetTooltipColorBox [1, 0, 0, 1];$/Code$
+ $Code$setAperture 0.3;$/Code$
- undefined / undefined
+ undefined / local
+ The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30. Setting the value to less than 20 will result in a very bright scene, suitable for night conditions. The closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor. Different lighting/weather conditions can change the actual indoor and outdoor aperture values. Experiment and test to be sure.
- Nothing
+ Nothing
+
- ctrlSetTooltipColorShade
+ menuSetPicture
- Sets tooltip background color of given control. Color is in format Color.
+ Sets new picture into menu entry on given path.
- https://community.bistudio.com/wiki/ctrlSetTooltipColorShade
+ https://community.bistudio.com/wiki/menuSetPicture
- Control ctrlSetTooltipColorShade Array
+ menuSetPicture Array
+
+ Control menuSetPicture Array
- control ctrlSetTooltipColorShade color
+ menuSetPicture [idc, path, picture]
+
+ control menuSetPicture [path, picture]
- $Code$_control ctrlSetTooltipColorShade [1, 0, 0, 1];$/Code$
-
+
undefined / undefined
- Nothing
+ Nothing - Nothing
+
- ctrlSetTooltipColorText
+ reverse
- Sets tooltip text color of given control. Color is in format Color.
+ Reverses given array by reference (modifies the original array, just like resize ).
- https://community.bistudio.com/wiki/ctrlSetTooltipColorText
+ https://community.bistudio.com/wiki/reverse
- Control ctrlSetTooltipColorText Array
+ reverse Array
- display ctrlSetTooltipColorText color
+ reverse array
- $Code$_control ctrlSetTooltipColorText [1, 0, 0, 1]$/Code$
+ $Code$_arr = [1,2,3];
+ reverse _arr;
+ hint str _arr; //[3,2,1]$/Code$
+
+ $Code$_wordArr = toArray "gateman";
+ reverse _wordArr;
+ hint toString _wordArr; //nametag$/Code$
undefined / undefined
@@ -16020,38 +16881,28 @@
- Nothing
+ Nothing
+
- ctrlSetTooltip
+ backpackSpaceFor
- Sets tooltip text of given control.
+ Returns how much space is in backpack for given weapon or magazine
- https://community.bistudio.com/wiki/ctrlSetTooltip
+ https://community.bistudio.com/wiki/backpackSpaceFor
- Control ctrlSetTooltip String
+ Object backpackSpaceFor String
- control ctrlSetTooltip text
+ backpack backpackSpaceFor weaponName
- $Code$_control ctrlSetTooltip "tooltip";$/Code$
-
- $Code$findDisplay 10000 displayCtrl 10001 ctrlSetTooltip "ThisIsAGoodTip";$/Code$
-
- $Code$with uiNamespace do
- {
- bar = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscProgress", -1];
- bar ctrlSetPosition [0,0,1,0.01];
- bar ctrlCommit 0;
- bar progressSetPosition 0.75;
- bar ctrlSetTooltip "lalalalalalalala";
- };$/Code$
+ $Code$( backpack player ) backpackSpaceFor "m16"; // [weapons, magazines]$/Code$
undefined / undefined
@@ -16059,158 +16910,173 @@
- Nothing
+ Array
+
- ctrlShown
+ switchGesture
- Returns whether given control is shown.
+ When used on a person,the given move is started immediately (there is no transition).
- https://community.bistudio.com/wiki/ctrlShown
+ https://community.bistudio.com/wiki/switchGesture
- ctrlShown Control
+ Object switchGesture String
- ctrlShown controlName
+ soldier switchGesture moveName
- $Code$_bool = ctrlShown _ctrl;$/Code$
+ $Code$soldierOne switchGesture "Wave";$/Code$
undefined / undefined
+ (August 31, 2010)
+ Rpt says "Not implemented" as of OA 1.54.
- Boolean
+ Nothing
+
- ctrlShow
+ ctrlSetFont
- Set if a control of the currently active user dialog is shown or not.
- Read Dialog Control for more information about user dialogs and controls.
+ Sets the font for given control (see Fonts )
+ Available Arma 3 fonts
+ "EtelkaMonospacePro"
+ "EtelkaMonospaceProBold"
+ "EtelkaNarrowMediumPro"
+ "LCD14"
+ "LucidaConsoleB"
+ "PuristaBold"
+ "PuristaLight"
+ "PuristaMedium"
+ "PuristaSemibold"
+ "RobotoCondensed"
+ "RobotoCondensedBold"
+ "RobotoCondensedLight"
+ "TahomaB"
- https://community.bistudio.com/wiki/ctrlShow
+ https://community.bistudio.com/wiki/ctrlSetFont
- ctrlShow Array
-
- Control ctrlShow Boolean
+ Control ctrlSetFont String
- ctrlShow [idc, show]
-
- controlName ctrlShow show
+ control ctrlSetFont fontName
- $Code$ctrlShow [100, false ];$/Code$
-
- $Code$_control ctrlShow false ;$/Code$
+ $Code$_control ctrlSetFont "TahomaB"$/Code$
- local / local
+ undefined / undefined
- Nothing - Nothing
+ Nothing
+
- ctrlTextHeight
+ isLocalized
- Returns the control text height. Supported control types are:
- CT_STATIC 0
- CT_EDIT 2 ( Since Arma 3 v1.57.135040 )
- CT_STRUCTURED_TEXT 13
+ Checks whether given string name is localized.
- https://community.bistudio.com/wiki/ctrlTextHeight
+ https://community.bistudio.com/wiki/isLocalized
- ctrlTextHeight Control
+ isLocalized String
- ctrlTextHeight control
+ isLocalized stringName
- $Code$_h = ctrlTextHeight _ctrl;$/Code$
+ $Code$if ( isLocalized "STR_DN_SNAKE") then {
+ hint localize "STR_DN_SNAKE";
+ } else {
+ hint "STR_DN_SNAKE";
+ diag_log "ToDo: STR_DN_SNAKE is not localized";
+ };$/Code$
undefined / undefined
- (May 24, 2017)
- in ArmA 3 v.1.70.141764, this command always returns 0 if the control has no width.
- Number
+ Boolean
+
- ctrlText
+ canMove
- Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path.
- Read Dialog Control for more information about user dialogs and controls.
+ Returns if the given vehicle is still able to move. This command checks only the damage value, not the amount of fuel!
- https://community.bistudio.com/wiki/ctrlText
+ https://community.bistudio.com/wiki/canMove
- ctrlText Number
-
- ctrlText Control
+ canMove Object
- ctrlText idc
-
- ctrlText controlName
+ canMove unitName
- $Code$_text = ctrlText 100$/Code$
+ $Code$// SQS :
+ ?!( canMove _tank) : player sideChat "He's nailed on the ground! Now hurry!"$/Code$
- $Code$_text = ctrlText _control$/Code$
+ $Code$if (! canMove _tank) then
+ {
+ player sideChat "He's nailed on the ground! Now hurry!";
+ };$/Code$
- local / undefined
+ global / undefined
+ (08:17, 22 Juil 2016 (UTC))
+ This command will return true for a car or a tank out of fuel, but false for an helicopter or a plane for the same condition.
- String - String
+ Boolean
+
- ctrlType
+ leaderboardsRequestUploadScore
- Returns number representing the type of control, which is also defined by type property in config. For more information see Dialog Control
+ Starts async. operation to upload score to board with given name, value always overwrite the current value in the board. The details array is optional. The board has to be initialized before the call.
- https://community.bistudio.com/wiki/ctrlType
+ https://community.bistudio.com/wiki/leaderboardsRequestUploadScore
- ctrlType Control
+ leaderboardsRequestUploadScore Array
- ctrlType control
+ leaderboardsRequestUploadScore [boardName, score, [details]]
- $Code$_type = ctrlType _rscEdit; // 2$/Code$
+ $Code$leaderboardsRequestUploadScore ["TT01", 1234, [5,6,7,8]]$/Code$
undefined / undefined
@@ -16218,166 +17084,171 @@
- Number
+ Boolean
+
- ctrlVisible
+ menuEnable
- Returns if a control of the currently active user dialog is shown or not. Read Dialog Control for more information about user dialogs and controls.
+ Enables disabled menu entry on given path.
- https://community.bistudio.com/wiki/ctrlVisible
+ https://community.bistudio.com/wiki/menuEnable
- ctrlVisible Number
+ menuEnable Array
- ctrlVisible idc
+ menuEnable [idc, path]
- $Code$_bool = ctrlVisible 100;$/Code$
-
+
- local / undefined
+ undefined / undefined
- Boolean
+ Nothing
+
- curatorAddons
+ displayRemoveAllEventHandlers
- Returns list of addons allowed to given curator.
+ Remove all event handlers from the given display.
- https://community.bistudio.com/wiki/curatorAddons
+ https://community.bistudio.com/wiki/displayRemoveAllEventHandlers
- curatorAddons Object
+ Display displayRemoveAllEventHandlers String
- curatorAddons curatorObj
+ display displayRemoveAllEventHandlers handlerName
- $Code$_addons = curatorAddons myCurator;$/Code$
-
+
undefined / undefined
- Array
+ Nothing
+
- curatorCameraAreaCeiling
+ serverName
- Returns ceiling height for curator camera.
+ Returns name of the hosting server in MP, "" in SP.
- https://community.bistudio.com/wiki/curatorCameraAreaCeiling
+ https://community.bistudio.com/wiki/serverName
- curatorCameraAreaCeiling Object
+ serverName
- curatorCameraAreaCeiling curatorObj
+ serverName
- $Code$curatorCameraAreCeiling BIS_curatorUnit;$/Code$
-
+
undefined / undefined
- Number
+ String
+
- curatorCameraArea
+ disableRemoteSensors
- Returns all curator camera areas.
+ This command will halt raycasting calculations (on the local machine only) for all groups which don't contain any local entities. If a group contains a single local entity then calculations will still be performed for the entire group.
+ These raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like knowsAbout, nearTargets and targetKnowledge will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method.
- https://community.bistudio.com/wiki/curatorCameraArea
+ https://community.bistudio.com/wiki/disableRemoteSensors
- curatorCameraArea Object
+ disableRemoteSensors Boolean
- curatorCameraArea curatorObj
+ disableRemoteSensors state
- $Code$_camArea = curatorCameraArea myCurator;$/Code$
+ $Code$disableRemoteSensors false;$/Code$
- undefined / undefined
+ undefined / local
- Array
+ Nothing
+
- curatorCamera
+ displayParent
- Returns curator camera object.
+ Returns parent display of the given display.
- https://community.bistudio.com/wiki/curatorCamera
+ https://community.bistudio.com/wiki/displayParent
- curatorCamera
+ displayParent Display
- curatorCamera
+ displayParent display
-
+ $Code$_display = displayParent findDisplay 49; // Display #46$/Code$
+
undefined / undefined
- Object
+ Display
+
- curatorCoef
+ hcShownBar
- Returns current coeficient setting.
+ Return true if the high command bar is shown/active.
- https://community.bistudio.com/wiki/curatorCoef
+ https://community.bistudio.com/wiki/hcShownBar
- Object curatorCoef String
+ hcShownBar
- curatorObj curatorCoef action
+ hcShownBar
- $Code$curatorModule curatorCoef "Place"$/Code$
+ $Code$if ( hcShownBar ) then { hint "HC bar is active";};$/Code$
undefined / undefined
@@ -16385,117 +17256,130 @@
- Number
+ Boolean
+
- curatorEditableObjects
+ camPreparePos
- Returns all editable objects which belong to a curator.
+ Prepares the camera position (format Position ).
- https://community.bistudio.com/wiki/curatorEditableObjects
+ https://community.bistudio.com/wiki/camPreparePos
- curatorEditableObjects Object
+ Object camPreparePos Array
- curatorEditableObjects curatorObj
+ camera camPreparePos position
- $Code$_objects = curatorEditableObjects myCurator;$/Code$
+ $Code$_camera camPreparePos getPos player$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- curatorEditingAreaType
+ enableRadio
- Returns type of edit areas assigned to curator (blacklist/whitelist).
+ Enable and disable radio messages to be heard and shown in the left lower corner of the screen. This command can be helpful during cutscenes.
- https://community.bistudio.com/wiki/curatorEditingAreaType
+ https://community.bistudio.com/wiki/enableRadio
- curatorEditingAreaType Object
+ enableRadio Boolean
- curatorEditingAreaType obj
+ enableRadio state
-
+ $Code$enableRadio false$/Code$
+
- undefined / undefined
+ undefined / local
+ (7 August, 2008)
+ This command doesn't disable text-chat in multiplayer.
+
+ (11 September, 2008)
+ Does not affect VON.
- Boolean
+ Nothing
+
- curatorEditingArea
+ enableEndDialog
- Returns all curator editing areas.
+ Enables the execution of a custom camera sequence after the players death, coded in the script onPlayerKilled.sqs.
- https://community.bistudio.com/wiki/curatorEditingArea
+ https://community.bistudio.com/wiki/enableEndDialog
- curatorEditingArea Object
+ enableEndDialog
- curatorEditingArea curatorObj
+ enableEndDialog
- $Code$_editingArea = curatorEditingArea myCurator;$/Code$
-
+
- undefined / undefined
+ undefined / local
- Array
+ Nothing
+
- curatorMouseOver
+ canVehicleCargo
- Returns Curator Editable Object under curator mouse pointer in form of array:
- [] - when not in curator mode
- [""] - if no curator editable object under the pointer in curator mode
- [ typeName, Curator Editable Object ] - if there is curator editable object under the pointer in curator mode
+ Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle
- https://community.bistudio.com/wiki/curatorMouseOver
+ https://community.bistudio.com/wiki/canVehicleCargo
- curatorMouseOver
+ Object canVehicleCargo Object
- curatorMouseOver
+ vehicle canVehicleCargo cargo
- $Code$_mouseOver = curatorMouseOver ;
- // possible return value:[
- "OBJECT",
- 3594ab00# 164218: apc_wheeled_01_cannon_f.p3d
- ]$/Code$
+ $Code$// Blackfish with no vehicle cargo loaded
+ _result = blackfish canVehicleCargo offroad; //[true, true]$/Code$
+
+ $Code$// Blackfish with one vehicle cargo called offroad already loaded
+ _result = blackfish canVehicleCargo offroad; //[false, false]
+
+ // Even if the Blackfish was empty offroad can't be loaded because it's already in a cargo space$/Code$
+
+ $Code$// Blackfish with one vehicle cargo called offroad already loaded
+ _result = blackfish canVehicleCargo offroad2; //[false, true]
+
+ // offroad2 can't be loaded because there isn't enough space in the Blackfish, but if there was space offroad2 could be loaded into the Blackfish$/Code$
undefined / undefined
@@ -16503,82 +17387,97 @@
- Array
+ Array
+
- curatorPoints
+ addWeaponCargoGlobal
- Returns number of points that curator have. Points can be only in range from 0 to 1.
+ Add weapons to the cargo space of vehicles, which can be taken out by infantry units.
+ MP Synchronized
- https://community.bistudio.com/wiki/curatorPoints
+ https://community.bistudio.com/wiki/addWeaponCargoGlobal
- curatorPoints Object
+ Object addWeaponCargoGlobal Array
- curatorPoints curatorObj
+ vehicleName addWeaponCargoGlobal [weaponName, count]
- $Code$_points = curatorPoints myCurator;$/Code$
+ $Code$_truck addWeaponCargoGlobal["M16",5];$/Code$
- undefined / undefined
+ global / global
+ (November 7, 2011)
+ Synchronized to JIP as well.
- Number
+ Nothing
+
- curatorRegisteredObjects
+ closeDisplay
- Returns array with all objects that has curator registered and their settings.
+ Close given display with exit code. Most common exit codes are:
+ $Code$#define IDC_OK 1 //emulate "Ok" button$/Code$
+ $Code$#define IDC_CANCEL 2 //emulate "Cancel" button$/Code$
- https://community.bistudio.com/wiki/curatorRegisteredObjects
+ https://community.bistudio.com/wiki/closeDisplay
- curatorRegisteredObjects Object
+ Display closeDisplay Number
- curatorRegisteredObjects curatorObj
+ display closeDisplay exitcode
-
+ $Code$_display closeDisplay 1;$/Code$
+
+ $Code$#define IDC_OK 1
+ _display closeDisplay IDC_OK;$/Code$
+
undefined / undefined
+ (November 18, 2015)
+ closeDisplay does not instantly close the display but does it on next display simulation cycle (when display becomes active)
- Array
+ Nothing
+
- curatorSelected
+ diag_recordTurretLimits
- Returns list of all curator selected items.
+ Start recording tool for creating turret aiming limits.
+ Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
- https://community.bistudio.com/wiki/curatorSelected
+ https://community.bistudio.com/wiki/diag_recordTurretLimits
- curatorSelected
+ diag_recordTurretLimits Boolean
- curatorSelected
+ diag_recordTurretLimits section
- $Code$selectedItems = curatorSelected ;$/Code$
+ $Code$diag_recordTurretLimits true;$/Code$
undefined / undefined
@@ -16586,54 +17485,65 @@
- Array
+ Nothing
+
- curatorWaypointCost
+ markerPos
- Return current price for placing waypoints (curator specific).
+ Get marker Position. Note: This function is identical to getMarkerPos.
- https://community.bistudio.com/wiki/curatorWaypointCost
+ https://community.bistudio.com/wiki/markerPos
- curatorWaypointCost Object
+ markerPos String
- curatorWaypointCost curatorObj
+ markerPos markerName
-
+ $Code$_mPos = markerPos "markerOne";$/Code$
+
- undefined / undefined
+ global / undefined
+ (March 17, 2014)
+ Position's Z coordinate will always be 0."
- Number
+ Array
+
- current3DENOperation
+ uniformContainer
- Returns the currently performed editing operation in Eden Editor.
+ Returns a cargo container of a unit's uniform.
- https://community.bistudio.com/wiki/current3DENOperation
+ https://community.bistudio.com/wiki/uniformContainer
- current3DENOperation
+ uniformContainer Object
- current3DENOperation
+ uniformContainer unit
- $Code$if ( current3DENOperation == "Move") then { hint "Moving";};$/Code$
+ $Code$hint str uniformContainer player ; //2df7dd00# 163941: dummyweapon.p3d$/Code$
+
+ $Code$hint str getMagazineCargo uniformContainer player ;
+ // [
+ //["30Rnd_65x39_caseless_mag"],
+ //[3]
+ //]$/Code$
undefined / undefined
@@ -16641,90 +17551,106 @@
- String
+ Object
+
- currentChannel
+ enableWeaponDisassembly
- Returns currently selected user chat channel on the UI (selected with and in MP). Correspondence between channel and number:
- 0 = Global
- 1 = Side
- 2 = Command
- 3 = Group
- 4 = Vehicle
- 5 = Direct
- 6-15 = Custom Radio (see radioChannelCreate )
+ Enables or disables disassembly of static weapons. Could be applied to local player, to another unit or to static weapon directly.
- https://community.bistudio.com/wiki/currentChannel
+ https://community.bistudio.com/wiki/enableWeaponDisassembly
- currentChannel
+ enableWeaponDisassembly Boolean
+
+ Object enableWeaponDisassembly Boolean
- currentChannel
+ enableWeaponDisassembly enable
+
+ entity enableWeaponDisassembly enable
- $Code$_selected = currentChannel ; // 3 - for example for the Group$/Code$
+ $Code$enableWeaponDisassembly false ;$/Code$
+
+ $Code$soldier1 enableWeaponDisassembly false ;$/Code$
+
+ $Code$mortar1 enableWeaponDisassembly false ;$/Code$
- undefined / undefined
+ global / global
- Number
+ Nothing - Nothing
+
- currentCommand
+ commander
- Return the current command type (empty string when no command) for the commander of given vehicle (or for a given soldier). Value returned can be one of:
- "WAIT", "ATTACK", "HIDE", "MOVE", "HEAL", "REPAIR", "REFUEL", "REARM", "SUPPORT", "JOIN", "GET IN", "FIRE", "GET OUT", "STOP", "EXPECT", "ACTION", "ATTACKFIRE",
+ In OFP it returns the commander of a vehicle. Since ArmA and VBS2 it returns the primary observer. The commander of a vehicle can be found with effectiveCommander.
- https://community.bistudio.com/wiki/currentCommand
+ https://community.bistudio.com/wiki/commander
- currentCommand Object
+ commander Object
- currentCommand vehicleName
+ commander vehicleName
-
+ $Code$moveOut commander _tank;$/Code$
+
+ $Code$// Detect if player is in commander turret of a vehicle:
+ _isVehicleCommander = player isEqualTo commander objectParent player ;$/Code$
+
- undefined / undefined
+ global / undefined
+ (August 3, 2006)
+ Notes from before the conversion:
+ It is also possible to find the commander of a vehicle by placing a C after the name of the vehicle so Tank1C and commander Tank1 both refer to the same unit, providing the original commander has not got out of the tank.
+ The difference between the two is Tank1C is always the unit that was commander of the tank when the mission started, whilst commander Tank1 is the commander which is now there.
+
+ (August 3, 2006)
+ WARNING about Hardrock note:
+ Take very care about this : if you give a vehiculeVarName to one crew, so his referent will not be Tank1x anymore ! Also, if in the mission editor, you put something in the name field, when this soldier will getin a vehicle, it will not be a Tank1x too. So do not take consideration about Hardrock note, if you don't want to have bad surprise. It Is better to force names by using setVehicleVarName command.
+ $Code$(( crew tank) select 0) setVehicleVarName "Tankcrew0"$/Code$
- String
+ Object
+
- currentMagazineDetailTurret
+ taskAlwaysVisible
- Returns the class name of currently used magazine on specified turret. Use turret path [-1] for driver's turret. Note that a turret is not loaded until unit enters it, so this command will return "".
+ Returns true if the task is flagged to be always visible or false if not.
- https://community.bistudio.com/wiki/currentMagazineDetailTurret
+ https://community.bistudio.com/wiki/taskAlwaysVisible
- Object currentMagazineDetailTurret Array
+ taskAlwaysVisible Task
- vehicle currentMagazineDetailTurret [turret path]
+ taskAlwaysVisible task
- $Code$_magazineDetail = MBT_Kuma currentMagazineDetailTurret [0];$/Code$
+ $Code$_isAlwaysVisible = taskAlwaysVisible ( currentTask player );$/Code$
undefined / undefined
@@ -16732,60 +17658,63 @@
- String
+ Boolean
+
- currentMagazineDetail
+ triggerTimeout
- Returns description of vehicle's currently loaded magazine, its ammo count (current/default) and its id.
+ Returns trigger timeout in the form [min, mid, max, interruptable].
+ Note: The trigger could be local or remote but the result returned by this command will be for the trigger condition set up locally on the client that executed the command. See createTrigger for more info.
- https://community.bistudio.com/wiki/currentMagazineDetail
+ https://community.bistudio.com/wiki/triggerTimeout
- currentMagazineDetail Object
+ triggerTimeout Object
- currentMagazineDetail vehicle
+ triggerTimeout trigger
- $Code$_currentMagazineDetail = currentMagazineDetail player ; //"6.5mm 30Rnd STANAG Mag(30/30)[id:0]"$/Code$
-
- $Code$_currentMagazineDetail = currentMagazineDetail Mi_48; //"30mm HE Shells(250/250)[id:21]"$/Code$
-
- $Code$_cmd = currentMagazineDetail player ; //"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]"
- _cmd splitString "([ ]/:)"; //["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]$/Code$
-
+
- undefined / undefined
+ global / local
- String
+ Array
+
- currentMagazineTurret
+ getFSMVariable
- Returns the name of the type of the currently using magazine on specified turret. Use turret path [-1] for driver's turret. Note that a turret is not loaded until unit enters it, so this command will return "".
+ Return the value of variable in the variable space of given FSM. The FSM handle is the number returned by the execFSM command.
- https://community.bistudio.com/wiki/currentMagazineTurret
+ https://community.bistudio.com/wiki/getFSMVariable
- Object currentMagazineTurret Array
+ Number getFSMVariable String
+
+ Number getFSMVariable Array
- vehicle currentMagazineTurret [turret path]
+ FSMhandle getFSMVariable name
+
+ FSMhandle getFSMVariable [name, defaultValue]
- $Code$_magazine = MBT_Kuma currentMagazineTurret [0];$/Code$
+ $Code$_handle getFSMVariable "_foo";$/Code$
+
+ $Code$_handle getFSMVariable ["_foo", 123];$/Code$
undefined / undefined
@@ -16793,60 +17722,61 @@
- String
+ Anything - Anything
+
- currentMagazine
+ group
- Returns class name of currently loaded vehicle's magazine.
+ Returns the group a unit is assigned to.
- https://community.bistudio.com/wiki/currentMagazine
+ https://community.bistudio.com/wiki/group
- currentMagazine Object
+ group Object
- currentMagazine vehicle
+ group object
- $Code$_magazineClass = currentMagazine player ;//Example: "30Rnd_545x39_AK"$/Code$
+ $Code$_playerGrp = group player$/Code$
- undefined / undefined
+ global / undefined
- (October 4, 2010)
- See notes of currentWeapon.
+ (August 19, 2006)
+ Few rules about group in OFP:R.
+ 1) When last man in group die or is moved to other group, group will be destroyed, and it can't be used anymore.
+ 2) 1st man joined to empty group will be group leader.
- String
+ Group
+
- currentMuzzle
+ deleteMarker
- Returns current muzzle of unit's weapon.
- This command will return 0 Number if given object is a vehicle instead of a person.
+ Destroys the given marker.
- https://community.bistudio.com/wiki/currentMuzzle
+ https://community.bistudio.com/wiki/deleteMarker
- currentMuzzle Object
+ deleteMarker String
- currentMuzzle gunner
+ deleteMarker name
- $Code$_muzzle = currentMuzzle player ;$/Code$
-
- $Code$_muzzle = currentMuzzle ( gunner ( vehicle player ));$/Code$
+ $Code$deleteMarker "Marker1"$/Code$
undefined / undefined
@@ -16854,27 +17784,28 @@
- String
+ Nothing
+
- currentNamespace
+ addWeaponPool
- Returns current global namespace the script runs in.
+ Add weapons to the weapon pool, of which the player may choose in the following mission. Available in campaigns only.
- https://community.bistudio.com/wiki/currentNamespace
+ https://community.bistudio.com/wiki/addWeaponPool
- currentNamespace
+ addWeaponPool Array
- currentNamespace
+ addWeaponPool [weaponName, count]
- $Code$if ( currentNamespace isEqualTo uiNamespace ) then { hint "This is uiNamespace"};$/Code$
+ $Code$addWeaponPool ["M16",5];$/Code$
undefined / undefined
@@ -16882,288 +17813,310 @@
- Namespace
+ Nothing
+
- currentTasks
+ getAllHitPointsDamage
- List all uncompleted tasks.
+ Returns 3 arrays for easy cross reference: 1st - array of hit point names, 2nd - array of hit selection names, 3rd - array of damage values. All values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex. Levels of damage are:
+ 0: no damage
+ 1: full damage
- https://community.bistudio.com/wiki/currentTasks
+ https://community.bistudio.com/wiki/getAllHitPointsDamage
- currentTasks Team_Member
+ getAllHitPointsDamage Object
- currentTasks member
+ getAllHitPointsDamage entity
- $Code$_playerTasks = currentTasks teamMember player$/Code$
+ $Code$getAllHitPointsDamage player ;
+ //[
+ //["HitFace","HitNeck","HitHead","HitPelvis","HitAbdomen","HitDiaphragm","HitChest","HitBody","HitArms","HitHands","HitLegs"],
+ //["","neck","head","pelvis","spine1","spine2","spine3","body","","hands","legs"],
+ //[0,0.0939002,0.0319932,0.0858595,0.174491,1,1,0.168495,1,0.5,0.195907]
+ //]$/Code$
- undefined / undefined
+ global / undefined
- Array
+ Array
+
- currentTask
+ enableGunLights
- Return current task of given person.
+ Force the AI to use gun lights
- https://community.bistudio.com/wiki/currentTask
+ https://community.bistudio.com/wiki/enableGunLights
- currentTask Object
+ Object/Group enableGunLights Boolean
- currentTask person
+ thing enableGunLights value
-
+ $Code$_grp enableGunLights true$/Code$
+
+ $Code$_unit enableGunLights true$/Code$
+
- undefined / undefined
+ local / global
+ (27 July, 2011)
+ This command can be used to force lights on, but not to force lights off. ( Source )
+
+ (17 April, 2013)
+ In order for this command to work in ARMA 3 you should use groupname enableGunLights "AUTO" or soldierOne enableGunLights "AUTO". Other options are "forceOn" or "forceOff". ( Source )
- Task
+ Nothing
+
- currentThrowable
+ initAmbientLife
- Returns currently selected throwable, which will be launched if user presses "G".
- Please note: The weapon/magazine id system is W.I.P. and may change without notice.
+ Initialize the ambient life.
- https://community.bistudio.com/wiki/currentThrowable
+ https://community.bistudio.com/wiki/initAmbientLife
- currentThrowable Object
+ initAmbientLife
- currentThrowable player
+ initAmbientLife
- $Code$currentThrowable player ; //["SmokeShellGreen","SmokeShellGreenMuzzle",[1.00002e+007,0]]$/Code$
-
- $Code$_ct = currentThrowable player ; //["HandGrenade","HandGrenadeMuzzle",[1e+007,0]]
- _id = (_ct select 2 select 0) - 10000000; //18$/Code$
-
+
undefined / undefined
- Array
+ Nothing
+
- currentVisionMode
+ format
- Returns current vision mode of unit's weapon.
- 0 - daytime
- 1 - night vision
- 2 - thermal vision
+ Composes a string containing other variables or other variable types. Converts any variable type to a string. If you want to convert a string back to a number, use parseNumber. NOTE that output of this command is limited to ~8Kb. joinString on the other hand doesn't have such limit.
- https://community.bistudio.com/wiki/currentVisionMode
+ https://community.bistudio.com/wiki/format
- currentVisionMode Object
+ format Array
- currentVisionMode unit
+ format [formatString, var1, var2]
- $Code$_currMode = currentVisionMode gunner _tank$/Code$
+ $Code$format ["Player:%1, player's side:%2", player, side player ];
+ // returns "Player:WEST 1-1-A:1 (Username), player's side:WEST"$/Code$
- $Code$if ( currentVisionMode player == 1) then
- {
- hint "nightvision active";
- };$/Code$
+ $Code$player addEventHandler ["HandleDamage", {
+ hint format ["You just sustained %1%2 damage!", ceil (( _this select 2) * 100), "%"];
+ }];
+ // hints "You just sustained 20% damage!"$/Code$
- global / undefined
+ undefined / undefined
- (April 29, 2016)
- The return value is somewhat erratic for UAVs. For example, if you are connected to a UAV, with the turret set to thermal vision and PIP feed enabled, "currentVisionMode gunner _uav" returns 2 when controlling the turret, but returns 0 after releasing control, even thought the PIP feed is still in thermal mode. WIth nightvision, it will return 1 whether or not you are controlling the turret, but if you switch from 1st to 3rd person before releasing control, then it returns 0 afterwards...
+ The maximum number of characters returned by the format command seems to depend on the total byte count. For plain ASCII strings the limit is 2048 characters.
+
+ In Arma 3 the max length of String returned by format command seems to be 8191 characters. formatText doesn't seem to have this limitation.
+
+ (March 28, 2015)
+ In addition to the note above, formatTexted strings are Structured Text, hence cannot be used like formatted strings (with most scripting commands). A workaround to get strings of type String with more than 8191 characters is: $Code$ str formatText ["%1", _string]$/Code$
+
+ (January 2, 2016)
+ In addition to the note above, you may consider using joinString instead of format or formatText workaround. joinString is a fraction faster than format and it has no limit on the length of the string (apart from global String limit obviously)
- Number
+ String
+
- currentWaypoint
+ editObject
- Return the index of the current waypoint.
- To determine the validity of the index, compare it to the waypoints count.
- If all waypoints are 'completed', then the index is 1 greater than the last valid index.
- If there are no waypoints, then the index is 0.
- By default, a group has 1 waypoint at their starting position, which is considered completed and so the currentWaypoint is 1.
+ Show the edit object dialog for the given object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/currentWaypoint
+ https://community.bistudio.com/wiki/editObject
- currentWaypoint Group
+ Control editObject String
- currentWaypoint groupName
+ map editObject object
- $Code$_index = currentWaypoint group player ;$/Code$
-
+
undefined / undefined
- Number
+ Any_Value
+
- currentWeaponMode
+ addBackpack
- Returns current weapon mode of unit's weapon. Result can be: "Single", "Burst", "FullAuto", "manual", "player"
- This command will return 0 Number if given object is a vehicle instead of a person.
+ Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit.
+ Classname list of available backpacks :
+ Arma 2 OA backpacks
+ Arma 3 backpacks - objects starting with "B_", starts with " B_AssaultPack_khk "
- https://community.bistudio.com/wiki/currentWeaponMode
+ https://community.bistudio.com/wiki/addBackpack
- currentWeaponMode Object
+ Object addBackpack String
- currentWeaponMode gunner
+ unit addBackpack packClassName
- $Code$_weaponMode = currentWeaponMode player ;$/Code$
+ $Code$this addBackpack "TK_RPG_Backpack_EP1";$/Code$
- $Code$_weaponMode = currentWeaponMode gunner vehicle player ;$/Code$
+ $Code$_mySoldierDude addBackpack "US_Patrol_Pack_EP1";$/Code$
- undefined / undefined
+ local / global
- (September 27, 2014)
- - Be careful using this in script. This function returns these strings but also:
- - 0 if unit is in a vehicle (pax),
- - absolutely nothing if AH-99 helo driver or all weapons removed,
- - "truckhorn2" if Hunter driver...
- Absolutely nothing means: if you use a hint to display the returned value, you obtain absolutely no text,no black box, no error! Hint isn't displayed and there is no error in rpt file with compile preprocessFileLineNumbers.
- On the other hand, returned value 0 when unit is pax of a vehicle, could lead to a variable error type if your script is waiting for a string.
- String
+ Nothing
+
- currentWeaponTurret
+ playMusic
- Returns the name of the currently selected weapon on specified turret. Use turret path [-1] for driver's turret.
+ Plays music defined in Description.ext#CfgMusic or config.cpp. To stop the music execute playMusic "" or give the start time which is beyond the music duration playMusic ["SomeMusic", 1000];
+ For Arma 3 music, see Arma 3 CfgMusic. Since Arma 3 v1.67 one can use Jukebox Utility to preview in-game music.
- https://community.bistudio.com/wiki/currentWeaponTurret
+ https://community.bistudio.com/wiki/playMusic
- Object currentWeaponTurret Array
+ playMusic String
+
+ playMusic Array
- vehicle currentWeaponTurret [turret path]
+ playMusic name
+
+ playMusic [name, start]
- $Code$_weapon = MBT_Kuma currentWeaponTurret [0];$/Code$
+ $Code$playMusic "RadioAmbient1";$/Code$
+
+ $Code$playMusic ["RadioAmbient3", 3]; //start from 00:00:03$/Code$
+
+ $Code$// Play from 00:00:01 to 00:00:05
+ 0 = [] spawn {
+ playMusic ["RadioAmbient5", 1];
+ sleep 4;
+ playMusic "";
+ };$/Code$
- undefined / undefined
+ undefined / local
+ You can get all Music Types from Arma:_cfgMusic
+ http://community.bistudio.com/wiki/Arma_2:_Music#top
- String
+ Nothing - Nothing
+
- currentWeapon
+ setWaypointPosition
- Return the name of the currently selected weapon (on the primary turret for vehicles).
+ Moves the waypoint to a random position in a circle with the given center and radius.
- https://community.bistudio.com/wiki/currentWeapon
+ https://community.bistudio.com/wiki/setWaypointPosition
- currentWeapon Object
+ Array setWaypointPosition Array
- currentWeapon vehicle
+ waypoint setWaypointPosition [center, radius]
- $Code$_weaponClass = currentWeapon (vehicle player);//Example: "M16A2GL"$/Code$
-
- $Code$_weaponClass = currentWeapon player;$/Code$
+ $Code$[_grp, 2] setWaypointPosition [ position player, 0];$/Code$
undefined / undefined
- (July 15, 2009)
- You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string.
-
- (July 15, 2009)
- It seems it's not working in 1.02 for other unit than player.
-
- (May 4, 2010)
- This works for vehicles providing there is a gunner
- String
+ Nothing
+
- currentZeroing
+ actionName
- Returns zeroing of unit's weapon.
+ Returns localized name of action.
- https://community.bistudio.com/wiki/currentZeroing
+ https://community.bistudio.com/wiki/actionName
- currentZeroing Object
+ actionName String
- currentZeroing gunner
+ actionName action
- $Code$_zeroing = currentZeroing player ;$/Code$
+ $Code$actionName "ReloadMagazine"$/Code$
undefined / undefined
@@ -17171,402 +18124,299 @@
- Number
+ String
+
- cursorObject
+ ctSetData
- Returns the object under cursor. This command is quite different from cursorTarget as it is more precise in determining the boundaries of the pointed at object and can detect a larger variety of objects including map objects and trees.
+ Associates metadata (string) with the row determined by the index. Returns Nothing.
- https://community.bistudio.com/wiki/cursorObject
+ https://community.bistudio.com/wiki/ctSetData
- cursorObject
+ Control ctSetData Array
- cursorObject
+ ctrl ctSetData [index, data]
- $Code$hint str [ getModelInfo cursorObject, typeOf cursorObject ];$/Code$
+ $Code$_control ctSetData [0, "Test"];$/Code$
- undefined / undefined
+ local / local
- (March 23, 2015)
- If you point at the primary weapon of an infantry unit, cursorObject will return the p3d of the weapon instead of the unit itself (B Alpha 1-2:1.. or its variable name ). That doesn't occur for anything else (backpack or headgear).
- Object
+ Nothing
+
- cursorTarget
+ hideBody
- Returns the target pointed at by the player (usually with cross-hairs). The target has to be known to the player to some degree ( knowsAbout 0). If target is completely unknown, command returns objNull.
- A valid target could belong to an enemy or a friendly side. Buildings are normally known to player and so are valid targets. Try nearTargets to see what else is considered a target. While friendly targets are usually known to the player, enemy targets can be totally unknown, especially if "auto-spotting" (or sometimes called "auto-reporting") is switched off. To check if auto-spotting is enabled: difficultyEnabled "autospot"
- cursorTarget also returns locked target for the duration of the lock even if there is another target under the cursor. As soon as missile is fired, cursorTarget switches to current known target under cursor or objNull. Targeting (currently "T" in Arma 3) works regardless of the state of "auto-spotting".
- Adding a target to the known list could be done with reveal command. When auto-spotting is enabled, zooming on the enemy target with cross-hairs usually reveals the target. As friendly targets are always known, zooming on friendly target could improve knowsAbout value.
- Side relations can also influence target knowledge. For example east target is unknown target for civilian, but making them friends with setFriend instantly improves civilian knowledge of the east.
+ Hides dead body of the given unit. After a short delay, the body slowly sinks into the ground. After awhile, when group of the unit becomes grpNull, the body gets deleted and becomes objNull. If applied to alive unit, nothing happens until unit dies, then the unit's body gets hidden. If a dead unit is human player, the body is hidden but not deleted until player respawns.
- https://community.bistudio.com/wiki/cursorTarget
+ https://community.bistudio.com/wiki/hideBody
- cursorTarget
+ hideBody Object
- cursorTarget
+ hideBody unit
- $Code$alive cursorTarget ;$/Code$
+ $Code$hideBody player1;$/Code$
- undefined / undefined
+ local / global
- (01:25, 18 February 2011 (CET))
- If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it's in sight or not.
-
- (11 March 2011)
- Addition to Myke's note:
- It also works for infantry with launchers that canLock, like Javelin or AA.
- Only the lock cursor must be visible on the target - not a full lock necessarily.
-
- (13:09, 11 July 2009 (CEST))
- Player must knows about what he is pointing to for this command to return something other than NULL-OBJECT
- This command doesn't work through building windows
- This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things
-
- (22:11, 23 August 2013 (CEST))
- To add to Lou Montana's note, use reveal command on the object you want to be detected with cursorTarget when pointing at it. Without it, distant units are most likely to return objNull even if you shoot and hit them. Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: $Code${ player reveal _x} forEach allUnits ;$/Code$
-
- (December 3, 2014)
- cursorTarget seems to change when your cursor enters an object's boundingBox. Because of this, if the player is inside the boundingBox, the object will always be the current cursorTarget if the player is not looking at another object, although sometimes the object will remain the cursorTarget even if the player does.
-
- (April 21, 2015)
- Cursortarget will not return enemy units, even very close, if "autoreport" is disabled in game difficulty settings, and if player is alone.
- However, when enemy units open fire on player, the cursortarget becomes functional on these units. If player is in a group, cursortarget is also functional (report by other units).
-
- (February 5, 2016)
- CursorTarget will return a Null_Object for all of thus which have a disabled simulation (_object enableSimulation false).
- Object
+ Nothing
+
- customChat
+ rainbow
- Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with radioChannelCreate command.
+ Returns the current rainbow intensity.
- https://community.bistudio.com/wiki/customChat
+ https://community.bistudio.com/wiki/rainbow
- Object customChat Array
+ rainbow
- unit customChat [channel, message]
+ rainbow
- $Code$_unit customChat [1, "Hi, I am a custom chat message"];$/Code$
-
- $Code$driver vehicle player sideChat "sideChat";
- driver vehicle player globalChat "globalChat";
- driver vehicle player groupChat "groupChat";
- vehicle player vehicleChat "vehicleChat";
- driver vehicle player commandChat "commandChat";
- driver vehicle player customChat [1, "customChat"];
- systemChat "systemChat";$/Code$
-
+
- global / local
+ undefined / undefined
- Nothing
+ Number
+
- customRadio
+ setName
- Sends the message to the custom radio channel. The message is defined in the description.ext file or radio protocol.
+ Sets the name of a location or a person. In Arma 3 this can be used to set name of a person but only in single player.
- https://community.bistudio.com/wiki/customRadio
+ https://community.bistudio.com/wiki/setName
- Object customRadio Array
+ Object setName String
+
+ Object setName Array
+
+ Location setName String
- unit customRadio [channel, message]
+ object setName name
+
+ unit setName [name, firstName, lastName]
+
+ location setName name
- $Code$_soldierOne customRadio [1, "WordEnemy"];$/Code$
+ $Code$myLocation setName "My Location Name";$/Code$
+
+ $Code$player setName "New Name";$/Code$
+
+ $Code$player setName ["Ben Kerry","Ben","Kerry"];$/Code$
- global / local
+ undefined / local
- (December 3, 2016)
- To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
- $Code$ player customRadio [1, "#MySound.ogg"];$/Code$
+ (July 9, 2010)
+ Appears to be only for the 3d editor.
+
+ (September 19, 2013)
+ Support of a person as the first parameter from Arma 3 v. 1.02.
+
+ (April 12, 2014)
+ Seems to have no effect on players in Multiplayer. (ArmA 3 v1.00)
+
+ (August 18, 2014)
+ Only last name will appear in command bar i.e. this setname _mynameArray will display _mynameArray select 2. If setname is used with a string : this setname "blah", nothing occurs in command bar and default randomized name is displayed.
+ Dealing with the units' names in a script, _x (in a foreach units group, for example) will return the "object" as B ALFA 4-1:2 or the name written in ai unit name field in editor (if exists). This context is rather a "variable name" for each object (ai) than an "identity name" as given via setname function.
- Nothing
+ Nothing - Nothing - Nothing
+
- cutFadeOut
+ setDirection
- Terminates the effect in the given layer by fading it out according to the given duration. If named layer used and it doesn't exist, it will be allocated.
- For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
+ Set's the orientation of a location. It's area and map icon (if it's type uses an icon) will be rotated to this orientation.
- https://community.bistudio.com/wiki/cutFadeOut
+ https://community.bistudio.com/wiki/setDirection
- Number cutFadeOut Number
-
- String cutFadeOut Number
+ Location setDirection Number
- layer cutFadeOut duration
-
- layerName cutFadeOut duration
+ location setDirection direction
- $Code$0 cutFadeOut 2;$/Code$
-
- $Code$_layer = "layer1" cutFadeOut 2;$/Code$
+ $Code$location1 = createLocation ["VegetationPalm", getPos player, 200, 200];
+ location1 setText "Benargee's Palm Tree";
+ location1 setDirection 45;$/Code$
undefined / undefined
- (July 9, 2016)
- (ArmA v1.60)
- The actual fadeout-duration can be dependent on the duration for the fadein (e.g. specified by cutText ). If the fadein-duration is set to a value less than 1 the fadeout-duration will be the given number multiplied by the fadein-duration.
- "test" cutText ["", "BLACK", 0.5, true]; // fadein is 0
- "test" cutFadeout 2; // The actual fadeout-time is 2 * 0.5 = 1
- Nothing - Number
+ Nothing
+
- cutObj
+ deleteTeam
- Displays an object defined in the global config in CfgTitles.
- For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
+ Destroy given team.
- https://community.bistudio.com/wiki/cutObj
+ https://community.bistudio.com/wiki/deleteTeam
- cutObj Array
-
- Number cutObj Array
-
- String cutObj Array
+ deleteTeam Team_Member
- cutObj [class, type, speed, showInMap]
-
- layer cutObj [class, type, speed, showInMap]
-
- layerName cutObj [class, type, speed, showInMap]
+ deleteTeam team
- $Code$cutObj ["TVSet", "PLAIN"];
- cutObj ["TVSet", "PLAIN", 2]$/Code$
-
- $Code$2 cutObj ["Sphere", "PLAIN"];$/Code$
-
- $Code$_layer = "layer1" cutObj ["BISLogo", "PLAIN"];$/Code$
+ $Code$deleteTeam _team;$/Code$
- undefined / local
+ undefined / undefined
- Nothing - Nothing - Number
+ Nothing
+
- cutRsc
+ exportJIPMessages
- Display a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.
- For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
+ Export list of JIP to a file. Special: BattlEye's RCON variant of this command is #exportJIPqueue (see also Multiplayer_Server_Commands )
- https://community.bistudio.com/wiki/cutRsc
+ https://community.bistudio.com/wiki/exportJIPMessages
- cutRsc Array
-
- Number cutRsc Array
-
- String cutRsc Array
+ exportJIPMessages String
- cutRsc [class, type, speed, showInMap]
-
- layer cutRsc [class, type, speed, showInMap]
-
- layerName cutRsc [class, type, speed, showInMap]
+ exportJIPMessages fileName
- $Code$cutRsc ["binocular", "PLAIN"];
- cutRsc ["binocular", "PLAIN", 2];
- cutRsc ["binocular", "PLAIN", 2, false ];$/Code$
-
- $Code$2 cutRsc ["binocular", "PLAIN", 2];$/Code$
-
- $Code$_layer = "layer1" cutRsc ["binocular", "PLAIN", 2];$/Code$
-
- $Code$// Create IGUI display:
- "someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
- _display = uiNamespace getVariable "RscTitleDisplayEmpty";$/Code$
+ $Code$exportJIPMessages "myFileNameWithoutExtension";$/Code$
- undefined / local
+ undefined / undefined
- (30 Jun, 2008)
- Using cutRsc (instead of titleRsc ) for a HUD has the benefits of:
- having the HUD automatically hide itself when you access the map and redisplay itself after closing the map.
- using the 'Direct communication' chat channel messages will not interfere with the HUD by hiding it.
-
- (17 Oct, 2013)
- Regarding removing current resource with cutRsc ["Default", "PLAIN"]. If it does't work and it gives you error message that "Default" is not found, add it by yourself to RscTitles in description.ext so it looks like this:
- class RscTitles
- {
- class Default
- {
- idd = - 1 ;
- fadein = 0 ;
- fadeout = 0 ;
- duration = 0 ;
- } ;
- } ;
- Alternatively, you can use cutText, yes cutText command to cancel your resources. As Karel Moricky explains: "All 'cut' commands are in the same layer, the same as all 'title' commands are in another one." So to remove cutRsc resource execute cutText on the same layer:
- $Code$ cutRsc ["myRsc", "PLAIN"]; //show
- cutText ["", "PLAIN"]; //remove$/Code$
- $Code$10 cutRsc ["myRsc", "PLAIN"]; //show
- 10 cutText ["", "PLAIN"]; //remove$/Code$
- Also if you use layers would be a good idea to register them with BIS_fnc_rscLayer to avoid possible clashes with other layers:
- $Code$("myLayerName" call BIS_fnc_rscLayer ) cutRsc ["myRsc","PLAIN"]; //show
- ("myLayerName" call BIS_fnc_rscLayer ) cutText ["","PLAIN"]; //remove$/Code$
- You can also immediately remove resource with cutFadeOut command: $Code$123 cutFadeOut 0;$/Code$
- Nothing - Nothing - Number
+ Nothing
+
- cutText
+ showGPS
- Displays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters: cutText ["line1\nline2\nline3", "PLAIN"];. Since Arma 3 v1.73.142260 this command supports Structured Text formatting.
- For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
+ Shows or hides the GPS receiver on the map screen, if enabled for the mission and you possess the item. (default false )
- https://community.bistudio.com/wiki/cutText
+ https://community.bistudio.com/wiki/showGPS
- cutText Array
-
- Number cutText Array
-
- String cutText Array
+ showGPS Boolean
- cutText [text, type, speed, showInMap, isStructuredText]
-
- layer cutText [text, type, speed, showInMap, isStructuredText]
-
- layerName cutText [text, type, speed, showInMap, isStructuredText]
+ showGPS show
- $Code$cutText ["","BLACK OUT"];
- cutText ["Hello World!","PLAIN",2];$/Code$
-
- $Code$2 cutText ["Hello World!","PLAIN",2];$/Code$
-
- $Code$_layer1 = "normal" cutText ["In The Centre","PLAIN"];
- _layer2 = "down" cutText ["At The Bottom","PLAIN DOWN"];$/Code$
-
- $Code$// Since Arma 3 v1.73.142260:
- cutText [" t color='#ff0000' size='5' RED ALERT! /t br/ ***********", "PLAIN", -1, true, true ];$/Code$
+ $Code$showGPS true ;$/Code$
- undefined / local
+ undefined / undefined
- (September 20, 2013)
- In Arma 3 "PLAIN" param will display your text where the crosshair is, "PLAIN DOWN" will push the text further down, closer to the bottom of the screen.
+ (16 Aug, 2009)
+ In Arma 2, the GPS is now an inventory item. Class path is CfgWeapons- ItemGPS. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon "ItemGPS")
- (July 6, 2016)
- The value for speed has to be greater 0. If 0 is used as speed the default value (1) will be used.
- If you want to create an "instant" effect you can use a really small value (e.g. 0.001)
+ (14 Jun, 2010)
+ In Arma 2 GPS is also an item, so will not be removed by removeAllWeapons, even though it can be removed by removeWeapon and added by addWeapon. To remove all items use the removeAllItems command (though this will also remove basic items such as map and compass).
- Nothing - Nothing - Number
+ Nothing
+
- damage
+ ctrlSetTooltipColorBox
- Return the damage value of an object.
+ Sets tooltip border color of given control. Color is in format Color.
- https://community.bistudio.com/wiki/damage
+ https://community.bistudio.com/wiki/ctrlSetTooltipColorBox
- damage Object
+ Control ctrlSetTooltipColorBox Array
- damage object
+ control ctrlSetTooltipColorBox color
- $Code$? (( damage player ) 0.1) : player groupChat "I'm hurt! Medic!"$/Code$
-
- $Code$if (( damage player ) 0.1) then {
- player groupChat "I'm hurt! Medic!";
- };$/Code$
+ $Code$_control ctrlSetTooltipColorBox [1, 0, 0, 1];$/Code$
- global / undefined
+ undefined / undefined
- (February 13, 2015)
- The returned value depends on the couple target/ammo fired. This value has no correlation with the sum of all hitpoints damage status and the effective status of the object. Firing bullets on cars often lead to weird results. For example: damage returns zero while a Hunter is fired at will with an.50 HMG! Hunter can be almost destroyed with zero damage for this function. If you script, use instead the getHitPointDamage function.
- Number
+ Nothing
+
@@ -17614,101 +18464,57 @@
- Number
-
-
-
-
- date
-
-
- Return the actual mission date and time as an array [ year, month, day, hour, minute ]$/Code$. Month is a full number between 1 and 12, day is between 1 and 31, hour is between 0 and 23 and minute is between 0 and 59.
-
-
- https://community.bistudio.com/wiki/date
-
-
- date
-
-
- date
-
-
- $Code$_now = date ; // _now = [2014,10,30,2,30] (Oct. 30th, 2:30am)
- _hour = _now select 3;
- _min = _now select 4;$/Code$
-
- $Code$if ( date select 3 = 19) then { // 7pm
- hintSilent "ah, Arma sunset"; //...cue bad guys
- };$/Code$
-
-
- undefined / undefined
-
-
-
-
- Array
+ Number
+
- daytime
+ setPylonsPriority
- Returns the current ingame time in hours.
+ Overrides default pylons priorities
- https://community.bistudio.com/wiki/daytime
+ https://community.bistudio.com/wiki/setPylonsPriority
- daytime
+ Object setPylonsPriority Array
- daytime
+ vehicle setPylonsPriority [priority pylon1, priority pylon2,]
- $Code$; assumme it is 16:30
- _daytime = daytime
- returns 16.5$/Code$
+ $Code$( vehicle player ) setPylonsPriority [0,1,2,3,4,5,5,4,3,2,1,0];$/Code$
undefined / undefined
- (September 23, 2014)
- To change daytime To 24 hour format with hours, minutes, and seconds use this:
- $Code$// daytime = 1.66046
- _hour = floor daytime ;
- _minute = floor (( daytime - _hour) * 60);
- _second = floor ((((( daytime ) - (_hour))*60) - _minute)*60);
- _time24 = text format ["%1:%2:%3",_hour,_minute,_second];
- //_time24 = 1:39:37$/Code$
- Note: Not perfect method, "12:03:06" will display as "12:3:6", more script needed to remove this. Other methods might exist for basic functionality.
- Number
+ Nothing
+
- deActivateKey
+ getSoundController
- Deactivates the given keyname for the current user profile. The keys are used to unlock missions or campaigns.
- See keys, keysLimit and doneKeys in the description.ext file of the missions.
+ Returns value of the given sound controller.
- https://community.bistudio.com/wiki/deActivateKey
+ https://community.bistudio.com/wiki/getSoundController
- deActivateKey String
+ Object getSoundController String
- deActivateKey keyname
+ vehicle getSoundController controller
- $Code$deActivateKey "Mission04Key"$/Code$
+ $Code$vehicle player getSoundController "rpm"; //600$/Code$
undefined / undefined
@@ -17716,27 +18522,28 @@
- Nothing
+ Number
+
- debriefingText
+ allowCuratorLogicIgnoreAreas
- Returns debriefing text.
+ Allows curator placing and working with modules outside of edit areas.
- https://community.bistudio.com/wiki/debriefingText
+ https://community.bistudio.com/wiki/allowCuratorLogicIgnoreAreas
- debriefingText String
+ Object allowCuratorLogicIgnoreAreas Boolean
- debriefingText end
+ curatorObj allowCuratorLogicIgnoreAreas allow
- $Code$_deathText = debriefingText "endDeath";$/Code$
+ $Code$curatorModule allowCuratorLogicIgnoreAreas true$/Code$
undefined / undefined
@@ -17744,146 +18551,266 @@
- String
+ Nothing
+
- debugFSM
+ lineIntersectsObjs
- Dump (something about FSM) to debugging output. This command is (assumed to be) non-functional in the retail version.
- Non functional in retail
+ Returns list of objects intersected by given line from begPos to endPos.
- https://community.bistudio.com/wiki/debugFSM
+ https://community.bistudio.com/wiki/lineIntersectsObjs
- Number debugFSM Boolean
+ lineIntersectsObjs Array
- FSMhandle debugFSM true
+ lineIntersectsObjs [begPos, endPos, withObj, ignoreObj, sortByDistance, flags]
- undefined / undefined
+ global / undefined
+ (Mar 27, 2014)
+ Example (in ArmA3 ver 1.14) display objects' array in the middle of the screen sorted by 6 flags:
+ $Code$
+ Sto = [];
+ Fn = {
+ {
+ Sto set [_foreachindex, lineIntersectsObjs [( eyePos player ),( ATLtoASL screenToWorld [0.5,0.5]), objNull, objNull, false,_x]];
+ } forEach [1,2,4,8,16,32];
+ hintSilent format ["
+ ONLY_WATER: %1,
+ NEAREST_CONTACT: %2,
+ ONLY_STATIC: %3,
+ ONLY_DYNAMIC: %4,
+ FIRST_CONTACT: %5,
+ ALL_OBJECTS: %6",
+ Sto select 0,Sto select 1,Sto select 2,Sto select 3,Sto select 4,Sto select 5];
+ };
+ ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler ;
+ $/Code$
+
+ (March 29, 2016)
+ Distance sorting is relative to object model center, and not intersect position.
- Nothing
+ Array
+
- debugLog
+ deleteAt
- Dump argument type and value to debugging output.
- This command is non-functional in the retail version
+ Removes array element at the given index and returns removed element (modifies the original array, just like resize or set ). Will not issue error when -1 index is passed making it ideal for using with find command (see Example 2)
- https://community.bistudio.com/wiki/debugLog
+ https://community.bistudio.com/wiki/deleteAt
- debugLog Any_Value
+ Array deleteAt Number
- debugLog anything
+ array deleteAt index
- $Code$debugLog player$/Code$
+ $Code$_arr = [1,2,3];
+ _rem = _arr deleteAt 1;
+ hint str [_rem, _arr]; //[2,[1,3]]$/Code$
+
+ $Code$_arr = [1,2,3];
+ _arr deleteAt (_arr find 0); // non existent item
+ hint str _arr; // [1,2,3]
+ _arr deleteAt (_arr find 2); // existent item
+ hint str _arr; // [1,3]$/Code$
undefined / undefined
+ (October 15, 2014)
+ $Code$_array deleteAt 0$/Code$ is almost 60x faster than $Code$_array = _array - [_array select 0]$/Code$ (Tested with an array of 10.000 strings, iterating through it using a for-from-to-do loop)
+
+ (March 4, 2016)
+ Deleting from an array with foreach and _foreachIndex variable is tricky. The array is being altered, the _foreachIndex won't keep up and other elements in the array will be skipped and in worst case not being deleted.
+ If you delete elements from an array in descending order (using while or for) it will work.
+
+ (February 9, 2017)
+ To expand on Highheads comment above - this is because forEach implements iterators to traverse a collection, which are read only by definition.
+ The variable _x is an iterator that points to the current item in the collection. Trying to alter _x will have no effect.
+ $Code$ARRAY = [1,2,3,4,5,6,7,8];
+ { _x = 2; } forEach ARRAY
+ // ARRAY is still [1,2,3,4,5,6,7,8]$/Code$
+ When trying to use deleteAt inside forEach, the behaviour would be undefined as you are invalidating the iterator reference, and it will not know how to traverse to the next element.
+ In short, only use forEach when reading data from an array.
+ For more info about iterators, see C++ Iterators.
- Nothing
+ Anything
+
- default
+ moveInGunner
- See switch do.
+ Move soldier into vehicle gunner position (Immediate, no animation).
- https://community.bistudio.com/wiki/default
+ https://community.bistudio.com/wiki/moveInGunner
- default Code
+ Object moveInGunner Object
- default a
+ unitName moveInGunner vehicle
- $Code$switch (_condition) do {
- case 1: { hint "1" };
- case 2: { hint "2" };
- default { hint "default" };
- };$/Code$
+ $Code$soldierOne moveInGunner tankOne$/Code$
- undefined / undefined
+ local / global
+ (August 4, 2006)
+ Notes from before the conversion:
+ MP Note Functions MoveInGunner can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
+
+ In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Gunner" action command.
- Nothing
+ Nothing
+
- deg
+ lineIntersectsSurfaces
- Convert a number from Radians to Degrees.
+ Returns list of intersections with surfaces from begPosASL to endPosASL. If there is ground intersection, it is also included. Works on units. Works underwater. Doesn't return intersection with sea surface. Hardcoded max distance: 5000m. By default, for speed purposes, command will return only 1st intersection with unique objects. Since Arma 3 v1.69.140138, this could be tweaked with an optional param. NOTE: if begPosASL is under the ground and endPosASL is above it, the command will only return intersection with the ground, this is engine limitation and none of the intersectXXX commands will work when initiated from under the ground.
+ Since Arma v1.51.131920 it is possible to indicate primary and secondary LOD to look for intersection. Available options are:
+ "FIRE"
+ "VIEW"
+ "GEOM"
+ "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
+ "NONE"
+ Default LODs are "VIEW" and "FIRE"
- https://community.bistudio.com/wiki/deg
+ https://community.bistudio.com/wiki/lineIntersectsSurfaces
- deg Number
+ lineIntersectsSurfaces Array
- deg x
+ lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]
- $Code$_degrees= deg 1
- returns 57.295$/Code$
+ $Code$_intersections = lineIntersectsSurfaces [ eyePos player, aimPos chopper, player, chopper, true, -1];$/Code$
+
+ $Code$arrow = "Sign_Arrow_F" createVehicle [0,0,0];
+ onEachFrame {
+ _ins = lineIntersectsSurfaces [
+ AGLToASL positionCameraToWorld [0,0,0],
+ AGLToASL positionCameraToWorld [0,0,1000],
+ player
+ ];
+ if ( count _ins == 0) exitWith {arrow setPosASL [0,0,0]};
+ arrow setPosASL (_ins select 0 select 0);
+ arrow setVectorUp (_ins select 0 select 1);
+ hintSilent str _ins;
+ };$/Code$
+
+ $Code$// This should detect glass windows and wire fences (since Arma v1.51.131920):
+ wirefence = "Land_New_WiredFence_5m_F" createVehicle position player ;
+ arrow = "Sign_Arrow_F" createVehicle [0,0,0];
+ onEachFrame {
+ _ins = lineIntersectsSurfaces [
+ AGLToASL positionCameraToWorld [0,0,0],
+ AGLToASL positionCameraToWorld [0,0,1000],
+ player,
+ objNull,
+ true,
+ 1,
+ "GEOM",
+ "NONE"
+ ];
+ if ( count _ins == 0) exitWith {arrow setPosASL [0,0,0]};
+ arrow setPosASL (_ins select 0 select 0);
+ arrow setVectorUp (_ins select 0 select 1);
+ hintSilent str _ins;
+ };$/Code$
- undefined / undefined
+ global / undefined
+ (August 27, 2015)
+ Fast check if object is in a house: $Code$KK_fnc_inHouse = {
+ lineIntersectsSurfaces [
+ getPosWorld _this,
+ getPosWorld _this vectorAdd [0, 0, 50],
+ _this, objNull, true, 1, "GEOM", "NONE"
+ ] select 0 params ["","","","_house"];
+ if (_house isKindOf "House") exitWith { true };
+ false
+ };
+ onEachFrame { hintSilent str ( player call KK_fnc_inHouse)};$/Code$
+
+ (January 30, 2016)
+ This command is useful to place weaponholder (and then spawned weapons) on floor of houses, correcting the spawn position (can_collide) to intersect with floor:
+ $Code$
+ MGI_fnc_setPosAGLS = {
+ params ["_obj", "_pos"];
+ _wh_pos = getPosASL _obj;
+ _pos set [2, ( ATLtoASL _pos select 2)-10];
+ _ins = lineIntersectsSurfaces [_wh_pos, _pos,_obj, objNull, true,1,"VIEW","FIRE"];
+ _surface_distance = if ( count _ins 0) then [{(_ins select 0 select 0) distance _wh_pos},{0}];
+ _wh_pos set [2, ( getPosASL _obj select 2) - (_surface_distance)];
+ _weaponholder setPosASL _wh_pos;
+ };
+ $/Code$
+ After the position (_pos) obtained in BIS_fnc_buidingPositions array:
+ $Code$
+ _weaponholder = createVehicle ["groundWeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
+ [_weaponholder,_pos] call MGI_fnc_setPosAGLS;
+ Then fill your weapon holder.
+ $/Code$
- Number
+ Array
+
- delete3DENEntities
+ setCamShakeParams
- Delete given entities in Eden Editor, including anything that can be placed in editor.
+ Set camera shake parameters.
+ Will not have any effect until shake is started via addCamShake.
- https://community.bistudio.com/wiki/delete3DENEntities
+ https://community.bistudio.com/wiki/setCamShakeParams
- delete3DENEntities Array
+ setCamShakeParams Array
- delete3DENEntities entities
+ setCamShakeParams [posCoef, vertCoef, horzCoef, bankCoef, interpolation]
- $Code$delete3DENEntities ( all3DENEntities select 0);
- // removes all objects$/Code$
+ $Code$setCamShakeParams [0.1, 1, 1, 1, true];$/Code$
undefined / undefined
@@ -17891,321 +18818,393 @@
- Nothing
+ Nothing
+
- deleteAt
+ remoteExec
- Removes array element at the given index and returns removed element (modifies the original array, just like resize or set ). Will not issue error when -1 index is passed making it ideal for using with find command (see Example 2)
+ Asks server to execute given scripted function or script command on given target PC. The environment chosen for the execution is as follows:
+ Scripted function - scheduled environment ( suspension is allowed, i.e. spawn, execVM ).
+ Script command - unscheduled environment ( suspension is NOT allowed).
+ remoteExec can also be used in SP (the same restrictions apply both to SP and MP). For more information about the usage, security features and advanced jip techniques check the remote execution dedicated section.
- https://community.bistudio.com/wiki/deleteAt
+ https://community.bistudio.com/wiki/remoteExec
- Array deleteAt Number
+ Anything remoteExec Array
+
+ remoteExec Array
- array deleteAt index
+ params remoteExec [functionName, targets, JIP]
+
+ remoteExec [functionName, targets, JIP]
- $Code$_arr = [1,2,3];
- _rem = _arr deleteAt 1;
- hint str [_rem, _arr]; //[2,[1,3]]$/Code$
+ $Code$// runs hint "hello" on each connected client
+ "hello" remoteExec [" hint "];$/Code$
- $Code$_arr = [1,2,3];
- _arr deleteAt (_arr find 0); // non existent item
- hint str _arr; // [1,2,3]
- _arr deleteAt (_arr find 2); // existent item
- hint str _arr; // [1,3]$/Code$
+ $Code$// runs hint "hello" on first connected client
+ "hello" remoteExec [" hint ", 3];$/Code$
+
+ $Code$// runs hint "hello" everywhere but server
+ "hello" remoteExec [" hint ", -2];$/Code$
+
+ $Code$// runs hint "hello" everywhere but server, JIPs the message
+ // and returns e.g. "3_1" as a unique JIP id
+ myJipID = "hello" remoteExec [" hint ", -2, true ];$/Code$
+
+ $Code$// runs hint "hello" everywhere but server, JIPs the message under ID "some_JIP_ID"
+ // replacing any previous message with this ID in the JIP queue.
+ "hello" remoteExec [" hint ", -2, "some_JIP_ID"];$/Code$
+
+ $Code$// runs "someFuncWithNoArgs" on each connected client
+ remoteExec ["someFuncWithNoArgs"];$/Code$
+
+ $Code$// removes a message identified by "IamUnique" from the JIP queue
+ remoteExec ["", "IamUnique"];$/Code$
+
+ $Code$// all clients will have their ammo set to 1 for their current weapon
+ { player setAmmo [ primaryWeapon player, 1];} remoteExec [" bis_fnc_call ", 0];$/Code$
+
+ $Code$// Object obj will have its ammo set to 1 where it is local
+ [obj,[ primaryWeapon obj, 1]] remoteExec [" setAmmo ", obj];$/Code$
+
+ $Code$myJipID = "hello" remoteExec ["", 0];
+ if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
undefined / undefined
- (October 15, 2014)
- $Code$_array deleteAt 0$/Code$ is almost 60x faster than $Code$_array = _array - [_array select 0]$/Code$ (Tested with an array of 10.000 strings, iterating through it using a for-from-to-do loop)
-
- (March 4, 2016)
- Deleting from an array with foreach and _foreachIndex variable is tricky. The array is being altered, the _foreachIndex won't keep up and other elements in the array will be skipped and in worst case not being deleted.
- If you delete elements from an array in descending order (using while or for) it will work.
+ (June 30, 2015)
+ While it is true that this function executes the desired scripted command/function by calling it, it does not mean remoteExecCall itself will be executed right away. Therefore, calling remoteExecCall is by no means a replacement for calling scripted commands/functions directly.
+ Example:
+ remoteExecCall ["func1"]; call func2; // func2 can be executed sooner than func1
+ call func1; call func2; // func2 will always execute after func1.
- (February 9, 2017)
- To expand on Highheads comment above - this is because forEach implements iterators to traverse a collection, which are read only by definition.
- The variable _x is an iterator that points to the current item in the collection. Trying to alter _x will have no effect.
- $Code$ARRAY = [1,2,3,4,5,6,7,8];
- { _x = 2; } forEach ARRAY
- // ARRAY is still [1,2,3,4,5,6,7,8]$/Code$
- When trying to use deleteAt inside forEach, the behaviour would be undefined as you are invalidating the iterator reference, and it will not know how to traverse to the next element.
- In short, only use forEach when reading data from an array.
- For more info about iterators, see C++ Iterators.
+ (December 29, 2015)
+ remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string analyzed by BE is formatted the same way as the following example's output:
+ $Code$ format ["%1 %2", functionName, str params]$/Code$
+ If CfgRemoteExec class Functions is set to mode = 1;, the following remoteexec.txt exclusion can be used to safely allow all whitelisted *_fnc_* functions taking an array as parameter to go through:
+ $Code$!="\w+?_fnc_\w+? \[.*\]"$/Code$
+ Any attempt to exploit this exclusion using other RE methods like createUnit will run into "Error Missing ;" without any malicious code being executed. Mod makers should refrain from remote-executing raw commands from clients, as they require individual exclusions, and instead use *_fnc_* functions taking an array as parameter, which are covered by the above exclusion.
+
+ (January 15, 2016)
+ Executing commands/functions via remoteExec is more faster than using BIS_fnc_MP. Tested with BIS_fnc_codePerformance in ArmA 3 1.52.
+ $Code$['"string" remoteExec ["hint",player];',[],100] call BIS_fnc_codePerformance ; //Result ~0.1ms$/Code$
+ $Code$['["string","hint", player ] call BIS_fnc_MP ;',[],100] call BIS_fnc_codePerformance ; //Result ~0.6ms$/Code$
+
+ (March 24, 2016)
+ The INCORRECT way to call reveal command on a certain object for every player:
+ $Code$[ player, _desired_object] remoteExec ["reveal", 0];$/Code$
+ In this case player object will be the object obtained on the computer where remoteExec is initiated. If it is dedicated server, player will be objNull, if it is client, player would be player object on this client. In any case this will not reveal _desired_object for all connected players.
+ The CORRECT way:
+ $Code$[_desired_object, { player reveal _this}] remoteExec ["call", 0];$/Code$
+ The _desired_object will be identical on every client, this is what we want, but player will refer to individual player on each client, so _desired_object will be revealed to all connected players.
+
+ (May 25, 2016)
+ When adapting mission from dedicated server for SP, if target used in remoteExec is -2 (execute on every client but not server), in SP this will not execute since client is server in SP. To work around, the target could be set using isMultiplayer condition like this:
+ $Code$"123" remoteExec ["hint", [0, -2] select isMultiplayer ];$/Code$
+ This will execute hint on every client in MP on dedicated server (target -2) and will also execute it in SP (target 0).
+
+ (May 28, 2016)
+ While KK's solution works fine in sp missions and on dedicated servers, it will not work properly for hosted missions.
+ Solution:
+ $Code$[0,0.5] remoteExec [' fadeRadio ',[0,-2] select isDedicated, true ];$/Code$
+ Singleplayer: isDedicated returns false - code is executed everywhere (0)
+ Hosted: isDedicated returns false - code is executed everywhere including host (0)
+ Dedicated: isDedicated returns true - code is executed everywhere excluding server (-2)
+
+ (Jan 30, 2017)
+ $Code$[some params] remoteExec ['some command',2,true];$/Code$
+ will fail, as you can't use JIP and remoteExec on server only
+ $Code$[some params] remoteExec ['some command',2]; // works$/Code$
+
+ (May 10, 2017)
+ To remoteExec :
+ $Code$ titleText ["Test Message", "PLAIN", 1];$/Code$
+ Use
+ $Code$[["Test Message", "PLAIN", 1]] remoteExec ["titleText"];$/Code$
- Anything
+ Anything - Anything
+
- deleteCenter
+ east
- In a nutshell, this command removes gaming Side (see createCenter ). If a side has 0 Groups it cannot be deleted. Center can only be created for: east, west, resistance, civilian and sideLogic, therefore only centers from the mentioned sides can be deleted.
- Old description: Destroys the AI center of the given side.
+ Pre-defined variable for the eastern side.
- https://community.bistudio.com/wiki/deleteCenter
+ https://community.bistudio.com/wiki/east
- deleteCenter Side
+ east
- deleteCenter side
+ east
- $Code$deleteCenter east$/Code$
+ $Code$// SQS:
+ ?((side _unit) == east ) : hint "This is a eastern unit!"$/Code$
+
+ $Code$// SQF:
+ if (( side _unit) == east ) then {
+ hint "This is a eastern unit!";
+ };$/Code$
- undefined / global
+ undefined / undefined
+ (April 17, 2007)
+ In ArmA terms OPFOR, BLUFOR, Independents and Civilians are used in the front end UI.
- Nothing
+ Side
+
- deleteCollection
+ loadGame
- Delete a collection. As example, used with a soldier, it'll hide the ingame model.
- When targetting ArmA 2 1.06 or newer, use hideObject instead. This function is a relic from dynamic building destruction development. It is left only for compatibility with scripts created before ArmA 2 1.06, and its functionality may be changed or removed in the future.
+ Load a game from the autosave. If failed, restart the mission.
- https://community.bistudio.com/wiki/deleteCollection
+ https://community.bistudio.com/wiki/loadGame
- deleteCollection Object
+ loadGame
- deleteCollection object
+ loadGame
- $Code$deleteCollection unitName;$/Code$
+ $Code$loadGame ;$/Code$
undefined / undefined
- (August 20, 2014)
- In Arma 3 deleteCollection is alias for hideObject
- Nothing
+ Nothing
+
- deleteEditorObject
+ getRelDir
- Delete the editor object. Requires all editor object links to be removed prior.
- i
- Some Old Editor Command
+ Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo.
- https://community.bistudio.com/wiki/deleteEditorObject
+ https://community.bistudio.com/wiki/getRelDir
- Control deleteEditorObject String
+ Object getRelDir Object/Position2D/Position3D
- map deleteEditorObject object
+ object getRelDir position
-
+ $Code$_reldir = player getRelDir tank;$/Code$
+
- undefined / undefined
+ global / undefined
- Any_Value
+ Number
+
- deleteGroupWhenEmpty
+ distance2D
- Marks given group for auto-deletion when group is empty. true will mark the group for auto-deletion, however false will only unmark the group that was marked previously. There are other engine group auto-deletion mechanisms in place, which are not affected by this.
- NOTE: It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.
+ Returns a 2D distance ( distance projected to X,Y plane) in meters between two Objects or two Positions or Object and Position.
- https://community.bistudio.com/wiki/deleteGroupWhenEmpty
+ https://community.bistudio.com/wiki/distance2D
- Group deleteGroupWhenEmpty Boolean
+ Object/Array distance2D Object/Array
- group deleteGroupWhenEmpty delete
+ param1 distance2D param2
- $Code$_group deleteGroupWhenEmpty true ;$/Code$
+ $Code$_meters = player distance2D heli;$/Code$
- global / global
+ global / undefined
- Nothing
+ Number
+
- deleteGroup
+ removeAllMissionEventHandlers
- Destroys the given group. Group must be empty and local to the machine executing command.
- NOTE: In Arma 3 you can find out locality of the group with local command, unlike with previous games. However owner and setOwner dont work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server.
- In Arma 3 when last unit leaves a group, the group gets auto deleted. Manually deleting all units from a group however, does not auto delete the empty group. To force the group to get auto-deleted when empty use deleteGroupWhenEmpty
+ Removes all mission event handlers of the given type which were added by addMissionEventHandler.
- https://community.bistudio.com/wiki/deleteGroup
+ https://community.bistudio.com/wiki/removeAllMissionEventHandlers
- deleteGroup Group
+ removeAllMissionEventHandlers String
- deleteGroup group
+ removeAllMissionEventHandlers type
- $Code$deleteGroup _groupname$/Code$
+ $Code$removeAllMissionEventHandlers "Loaded";$/Code$
- local / global
+ undefined / undefined
- (December 17, 2006)
- The deleteGroup Command does not work when there are living members of in the group. It doesn't error, it simply doesn't do anything.
-
- (07:50, 10 July 2007 (CEST))
- Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.
-
- (September 12, 2013)
- deleteGroup will only delete local groups even if called by server. Say we have a situation where client creates a group and puts a unit there and later unit dies\gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server
- Nothing
+ Nothing
+
- deleteIdentity
+ addItemToVest
- Delete an identity (created with saveIdentity ) from the campaign's progress file.
+ Create new item and store it to soldier's vest. The item can also be a weapon or a magazine.
- https://community.bistudio.com/wiki/deleteIdentity
+ https://community.bistudio.com/wiki/addItemToVest
- deleteIdentity String
+ Object addItemToVest String
- deleteIdentity identityName
+ unit addItemToVest item
- $Code$?deleteIdentity "playerIdentity":hint "Delete ok"$/Code$
+ $Code$player addItemToVest "itemGPS";$/Code$
+
+ $Code$player addItemToVest "hgun_Rook40_F";$/Code$
- undefined / local
+ global / global
- Boolean
+ Nothing
+
- deleteLocation
+ synchronizeObjectsAdd
- Delete a location.
+ Add given objects to the unit's list of synchronized objects.
- https://community.bistudio.com/wiki/deleteLocation
+ https://community.bistudio.com/wiki/synchronizeObjectsAdd
- deleteLocation Location
+ Object synchronizeObjectsAdd Array
- deleteLocation location
+ unit synchronizeObjectsAdd [objects]
- $Code$deleteLocation myLocation$/Code$
+ $Code$_acm = _groupLogic createUnit ["AmbientCombatManager",position player,[],0,"NONE"];
+ _acm synchronizeObjectsAdd [player];$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- deleteMarkerLocal
+ setFlagSide
- Destroys the given marker.
+ Sets flag Side. A flag may be taken by any unit that is enemy to the side that owns the flag. Just like with setFlagTexture, if the command executed where unit is local effect of the command will be global and JIP compatible.
- https://community.bistudio.com/wiki/deleteMarkerLocal
+ https://community.bistudio.com/wiki/setFlagSide
- deleteMarkerLocal String
+ Object setFlagSide Side
- deleteMarkerLocal markerName
+ flag setFlagSide side
- $Code$deleteMarkerLocal "Marker1"$/Code$
+ $Code$_flag1 setFlagSide east ;$/Code$
+
+ $Code$// Capturable OPFOR flag:
+ private _flag = "FlagPole_F" createVehicle position player ;
+ _flag setFlagTexture "\A3\Data_F\Flags\Flag_CSAT_CO.paa";
+ _flag setFlagSide east ;$/Code$
- undefined / local
+ local / global
- (7 January, 2012)
- Unproven: I believe that if you use this command on a globally-created marker, and subsequently another machine executes a global command on the same marker (e.g. setMarkerPos), then the marker will be re-created on the machine it was previously deleted on. Can result in confusing marker behaviour.
- Nothing
+ Nothing
+
- deleteMarker
+ kbAddTopic
- Destroys the given marker.
+ Register conversation topic to given person. See Conversations for more details.
- https://community.bistudio.com/wiki/deleteMarker
+ https://community.bistudio.com/wiki/kbAddTopic
- deleteMarker String
+ Object kbAddTopic Array
- deleteMarker name
+ person kbAddTopic [topicName, conversationFile, fsmFile, eventHandler]
- $Code$deleteMarker "Marker1"$/Code$
+ $Code$player kbAddTopic ["myTest", "myTest.bikb", "myTest.fsm", compile preprocessFileLineNumbers "myTest.sqf"];$/Code$
+
+ $Code$player kbAddTopic ["itsGettingWarm", "weatherTalk.bikb"];$/Code$
undefined / undefined
@@ -18213,29 +19212,28 @@
- Nothing
+ Nothing
+
- deleteRange
+ curatorPoints
- Removes a range of array elements from the given array (modifies the original array, just like resize or set ).
+ Returns number of points that curator have. Points can be only in range from 0 to 1.
- https://community.bistudio.com/wiki/deleteRange
+ https://community.bistudio.com/wiki/curatorPoints
- Array deleteRange Array
+ curatorPoints Object
- array deleteRange [from, count]
+ curatorPoints curatorObj
- $Code$_arr = [1,2,3,4,5,6];
- _arr deleteRange [1,4];
- hint str _arr; //[1,6]$/Code$
+ $Code$_points = curatorPoints myCurator;$/Code$
undefined / undefined
@@ -18243,111 +19241,145 @@
- Nothing
+ Number
+
- deleteResources
+ objNull
- Delete (unregister) resources of the team member. Resources are deleted in the order they were added. Case insensitive.
+ A non-existent Object. To compare non-existent objects use isNull or isEqualTo :
+ objNull == objNull ; // false
+ isNull objNull ; // true
+ objNull isEqualTo objNull ; // true
- https://community.bistudio.com/wiki/deleteResources
+ https://community.bistudio.com/wiki/objNull
- Team_Member deleteResources Array
+ objNull
- teamMember deleteResources [resource1, resource2,]
+ objNull
- $Code$teamMember _agent deleteResources ["Legs"];$/Code$
+ $Code$player == player ; // false if player is null$/Code$
+
+ $Code$isNull player ; // true if player is null$/Code$
+
+ $Code$str objNull // NULL-object$/Code$
+
+ $Code$position objNull // [0,0,0]$/Code$
- global / local
+ undefined / undefined
- Nothing
+ Object
+
- deleteSite
+ setViewDistance
- Removes the site.
- This command is considered deprecated and is no longer supported
+ Set rendering distance, in metres. Default is 900m (in OFP) or 1,200m (in ArmA), accepted range is 500m to 5,000m (in OFP) or 10,000m (in ArmA). Setting view distance to = 0 resets the value to the one set in Options- Video- General- Visibility- Overall
- https://community.bistudio.com/wiki/deleteSite
+ https://community.bistudio.com/wiki/setViewDistance
- deleteSite Object
+ setViewDistance Number
- deleteSite site
+ setViewDistance distance
-
+ $Code$setViewDistance 2250;$/Code$
+
+ $Code$//reset view distance in Arma 3
+ setViewDistance -1;$/Code$
+
- undefined / undefined
+ undefined / local
+ In OFP v1.96, view distance also defines the maximum distance between a unit and any other unit they can know about. Higher view distance will involve more AI simulation cycles for every unit, which causes low performance.
+
+ I tested the above and it seems to apply in Arma 2 as well. AI at a bit above 500m would stop engaging when I lowered the view distance down to 500m and re-engaged when I increased it back.
+
+ In ArmA 2 viewDistance can be set up to 15 km with this command ( while from interface only 10 km )
+
+ (October 15, 2014)
+ In Arma 3, Values below 200 have no visible effect.
+
+ (November 20, 2014)
+ To clarify Bernagee's post, values under 200 have no effect. Tested by setViewDistance below 200, then hint viewDistance. It will not go below 200. Also, as object view distance can only be, at a maximum, the view distance, object view distance will also be reset to 200.
+
+ (June 8, 2015)
+ Client-side max view distance is limited by the server's view distance.
+ Tested in Arma 3.
- Nothing
+ Nothing
+
- deleteStatus
+ createSite
- Delete a status (created with saveStatus ) from the campaign's progress file.
+ Create a new site.
+ This command is considered deprecated and is no longer supported
- https://community.bistudio.com/wiki/deleteStatus
+ https://community.bistudio.com/wiki/createSite
- deleteStatus String
+ String createSite Position
- deleteStatus statusName
+ type createSite pos
- $Code$? deleteStatus "playerStatus" : "saved status gone from campaign"$/Code$
-
+
- undefined / global
+ undefined / undefined
+ (February 18, 2014)
+ "CreateSite is an obsolete command from the time in development when Sites were handled separately from other modules. Now they use the modules framework.
+ If you want a specific Site to be activated during the mission, place it in the editor and use the Condition line in its parameters (the last one)." - Jezuro [1]
- Boolean
+ Object
+
- deleteTeam
+ curatorSelected
- Destroy given team.
+ Returns list of all curator selected items.
- https://community.bistudio.com/wiki/deleteTeam
+ https://community.bistudio.com/wiki/curatorSelected
- deleteTeam Team_Member
+ curatorSelected
- deleteTeam team
+ curatorSelected
- $Code$deleteTeam _team;$/Code$
+ $Code$selectedItems = curatorSelected ;$/Code$
undefined / undefined
@@ -18355,197 +19387,149 @@
- Nothing
+ Array
+
- deleteVehicleCrew
+ incapacitatedState
- Deletes a member of the crew of a vehicle. Human players cannot be deleted.
+ Returns the incapacitated state of the given unit.
- https://community.bistudio.com/wiki/deleteVehicleCrew
+ https://community.bistudio.com/wiki/incapacitatedState
- Object deleteVehicleCrew Object
+ incapacitatedState Object
- vehicle deleteVehicleCrew unit
+ incapacitatedState person
- $Code$heli deleteVehicleCrew driver heli;$/Code$
+ $Code$_result = incapacitatedState player;$/Code$
- global / global
+ undefined / undefined
- (August 31, 2014)
- Not quite sure of the exact use of this command. You can delete AI pilot for example with $Code$ deleteVehicle driver heli;$/Code$ but co-pilot will then jump out. If you use $Code$heli deleteVehicleCrew driver heli;$/Code$ co-pilot stays.
-
- (April 10, 2015)
- Using the following code will remove ALL crew from the given vehicle.
- $Code${_myvehicle deleteVehicleCrew _x} forEach crew _myvehicle;$/Code$
- Nothing
+ String
+
- deleteVehicle
+ velocity
- Deletes an object. Only units inserted in the mission editor and units created during the game's progress can be deleted by this command. Island objects and player units cannot be removed. Deleting a vehicle, which is still being accessed by a running script, can result in a CTD.
- NOTE : Actual object deletion, when object becomes objNull, happens on the next frame after command execution, but there are some object modifications that happen immediately. For example if the object is unit in a group, it immediately becomes groupless isNull group _unit; //true
+ Return velocity (speed vector) of Unit as an array with format [x, y, z]. Units are in metres per second.
- https://community.bistudio.com/wiki/deleteVehicle
+ https://community.bistudio.com/wiki/velocity
- deleteVehicle Object
+ velocity Object
- deleteVehicle object
+ velocity vehicleName
- $Code$deleteVehicle _house1;$/Code$
-
- $Code${
- _x action ["Eject", car];
- } forEach crew car;
- deleteVehicle car;$/Code$
+ $Code$_vector = velocity jeep;$/Code$
- $Code$// Objects such as
- //test_EmptyObjectForBubbles
- //test_EmptyObjectForFireBig
- //test_EmptyObjectForSmoke
- //create additional emitters that needs to be deleted first before deleting the object itself:
- ///--- function to delete test object (MP compatible)
- fnc_deleteTestObj = {
- _this addMPEventHandler ["MPKilled", {
- _this = _this select 0;
- {
- deleteVehicle _x;
- } forEach (_this getVariable ["effects", []]);
- if ( isServer ) then {
- deleteVehicle _this;
- };
- }];
- _this setDamage 1;
- };
- ///--- example
- [] spawn {
- _fire = "test_EmptyObjectForFireBig" createVehicle position player ;
- sleep 5;
- _fire call fnc_deleteTestObj;
- };$/Code$
+ $Code$if ( velocity _plane1 select 2 50) then { hint "Aircraft is climbing up too fast!"};$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Array
+
- deleteWaypoint
+ ctrlPosition
- Removes the specified waypoint.
+ Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z].
- https://community.bistudio.com/wiki/deleteWaypoint
+ https://community.bistudio.com/wiki/ctrlPosition
- deleteWaypoint Array
+ ctrlPosition Control
- deleteWaypoint [group, index]
+ ctrlPosition controlName
- $Code$deleteWaypoint [_grp, 2]$/Code$
+ $Code$_pos = ctrlPosition _control;$/Code$
- global / global
+ undefined / undefined
- (1 Feb, 2008)
- In order to change the behavior of a unit currently following a string of waypoints, it is not enough to use deleteWaypoint. The path of the unit is calculated by the waypoints present at start, and the unit will continue according to the original waypoints even if you delete them by using this command.
- To achieve the wanted effect, you should rather use setWPPos to the units current position (thereby stopping the unit), and (after a small delay) use deleteWaypoint to remove the waypoints.
-
- (15 Nov, 2008)
- Another (more foolproof) method to avoid the problem of non-deleteable waypoints is to introduce another group (createGroup) and join all units of the present group. A new group will start without any preset waypoints so you can start setting new WPs all over again.
- Old group is "_combatGroup", new group is "_combatGroup2"
- $Code$_combatGroup2 = createGroup EAST;
- {[_x] joinSilent _combatGroup2} forEach ( units _combatGroup);
- _combatGroup2 addWaypoint [ getPos player, 25];$/Code$
-
- (January 04, 2011)
- When you want to remove all waypoints, do NOT iterate over waypoints _group while trying to delete them (an array is by reference!). Instead use an approach like this:
- $Code$
- while {( count ( waypoints _group)) 0} do
- {
- deleteWaypoint (( waypoints _group) select 0);
- };$/Code$
+ (May 22, 2017)
+ If the ctrl is part of a CtrlGroup the returned position is relative to the ctrlGroups position.
- Nothing
+ Array
+
- detach
+ show3DIcons
- Detaches previously attached with attachTo object.
+ Toggle the drawing of 3D icons.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/detach
+ https://community.bistudio.com/wiki/show3DIcons
- detach Object
+ Control show3DIcons Boolean
- detach object
+ map show3DIcons bool
- $Code$obj1 attachTo [player];
- detach obj1;$/Code$
-
+
- global / global
+ undefined / undefined
- Nothing
+ Nothing
+
- detectedMines
+ setGroupIconsSelectable
- Returns an array of all mines detected by a given side
+ Sets if group icons raises onclick and onover events.
- https://community.bistudio.com/wiki/detectedMines
+ https://community.bistudio.com/wiki/setGroupIconsSelectable
- detectedMines Side
+ setGroupIconsSelectable Boolean
- detectedMines side
+ setGroupIconsSelectable bool
- $Code$detectedMines west ;$/Code$
-
- $Code$detectedMines side player ;$/Code$
+ $Code$setGroupIconsSelectable true ;$/Code$
undefined / undefined
@@ -18553,91 +19537,101 @@
- Array
+ Object
+
- diag_activeMissionFSMs
+ unassignVehicle
- Returns array with active Mission FSMs.
+ Unassigns individual unit from a vehicle, i.e removes assignedVehicleRole of the unit. If the unit is currently in that vehicle, the group leader will issue an order to disembark.
- https://community.bistudio.com/wiki/diag_activeMissionFSMs
+ https://community.bistudio.com/wiki/unassignVehicle
- diag_activeMissionFSMs
+ unassignVehicle Object
- diag_activeMissionFSMs
+ unassignVehicle unitName
- $Code${ systemChat str _x} forEach diag_activeMissionFSMs ;$/Code$
+ $Code$unassignVehicle player ;$/Code$
+
+ $Code${ unassignVehicle _x } forEach crew _vehiclename;
+ // Will make all the occupants of a vehicle disembark$/Code$
- undefined / undefined
+ local / global
+ (August 4, 2006)
+ Notes from before the conversion:
+ Even though:
+ {unassignVehicle _x} forEach crew vehiclename
+ will make all the occupants of a vehicle disembark, if they are the original crew of the vehicle then they will just get back in again.
+ To prevent this happening also use allowGetIn as in the example below:
+ {unassignVehicle _x} forEach crew vehiclename; crew vehiclename allowGetIn false
- Array
+ Nothing
+
- diag_activeSQFScripts
+ setAccTime
- Returns an array with active SQFs.
+ Set time acceleration coefficient. May be also used to slow time in cutscenes. This command does NOT work in multiplayer. accFactor is clamped to [1/128; 4].
- https://community.bistudio.com/wiki/diag_activeSQFScripts
+ https://community.bistudio.com/wiki/setAccTime
- diag_activeSQFScripts
+ setAccTime Number
- diag_activeSQFScripts
+ setAccTime accFactor
- $Code${ systemChat str _x} forEach diag_activeSQFScripts ;$/Code$
-
- $Code$[] spawn {
- hint str diag_activeSQFScripts ; //[[" spawn ","",true,1]]
- };
- [] spawn {
- scriptName "myScript";
- hint str diag_activeSQFScripts ; //[["myScript","",true,1]]
- };$/Code$
+ $Code$setAccTime 0.1$/Code$
undefined / undefined
+ (August 4, 2006)
+ Notes from before the conversion:
+ A good habit to get into is setting the accTime to 1 at the start of all cutscenes, in case the player is running at 4x speed when the scene starts.
- Array
+ Nothing
+
- diag_activeSQSScripts
+ toArray
- Returns array with active SQSs.
+ Converts the supplied String into an Array of Numbers.
+ The numbers in the created array are the decimal Unicode representations of characters.
- https://community.bistudio.com/wiki/diag_activeSQSScripts
+ https://community.bistudio.com/wiki/toArray
- diag_activeSQSScripts
+ toArray String
- diag_activeSQSScripts
+ toArray string
- $Code${ systemChat str _x} forEach diag_activeSQSScripts ;$/Code$
+ $Code$hint format["%1",toArray("AaŒ")]
+ // returns "[65,97,338]"$/Code$
undefined / undefined
@@ -18645,94 +19639,95 @@
- Array
+ Array
+
- diag_activeScripts
+ lnbPicture
- Returns 4 element array with numbers of currently running scripts in format: [ spawn -ed, execVM -ed, exec -ed, execFSM -ed]
+ Returns the picture name or path of the item with the given position of the 2D listbox.
- https://community.bistudio.com/wiki/diag_activeScripts
+ https://community.bistudio.com/wiki/lnbPicture
- diag_activeScripts
+ lnbPicture Array
+
+ Control lnbPicture Array
- diag_activeScripts
+ lnbPicture [IDC, [row, column]]
+
+ control lnbPicture [row, column]
- $Code$hint str diag_activeScripts ; //[0,0,0,1]$/Code$
+ $Code$lnbPicture [200, [1, 1]];$/Code$
+
+ $Code$_control lnbPicture [1, 1]; //"a3\ui_f\data\gui\cfg\ranks\corporal_gs.paa"$/Code$
- undefined / undefined
+ local / local
- Array
+ String - String
+
- diag_captureFrame
+ setTimeMultiplier
- This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and captured data UI dialog appears, similar to diag_captureSlowFrame.
- This can also be executed on a dedicated Server and because a Server has no UI it will behave like diag_captureFrameToFile.
- Special: BattlEye's RCON variant of this command is #captureFrame
- Note : Only available in specific builds. See Performance Profiling for details.
+ Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
- https://community.bistudio.com/wiki/diag_captureFrame
+ https://community.bistudio.com/wiki/setTimeMultiplier
- diag_captureFrame Number
+ setTimeMultiplier Number
- diag_captureFrame frame
+ setTimeMultiplier value
- $Code$diag_captureFrame 1; //capture the first frame after command execution$/Code$
+ $Code$setTimeMultiplier 60;$/Code$
- $Code$diag_captureFrame 24; //capture 24th frame after command execution$/Code$
+ $Code$setTimeMultiplier 0.5;$/Code$
- undefined / undefined
+ undefined / global
+ This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Nothing
+
- diag_captureFrameToFile
+ dynamicSimulationDistance
- This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and
- written to a log file in the same directory as the.rpt file.
- The full Path to the log file is logged to simultaneously.
- The data in the log file can be copied and pasted into the diag_captureFrame UI dialog to get a visualisation later on.
- Note : Only available in specific builds. See Performance Profiling for details.
+ A getter for setDynamicSimulationDistance
- https://community.bistudio.com/wiki/diag_captureFrameToFile
+ https://community.bistudio.com/wiki/dynamicSimulationDistance
- diag_captureFrameToFile Number
+ dynamicSimulationDistance String
- diag_captureFrameToFile frame
+ dynamicSimulationDistance category
- $Code$diag_captureFrameToFile 1; //capture the first frame after command execution$/Code$
-
- $Code$diag_captureFrameToFile 24; //capture 24th frame after command execution$/Code$
+ $Code$hint str dynamicSimulationDistance "Prop";$/Code$
undefined / undefined
@@ -18740,39 +19735,28 @@
- Nothing
+ Number
+
- diag_captureSlowFrame
+ triggerDynamicSimulation
- Opens "capture frame" dialog if current frame exceeds set threshold in seconds. One can indicate to either capture duration of a specific profiling selection or the total duration of the frame. The selection names can be obtained by expanding the profiling tree. Clicking on a tree item will highlight the item on the graph and vice versa. The GUI also provides method of copying of the displayed data to clipboard. Some of the selections:
- Render
- - bgD3D
- Main Thread
- - total
- - memAl
- Visualize
- - visul
- Mjob
- - Mjob
- Note : Only available in specific builds. See Performance Profiling for details.
+ Controls ability of given unit to activate entities with disabled Arma_3_Dynamic_Simulation. If false dynamically disabled entities will not be activated by unit presence
- https://community.bistudio.com/wiki/diag_captureSlowFrame
+ https://community.bistudio.com/wiki/triggerDynamicSimulation
- diag_captureSlowFrame Array
+ Object triggerDynamicSimulation Boolean
- diag_captureSlowFrame [section, threshold]
+ unit triggerDynamicSimulation trigger
- $Code$diag_captureSlowFrame ['total',0.003];$/Code$
-
- $Code$diag_captureSlowFrame ['memAl', 0.0001];$/Code$
+ $Code$player triggerDynamicSimulation false ;$/Code$
undefined / undefined
@@ -18780,119 +19764,139 @@
- Nothing
+ Nothing
+
- diag_codePerformance
+ hmd
- Attempts to run given code with given arguments given number of cycles in unscheduled environment and returns average time it took to run the code as well as actual number of executions performed. The command will return as soon as possible if the tested code is slow and the duration of the command exceeds 1 second. Engine alternative to BIS_fnc_codePerformance
- NOTE: For security purposes, this command will only run for 1 cycle in MP, unless in-game debug console is available via description.ext option or Eden attribute setting.
+ Returns class name of currently used Head Mounted Display. Returns an empty string if the slot is empty.
- https://community.bistudio.com/wiki/diag_codePerformance
+ https://community.bistudio.com/wiki/hmd
- diag_codePerformance Array
+ hmd Object
- diag_codePerformance [code, arguments, cycles]
+ hmd unit
- $Code$_result = diag_codePerformance [{ private _a = 123;}, 0, 10000];$/Code$
+ $Code$_nvgs = hmd player ; //NVGoggles$/Code$
- undefined / undefined
+ global / undefined
- Array
+ String
+
- diag_drawMode
+ set3DENMissionAttributes
- Activates specific debug visualization.
- Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
+ Set scenario attributes.
+ An attribute is identified by its property ( data when it's engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.
+ !
+ Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
- https://community.bistudio.com/wiki/diag_drawMode
+ https://community.bistudio.com/wiki/set3DENMissionAttributes
- diag_drawMode String
+ set3DENMissionAttributes Array
- diag_drawMode type
+ set3DENMissionAttributes [[ section, class1, value1 ],, [ section, classN, valueN ]]
- $Code$diag_drawMode "normal"$/Code$
+ $Code$set3DENMissionAttributes [["Multiplayer","respawn",3],["Multiplayer","respawnDelay",10]];
+ // Set respawn type to 3 and respawn delay to 10 seconds$/Code$
undefined / undefined
- (September 6, 2016)
- Currently A3 dev branch, diag.exe, version 1.65.138249 has no drawModes available:
- $Code$diag_list "drawMode" - []$/Code$
- Nothing
+ Boolean
+
- diag_enabled
+ isNull
- Checks whether specific diagnostic mode is activated.
- Only available in the Arma 3 Diagnostic exe
+ Checks whether the tested item is Null.
+ Which null type the item has to be equal to depends on the type of game entity tested:
+ Objects - objNull
+ Controls - controlNull
+ Displays - displayNull
+ Groups - grpNull
+ Locations - locationNull (since ARMA 2)
+ Tasks - taskNull (since ARMA 2)
+ Scripts - scriptNull (since Arma 3 1.29.127075)
+ Configs - configNull (since Arma 3 1.53.133130)
+ Note: A test via == does not work, because, for example, objNull is not equal to anything, not even to itself. Use isEqualTo.
- https://community.bistudio.com/wiki/diag_enabled
+ https://community.bistudio.com/wiki/isNull
- diag_enabled String
+ isNull Object/Control/Display/Group
- diag_enabled diag_mode
+ isNull entity
- $Code$"Animation" diag_enable true ;
- diag_enabled "Animation";//returns true$/Code$
+ $Code$if ( isNull obj) then { hint "doesn't exist";};$/Code$
- undefined / undefined
+ global / undefined
+ (December 9, 2015)
+ isNull does not work with the TEAM_MEMBER type.
+ Use this instead:
+ $Code$_tmember isEqualTo teamMemberNull$/Code$
+
+ (December 9, 2015)
+ The note in the description does not apply to the CONFIG type, probably due to backwards compatibility.
+ $Code$configNull == configNull
+ - true
+ $/Code$
- Boolean
+ Boolean
+
- diag_enable
+ attachObject
- Used to enable/disabled various diagnostics.
- Only available in the Arma 3 Diagnostic exe
+ Attaches a location to the specified object. To detach a location, attach it to objNull.
- https://community.bistudio.com/wiki/diag_enable
+ https://community.bistudio.com/wiki/attachObject
- String diag_enable Boolean
+ Location attachObject Object
- diag_mode diag_enable state
+ location attachObject object
- $Code$"All" diag_enable true$/Code$
+ $Code$myLocation attachObject player ;$/Code$
undefined / undefined
@@ -18900,27 +19904,29 @@
- Nothing
+ Nothing
+
- diag_fpsMin
+ deg
- Returns minimal framerate. Calculated from the longest frame over last 16 frames.
+ Convert a number from Radians to Degrees.
- https://community.bistudio.com/wiki/diag_fpsMin
+ https://community.bistudio.com/wiki/deg
- diag_fpsMin
+ deg Number
- diag_fpsMin
+ deg x
- $Code$_minfps = diag_fpsMin ;$/Code$
+ $Code$_degrees= deg 1
+ returns 57.295$/Code$
undefined / undefined
@@ -18928,902 +19934,940 @@
- Number
+ Number
+
- diag_fps
+ ammoOnPylon
- Returns average framerate calculated over last 16 frames.
+ Returns ammo count on given pylon.
+ Returns false ( Bool ) on failure.
- https://community.bistudio.com/wiki/diag_fps
+ https://community.bistudio.com/wiki/ammoOnPylon
- diag_fps
+ Object ammoOnPylon String/Number
- diag_fps
+ vehicle ammoOnPylon pylon
- $Code$diag_log diag_fps;$/Code$
+ $Code$_ammoCount = ( vehicle player ) ammoOnPylon "pylon1";$/Code$
+
+ $Code$hint str (( vehicle player ) ammoOnPylon "pylonCenter");$/Code$
undefined / undefined
- (November 19, 2014)
- The engine will always calculate the last 16 frames without caring if they are frames in which the loading screen was drawn, or actual mission frames.
+ (August 18, 2017)
+ The pylon indices start at 1 and not at 0.
- Number
+ Number/Boolean
+
- diag_frameNo
+ flyInHeight
- Returns number of frame currently displayed.
+ Sets the flying altitude for aircraft relatively to the ground surface. Avoid too low altitudes, as helicopters and planes won't evade trees and obstacles on the ground. The default flying altitude is 100 meters.
- https://community.bistudio.com/wiki/diag_frameNo
+ https://community.bistudio.com/wiki/flyInHeight
- diag_frameNo
+ Object flyInHeight Number
- diag_frameNo
+ aircraft flyInHeight altitude
- $Code$_currFrameNo = diag_frameNo ;$/Code$
+ $Code$_helicopter flyInHeight 40$/Code$
- undefined / undefined
+ local / global
- (November 19, 2014)
- Avoid using hard-coded frame-specific events, the total amount of drawn frames is persistent across all missions. It does not get reset until the game is closed.
+ (August 4, 2006)
+ Notes from before the conversion:
+ From version 1.80+ - flyInHeight now affects not only helicopters, but also planes.
+
+ (August 4, 2006)
+ A planes flyInHeight, is restricted to a minimum of 20 meters.
+
+ (December 15, 2008)
+ A flyInHeight of 0 will keep the chopper pinned to the ground, even when the engines have been started.
+
+ (00:53, 11 April 2009 (CEST))
+ If a helo has no waypoints, it will assume a low hover without regard to this setting.
- Number
+ Nothing
+
- diag_list
+ vestMagazines
- Returns an array of all diag modes available in the game.
- Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
+ Get array with all magazines from vest of the given unit.
- https://community.bistudio.com/wiki/diag_list
+ https://community.bistudio.com/wiki/vestMagazines
- diag_list String
+ vestMagazines Object
- diag_list name
+ vestMagazines unit
- $Code$diag_list "toggle";$/Code$
-
- $Code$diag_list "drawMode"$/Code$
+ $Code$vestMagazines player ;[
+ "6.5mm 30Rnd STANAG Mag(30/30)[id/cr:4/0](2x)",
+ "9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)",
+ "RGO Frag Grenade(1/1)[id/cr:10/0](2x)",
+ "Smoke Grenade (White)(1/1)[id/cr:12/0](1x)",
+ "Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)",
+ "Chemlight (Green)(1/1)[id/cr:14/0](2x)"
+ ]$/Code$
undefined / undefined
- (October 7, 2016)
- Arma 3 Version 1.65.138660
- $Code$ diag_list "toggle";$/Code$ returns:
- ["Force","Animation","Mines","HitPoints","AnimSrcUnit","AnimSrcTarget","Suspension",
- "EPEForce","EPEVehicle","ParticleNames","Particles","SurfaceUnder","AISkill","AIDriving",
- "AIAiming","AIBrain","AIDynamicError","AISuppression"]
- Array
+ Array
+
- diag_logSlowFrame
+ setMass
- Log all frames, where section takes longer than the threshold (in seconds).
- Note : Only available in specific builds. See Performance Profiling for details.
+ Changes the mass of an object smoothly during the given time (in seconds). A time of zero (or using the alternative syntax) means an immediate change.
- https://community.bistudio.com/wiki/diag_logSlowFrame
+ https://community.bistudio.com/wiki/setMass
- diag_logSlowFrame Array
+ Object setMass Array
+
+ Object setMass Number
- diag_logSlowFrame [section, threshold]
+ myObject setMass [mass, time]
+
+ myObject setMass mass
- $Code$diag_logSlowFrame ['total',0.3]$/Code$
+ $Code$myObject setMass [10,0.5];$/Code$
+
+ $Code$myObject setMass 10;$/Code$
- undefined / undefined
+ local / global
+ (20 Jun, 2014)
+ (ArmA3 1.22) A quick reference:
+ category
+ setMass
+ setCenterOfMass
+ unit
+ The larger the mass is, the easier a unit will physically fatigued
+ N/A
+ aircraft
+ The larger the mass is, the more sensitive an aircraft will react to joystick, vice versa (Except when AFM is enabled).
+ Aircraft slant due to center change accordingly, and the position of the camera view will be altered relatively at the same time. (3rd person view)
+ vehicle
+ The larger the mass is, the slower a vehicle drives (Ships will sink), vice versa. (Land vehicle performs like a bouncing ball while ships accelerated pretty speedy.)
+ Vehicle slant due to center change accordingly.
+
+ (March 26, 2015)
+ If you intend to use setMass in conjunction with ropeCreate in MP i highly recommend to first ropeCreate then setMass (on clientside).
+ RopeCreate in MP will set the mass of the attached object to the server value upon execution.
- Nothing
+ Nothing - Nothing
+
- diag_log
+ diag_captureSlowFrame
- Dumps the argument's value to the report file. Each call creates a new line in the file.
+ Opens "capture frame" dialog if current frame exceeds set threshold in seconds. One can indicate to either capture duration of a specific profiling selection or the total duration of the frame. The selection names can be obtained by expanding the profiling tree. Clicking on a tree item will highlight the item on the graph and vice versa. The GUI also provides method of copying of the displayed data to clipboard. Some of the selections:
+ Render
+ - bgD3D
+ Main Thread
+ - total
+ - memAl
+ Visualize
+ - visul
+ Mjob
+ - Mjob
+ Note : Only available in specific builds. See Performance Profiling for details.
- https://community.bistudio.com/wiki/diag_log
+ https://community.bistudio.com/wiki/diag_captureSlowFrame
- diag_log Anything
+ diag_captureSlowFrame Array
- diag_log anything
+ diag_captureSlowFrame [section, threshold]
- $Code$diag_log time ;$/Code$
-
- $Code$diag_log format ["%1, %2", player, time ];$/Code$
-
- $Code$_arr = [1, "foo", player, "bar"];
- {
- diag_log _x ;
- } forEach _arr; // Creates 4 entries on 4 lines$/Code$
+ $Code$diag_captureSlowFrame ['total',0.003];$/Code$
- $Code$_arr = [1, "foo", player, "bar"];
- diag_log _arr;
- // Creates one entry of e.g. [1,"foo",B Alpha 1-1:1 (Player Name),"bar"]$/Code$
+ $Code$diag_captureSlowFrame ['memAl', 0.0001];$/Code$
undefined / undefined
- To dump a string without "" use text.
- Posted 23:35, 19 April 2011
-
- in patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044.
- Nothing
+ Nothing
+
- diag_mergeConfigFile
+ uiNamespace
- Adjust configs on-the-fly without the need of restarting the game (by merging the given config file into the main config in memory). Location is relative to the Userdir (default) or mission directory depending on the the value of UserDir [FileName,UserDir].
- Doesn't work with cfgAmmo & few other classes. (Since 1.69, cfgAmmo should be mergeable!) Merging config file means also that you can't delete parameters through diag_mergeConfigFile. Changes applied by diag_mergeConfigFile are applied to all new entities so restart of mission is not necessarily required - spawning vehicle again or changing back forth weapon should usually do the trick.
- Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
+ Returns the global namespace attached to user interface.
- https://community.bistudio.com/wiki/diag_mergeConfigFile
+ https://community.bistudio.com/wiki/uiNamespace
- diag_mergeConfigFile Array
+ uiNamespace
- diag_mergeConfigFile [PathToConfigOnDrive]
+ uiNamespace
- $Code$diag_mergeConfigFile ["O:\Arma3\A3\Stuff_F\config.cpp"]$/Code$
+ $Code$uiNamespace setVariable ["LIB_interruptDisplay", _display];$/Code$
+
+ $Code$uiNamespace setVariable ["myVar", 46];
+ with uiNamespace do {
+ hint str myVar; //46
+ };$/Code$
undefined / undefined
+ variables in uiNamespace are not lost between mission changes, they are carried over. Also take note that the server can make use of uiNamespace.
+
+ (29 September, 2014)
+ ^The same can be said with parsingNamespace.
- Nothing
+ Namespace
+
- diag_recordTurretLimits
+ ppEffectAdjust
- Start recording tool for creating turret aiming limits.
- Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
+ Set post process effect parameters. NOTE: The two syntaxes differ in what format of the params they accept. The syntax with PP name expects colors to be packed into arrays within main array, while the syntax with PP handle can handle both flat and packed array. Therefore it is recommended to use the universal packed format, such as shown in the examples.
- https://community.bistudio.com/wiki/diag_recordTurretLimits
+ https://community.bistudio.com/wiki/ppEffectAdjust
- diag_recordTurretLimits Boolean
+ String ppEffectAdjust Array
+
+ Number ppEffectAdjust Array
- diag_recordTurretLimits section
+ effect ppEffectAdjust settings
+
+ effect ppEffectAdjust settings
- $Code$diag_recordTurretLimits true;$/Code$
+ $Code$"colorCorrections" ppEffectAdjust [1, 1, -0.01, [0, 0, 0, 0], [1.5, 1, 1.2, 0.6], [0.199, 0.587, 0.114, 0]];$/Code$
+
+ $Code$// Black&White:
+ _colorCorrectionsEffHandle ppEffectAdjust [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]];$/Code$
- undefined / undefined
+ undefined / local
- Nothing
+ Nothing - Nothing
+
- diag_resetShapes
+ forceWalk
- Reload models on-the-fly without the need of restarting the game. Changes applied by diag_resetShapes are applied to all new entities so restart of mission is not necessarily required - spawning vehicle again or changing back forth weapon should usually do the trick. It works only with "-FilePatching" in combination with local data. Command will reload only models present in local data.
- Limitation - you can't reload cfgSkeletons (Which is inside model.cfg)
- Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
+ Forces unit to walk even if run or sprint is selected.
- https://community.bistudio.com/wiki/diag_resetShapes
+ https://community.bistudio.com/wiki/forceWalk
- diag_resetShapes
+ Object forceWalk Boolean
- diag_resetShapes
+ unit forceWalk value
- $Code$diag_resetShapes$/Code$
+ $Code$player forceWalk true ;$/Code$
- undefined / undefined
+ local / undefined
- Nothing
+ Nothing
+
- diag_tickTime
+ nearTargets
- Real time spent from the start of the game. Expressed in fractions of second. Resolution of 1 tick is 1 ms.
+ Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
- https://community.bistudio.com/wiki/diag_tickTime
+ https://community.bistudio.com/wiki/nearTargets
- diag_tickTime
+ Object nearTargets Number
- diag_tickTime
+ unit nearTargets range
- $Code$_start = diag_tickTime ;
- //code
- _stop = diag_tickTime ;
- diag_log format ["%1",_stop - _start];$/Code$
+ $Code$player nearTargets 100;
+ // could return something like this:
+ //[[[2555.33,2535.33,1.32708],"SoldierEB",EAST,214222,EAST 1-1-A:1],[[2550.39,2482.5,1.32696],"SoldierWB",WEST,0,WEST 1-1-A:2]]$/Code$
undefined / undefined
- (8 Sept, 2010)
- In Arma 2 Operation Arrowhead 1.54.0.72888 this returns the time in seconds since the game was started.
+ (Febuary 17, 2011)
+ A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. Any unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1.
- (25 Jan, 2014)
- This command will return time since last client restart as float. However because of Number format used in Arma, the more time has past since restart the less precise the returned value will be.
+ (January 15, 2012)
+ The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit:
+ For infantry:
+ ] 0, 1.5 [ - side unknown, some position offset, identified as SoldierWB
+ [ 1.5, 1.6 [ - side identified, subjective cost set
+ [ 1.6, 2 [ - type identified better (USMC_Soldier_Base)
+ [ 2, 3.6 [ - type identified precisely (USMC_Soldier)
+ [ 3.6, 4 ] - position identified precisely
+ The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
+ 0class CAManBase: Man
+ 1.6class SoldierWB: CAManBase
+ 2class USMC_Soldier_Base: SoldierWB
+ 3.9class USMC_Soldier: USMC_Soldier_Base
+ For tanks:
+ ] 0, 0.03 [ - side unknown, some position offset, identified as LandVehicle
+ [ 0.03, 0.13 [ - type identified better (Tank)
+ [ 0.13, 0.3 [ - type identified better (M1A1)
+ [ 0.3, 1.5 [ - side identified, subjective cost set
+ [ 1.5, 3.6 [ - side identified precisely (CIV), subjective cost adjusted
+ [ 3.6, 4 ] - position identified precisely
+ The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
+ 0class All
+ class AllVehicles: All
+ 0.0005class Land: AllVehicles
+ 0.02class LandVehicle: Land
+ 0.12class Tank: LandVehicle
+ 0.25class M1A1: Tank
+
+ (January 17, 2012)
+ When an unit dies, it's nearTargets array gets emptied after some seconds.
+ When an unit dies, its reference will get removed from other units nearTargets' arrays immediately.
+ A target will be removed from the array after about 360 seconds without contact.
+
+ (January 21, 2012)
+ Position accuracy seems to be a radius in meters from the perceived position.
- Number
+ Array
+
- diag_toggle
+ ctData
- Used to enable/disabled various diagnostics.
- Only available in the Arma 3 Diagnostic exe
+ Returns metadata (string) associated with a particular row of RscControlsTable.
- https://community.bistudio.com/wiki/diag_toggle
+ https://community.bistudio.com/wiki/ctData
- diag_toggle String
+ Control ctData Number
- diag_toggle diag_mode
+ ctrl ctData row
- $Code$diag_toggle "Animation";//enable
- diag_toggle "Animation";//disable$/Code$
+ $Code$ctData _control;$/Code$
- undefined / undefined
+ local / local
- Nothing
+ String
+
- dialog
+ difficultyOption
- Tests whether any user dialog is open.
+ Checks specific difficulty settings of the current user. Difficulty flag names can be found in the CfgDifficultyPresets config class or in
+ ArmA profile file under class DifficultyPresets/xxx/Options (xxx being Recruit, Regular or Veteran).
+ This command replaces difficultyEnabled.
- https://community.bistudio.com/wiki/dialog
+ https://community.bistudio.com/wiki/difficultyOption
- dialog
+ difficultyOption String
- dialog
+ difficultyOption optionName
- $Code$if (! dialog ) then { createDialog "Dialog1";};$/Code$
+ $Code$hint str ( difficultyOption "friendlyTags");$/Code$
undefined / undefined
+ (March 23, 2016)
+ Arma 3 options:
+ reducedDamage
+ groupIndicators
+ friendlyTags
+ enemyTags
+ detectedMines
+ commands
+ waypoints
+ weaponInfo
+ stanceIndicator
+ staminaBar
+ weaponCrosshair
+ visionAid
+ thirdPersonView
+ cameraShake
+ scoreTable
+ deathMessages
+ vonID
+ mapContent
+ autoReport
+ multipleSaves
- Boolean
+ Number
+
- diarySubjectExists
+ lbSetPictureRight
- Checks whether given subject is present in the diary of given person.
+ Sets the second (right aligned) picture in the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Name is the picture name. The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).
+ In Arma 3 it might be necessary to set the color of the picture as well with lbSetPictureRightColor as default [0,0,0,0] color makes picture invisible.
- https://community.bistudio.com/wiki/diarySubjectExists
+ https://community.bistudio.com/wiki/lbSetPictureRight
- Object diarySubjectExists String
+ lbSetPictureRight Array
+
+ Control lbSetPictureRight Array
- person diarySubjectExists name
+ lbSetPictureRight [idc, index, name]
+
+ control lbSetPictureRight [index, name]
-
-
- undefined / undefined
-
+ $Code$lbSetPictureRight [101, 0, "iskoda"];$/Code$
+
+ $Code$_control lbSetPictureRight [0, "iskoda"];$/Code$
+
+
+ local / local
+
+ More information on the LB command family can be found here
- Boolean
+ Nothing - Nothing
+
- didJIP
+ execVM
- Checks if the current client Joined In Progress.
+ Compiles and adds SQF Script to the scheduler queue and returns script handle. The script is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. The script does not execute immediately upon running execVM command, but with some delay. How much delay is unknown as it largely depends on how many other scripts there are in the queue and how busy is VM. The optional argument is passed to the script in private variable _this. In Arma 3 the script handle is also passed to the script in _thisScript variable.
+ In order to understand execVM consider the following comparison:
+ $Code$ private _handle = _args execVM "someFile.sqf";
+ // is practically identical to
+ private _handle = _args spawn compile preprocessFileLineNumbers "someFile.sqf";$/Code$
+ So if you need multiple execution of the same file, you might want to store it in a function ( Functions Library ), otherwise, for a single execution, execVM is a good choice.
- https://community.bistudio.com/wiki/didJIP
+ https://community.bistudio.com/wiki/execVM
- didJIP
+ Anything execVM String
+
+ execVM String
- didJIP
+ arguments execVM filename
+
+ execVM filename
- $Code$clientDidJIP = didJIP ;$/Code$
+ $Code$_handle = execVM "test.sqf";$/Code$
+
+ $Code$_handle = player execVM "test.sqf";
+ waitUntil { scriptDone _handle};$/Code$
+
+ $Code$// In Arma 3 this is also possible:
+ _handle = execVM "123.sqf";
+ waitUntil { isNull _handle};$/Code$
+
+ $Code$[4] execVM "showDamage.sqf";
+ // showDamage.sqf
+ _damage = _this select 0;
+ hint format ["%1", _damage];$/Code$
undefined / undefined
- (February 23, 2016)
- reports false in CfgFunctions with preInit = 1; even when the client joined in progress.
+ (November 23, 2010)
+ Passing variables to the script file
+ To pass multiple variables to the script file, use an array e.g:
+ null = [myunit,1234] execVM "test.sqf";
+ Now within test.sqf to access the elements, use the following:
+ _myunit = _this select 0;
+ _myvar = _this select 1;
- Boolean
+ Script_Handle - Script_Handle
+
- didJIPOwner
+ allDead
- Checks if the current owner of supplied Object Joined In Progress. Server execution only. On clients returns false.
+ Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.
- https://community.bistudio.com/wiki/didJIPOwner
+ https://community.bistudio.com/wiki/allDead
- didJIPOwner Object
+ allDead
- didJIPOwner object
+ allDead
- $Code$ownerDidJip = didJIPOwner tank;$/Code$
+ $Code${ deleteVehicle _x } forEach allDead ;$/Code$
+
+ $Code$// allAlive:
+ _all = allUnits + vehicles ;
+ {
+ _all pushBack agent _x;
+ } forEach ( agents - [ teamMemberNull ]);
+ allAlive = _all - allDead ;$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
+ (April 6, 2017)
+ This also returns bodies hidden with hideBody until they are deleted. Tested in A2OA 1.63.131129
- Boolean
+ Array
+
- difficultyEnabledRTD
+ setUnitRecoilCoefficient
- Returns true if rotorlib simulation is enabled. Forcing by mission is included
+ Proportionaly increase/decrease unit's recoil. Drives muzzle up with every shot when supplied positive number and down when negative. 0 cancels recoil.
- https://community.bistudio.com/wiki/difficultyEnabledRTD
+ https://community.bistudio.com/wiki/setUnitRecoilCoefficient
- difficultyEnabledRTD
+ Object setUnitRecoilCoefficient Number
- difficultyEnabledRTD
+ unitName setUnitRecoilCoefficient coefficient
- $Code$_rtdOn = difficultyEnabledRTD$/Code$
+ $Code$player setUnitRecoilCoefficient 10$/Code$
undefined / undefined
+ (March 28, 2015)
+ Doesnt seem to work on AI or remote controlled units. Setting the value too high, positive or negative produces some interesting recoil animations.
- Boolean
+ Nothing
+
- difficultyEnabled
+ detectedMines
- This command is deprecated since Arma 3 1.58. Since this version it always returns false. Use difficultyOption instead. See Arma 3 Difficulty Overhaul for further details.
- Former functionality:
- Checks specific difficulty settings of the current user. Difficulty flag names can be found in the ArmA profile file under class Difficulties/xxx/Flags (xxx being regular or veteran).
- Note: stress damage for some reason is a separate difficulty so difficultyEnabled "stressDamageEnabled" might not return correct set value. There are however 2 dedicated commands for it:
- enableStressDamage
- isStressDamageEnabled
- Note: auto trim is also for some reason a separate difficulty so difficultyEnabled "autoTrimEnabled" might not return correct set value. There are also 2 dedicated commands for it:
- enableAutoTrimRTD
- isAutoTrimOnRTD
+ Returns an array of all mines detected by a given side
- https://community.bistudio.com/wiki/difficultyEnabled
+ https://community.bistudio.com/wiki/detectedMines
- difficultyEnabled String
+ detectedMines Side
- difficultyEnabled flagName
+ detectedMines side
- $Code$hint str ( difficultyEnabled "armor");$/Code$
+ $Code$detectedMines west ;$/Code$
- $Code$// List current difficulty settings:
- call {
- private ["_diff", "_cfg", "_flags", "_res"];
- _diff = [];
- _cfg = configFile "CfgDifficulties";
- {
- _flags = _cfg configName _x "Flags";
- for "_i" from 0 to count _flags - 1 do {
- _diff pushBack configName (_flags select _i);
- };
- } forEach ("true" configClasses _cfg);
- _diff = _diff arrayIntersect _diff;
- _diff sort true ;
- _res = text "";
- {
- _res = composeText [_res, parseText format [
- " t align='left' %1 - %2 /t ",
- _x,
- [0, 1] select difficultyEnabled _x
- ], lineBreak ];
- } forEach _diff;
- hint _res;
- };$/Code$
+ $Code$detectedMines side player ;$/Code$
undefined / undefined
- (June 29, 2015)
- Arma 3 Flags:
- 3rdPersonView
- armor
- autoAim
- autoGuideAT
- autoSpot
- autoTrimEnabled
- cameraShake
- clockIndicator
- deathMessages
- enemyTag
- extendetInfoType
- friendlyTag
- hud
- hudGroupInfo
- hudPerm
- hudWp
- hudWpPerm
- map
- mineTag
- netStats
- roughLanding
- stanceIndicator
- stressDamageEnabled
- unlimitedSaves
- vonID
- weaponCursor
- windEnabled
-
- Possible Values for Arma 2:
- 3rdPersonView
- armor
- autoSpot
- autoGuideAT
- autoAim
- allowSeagull
- clockIndicator
- deathMessages
- enemyTag
- friendlyTag
- hud
- hudPerm
- hudWp
- hudWpPerm
- map
- netStats
- suppressPlayer
- tracers
- realisticFatigue
- ultraAI
- unlimitedSaves
- weaponCursor
- Boolean
+ Array
+
- difficultyOption
+ ctrlSetModelScale
- Checks specific difficulty settings of the current user. Difficulty flag names can be found in the CfgDifficultyPresets config class or in
- ArmA profile file under class DifficultyPresets/xxx/Options (xxx being Recruit, Regular or Veteran).
- This command replaces difficultyEnabled.
+ Sets 3D control model scale
- https://community.bistudio.com/wiki/difficultyOption
+ https://community.bistudio.com/wiki/ctrlSetModelScale
- difficultyOption String
+ Control ctrlSetModelScale Number
- difficultyOption optionName
+ control ctrlSetModelScale scale
- $Code$hint str ( difficultyOption "friendlyTags");$/Code$
+ $Code$_ctrl3D ctrlSetModelScale 1.5;$/Code$
undefined / undefined
- (March 23, 2016)
- Arma 3 options:
- reducedDamage
- groupIndicators
- friendlyTags
- enemyTags
- detectedMines
- commands
- waypoints
- weaponInfo
- stanceIndicator
- staminaBar
- weaponCrosshair
- visionAid
- thirdPersonView
- cameraShake
- scoreTable
- deathMessages
- vonID
- mapContent
- autoReport
- multipleSaves
- Number
+ Nothing
+
- difficulty
+ !=
- Returns high-level selected difficulty mode.
- Returned value will be: 0 (Recruit), 1 (Regular), 2 (Veteran) or 3 (Elite)
+ Returns whether one value is not equal to another. Both values have need be of the same type.
- https://community.bistudio.com/wiki/difficulty
+ https://community.bistudio.com/wiki/a_!%3D_b
- difficulty
+ Anything != Anything
- difficulty
-
+
- $Code$value = difficulty ;$/Code$
-
- $Code$// The command returns the index of selected difficulty as they appear in CfgDifficulties
- hint str difficulty ; //Result: 4$/Code$
-
+
undefined / undefined
- Number
+ Boolean
+
- directSay
+ unassignItem
- Sends given audio message to the direct channel. Command operates just like xxxxRadio commands, but the sound is played over direct channel and is independent of fadeRadio. The message is defined in CfgRadio in the description.ext file or config radio protocol or a kbAddTopic. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
- Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
+ Unassigns existing item and tries to put it into inventory. If there is no space in inventory the item simply disappears.
- https://community.bistudio.com/wiki/directSay
+ https://community.bistudio.com/wiki/unassignItem
- Object directSay String
+ Object unassignItem String
- unit directSay radioName
+ unit unassignItem item
- $Code$player directSay configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+ $Code$bluforUnit unassignItem "NVGoggles";
+ bluforUnit removeItem "NVGoggles";
+ opforUnit unassignItem "NVGoggles_OPFOR";
+ opforUnit removeItem "NVGoggles_OPFOR";
+ independentUnit unassignItem "NVGoggles_INDEP";
+ independentUnit removeItem "NVGoggles_INDEP";$/Code$
- global / local
+ global / global
- (December 3, 2016)
- To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
- $Code$ player directSay "#MySound.ogg";$/Code$
- Nothing
+ Nothing
+
- direction
+ tvAdd
- Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).
+ Adds an item with given text to Tree View control. The position on Tree View where to add the item and the actual path to this item once added are different. If item is added to existing item, then parent item path is used. If no parent exists, empty array [] is used. See Tree View Path for more information.
- https://community.bistudio.com/wiki/direction
+ https://community.bistudio.com/wiki/tvAdd
- direction Object/Location
+ tvAdd Array
+
+ Control tvAdd Array
- direction object
+ tvAdd [idc, pathParent, text]
+
+ control tvAdd [pathParent, text]
- $Code$player setDir 90;
- _d = direction player ;//returns 90$/Code$
+ $Code$_index = _ctrl tvAdd [[], "Parent Item"];$/Code$
+
+ $Code$_index = tvAdd [101, [0], "First item"];$/Code$
- global / undefined
+ undefined / undefined
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Number
+ Number - Number
+
- disableAI
+ secondaryWeaponMagazine
- Disable parts of the AI behaviour to get a better control over the actions of a unit. Must be executed where AI unit is local. If unit changes locality, it might need to be executed again at the new locality to maintain effect.
- Possible values are:
- "TARGET" - stop the unit to watch the assigned target / group commander may not assign targets
- "AUTOTARGET" - prevent the unit from assigning a target independently and watching unknown objects / no automatic target selection
- "MOVE" - disable the AI's movement / do not move
- "ANIM" - disable ability of AI to change animation. Available only since ArmA: Cold War Assault (OFP 1.99).
- "TEAMSWITCH" - AI disabled because of Team Switch
- "FSM" - disable the execution of AI behavior scripts. Available only since Operation Arrowhead v1.60.
- "WEAPONAIM" - no weapon aiming
- "AIMINGERROR" - prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed/lost target Available only since Arma 3 v1.42.
- "SUPPRESSION" - prevents AI from being suppressed Available only since Arma 3 v1.42.
- "CHECKVISIBLE" - disables visibility raycasts Available only since Arma 3 v1.54.
- "COVER" - disables usage of cover positions by the AI Available only since Arma 3 v1.56.
- "AUTOCOMBAT" - disables autonomous switching to COMBAT when in danger Available only since Arma 3 v1.56.
- "PATH" - stops the AI’s movement but not the target alignment Available only since Arma 3 v1.61.
- "MINEDETECTION" - disable Ai mine detection.
- "ALL" - all of the above Available since Arma 3 v1.65
- Note: In OFP is no way to undo this command.
+ Returns either single element array, containing class name of currently loaded in the secondary weapon magazine, or an empty array if unit has no secondary weapon or secondary weapon is not loaded. This command is used for infantry weapons only.
- https://community.bistudio.com/wiki/disableAI
+ https://community.bistudio.com/wiki/secondaryWeaponMagazine
- Object disableAI String
+ secondaryWeaponMagazine Object
- unitName disableAI section
+ secondaryWeaponMagazine unit
- $Code$_soldier1 disableAI "AUTOTARGET";$/Code$
+ $Code$hint secondaryWeaponMagazine player ; //["NLAW_F"]$/Code$
+
+ $Code$_array = secondaryWeaponMagazine player ;
+ if ( count _array 0) then {
+ hint ("Secondary weapon is loaded with " + (_array select 0) + "!");
+ } else {
+ if ( secondaryWeapon player != "") then {
+ hint "Secondary weapon is not loaded!";
+ } else {
+ hint "Player doesn't have a secondary weapon!";
+ };
+ };$/Code$
- local / global
+ undefined / undefined
- (26.9.2013)
- After substantial testing in ArmA3 1.01, the AI sections are as follows:
- MOVE: disabling this will stop units from turning and moving. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Unit will watch enemies that are in their line of sight, but won't turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can't be controlled by a script either, you have to re-enable movement for that. Unit will still be able to aim within his cone of fire.
- AUTOTARGET: Essentially makes single units without a group, "deaf". The unit still goes prone and combat ready if he hears gunfire. They won't turn around when gunfire comes from the behind, but if an enemy walks in front they will target the enemy and fire as normal. WON'T WORK FOR GROUPED UNITS WITH A LEADER, the leader will assign targets to the units and effectively enables the AI back on.
- TARGET: Will prevent units from engaging the target. Units still move around for cover etc...but won't hunt down the player. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by.
- ANIM: completely freezes the unit, including breathing. Won't even blink. No move command works until the unit is unfrozen.
- FSM: Essentially makes the enemy "dumber". Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM, can give the impression of untrained units as they react slower and are more disorganized than when FSM is enabled. Good for rebel fighters and when enabled better for professional armies.
-
- (August 3, 2006)
- Notes from before the conversion:
- The "TARGET" section of the AI is likely different than what you would think. Normally, when an AI group is standing still and sees an enemy, the group will break formation and start moving towards the enemy. If you disable the "TARGET" AI, then the AI units will stay where they are at. Even if you disable the "MOVE" AI, the units will still move out to attack the enemy, unless you disable the "TARGET" AI. Disabling both these AI sections is useful when placing units in defensive positions. This way, you can have them stay behind their cover, and not run out into the open.
- This command has also a bug: after mission save or load the effect will be no longer active and you must set it again. It's also good way to detect number of saves and loads (loads can be recognized using time command).
-
- (Feb 7, 2009)
- Multiplayer Use as of ArmA v1.14:
- Contrary to the post above, using this command WILL disable A.I. movement ability if used with the "MOVE" parameter. Works even when the A.I. is grouped with other units. I use this command to set up stationary targets at objectives all the time. Works on a dedicated server.
-
- (September 19, 2015)
- Beware that disabling "TARGET" AI to units in the player's group will disable the ability to execute engage orders issued by the player.
-
- (August 24, 2016)
- As of version 1.65 dev., disableAI "MOVE" will also stop vehicles driven by AI.
-
- (September 26, 2016)
- Command is buggy in version 1.64.138497 as it disables the ability to drive vehicles for players. Tested with $Code$player disableAI "move"$/Code$. Entering a vehicle is possible, but not starting the engine. $Code$player enableAI "move"$/Code$ enables the player to drive again.
- Already in the feedback tracker: https://feedback.bistudio.com/T120346
- Nothing
+ Array
+
- disableCollisionWith
+ vectorUpVisual
- Disable collision between vehicles. This commmand doesn't disable collision between PhysX objects.
- !
- Command has to be executed where objects are local, and as long as they don't change locality, the effect of this command will be global.
- If the 2 objects are not local to the same computer, then it has to be executed on both computers to achieve the desired effect.
- If one or both objects change locality, the command needs to be executed again on the new owner 's machine(s) to maintain the effect.
+ Return object's up vector in world Position coordinates ( [x, y, z] ) in render time scope.
- https://community.bistudio.com/wiki/disableCollisionWith
+ https://community.bistudio.com/wiki/vectorUpVisual
- Object disableCollisionWith Object
+ vectorUpVisual Object
- vehicle disableCollisionWith vehicle
+ vectorUpVisual objectName
-
+ $Code$_vUp = vectorUpVisual vehicle player ;$/Code$
+
- local / global
+ global / undefined
- (April 4, 2015)
- disableCollisionWith is basically a script that when you apply it to an object, and your unit can go through it like a ghost. However, if you wish the object to be solid again, you may wish to use the enableCollisionWith.
- An example for this is:
- $Code$//name of unit in editor such as player1
- //name of object in editor such as barrel1
- barrel1 disableCollisionWith player1;
- //to make the barrel solid again, do this as vice versa if you know what your doing!
- barrel1 enableCollisionWith player1 $/Code$
- On a side note: this can come in handy a lot if you want a unit to sit on the back of a car or on top of a container
- Nothing
+ Array
+
- disableConversation
+ lockTurret
- Disable the ability to talk to other people.
+ Lock the gunner position of the vehicle turret. This command must be executed where vehicle is local.
- https://community.bistudio.com/wiki/disableConversation
+ https://community.bistudio.com/wiki/lockTurret
- Object disableConversation Boolean
+ Object lockTurret Array
- unitName disableConversation disable
+ vehicle lockTurret [turret path,lock]
- $Code$player disableConversation true$/Code$
+ $Code$vehicleName lockTurret [[0,0], true ];$/Code$
- $Code$soldier1 disableConversation true$/Code$
+ $Code$vehicle player lockTurret [[0], true ];$/Code$
- undefined / undefined
+ local / global
- (July 10, 2009)
- Note that this will also prevent you from using group radio.
- If you just want player unable to speak to others (or one particular soldier),
- use $Code$player setVariable ["BIS_noCoreConversations", true];$/Code$
- or, for the other soldier,
- $Code$unitName setVariable ["BIS_noCoreConversations", true];$/Code$
-
- (August 18, 2010)
- My previous note is incorrect now, you can use disableConversation and still use the group radio, at least in A2:OA !
- Nothing
+ Nothing
+
- disableDebriefingStats
+ curatorMouseOver
- Disable debriefing score table.
- This command is broken.
+ Returns Curator Editable Object under curator mouse pointer in form of array:
+ [] - when not in curator mode
+ [""] - if no curator editable object under the pointer in curator mode
+ [ typeName, Curator Editable Object ] - if there is curator editable object under the pointer in curator mode
- https://community.bistudio.com/wiki/disableDebriefingStats
+ https://community.bistudio.com/wiki/curatorMouseOver
- disableDebriefingStats
+ curatorMouseOver
- disableDebriefingStats
+ curatorMouseOver
- $Code$disableDebriefingStats ;$/Code$
+ $Code$_mouseOver = curatorMouseOver ;
+ // possible return value:[
+ "OBJECT",
+ 3594ab00# 164218: apc_wheeled_01_cannon_f.p3d
+ ]$/Code$
undefined / undefined
@@ -19831,165 +20875,149 @@
- Nothing
+ Array
+
- disableNVGEquipment
+ isUAVConnectable
- Enables or disables transport NV (Night Vision). To disable TI (Thermal Imaging) use disableTIEquipment.
+ Returns true if UAV is connectable by AV terminal(s).
- https://community.bistudio.com/wiki/disableNVGEquipment
+ https://community.bistudio.com/wiki/isUAVConnectable
- Object disableNVGEquipment Boolean
+ Object isUAVConnectable Array
- vehicle disableNVGEquipment state
+ object isUAVConnectable [uav, checkAllItems]
- $Code$myTank disableNVGEquipment true ;$/Code$
+ $Code$connectable = unit isUAVConnectable [uav,true];$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Boolean
+
- disableRemoteSensors
+ getElevationOffset
- This command will halt raycasting calculations (on the local machine only) for all groups which don't contain any local entities. If a group contains a single local entity then calculations will still be performed for the entire group.
- These raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like knowsAbout, nearTargets and targetKnowledge will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method.
+ Returns the map elevation offset from [map]/config.cpp.
+ Returns 0 if there's no elevationOffset defined in the config of the current world.
- https://community.bistudio.com/wiki/disableRemoteSensors
+ https://community.bistudio.com/wiki/getElevationOffset
- disableRemoteSensors Boolean
+ getElevationOffset
- disableRemoteSensors state
+ getElevationOffset
- $Code$disableRemoteSensors false;$/Code$
+ $Code$_offset = getElevationOffset ;$/Code$
- undefined / local
+ undefined / undefined
- Nothing
+ Number
+
- disableSerialization
+ openYoutubeVideo
- Disable saving of script containing this command. After this, the script can work with data types which do not support serialization (UI types).
- NOTE : When using spawn command, if the argument passed to it is Display or Control, an error will show asking to consider to disable serialization because of use of _this variable. What's more neither disableSerialization no use of uiNamespace will solve this. Passing Display or Control as part of an array however, will do the job:
- $Code$ findDisplay 46 spawn { hint str _this}; // serialization error
- [ findDisplay 46] spawn { hint str (_this select 0)}; // OK $/Code$
+ Opens Steam overlay with given YT video. Video URL is the end part of the YT URL, starting with watch?v=.... If the user has Steam overlay disabled, the command will display appropriate message to the user and return false.
- https://community.bistudio.com/wiki/disableSerialization
+ https://community.bistudio.com/wiki/openYoutubeVideo
- disableSerialization
+ openYoutubeVideo String
- disableSerialization
+ openYoutubeVideo youTubeUrl
- $Code$disableSerialization ;
- _display = findDisplay 46;$/Code$
+ $Code$//Open http://www.youtube.com/watch?v=UBIAbm7Rt78
+ _isOpened = openYoutubeVideo "watch?v=UBIAbm7Rt78";$/Code$
undefined / undefined
- (19 June, 2010)
- Can be used to detecting load. Scope with disabled serialization is discontinued after load, even if there's endless loop inside.
- _loaded = [] spawn { disableSerialization ; waitUntil { false };};
- waitUntil { scriptDone _loaded;};
- hint "Game was loaded!"
- Works for all possible load types - loading user save, loading autosave and resuming mission from main menu.
- Use with caution, as it handles two threads in memory, having impact at overall scripting time.
-
- (23 October, 2013)
- If you do not store UI elements ( Display, Control ) in variables, you do not need disableSerialization ; UI elements are usually returned by scripting commands such as findDisplay or passed as params in UI event handler scripts ( displayAddEventHandler, ctrlAddEventHandler ).
- This code will require disableSerialization : $Code$ disableSerialization ;
- _display = findDisplay 123;
- _ctrl = _display displayCtrl -1;
- _ctrl ctrlSetText "LOL";$/Code$
- This code will not: $Code$ findDisplay 123 displayCtrl -1 ctrlSetText "LOL";$/Code$
-
- (July 25, 2017)
- In ArmA 3 1.72.142223, a scripted FSM does somehow not work with disableSerialization. As a workaround, store a display inside an array.
- Example: $Code$_d = [ findDisplay idd ];$/Code$
- Nothing
+ Boolean
+
- disableTIEquipment
+ inRangeOfArtillery
- Disables TI (Thermal Imaging) equipment for given vehicle. In older versions of Arma this command would also disable NV (Night Vision), but since Arma 3 v1.52.132676 this command disables only TI. Use disableNVGEquipment to disable NV.
+ Returns true if all given units are able to fire at given position with given magazineType.
- https://community.bistudio.com/wiki/disableTIEquipment
+ https://community.bistudio.com/wiki/inRangeOfArtillery
- Object disableTIEquipment Boolean
+ Position inRangeOfArtillery Array
- vehicle disableTIEquipment state
+ pos inRangeOfArtillery [[unit], magazineType]
- $Code$vehicle player disableTIEquipment true ;$/Code$
-
- $Code$_tank disableTIEquipment true ;$/Code$
+ $Code$_isInRange = getMarkerPos "myTarget" inRangeOfArtillery [[myArty], "32Rnd_155mm_Mo_shells"]$/Code$
- global / global
+ global / undefined
+ (July 10, 2015)
+ Using an empty artillery vehicle will return false.
- Nothing
+ Boolean
+
- disableUAVConnectability
+ set3DENIconsVisible
- Disables unit's AV terminal(s) connecting to UAV.
+ Toggle visibility of Eden Editor icons.
- https://community.bistudio.com/wiki/disableUAVConnectability
+ https://community.bistudio.com/wiki/set3DENIconsVisible
- Object disableUAVConnectability Array
+ set3DENIconsVisible Array
- object disableUAVConnectability [uav, checkAllItems]
+ set3DENIconsVisible [showMap, showScene]
- $Code$unit disableUAVConnectability [uav,true];$/Code$
+ $Code$set3DENIconsVisible [ false, false ];
+ // Hide all icons$/Code$
undefined / undefined
@@ -19997,152 +21025,118 @@
- Nothing
+ Nothing
+
- disableUserInput
+ removeMenuItem
- Disable and enable the keyboard and mouse input, usually used during cutscenes.
- Be careful with the usage of this command, always remember to enable the user input again, as once the user input is disabled, you can only shut down OFP but not exit the mission with escape.
+ Removes a previously added menu item.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/disableUserInput
+ https://community.bistudio.com/wiki/removeMenuItem
- disableUserInput Boolean
+ Control removeMenuItem Number
- disableUserInput state
+ map removeMenuItem index
- $Code$disableUserInput true
- ; cutscene
- disableUserInput false$/Code$
-
+
- undefined / local
+ undefined / undefined
- (14 March 2014)
- Sometimes, when disableUserInput true command is invoked while the user is holding a button, when disableUserInput false is called and the user is no longer holding the button, the input will resume as if the user is still holding the button. To reset this behaviour, disable and enable user input again in the same frame:
- $Code$ disableUserInput true ;
- //do something
- disableUserInput false ;
- disableUserInput true ;
- disableUserInput false ;$/Code$
- Unfortunately, if the user is moving mouse when disableUserInput true command is invoked, the mouse input will get stuck for the whole duration of disabled user input but will reset as soon as disableUserInput false is called. I was unable to find workaround for this one.
- Nothing
+ Nothing
+
- displayAddEventHandler
+ debriefingText
- Adds an event handler to the given display. Returns the ID of the event handler, or -1 when failed.
- Returning true in EH code will override default engine handling for keyboard events.
- See User Interface Event Handlers for the full list of event names.
- If applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.
- NOTE: Display EHs are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.
+ Returns debriefing text.
- https://community.bistudio.com/wiki/displayAddEventHandler
+ https://community.bistudio.com/wiki/debriefingText
- Display displayAddEventHandler Array
+ debriefingText String
- display displayAddEventHandler [eventName, code]
+ debriefingText end
- $Code$moduleName_keyDownEHId = ( findDisplay 46) displayAddEventHandler ["KeyDown", " hint str _this;"];$/Code$
-
- $Code$moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler ["KeyDown", { hint str _this}];$/Code$
+ $Code$_deathText = debriefingText "endDeath";$/Code$
undefined / undefined
- (October 30, 2013)
- As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
-
- (March 10, 2014)
- From within an Addon, you must assign the events from a spawned script. eg $Code$[] spawn { (findDisplay 46) displayAddEventHandler["KeyDown","_this call my_KeyDownFunctionhandler"]; };$/Code$
-
- (January 22, 2016)
- Be sure to wait until the main display is initialized before using this command by using: $Code$waituntil {!isnull (finddisplay 46)};$/Code$
-
- (May 28, 2017)
- use #define if you want the displayEventHandler to use data that is defined in the same file in which the command is executed.
- However, that does not work if you use STRING as 'code'. In case of STRING, use the format command around it.
-
- (August 7, 2017)
- Using KeyUp you can't override default engine action by returning true ( A3 1.72.142342 )
- Number
+ String
+
- displayCtrl
+ gearSlotAmmoCount
- Return child control with specified idc.
+ Returns ammo count of assigned magazine.
- https://community.bistudio.com/wiki/displayCtrl
+ https://community.bistudio.com/wiki/gearSlotAmmoCount
- Display displayCtrl Number
+ gearSlotAmmoCount Control
- display displayCtrl idc
+ gearSlotAmmoCount control
- $Code$_ChildControl = _ParentDisplay displayCtrl 101;$/Code$
+ $Code$ammo = gearSlotAmmoCount _control;$/Code$
undefined / undefined
- (May 1, 2017)
- Since Arma 3 1.42 you can also return a control inside a controls group using controlsGroupCtrl (created with ctrlCreate or inside a controls[] of a control config). Example:
- $Code$((uiNamespace getVariable "RscUnitInfo") displayCtrl 2303) controlsGroupCtrl 154; // Display - Controls Group - Control$/Code$
- Note that control inside controls group having -1 IDC currently cannot be returned in any way.
- Control
+ Number
+
- displayNull
+ preloadCamera
- A non-existing Display. To compare non-existent displays use isNull or isEqualTo :
- displayNull == displayNull ; // false
- isNull displayNull ; // true
- displayNull isEqualTo displayNull ; // true
+ Preload all textures and models around given Position to avoid visual artifacts after camera is moved.
+ Should be used before any abrupt camera change/cut.
+ Returns true once all data is ready.
- https://community.bistudio.com/wiki/displayNull
+ https://community.bistudio.com/wiki/preloadCamera
- displayNull
+ preloadCamera Array
- displayNull
+ preloadCamera position
- $Code$! isNull displayNull ; // false$/Code$
-
- $Code$str displayNull ; // No display$/Code$
+ $Code$waitUntil { preloadCamera markerPos "cam_location_2"};$/Code$
undefined / undefined
@@ -20150,27 +21144,28 @@
- Display
+ Boolean
+
- displayParent
+ isInstructorFigureEnabled
- Returns parent display of the given display.
+ Returns the status of INSTRUCTOR FIGURE setting in UI (OPTIONS GAME GENERAL INSTRUCTOR FIGURE).
- https://community.bistudio.com/wiki/displayParent
+ https://community.bistudio.com/wiki/isInstructorFigureEnabled
- displayParent Display
+ isInstructorFigureEnabled
- displayParent display
+ isInstructorFigureEnabled
- $Code$_display = displayParent findDisplay 49; // Display #46$/Code$
+ $Code$hint str isInstructorFigureEnabled ;$/Code$
undefined / undefined
@@ -20178,24 +21173,25 @@
- Display
+ Boolean
+
- displayRemoveAllEventHandlers
+ missionName
- Remove all event handlers from the given display.
+ Return currently loaded mission file (path to mission.pbo, relative to game exe).
- https://community.bistudio.com/wiki/displayRemoveAllEventHandlers
+ https://community.bistudio.com/wiki/missionName
- Display displayRemoveAllEventHandlers String
+ missionName
- display displayRemoveAllEventHandlers handlerName
+ missionName
@@ -20203,260 +21199,214 @@
undefined / undefined
+ (2nd August, 2010)
+ Only works in SP and on the MP Host/DS. It returns the mission pboprefix if available, otherwise the pboname. For clients it returns '__cur_mp'.
+
+ (September 25, 2014)
+ In OFP (up to v1.96) it returns the mission filename. In CWA (since v1.99), it returns the briefing name instead when in multiplayer. The string displayed is that set in the Intel section of the mission editor.
- Nothing
+ String
+
- displayRemoveEventHandler
+ camPrepareRelPos
- Remove a given event handler from the given display.
+ Prepares the camera position relative to the current position of the currect target (see camPrepareTarget ).
- https://community.bistudio.com/wiki/displayRemoveEventHandler
+ https://community.bistudio.com/wiki/camPrepareRelPos
- Display displayRemoveEventHandler Array
+ Object camPrepareRelPos Array
- display displayRemoveEventHandler [handler name,id]
+ camera camPrepareRelPos position
-
+ $Code$_camera camPrepareRelPos [10,5,-2]$/Code$
+
undefined / undefined
- (April 19, 2015)
- If you for example used this code to add the eventHandler:
- $Code$_myEH = (findDisplay 46) displayAddEventHandler ["KeyDown", "hint str _this"];$/Code$
- Then this would be the correct code to remove that eventHandler again:
- $Code$(findDisplay 46) displayRemoveEventHandler ["KeyDown", _myEH];$/Code$
- Nothing
+ Nothing
+
- displaySetEventHandler
+ findEditorObject
- Sets given event handler of given display.
- The return code of the provided function should indicate whether this event was handled correctly. This implies telling the engine whether it's default code should be executed.
- See User Interface Event Handlers for the full list of handler names.
- If applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.
+ Return object that matches the provided reference.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/displaySetEventHandler
+ https://community.bistudio.com/wiki/findEditorObject
- Display displaySetEventHandler Array
+ Control findEditorObject Any_Value
- display displaySetEventHandler [handlerName, function]
+ map findEditorObject value
- $Code$_control displaySetEventHandler ["KeyDown", ""]$/Code$
-
- $Code$init.sqf
- keyspressed = compile preprocessFile "keyspressed.sqf";
- _display = findDisplay 46;
- _display displaySetEventHandler ["KeyDown","_this call keyspressed"];
- keyspressed.sqf
- private['_handled'];
- _handled = false;
- switch (_this select 1) do
- {
- //F key
- case 33:
- {
- // code here
- _handled = true;
- };
- };
- _handled;$/Code$
-
+
undefined / undefined
- (Nov 25, 2009)
- Always use displayAddEventHandler instead, as DSetEH overwrites other (peoples') DEH.
- Nothing
+ String
+
- dissolveTeam
+ ctrlScale
- Dissolves the given team. All members become members of the main team. Possible team values are: "RED", "GREEN", "BLUE" or "YELLOW".
+ Returns the current scale of the control.
- https://community.bistudio.com/wiki/dissolveTeam
+ https://community.bistudio.com/wiki/ctrlScale
- dissolveTeam String
+ ctrlScale Control
- dissolveTeam teamColor
+ ctrlScale controlName
- $Code$dissolveTeam "RED"$/Code$
+ $Code$_scale = ctrlScale _control$/Code$
- local / undefined
+ undefined / undefined
- Nothing
+ Number
+
- distance2D
+ visibleCompass
- Returns a 2D distance ( distance projected to X,Y plane) in meters between two Objects or two Positions or Object and Position.
+ Checks if the player has compass opened and visible
- https://community.bistudio.com/wiki/distance2D
+ https://community.bistudio.com/wiki/visibleCompass
- Object/Array distance2D Object/Array
+ visibleCompass
- param1 distance2D param2
+ visibleCompass
- $Code$_meters = player distance2D heli;$/Code$
+ $Code$if ( visibleCompass ) then { hint "Compass is visible"};$/Code$
- global / undefined
+ undefined / undefined
- Number
+ Boolean
+
- distanceSqr
+ enableRopeAttach
- Computes the squared distance between two objects or positions.
+ Enable/disable ability to attach or be attached to ropes for given vehicle
- https://community.bistudio.com/wiki/distanceSqr
+ https://community.bistudio.com/wiki/enableRopeAttach
- Object/Position distanceSqr Object/Position
+ Object enableRopeAttach Boolean
- var1 distanceSqr var2
+ vehicle enableRopeAttach enable
- $Code$player distanceSqr ( leader player )$/Code$
-
- $Code$_distance = sqrt ((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2);
- _distanceSqr = (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2;
- _distance = [x1, y1, z1] distance [x2, y2, z2];
- _distanceSqr = [x1, y1, z1] distanceSqr [x2, y2, z2];
- _distance = sqrt ([x1, y1, z1] distanceSqr [x2, y2, z2]);
- _distanceSqr = ([x1, y1, z1] distance [x2, y2, z2]) ^ 2;$/Code$
+ $Code$( vehicle player ) enableRopeAttach false ;$/Code$
undefined / undefined
+ (05 April, 2014)
+ Attachable nearby vehicles may not update on Sling Load Assistant until re-opened.
- Number
+ Nothing
+
- distance
+ removeWeaponTurret
- Returns a distance in meters between Objects, Positions or Locations.
- NOTE: If positions are supplied as arguments, the coordinates are treated as PositionATL if over the land and as PositionASLW if over the sea. If 2D position is supplied, z is assumed 0.
+ Removes weapon from the turret. Use turret path [-1] for driver's turret.
- https://community.bistudio.com/wiki/distance
+ https://community.bistudio.com/wiki/removeWeaponTurret
- Object/Array distance Object/Array
-
- Location/Array distance Location/Array
+ Object removeWeaponTurret Array
- param1 distance param2
-
- location1 distance location2
+ vehicle removeWeaponTurret [weaponName, turretPath]
- $Code$_meters = player distance _object;$/Code$
-
- $Code$_meters = player distance [1,2,3];$/Code$
-
- $Code$_meters = [1,2,3] distance [4,5,6];$/Code$
+ $Code$_tank removeWeaponTurret ["LMG_M200",[0,0]];$/Code$
- $Code$_meters = position player distance nearestLocation [ position player, "hill"];$/Code$
+ $Code$vehicle player removeWeaponTurret ["SportCarHorn",[-1]];$/Code$
- global / undefined
+ local / global
- (Feb 14, 2007)
- distance to position3D (array) doesnt work with OFP, only objects
- Armed Assault:
- position3D (array) and object works
-
- (Mar 10, 2010)
- This returns the map distance, not the vector distance, [0,0,0] distance [0,0,1] can be 1 or 1, not exactly 1; unlike the vector math.
-
- (Aug 03, 2012)
- If a position in format [x, y, z] is provided for both arguments, distance also checks the z dimension as well. Ie:
- player distance [0,0,200]
- will return 200, if the player is at this position at ground/sea level.
-
- (March 22, 2014)
- When objects are supplied as arguments, distance is calculated from their model center (object modelToWorld [0,0,0]), and not the position returned by getPos/ATL/ASL.
- However, this is not relevant for units, as their model center matches their world position.
- Number - Number
+ Nothing
+
- distributionRegion
+ sideEmpty
- Returns the numerical index for the distribution region of this copy of ArmA.
- 1 - US
- 2 - Rest of the world
+ Returns empty side, for example static buildings in Eden Editor.
- https://community.bistudio.com/wiki/distributionRegion
+ https://community.bistudio.com/wiki/sideEmpty
- distributionRegion
+ sideEmpty
- distributionRegion
+ sideEmpty
- $Code$distributionRegion == 1$/Code$
+ $Code$_sideEmpty = sideEmpty ;$/Code$
undefined / undefined
@@ -20464,63 +21414,72 @@
- Number
+ Side
+
- do
+ addWaypoint
- Executes code. Used as part of construct, such as while, with, for and switch. The code is always executed in missionNamespace unless do is used with with as an argument.
+ Adds (or inserts when index is given) a new waypoint to a group.
+ The waypoint is placed randomly within a circle with the given center and radius.
+ The function returns a waypoint with format [group, index].
- https://community.bistudio.com/wiki/do
+ https://community.bistudio.com/wiki/addWaypoint
- While_Type/With_Type/For_Type/Switch_Type do Code
+ Group addWaypoint Array
- construct do code
+ groupName addWaypoint [center, radius, index, name]
- $Code$while {b a} do {a = a + 1};$/Code$
-
- $Code$// A practical example: Repair all members of a group to such a level that they are able to stand up:
- {
- while {! canStand _x && alive _x } do {
- _x setDamage ( damage _x - 0.01);
- };
- } forEach units group unitname;$/Code$
+ $Code$_wp =_grp addWaypoint [ position player, 0];$/Code$
- undefined / undefined
+ global / global
+ (November 26, 2009)
+ In game versions prior to Arma 3 v1.22:
+ If you add a waypoint to your group and then want them to start moving to that waypoint, make sure to call setWaypointType "MOVE" on your waypoint.
+
+ (18:23, 28 April 2011 (CEST))
+ In VBS2 1.30, the randomization of addWaypoint doesn't seem to work correctly all of the time.
+ The alternative syntax of addWaypoint with a specified index doesn't seem to work correctly.
+
+ (June 21, 2014)
+ if you want to create a waypoint of type "MOVE" and set it as actual waypoint, you can use the move command that does everything for you with only one line of code ! Be aware that move command intercepts multiple waypoints and it will not line up in waypoints queue. In other word it is a quick solution if you want your group to get only one waypoint, but for several waypoints you'll have to use addwaypoint and all setwaypointXXXXXX commands around. see move command.
+
+ (August 4, 2014)
+ The waypoint may not be created exactly at the center position even if radius is zero. The position will be moved away if there are e.g. rocks at the center position or if it is placed at the edge of water on a shore.
- Anything
+ Array
+
- do3DENAction
+ leaderboardGetRows
- Performs given Eden Editor action.
- See the list of all actions.
+ Returns an array with values for the given leaderboard, the array is in format: [[player1Name, score, rank], [player2Name, score, rank], [player3Name, score, rank]... ]; This can be called after the one of the row request function has been called and successfully finished!
- https://community.bistudio.com/wiki/do3DENAction
+ https://community.bistudio.com/wiki/leaderboardGetRows
- do3DENAction String
+ leaderboardGetRows String
- do3DENAction action
+ leaderboardGetRows boardName
- $Code$do3DENAction "MissionSave";// saves the scenario$/Code$
+ $Code$leaderboardGetRows "TT01"$/Code$
undefined / undefined
@@ -20528,807 +21487,772 @@
- Nothing
+ Array
+
- doArtilleryFire
+ visibleMap
- Orders a unit to reload defined magazine commence fire burst on the given position (silently).
+ Return true if the main map is shown (active).
- https://community.bistudio.com/wiki/doArtilleryFire
+ https://community.bistudio.com/wiki/visibleMap
- Object doArtilleryFire Array
+ visibleMap
- unit doArtilleryFire [position, type, rounds]
+ visibleMap
- $Code$mortar1 doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];$/Code$
+ $Code$if (visibleMap) then {hint "You're showing the map !"}$/Code$
undefined / undefined
+ (13 November 2017)
+ visibleMap does not work in all cases where a map might be part of a dialog like in a uav terminal or in a artillery computer dialog. Some of these cases can be covered with an addMissionEventHandler of type "Map". Just use the two magic variables 'mapIsOpened' and 'mapIsForced'. Skeleton might look something like
+ // update marker as long as map is open (works for uav stations as well)
+ J_myGPSEH = addMissionEventHandler ["Map", {
+ params ["_mapIsOpened", "_mapIsForced"];
+ if (_mapIsOpened) then {
+ systemChat "GPS aktiv";
+ J_var_GPSOn = true;
+ // no sheduled environment - create one
+ /* Triggered when map is opened or closed either by user action or script command openMap. */
+ [] spawn {
+ waitUntil{
+ ... // do something as long as map is open;
+ not J_var_GPSOn
+ };
+ };
+ } else {
+ J_var_GPSOn = false;
+ systemChat "GPS inaktiv";
+ };
+ }];
- Nothing
+ Boolean
+
- doFSM
+ allowFileOperations
- Orders a unit to process command defined by FSM file (silently).
- Unlike with execFSM where _this is passed to the FSM, the following parameters are passed when using doFSM/commandFSM:
- _leader
- leader of subgroup with this command
- _destination
- command destination/position
- _target
- command target
- _units
- list of all persons in subgroup
+ Allow/dissallow file ops (load/save etc).
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/doFSM
+ https://community.bistudio.com/wiki/allowFileOperations
- Object/Array doFSM Array
+ Control allowFileOperations Boolean
- unit doFSM [fsmName, position, target]
+ map allowFileOperations bool
- $Code$_soldierOne doFSM ["move.fsm", position player, player ];$/Code$
-
+
undefined / undefined
- (August 4, 2010)
- Do not doStop a unit in a FSM called with doFSM or commandFSM. Doing so nevertheless will halt your FSM, since no links are followed anymore (doing so in an end state should be fine though). Also this may crash your game in certain mysterious circumstances.
- You may design your FSM so that they may be called with doFSM/commandFSM and execFSM likewise by checking if _units or _this is nil and then init the variables accordingly. Just remember that you should use the low level moveTo (together with moveToCompleted, moveToFailed ) if do-/commandFSM'd, and doMove or commandMove (together with unitReady ) if execFSM'd. A moveTo in an FSM started with execFSM won't do anything, likewise doMove in a FSM started with doFSM or commandFSM wont work either. Think about it for a minute and you will see why. (hint: a unit running a FSM called with doFSM or commandFSM will _never_ return true for (unitReady _unit) )
- Anyway, if you want to be able to call your FSM either way, a "ready" condition might look light this: (moveToCompleted _unit) || (moveToFailed _unit) || (unitReady _unit), assuming you have a moveTo or a doMove (depending on how the fsm is called) in the prior state.
-
- (February 14, 2015)
- Adding to Rübe's note, doFSM can be checked if it has finished by unitReady as of 2015 and it will return true when your FSM has completed.
- Nothing
+ Nothing
+
- doFire
+ assignToAirport
- Order the given unit(s) to fire on the given target (without radio messages).
- The target is set with doTarget or commandTarget.
- The target can be a unit or a vehicle, but not an object.
+ Not correctly implemented yet, currently it does the same as landAt. As the implementation may get fixed sometime, please do not use this command until then.
- https://community.bistudio.com/wiki/doFire
+ https://community.bistudio.com/wiki/assignToAirport
- Object/Array doFire Object
+ Object assignToAirport Number
+
+ Object assignToAirport Object
- unitName doFire target
+ plane assignToAirport id
+
+ plane assignToAirport target
- $Code$_ESoldier1 doFire _WSoldier1;$/Code$
+ $Code$plane1 assignToAirport 0$/Code$
- local / global
+ undefined / undefined
- (August 3, 2006)
- Notes from before the conversion:
- It is often helpful to use doTarget first.
-
- (March 25, 2007)
- A unit will not execute this command when his behaviour is set to "careless".
-
- (Feb 18, 2012)
- Board dofire not working in arma2 1.11. an entity he throws he shoots not only.
-
- (June 7, 2012)
- Unitname dofire objnull does not work like it does in commandfire. Target var has to be real (Arma2 AO) might be different in other versions.
- Nothing
+ Nothing - Nothing
+
- doFollow
+ setSimpleTaskAlwaysVisible
- Order the given unit(s) to follow the given other unit or vehicle eg (without radio messages). Also is used to resume unit formation after doStop, just doFollow leader even if it is the leader himself you want to resume (see Example 2).
+ Makes the given task allways visible or not.
- https://community.bistudio.com/wiki/doFollow
+ https://community.bistudio.com/wiki/setSimpleTaskAlwaysVisible
- Object/Array doFollow Object
+ Task setSimpleTaskAlwaysVisible Boolean
- unitName doFollow unitName2
+ taskID setSimpleTaskAlwaysVisible state
- $Code$_soldier1 doFollow _soldier2$/Code$
-
- $Code$units _group doFollow leader _group;$/Code$
+ $Code$getWarka setSimpleTaskAlwaysVisible true ;$/Code$
- local / global
+ undefined / undefined
- These commands ( doFollow or commandFollow ) work only if the two units are in the same group.
-
- (August 29, 2016)
- The name of this command is a bit misleading, it is used to make a unit return to the formation of its group or subformation.
- Nothing
+ Nothing
+
- doGetOut
+ enginesRpmRTD
- Orders a unit or units to get out from the vehicle (silently).
+ Returns all engines RPM
- https://community.bistudio.com/wiki/doGetOut
+ https://community.bistudio.com/wiki/enginesRpmRTD
- doGetOut Object/Array
+ enginesRpmRTD Object
- doGetOut unit
+ enginesRpmRTD RTD_helicopter
- $Code$doGetOut _unitOne$/Code$
+ $Code$_UH80_E1 = ( enginesRpmRTD _UH80) select 0;//engine 1 RPM
+ _UH80_E2 = ( enginesRpmRTD _UH80) select 1;//engine 2 RPM$/Code$
- local / global
+ undefined / undefined
- Nothing
+ Array
+
- doMove
+ isRemoteExecutedJIP
- Order the given unit(s) to move to the given position (without radio messages). After reaching his destination, the unit will immediately return to formation (if in a group); or order his group to form around his new position (if a group leader). Use doStop to stop units returning to formation.
+ Returns true if the code context is being remote executed from the JIP queue by remoteExec or remoteExecCall (when JIP param was set). It is a subset of isRemoteExecuted :
+ Normal remote execution:
+ isRemoteExecuted - true
+ isRemoteExecutedJIP - false
+ Remote execution from JIP queue:
+ isRemoteExecuted - true
+ isRemoteExecutedJIP - true
+ In SP always returns false.
- https://community.bistudio.com/wiki/doMove
+ https://community.bistudio.com/wiki/isRemoteExecutedJIP
- Object/Array doMove Array
+ isRemoteExecutedJIP
- unit doMove position
+ isRemoteExecutedJIP
- $Code$_soldier1 doMove ( position _officer);$/Code$
-
- $Code$this doMove ( getMarkerPos "Marker1");$/Code$
+ $Code$_remoteExecutedJIP = isRemoteExecutedJIP ;$/Code$
- local / global
+ undefined / undefined
- (February 9, 2008)
- If doMove is to be used in conjunction with waypoint behavior commands (e.g. setSpeedMode ), then those have to be issued after the move command to have an effect. Otherwise the move will be done with the default settings.
-
- (February 3, 2009)
- If a unit is part of a group, and is not the leader, the unit will fall back into formation soon after the domove is completed. This does not happen for units that are in a group alone (because they are their own leader).
- There is no single command to get a unit to move to a position and stay there. The best way to do this is to issue a domove, then wait for the unit to reach his destination, then disable his movement AI. VBS2 users can use the fn_vbs_doMoveEx function.
- Nothing
+ Boolean
+
- doStop
+ createSimpleTask
- Order the given unit(s) to stop (without radio messages). The units stopped in this way will leave the groups formation. It will prevent them from moving around with their group (or formation leader), while still being able to turn around and even move to a new position if they see fit. The units will still respond to orders from their group leader (like engage, rearm, board a vehicle), but all of their actions will be separate from the group formation. To resume group default behaviour, use doFollow command. For example: units _group doFollow leader _group;
+ Creates a new Task. The task effect is local, it will only exist on PC it was added.
- https://community.bistudio.com/wiki/doStop
+ https://community.bistudio.com/wiki/createSimpleTask
- doStop Object/Array
+ Object createSimpleTask Array
- doStop unit
+ person createSimpleTask [name, parentTask ]
- $Code$doStop _soldier1;$/Code$
-
- $Code$doStop [_soldier1, _soldier2];$/Code$
+ $Code$_currentTask = player createSimpleTask ["NewTask"];$/Code$
- $Code$doStop ( units player );$/Code$
+ $Code$_childTask = player createSimpleTask ["ChildTask", _currentTask];$/Code$
- global / global
+ global / local
- (August 3, 2006)
- Notes from before the conversion:
- This command will make the unit stop where he is until the unit's group engages the enemy. At that time, the unit will move and fight the enemy. One good use for this is to place a bunch of units in the same group around a campfire or in some other place "for looks", and make them sit down or have their weapon on their back. When the enemy is spotted, they will get up and attack. Note that you cannot do something like place somebody behind sandbags and keep him there during a fight with this command. For that you will need disableAI "move".
-
- In ArmA 1.14, this command will not stop a unit that has been given a move order by selecting the unit, then clicking on the in game map (or ground).
-
- doStop'ed units WILL return to formation if their leader's behaviour isn't set to "COMBAT". The squad leader will also order everyone to return to formation if there are no enemies nearby in a set period of time, overwriting the doStop command. doStop can be best used to simply stop the unit from doing whatever he is currently doing without radio messages.
-
- (December 23, 2016)
- When a unit reaches position given with doMove, unitReady becomes true. If doStop command is not executed, unit will start wondering on its own soon after, especially if unit is under fire. doStop will keep unit at the given position, but watch out for unitReady as it will become false since unit is holding position indefinitely.
-
- (December 27, 2016)
- Although it is possible to resume group default behaviour by joining units into own group like this units _group joinSilent _group there is a risk that the leader will change. Instead use doFollow command as explained in the description.
+ (July 02, 2011)
+ Creating child will position the new task just under the parent task.
+ Creating another "normal" (parent) task will create a new line above the others. Think of it if you want ordered objectives.
+ Succeeding parent task will automatically succeed childs, whatever their taskState was set to. (I.E. If a task is set as a child to another, it will be completed when its parent is complete.. no matter if the child task really was or not).
+ This command has to be executed again for it to be applied for JIP players - no server sync
+ Full step by step code from beginning to end:
+ Step 1: create a new simpleTask
+ $Code$
+ A_SIMPLE_TASK = player createSimpleTask [( localize "STR_aSimpleTask")];
+ $/Code$
+ You may create a task at any given point in time. You just need to be aware of the fact, that you've created the task for a single unit (the player). So if you make use of teamSwitch, respawn or similiar, you need to think about how to manage this, so all of these units will have up to date tasks assigned to them.
+ Second, it's a good practice to use a stringtable, even if you do not plan (yet) to offer translations.
+ Step 2: task destination
+ $Code$
+ A_SIMPLE_TASK setSimpleTaskDestination _destination;
+ $/Code$
+ variable/pointer-to-your-task setSimpleTaskDestination some-position. That's it.
+ Step 3: task description
+ $Code$
+ A_SIMPLE_TASK setSimpleTaskDescription [
+ ( localize "STR_aSimpleTaskLongText"),
+ ( localize "STR_aSimpleTask"),
+ ( localize "STR_aSimpleTaskWaypointLabel")
+ ];
+ $/Code$
+ Again, no magic involved here. You take your task, the command setSimpleTaskDescription an pass an array with three strings in it. The first string is the long description text, the second is the name/title of the task and the last one will show up on-screen on the waypoint in cadet mode.
+ Step 4: set and update task states
+ $Code$
+ A_SIMPLE_TASK setTaskState "CREATED";
+ $/Code$
+ And that's it. Here a minimal working example:
+ $Code$
+ A_SIMPLE_TASK = player createSimpleTask ["simple task title"];
+ A_SIMPLE_TASK setSimpleTaskDestination ( position player );
+ A_SIMPLE_TASK setSimpleTaskDescription [
+ "simple task long description",
+ "simple task title",
+ "simple task waypoint label"
+ ];
+ A_SIMPLE_TASK setTaskState "CREATED";
+ $/Code$
+ And then later in the mission:
+ $Code$
+ A_SIMPLE_TASK setTaskState "SUCCEEDED";
+ $/Code$
+ If you want to keep the player in the loop about the status of tasks, you may always do this:
+ $Code$
+ [ objNull, objNull, A_SIMPLE_TASK, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
+ $/Code$
- Nothing
+ Task
+
- doSuppressiveFire
+ getDirVisual
- Order the given unit to suppress a given position or target (without radio messages).
+ Returns object's heading in the range from 0 to 360 in render time scope.
- https://community.bistudio.com/wiki/doSuppressiveFire
+ https://community.bistudio.com/wiki/getDirVisual
- Object/Array doSuppressiveFire Object/Array
+ getDirVisual Object
- unitName doSuppressiveFire target
+ getDirVisual object
- $Code$_soldier doSuppressiveFire [1869.508,5760.962,0.000]$/Code$
-
- $Code$_soldier doSuppressiveFire cursorTarget$/Code$
+ $Code$_dir = getDirVisual player ;$/Code$
- local / local
+ global / undefined
- (October 8, 2016)
- Command expects position as second argument in format ASL in A3 1.64.138497.
- Nothing
+ Number
+
- doTarget
+ joinString
- Order the given unit(s) to target the given target (without radio messages).
+ Joins array into String with provided separator. Array can be of mixed types, all elements will be converted to String prior to joining, but the fastest operation is on the array of Strings.
- https://community.bistudio.com/wiki/doTarget
+ https://community.bistudio.com/wiki/joinString
- Object/Array doTarget Object
+ Array joinString String
- unit doTarget target
+ array joinString separator
- $Code$_ESoldier1 doTarget _WSoldier1;$/Code$
+ $Code$_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"]
+ _str joinString " "; // "This is a sample string"$/Code$
+
+ $Code$["This","is","sparta"] joinString " ~ "; // "This ~ is ~ sparta"$/Code$
+
+ $Code$["1",2, text "3"] joinString ""; // "123"$/Code$
+
+ $Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
+
+ $Code$"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"$/Code$
+
+ $Code$// Remove all \r\n from file:
+ loadFile "somefile.txt" splitString toString [13,10] joinString " "$/Code$
- local / global
+ undefined / undefined
- It appears doTarget objNull can not be used to stop a unit targeting a previously assigned target. Using doWatch objNull will achieve the desired result. (ArmA v1.12Beta)
-
- (July 2, 2015)
- To expand on ceeeb's note, commandWatch objNull will also unassign target;
-
- (March 28, 2017)
- Targeting may not work as expected when trying to target a unit on the same side (friendly).
- Nothing
+ String
+
- doWatch
+ setLightDayLight
- Order the given unit(s) to watch the given position or target (without radio messages). Use objNull as the target to order a unit to stop watching a position/target.
+ Sets if light can be used during the day.
- https://community.bistudio.com/wiki/doWatch
+ https://community.bistudio.com/wiki/setLightDayLight
- Object/Array doWatch Array
-
- Object/Array doWatch Object
+ Object setLightDayLight Boolean
- unit doWatch position
-
- unit doWatch target
+ light setLightDayLight bool
- $Code$_soldierOne doWatch markerPos "MarkerMoveOne"
- // The unit named "soldierOne" will watch the position where the marker "MarkerMoveOne" is placed.$/Code$
-
- $Code$_soldierOne doWatch _eastSoldier
- // The unit named "soldierOne" will watch the unit named "eastSoldier".$/Code$
+ $Code$myLight setLightDayLight true;$/Code$
- local / global
+ local / local
- (April 18, 2015)
- Also controls where a vehicle gunner aims.
- Nothing - Nothing
+ Nothing
+
- doorPhase
+ vectorDirVisual
- Return animation phase of door on vehicle.
+ Return object's normalized direction vector in world space ( [x,y,z] ) in render time scope.
+ A unit facing North would return [0,1,0]
+ A unit facing East would return [1,0,0]
+ A unit facing South would return [0,-1,0]
+ A unit facing West would return [-1,0,0]
- https://community.bistudio.com/wiki/doorPhase
+ https://community.bistudio.com/wiki/vectorDirVisual
- Object doorPhase String
+ vectorDirVisual Object
- object doorPhase door
+ vectorDirVisual objectName
- $Code$_phase = heli doorPhase "door_L";$/Code$
+ $Code$_dirVector = vectorDirVisual _unit;$/Code$
- undefined / undefined
+ global / undefined
- Number
+ Array
+
- drawArrow
+ setAirportSide
- Draws a single line arrow on the map. To draw a color filled arrow of custom shape see BIS_fnc_drawArrow
+ Set owning side of the airport. ID is the number to identify which airport on the island you want to check.
- https://community.bistudio.com/wiki/drawArrow
+ https://community.bistudio.com/wiki/setAirportSide
- Control drawArrow Array
+ Number setAirportSide Side
+
+ Object setAirportSide Side
- map drawArrow [from, to, color]
+ id setAirportSide side
+
+ target setAirportSide side
- $Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
- {
- _this select 0 drawArrow [
- player, player getRelPos [100, 0], [1,0,0,1]
- ];
- }];$/Code$
+ $Code$0 setAirportSide east$/Code$
undefined / undefined
- (July 7, 2015)
- Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
- Nothing
+ Nothing - Nothing
+
- drawEllipse
+ isPlayer
- Draws an ellipse on the map. Just like with marker or trigger area, negative a and b will result in hexagon.
+ Checks if given person is player. Returns true for headless clients as well.
+ In some cases, the identity of certain player units might fail to propagate to other clients and the server, which causes isPlayer and getPlayerUID to incorrectly return false and "", respectively, where the affected units are not local. [1] Therefore, beware of false negatives.
- https://community.bistudio.com/wiki/drawEllipse
+ https://community.bistudio.com/wiki/isPlayer
- Control drawEllipse Array
+ isPlayer Object
- map drawEllipse [c, a, b, angle, color, fill]
+ isPlayer person
- $Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
- {
- _this select 0 drawEllipse [
- player, 10, 10, 0, [1, 0, 0, 1], ""
- ];
- _this select 0 drawEllipse [
- player, -10, -10, 0, [1, 1, 1, 1], "#(rgb,8,8,3)color(1,0.6,0,1)"
- ];
- _this select 0 drawEllipse [
- player, -10, -10, 90, [0, 0, 1, 1], ""
- ];
- }];$/Code$
+ $Code$if ( isPlayer _Soldier1) then {
+ _Soldier1 setDamage 1;
+ };$/Code$
+
+ $Code$_playerCount = { isPlayer _x} count playableUnits ;$/Code$
- undefined / undefined
+ global / undefined
- (July 7, 2015)
- Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
+ (1 August, 2006)
+ This is not the same as testing object == player, because in MP it tests for any player, not only for the local one. If object is a vehicle, the test is done for the vehicle commander.
- Nothing
+ Boolean
+
- drawIcon3D
+ linearConversion
- Draws an ingame icon at a given position. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D"
+ Converts given value from given "from" range to wanted "to" range. If clipping is set to true, the resulting value is guaranteed to be within "to" range no matter what. Say given range is 0 to 1 and wanted range is 0 to 100 (percent calculation). Given value 0.55 then will be linearConversion [0,1,0.55,0,100]; //55 but if given value is 1.1 linearConversion [0,1,1.1,0,100, false ]; //110 or if clipping is true linearConversion [0,1,1.1,0,100, true ]; //100
- https://community.bistudio.com/wiki/drawIcon3D
+ https://community.bistudio.com/wiki/linearConversion
- drawIcon3D Array
+ linearConversion Array
- drawIcon3D [texture, color, pos, width, height, angle, text, shadow, textSize, font, textAlign, drawSideArrows]
+ linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip]
- $Code$// Icon and text:
- onEachFrame {
- drawIcon3D ["targetIcon.paa", [1,1,1,1], getPos cursorTarget, 1, 1, 45, "Target", 1, 0.05, "TahomaB"];
- };$/Code$
+ $Code$linearConversion [4, 8, 5, 0, 1, false ];$/Code$
- $Code$// Just text:
- addMissionEventHandler ["Draw3D", {
- drawIcon3D ["", [1,0,0,1], position cursorTarget, 0, 0, 0, "Target", 1, 0.05, "PuristaMedium"];
- }];$/Code$
+ $Code$// Calculate days from 1/1/1970:
+ fnc_daysFromEpoc =
+ {
+ private _year = param [0];
+ private _days = 0;
+ for "_i" from 1970 to _year - 1 do
+ {
+ _days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false ];
+ };
+ _days + linearConversion [0, 1, dateToNumber _this, 0, 365, false ];
+ };
+ hint str ( date call fnc_daysFromEpoc);$/Code$
undefined / undefined
- (August 31, 2013)
- As command syntax indicates, this command expects icon position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW. Use additional ASLToAGL if needed.
- To draw smooth moving icon for a moving object use visiblePosition and visiblePositionASL accordingly.
-
- (September 23, 2013)
- This command works well with addon textures, however getting it to display mission textures is a bit tricky. Follow this guide :
-
- (April 19, 2014)
- Just a little precision to KK's first comment, this command expects PositionASLW over the sea, not regular ASL. Luckily, modelToWorld returns ATL over land and ASLW over sea, so if you want the icon to stay the the same place, you should use this snippet to find the correct position:
- $Code$_pos = visiblePositionASL _object;
- _pos set [2, (_object modelToWorld [0,0,0]) select 2];$/Code$
-
- (October 23, 2014)
- drawIcon3D and BIS_fnc_addStackedEventHandler work well together.
- Using formatting commands with drawIcon3D will not work, instead, they will be added to the string.
- $Code$["uniqueID", "onEachFrame",
- {
- drawIcon3D["myIcon.jpg", [1,1,1,0.5], getPos player, 1, 1, 0, format["%1\n%2", "Dreaded", "Entity"]];
- }] call BIS_fnc_addStackedEventHandler;$/Code$
- Shown text will be Dreaded\nEntity. (A3 1.32.127785)
- The "text" parameter must be a string. You cannot use Structured_Text.
- $Code$["uniqueID", "onEachFrame",
- {
- drawIcon3D
- [
- "myIcon.jpg",
- [1,1,1,0.5],
- getPos player,
- 1,
- 1,
- 0,
- parseText format[" t size='1.25' font='PuristaLight' color='#ff0000' %1%2 /t ", Dreaded, Entity]
- ];
- }] call BIS_fnc_addStackedEventHandler;$/Code$
- (A3 1.32.127785)
-
- (November 13 (2014))
- Here's a practical example combining both drawLine3D and drawIcon3D. Note: You may want to use visiblePosition instead of getPos for moving objects.
- $Code$DEADPILOTS = [];
- {
- if (getText (configfile "CfgVehicles" typeOf _x "textSingular") == "pilot") then {
- DEADPILOTS pushBack _x;
- };
- } forEach allDeadMen;
- addMissionEventHandler ["Draw3D", {
- if (
- {
- player distance _x = 15
- } count DEADPILOTS 0
- ) then {
- {
- _corpsePos = getPos _x;
- if (player distance _corpsePos = 15) then {
- _line1_start = _corpsePos;
- _line1_end = [(_line1_start select 0), (_line1_start select 1), 0.5];
- _line2_start = [(_line1_end select 0), (_line1_end select 1) + 0.5, (_line1_end select 2)];
- drawLine3D [_line1_start, _line1_end, [0,0,0,0.5]];
- drawLine3D [_line1_end, _line2_start, [0,0,0,0.5]];
- drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\BasicLook_ca.paa", [0,0,0,0.5], _line2_start, 0.75, 0.75, 0];
- };
- } forEach DEADPILOTS;
- };
- }];
+ (Mar 29, 2014)
+ (A3 0.50) It is recommended to use linearConversion instead of BIS_fnc_linearConversion :
+ $Code$ linearConversion [0,100,50,0,50, true ]; //same as [[0,100],50,[0,50]] call BIS_fnc_linearConversion $/Code$
+ As for clamp, true will disable new value out of its range while false won't:
+ $Code$ linearConversion [0,100,150,0,50, true ]; //return 50
+ linearConversion [0,100,150,0,50, false ]; //return 75
$/Code$
-
- (April 11, 2015)
- Doesn't work when showHUD false, textAlign is broken, drawSideArrows will turn if angle is not 0 [1]
-
- (February 11, 2016)
- You can also use getPosWorld, which works splendid in script performance. Here is an example:
- $Code$addMissionEventHandler ["Draw3D", { _pos = getPosWorld player; drawIcon3D ["a3\ui_f\data\gui\Rsc\RscDisplayArsenal\radio_ca.paa", [1,1,1,1], [(_pos select 0),(_pos select 1), 1], 0.8, 0.8, 0, (name player), 1, 0.0315, "EtelkaMonospacePro"]; }];$/Code$
- Nothing
+ Number
+
- drawIcon
+ setLightUseFlare
- Draw an icon on the map. The command needs to be called every frame, preferably with "Draw" control event handler ctrlAddEventHandler.
+ Sets if light has flare.
- https://community.bistudio.com/wiki/drawIcon
+ https://community.bistudio.com/wiki/setLightUseFlare
- Control drawIcon Array
+ Object setLightUseFlare Boolean
- map drawIcon [texture, color, position, width, height, angle, text, shadow, textSize, font, align]
+ light setLightUseFlare bool
- $Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", "
- _this select 0 drawIcon [
- 'iconStaticMG',
- [1,0,0,1],
- getPos player,
- 24,
- 24,
- getDir player,
- 'Player Vehicle',
- 1,
- 0.03,
- 'TahomaB',
- 'right'
- ]
- "];$/Code$
+ $Code$myLight setLightUseFlare true ;$/Code$
- undefined / undefined
+ local / local
- (July 03, 2013)
- Support of paremeters textSize, font and align is in the game since Arma 3 version 0.72.
-
- (March 22, 2014)
- icon will always remain the same width and height, if you want an icon scaled to the map, use: $Code$( sizeInMeters * 0.15) * 10^(abs log (ctrlMapScale _ctrl))$/Code$ for width and height (guessimated).
-
- (July 20, 2014)
- If you want only text with no icon, you can use "#(argb,8,8,3)color(0,0,0,0)" as texture.
-
- (July 7, 2015)
- Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
-
- (January 4, 2016)
- Arma 3 1.54
- This command doesn't seem to play nice with onEachFrame. It seems to draw on the main screen while maintaing position relative to the map position
- Example:
- $Code$ onEachFrame {
- findDisplay 12 displayCtrl 51 drawIcon ['iconStaticMG',[1,0,0,1], getPos player,24,24, getDir player,'Player Vehicle',1,0.03,'TahomaB','right'];
- };$/Code$
-
- (October 13, 2016)
- If you unPBO the following addon:
- $Code$@ui_f_data.pbo $/Code$
- You can find the possible icons inside this folder:
- $Code$ui_f_data\map\vehicleicons$/Code$
- For example:
- If you want to use "iconman_ca.paa" you will write "iconman" on the texture string.
+ (Mar 25, 2014)
+ 1. In ArmA3 ver 1.14 flare color can be changed via setLightColor.
+ 2. Flare won't have visual presentation in daytime.
+ 3. setLightUseFlare needs to be used together with setLightFlareSize and setLightFlareMaxDistance so that a flare can be seen.
- Nothing
+ Nothing
+
- drawLine3D
+ lineBreak
- Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D".
+ Creates a structured text containing a line break.
- https://community.bistudio.com/wiki/drawLine3D
+ https://community.bistudio.com/wiki/lineBreak
- drawLine3D Array
+ lineBreak
- drawLine3D [start, end, color]
+ lineBreak
- $Code$onEachFrame {
- drawLine3D [ getPos player, getPos cursorTarget, [1,1,1,1]];
- };$/Code$
+ $Code$_txt = composeText ["First line", lineBreak, "Second line"];$/Code$
undefined / undefined
- (August 31, 2013)
- As command syntax indicates, this command expects starting and ending position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW. Use additional ASLToAGL and AGLToASL commands wherever is necessary.
- $Code$ addMissionEventHandler ["Draw3D", {
- drawLine3D [ ASLToAGL eyePos soldier1, ASLToAGL eyePos soldier2, [1,0,0,1]];
- }];$/Code$
-
- (February 18, 2015)
- Visible through fog and past draw distance.
- Nothing
+ Structured_Text
+
- drawLine
+ addUniform
- Draw a line on the map.
+ Create a new uniform and try to link it into uniform slot (given uniform has to be supported by allowedUniforms list of target soldier). To check if uniform is allowed use isUniformAllowed and to force add incompatible uniform use forceAddUniform
- https://community.bistudio.com/wiki/drawLine
+ https://community.bistudio.com/wiki/addUniform
- Control drawLine Array
+ Object addUniform String
- map drawLine [position1, position2, color]
+ unit addUniform type
-
+ $Code$_unit addUniform "U_B_CombatUniform_mcam";$/Code$
+
- undefined / undefined
+ global / global
- (March 22, 2014)
- Map example: $Code$( findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw","
- ( _this select 0) drawLine [
- getPos player,
- [0,0,0],
- [0,0,1,1]
- ];
- "];$/Code$
- Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
- Nothing
+ Nothing
+
- drawLink
+ ctrlSetFade
- The editor will draw a line between the two specified editor objects. Line type can be LINE or ARROW.
- i
- Some Old Editor Command
+ Sets wanted transparency for control animation. Requires ctrlCommit to commit changes.
- https://community.bistudio.com/wiki/drawLink
+ https://community.bistudio.com/wiki/ctrlSetFade
- Control drawLink Array
+ Control ctrlSetFade Number
- map drawLink [from,to,param type,line type,color]
+ controlName ctrlSetFade fade
-
+ $Code$_control ctrlSetFade 1;
+ _control ctrlCommit 5;$/Code$
+
undefined / undefined
+ (March 10, 2015)
+ This command sets the amount of fade. For example:
+ $Code$
+ _ctrl ctrlSetFade 1; // hides the control
+ _ctrl ctrlSetFade 0.5; // control is 50% visible
+ _ctrl ctrlSetFade 0; // control is fully visible
+ $/Code$
+
+ (August 28, 2017)
+ The resulting fade speed seems like is not exactly what ctrlCommit commands it to be, as is dependant on your current framerate. Example:
+ $Code$_ctrl ctrlSetFade 0.5;
+ _ctrl ctrlCommit 1;
+ $/Code$
+ Will actually result in:
+ $Code$ [60 FPS and higher] = ~1.0 seconds
+ [30 FPS and around] = ~1.2 seconds
+ [10 FPS and anything lower] = ~5-10 seconds
+ $/Code$
+ This phenomenon probably occurs because of engine time simulation disruption caused by performance damage.
- Nothing
+ Nothing
+
- drawLocation
+ tvCount
- Unknown effect.
+ Returns childrens count of item on given path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/drawLocation
+ https://community.bistudio.com/wiki/tvCount
- Control drawLocation Location
+ tvCount Array
+
+ Control tvCount Array
- control drawLocation location
+ tvCount [idc, [path]]
+
+ _ctrl tvCount [path]
-
+ $Code$tvCount [101, [0]];$/Code$
+
+ $Code$_ctrl tvCount [1,0];$/Code$
+
- undefined / undefined
+ local / local
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Unknown
+ Number - Number
+
- drawPolygon
+ get3DENAttribute
- Draws given polygon on the given map control with given color. The polygon must consist of at least 3 points. Unlike with other draw shape commands and due to complexity, this command does not support filling of the polygon with color. Use drawTriangle command to construct and fill polygon shape as a workaround.
+ Returns value of a given entity's attribute in Eden Editor.
+ An attribute is identified by its property ( data when it's engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.
+ !
+ Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
- https://community.bistudio.com/wiki/drawPolygon
+ https://community.bistudio.com/wiki/get3DENAttribute
- Control drawPolygon Array
+ EdenEntity get3DENAttribute String
- map drawPolygon [polygon, color]
+ entity get3DENAttribute attribute
- $Code$test_polygon = [];
- for "_i" from 1 to 12 do
- {
- test_polygon pushBack ( player getPos [10 + random 100, 360/_i]);
- };
- findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
- {
- _this select 0 drawPolygon [test_polygon, [0,0,1,1]];
- }];$/Code$
+ $Code$systemChat str (( get3DENMouseOver select 1) get3DENAttribute "name");
+ // returns variable name of object under cursor$/Code$
undefined / undefined
@@ -21336,281 +22260,284 @@
- Nothing
+ Array
+
- drawRectangle
+ getMissionLayerEntities
- Draws a rectangle on the map.
+ Returns all entities within specific Eden Editor layer. To be used when the scenario is running, not in the editor workspace.
+ Useful for disabling / enabling whole parts of the scenario which you add to specific layer while editing.
- https://community.bistudio.com/wiki/drawRectangle
+ https://community.bistudio.com/wiki/getMissionLayerEntities
- Control drawRectangle Array
+ getMissionLayerEntities String
- map drawRectangle [c, a, b, angle, color, fill]
+ getMissionLayerEntities layerName
- $Code$_ctrl drawRectangle [
- getPos player,
- 20,
- 20,
- getDir player,
- [0,0,1,1],
- ""
- ];$/Code$
+ $Code$_base = getMissionLayerEntities "Base";$/Code$
- $Code$_ctrl drawRectangle [
- player,
- 10,
- 20,
- getDir player,
- [1,1,1,1],
- "#(rgb,8,8,3)color(1,0,0,1)"
- ];$/Code$
+ $Code$waitUntil {( player distance _someObject) 800};
+ {
+ deleteVehicle _x ;
+ } forEach (( getMissionLayerEntities "Simple Objects") select 0);//Deletes all objects within that layer after the player is over 800m away from _someObject$/Code$
undefined / undefined
- (March 22, 2014)
- Map example: $Code$( findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw",{
- (_this select 0) drawRectangle [
- getPos player,
- 20,
- 20,
- getDir player,
- [0,0,1,1],
- ""
- ];
- }];$/Code$
- Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
+ (October 26, 2016)
+ After an object was deleted from a layer, getMissionLayerEntities will return NULL-object for the deleted object.
+ Version: 1.65
+ Build: 139010
- Nothing
+ Array
+
- drawTriangle
+ unassignCurator
- Draws a single triangle or multiple triangles on the map. Triangle is defined by 3 positions of its verticies: p0, p1, p2 in a single array [ p0, p1, p2 ]. Next 3 positions in the same array [p0, p1, p2, p0, p1, p2 ] will be used to draw second triangle, another 3 positions [p0, p1, p2, p0, p1, p2, p0, p1, p2 ] to draw 3rd and so on.
- NOTE : when fill param is absent or is an empty string "", the triangle is drawn with lines of the color set in color param. In order to draw color filled triangle of the same color as color param, set fill param to opaque white procedural texture "#(rgb,1,1,1)color(1,1,1,1)".
+ Unassign curator (will destroy both sides of connection).
- https://community.bistudio.com/wiki/drawTriangle
+ https://community.bistudio.com/wiki/unassignCurator
- Control drawTriangle Array
+ unassignCurator Object
- map drawTriangle [vertices, color, fill]
+ unassignCurator curatorObj
- $Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
- {
- _this select 0 drawTriangle
- [
- [
- player getRelPos [100, 0],
- player getRelPos [100, -135],
- player getRelPos [100, 135]
- ],
- [1,0,0,0.5],
- "#(rgb,1,1,1)color(1,1,1,1)"
- ];
- }];$/Code$
+ $Code$unassignCurator myCurator;$/Code$
undefined / undefined
- (July 16, 2017)
- Example youtube video: [1] $Code$_ctrl = findDisplay 12 displayCtrl 51;
- _ctrl setVariable ["data", [1, "#(rgb,1,1,1)color(1,1,1,1)", 1000, position player,
- {
- params ["_p", "_r", "_a", "_sr", "_ba"];
- _sr = _r * 0.382;
- _pb = _p getPos [_sr, _a + 180];
- [
- _p getPos [_r, _a], _p getPos [_sr, _a + 36], _p getPos [_sr, _a - 36],
- _pb, _p getPos [_r, _a - 72], _p getPos [_r, _a + 72],
- _p getPos [_r, _a - 144], _p getPos [_sr, _a - 108], _pb,
- _p getPos [_r, _a + 144], _p getPos [_sr, _a + 108], _pb
- ]
- }]];
- _ctrl ctrlRemoveAllEventHandlers "Draw";
- _ctrl ctrlAddEventHandler ["Draw",
- {
- _map = _this select 0;
- _data = _map getVariable "data";
- _data params ["_i", "_fill", "_dist", "_pos", "_fn"];
- _data set [0, _i + 1];
- _size = _i % _dist;
- if (_size == 0) then
- {
- _data set [0, 1];
- _data set [1, ["#(rgb,1,1,1)color(1,1,1,1)", ""] select (random 1 0.3)];
- _data set [2, 250 + round random 750];
- };
- _alpha = linearConversion [_dist, 0, _dist - _size, 1, 0];
- _map drawEllipse [_pos, _size * 2, _size * 2, 0, [0,0,1,_alpha], _fill];
- _map drawTriangle [[_pos getPos [_size, -_size], _size, _size] call _fn, [1,0,0,_alpha], _fill];
- _map drawTriangle [[_pos getPos [_size, -_size + 120], _size, _size] call _fn, [0,1,0,_alpha], _fill];
- _map drawTriangle [[_pos getPos [_size, -_size - 120], _size, _size] call _fn, [1,1,0,_alpha], _fill];
- }];
- openMap true;$/Code$
+ This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Nothing
+
- driver
+ tvCurSel
- Returns the driver of a vehicle.
+ Returns path to currently selected item. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/driver
+ https://community.bistudio.com/wiki/tvCurSel
- driver Object
+ tvCurSel Number
+
+ tvCurSel Control
- driver vehicle
+ tvCurSel idc
+
+ tvCurSel control
- $Code$( driver _tank) action ["getout", _tank];$/Code$
+ $Code$tvCurSel 101;$/Code$
+
+ $Code$tvCurSel _ctrl;$/Code$
- global / undefined
+ local / local
- (August 3, 2006)
- Notes from before the conversion:
- It is also possible to find the driver of a vehicle by placing a D after the name of the vehicle so Tank1D and driver Tank1 both refer to the same unit, providing the original driver has not got out of the tank.
- The difference between the two is Tank1D is always the unit that was driver of the tank when the mission started, whilst driver Tank1 is the driver which is now there.
+ (Sep 11 2014)
+ (A3 1.28)tv command fmily overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Object
+ Array - Array
+
- drop
+ ctrlVisible
- Creates a particle effect.
- This command is used to create smoke, fire and similar effects.
- The particles are single polygons with single textures that always face the player.
- They can be set to dynamically change their position, size, direction, can be set to different weights and more or less dependant on the wind.
+ Returns if a control of the currently active user dialog is shown or not. Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/drop
+ https://community.bistudio.com/wiki/ctrlVisible
- drop Array
+ ctrlVisible Number
- drop array
+ ctrlVisible idc
- $Code$drop ["cl_basic", "", "Billboard", 1, 1, [-3.5*( sin ( direction xural)),
- -3.5*( cos ( direction xural)),0], [ random 0.1, random 0.1, random 0.5], 1, 0.005, 0.0042,
- 0.7, [0.3,3], [[0.5,0.5,0.5,0],[0.7,0.7,0.7,0.5],[0.9,0.9,0.9,0]], [0,1,0,1,0,1],
- 0.2, 0.2, "", "", xural]$/Code$
+ $Code$_bool = ctrlVisible 100;$/Code$
- undefined / local
+ local / undefined
- Nothing
+ Boolean
+
- dynamicSimulationDistanceCoef
+ turretLocal
- A getter for setDynamicSimulationDistanceCoef
+ Checks if a turret is local.
+ Some info on turrets: A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is local. When gunner leaves turret it is supposed to change locality to the locality of the vehicle.
- https://community.bistudio.com/wiki/dynamicSimulationDistanceCoef
+ https://community.bistudio.com/wiki/turretLocal
- dynamicSimulationDistanceCoef String
+ Object turretLocal Array
- dynamicSimulationDistanceCoef class
+ vehicle turretLocal turretPath
- $Code$hint str dynamicSimulationDistanceCoef "IsMoving";$/Code$
+ $Code$_isLocal = vehicle player turretLocal [0];$/Code$
+
+ $Code$if (heli turretLocal [1]) then {heli setVehicleAmmo 1};$/Code$
+
+ $Code$if ( isNil {heli turretLocal [5]}) then { hint "Turret 5 is non-existent"};$/Code$
- undefined / undefined
+ global / undefined
- Number
+ Boolean/Nothing
+
- dynamicSimulationDistance
+ eyeDirection
- A getter for setDynamicSimulationDistance
+ Returns the direction object is watching (eyes, or a vehicle primary observer).
- https://community.bistudio.com/wiki/dynamicSimulationDistance
+ https://community.bistudio.com/wiki/eyeDirection
- dynamicSimulationDistance String
+ eyeDirection Object
- dynamicSimulationDistance category
+ eyeDirection unit
- $Code$hint str dynamicSimulationDistance "Prop";$/Code$
+ $Code$can = "Land_Can_V3_F" createVehicle position player ;
+ onEachFrame {
+ can setPosASL [
+ ( eyePos player select 0) + ( eyeDirection player select 0),
+ ( eyePos player select 1) + ( eyeDirection player select 1),
+ ( eyePos player select 2) + ( eyeDirection player select 2)
+ ]
+ }$/Code$
+
+ $Code$// Draw AI eye direction (green) and weapon direction (red) in 3D:
+ bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"];
+ bob setVehiclePosition [ player modelToWorld [0,100,0], [], 0, "NONE"];
+ onEachFrame
+ {
+ _beg = ASLToAGL eyePos bob;
+ _endE = (_beg vectorAdd ( eyeDirection bob vectorMultiply 100));
+ drawLine3D [ _beg, _endE, [0,1,0,1]];
+ _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100));
+ drawLine3D [_beg, _endW, [1,0,0,1]];
+ };$/Code$
- undefined / undefined
+ global / undefined
+ (May 26, 2014)
+ This command should have really been named headDirection instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen. Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
- Number
+ Array
+
- dynamicSimulationEnabled
+ objectParent
- A getter for enableDynamicSimulation
+ Returns parent of an object if the object is proxy, otherwise objNull. In case of backpack, the parent is a weaponholder or a cargo space of a vehicle or the unit carrying it. Unit in a vehicle will return the vehicle as parent.
+ Another good use of objectParent is when a static weapon is known and one needs to check if it is assembled or not. objectParent _staticWeapon will return objNull if weapon is unpacked, or backpack object if packed.
- https://community.bistudio.com/wiki/dynamicSimulationEnabled
+ https://community.bistudio.com/wiki/objectParent
- dynamicSimulationEnabled Object/Group
+ objectParent Object
- dynamicSimulationEnabled object
+ objectParent object
- $Code$hint str dynamicSimulationEnabled _myObject;$/Code$
+ $Code$_weaponholder = objectParent _mybackpack;$/Code$
+
+ $Code$// Create and place created backpack in front of player:
+ _backpackContainer = "B_TacticalPack_rgr" createVehicle [0,0,0];
+ _weaponHolder = objectParent _backpackContainer;
+ _weaponHolder setPos ( player modelToWorld [0,5,0]);$/Code$
+
+ $Code$// Check if player is on foot:
+ _isOnFoot = isNull objectParent player ;$/Code$
+
+ $Code$// Detect if player is in commander turret of a vehicle:
+ _isVehicleCommander = player isEqualTo commander objectParent player ;$/Code$
undefined / undefined
@@ -21618,298 +22545,442 @@
- Boolean
+ Object
+
- dynamicSimulationSystemEnabled
+ count
- A getter for enableDynamicSimulationSystem
+ Can be used to count:
+ the number of elements in array
+ the number of elements in array with condition
+ the number of sub-entries in a config object
+ the number of characters in a string (since ["Arma 3","Arma3",127,126674,"Development"])
- https://community.bistudio.com/wiki/dynamicSimulationSystemEnabled
+ https://community.bistudio.com/wiki/count
- dynamicSimulationSystemEnabled
+ count Array
+
+ Code count Array
+
+ count Config
+
+ count String
- dynamicSimulationSystemEnabled
+ count array
+
+ condition count array
+
+ count configname
+
+ count string
- $Code$hint str dynamicSimulationSystemEnabled ;$/Code$
+ $Code$_cnt = count [0,0,1,2]; // returns 4
+ _cnt = count units group player ; // returns number of units in player group$/Code$
+
+ $Code$_cnt = { _x == 4} count [1,9,8,3,4,4,4,5,6]; // returns 3
+ _cnt = { alive _x } count allUnits ; // returns the number of alive units$/Code$
+
+ $Code$_cnt = count ( configFile "CfgVehicles");$/Code$
+
+ $Code$hint str count "japa is the man!"; //16$/Code$
- undefined / undefined
+ local / undefined
+ (April 28, 2007)
+ This conditional count command only works if all the elements in the tested array are of the same type as the tested element.
+ For example, the following code will created an error, since the elements are of different types (object, number, string):
+ $Code$_arr = [ player,100,"one"]; {_x == "one"} count _arr;$/Code$
+ Alternatively, to avoid the error use isEqualTo instead of ==. --KK
+ This one, on the other hand, where all elements are strings, just like the tested element, will return the correct result of 1:
+ $Code$_arr = ["one","two","three"]; {_x == "one"} count _arr;$/Code$
+
+ (August 3, 2006)
+ Notes from before the conversion:
+ Use this to calculate how many "M16" mags a soldier has left.
+ $Code${_x == "M16"} count magazines soldier1;$/Code$
+ Take care when using count to determine how many units are left alive in a group: count units group player or count units groupname Will return the number of units the leader of the group thinks are alive. If some units have been killed out of sight of other members of the group then it may take sometime for this to be the actual numbers in the group. To determine exactly how many units are really alive in a group use:
+ $Code${ alive _x} count units group player ;$/Code$
+ or
+ $Code${ alive _x} count units groupname;$/Code$
+
+ (December 15, 2014)
+ count can be (ab)used for a very fast and simple check if at least one element in an array fulfills a certain condition:
+ $Code$if({if( _x fulfills condition ) exitWith {1}; false} count _array isEqualTo 1) then
+ {
+ //do whatever here
+ };$/Code$
+ This code will exit the count loop as soon as it finds an element fulfilling the condition, leaving the count with the value of 1, hence make the larger if-condition be true.
+ If no array element fulfills the condition, the count will be 0 and the if-condition will be false.
+
+ (December 29, 2014)
+ Quit loop at first fulfilled condition (same as above but faster):
+ $Code$0 = { if (_x == 4) exitWith {
+ //do something when we reach 4
+ }} count [1,2,3,4,5,6];$/Code$
+
+ (January 2, 2015)
+ Using exitWith inside a count loop will overwrite the default functionality and make count return whatever the exitWith returns:
+ $Code$_result = {
+ if(_x isEqualTo 3) exitWith {"Hello"}
+ } count [1,2,3,4,5];
+ //_result = "Hello"$/Code$
+
+ (August 22, 2016)
+ With the alternative syntax each iteration should result in an interior return of bool or nothing. Example:
+ $Code$createDialog "RscFunctionsViewer";
+ { lbAdd [292901,_x]; } count ["first","second","third"];$/Code$
+ lbAdd returns a number, so this throws "Error Type Number, expected Bool". Tested in A2OA 1.63.131129
- Boolean
+ Number - Number - Number - Number
+
- east
+ buildingExit
- Pre-defined variable for the eastern side.
+ Returns the given indexed exit in a building. The returned value is in format Position.
- https://community.bistudio.com/wiki/east
+ https://community.bistudio.com/wiki/buildingExit
- east
+ Object buildingExit Number
- east
+ building buildingExit index
- $Code$// SQS:
- ?((side _unit) == east ) : hint "This is a eastern unit!"$/Code$
-
- $Code$// SQF:
- if (( side _unit) == east ) then {
- hint "This is a eastern unit!";
- };$/Code$
+ $Code$_building buildingExit 0$/Code$
undefined / undefined
- (April 17, 2007)
- In ArmA terms OPFOR, BLUFOR, Independents and Civilians are used in the front end UI.
- Side
+ Array
+
- echo
+ updateMenuItem
- Sends any text into the debugger console or the logfile. Present in internal version only, not working in the retail version.
+ Sets the text and command for the menu item. index is index as returned from addMenuItem command. command is optional.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/echo
+ https://community.bistudio.com/wiki/updateMenuItem
- echo String
+ Control updateMenuItem Array
- echo text
+ map updateMenuItem [menu item index,text,command]
- $Code$echo "Text in logfile"$/Code$
-
+
undefined / undefined
- Nothing
+ Nothing
+
- edit3DENMissionAttributes
+ currentWeaponMode
- Open a window with scenario attribute in given section.
+ Returns current weapon mode of unit's weapon. Result can be: "Single", "Burst", "FullAuto", "manual", "player"
+ This command will return 0 Number if given object is a vehicle instead of a person.
- https://community.bistudio.com/wiki/edit3DENMissionAttributes
+ https://community.bistudio.com/wiki/currentWeaponMode
- edit3DENMissionAttributes String
+ currentWeaponMode Object
- edit3DENMissionAttributes section
+ currentWeaponMode gunner
- $Code$edit3DENMissionAttributes "Multiplayer";$/Code$
+ $Code$_weaponMode = currentWeaponMode player ;$/Code$
+
+ $Code$_weaponMode = currentWeaponMode gunner vehicle player ;$/Code$
undefined / undefined
+ (September 27, 2014)
+ - Be careful using this in script. This function returns these strings but also:
+ - 0 if unit is in a vehicle (pax),
+ - absolutely nothing if AH-99 helo driver or all weapons removed,
+ - "truckhorn2" if Hunter driver...
+ Absolutely nothing means: if you use a hint to display the returned value, you obtain absolutely no text,no black box, no error! Hint isn't displayed and there is no error in rpt file with compile preprocessFileLineNumbers.
+ On the other hand, returned value 0 when unit is pax of a vehicle, could lead to a variable error type if your script is waiting for a string.
- Nothing
+ String
+
- editObject
+ enableAimPrecision
- Show the edit object dialog for the given object.
- i
- Some Old Editor Command
+ Set whether animation's aim precision affects weapon sway.
- https://community.bistudio.com/wiki/editObject
+ https://community.bistudio.com/wiki/enableAimPrecision
- Control editObject String
+ Object enableAimPrecision Boolean
- map editObject object
+ unit enableAimPrecision enable
-
+ $Code$player enableAimPrecision false ;$/Code$
+
undefined / undefined
- Any_Value
+ Nothing
+
- editorSetEventHandler
+ hideObject
- Sets given event handler of given editor.
- i
- Some Old Editor Command
+ Hide entity. Can be used on soldiers and vehicles, also on static objects.
- https://community.bistudio.com/wiki/editorSetEventHandler
+ https://community.bistudio.com/wiki/hideObject
- Control editorSetEventHandler Array
+ hideObject Object
+
+ Object hideObject Boolean
- map editorSetEventHandler [handler name,function]
+ hideObject object
+
+ object hideObject hidden
- $Code$_map editorSetEventHandler ["SelectObject",""]$/Code$
+ $Code$hideObject unitName;$/Code$
+
+ $Code$objectName hideObject true;$/Code$
- undefined / undefined
+ global / local
+ (July 15, 2010)
+ This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.
+
+ Use MP framework to activate this comand on all players from server or any other maschine
+ $Code$_nic = [nil, mantohide, "per", rHideObject, true ] call RE; //In A3 use hideObjectGlobal instead.$/Code$
+
+ you can use code as in example 2, where true = ON and false = OFF, if using it like in example 1, you can only turn it ON
+
+ using this locally causes the player/object disappear only locally; has to be executed serverside if used in MP. Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds. Usefull for creating objects the map-creator doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units.
+
+ The above comment is partially incorrect, if the effects of the command are local then it must be executed in every machine so it has global effect. If it is run only on the server machine, it will only be hidden on the server, while clients still see it.
+
+ (March 5, 2014)
+ As of today this now finally has a Global counterpart, just released on the Stable branch. Added it's link under See also.
+
+ (October 30, 2014)
+ When used on player, it only has an effect on third person mode. First person LOD is still visible. (A3 Dev 1.33)
+
+ (June 27, 2015)
+ hideObject and hideObjectGlobal disable object collision in addition to rendering. A3 1.45.131175
+ (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
+
+ (January 26, 2016)
+ Sometimes it´s easier to teleport the object about 100m under the ground (also JiP Support):
+ $Code$_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)-100];$/Code$
+ And to unhide:
+ $Code$_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)+100];$/Code$
- Nothing
+ Nothing - Nothing
+
- effectiveCommander
+ displayAddEventHandler
- Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to. So if in a tank there is a gunner and a commander and AI driver, if the effectiveCommander is gunner, then gunner pressing WASD will give AI orders to move. If gunner jumps out and then enters tank again, the effectiveCommander role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis.
+ Adds an event handler to the given display. Returns the ID of the event handler, or -1 when failed.
+ Returning true in EH code will override default engine handling for keyboard events.
+ See User Interface Event Handlers for the full list of event names.
+ If applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.
+ NOTE: Display EHs are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.
- https://community.bistudio.com/wiki/effectiveCommander
+ https://community.bistudio.com/wiki/displayAddEventHandler
- effectiveCommander Object
+ Display displayAddEventHandler Array
- effectiveCommander vehicle
+ display displayAddEventHandler [eventName, code]
- $Code$_commander = effectiveCommander tank;$/Code$
+ $Code$moduleName_keyDownEHId = ( findDisplay 46) displayAddEventHandler ["KeyDown", " hint str _this;"];$/Code$
+
+ $Code$moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler ["KeyDown", { hint str _this}];$/Code$
undefined / undefined
-
-
- Object
-
-
-
-
- else
-
-
- Executes else code when if condition returns false
-
+ (October 30, 2013)
+ As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
+
+ (March 10, 2014)
+ From within an Addon, you must assign the events from a spawned script. eg $Code$[] spawn { (findDisplay 46) displayAddEventHandler["KeyDown","_this call my_KeyDownFunctionhandler"]; };$/Code$
+
+ (January 22, 2016)
+ Be sure to wait until the main display is initialized before using this command by using: $Code$waituntil {!isnull (finddisplay 46)};$/Code$
+
+ (May 28, 2017)
+ use #define if you want the displayEventHandler to use data that is defined in the same file in which the command is executed.
+ However, that does not work if you use STRING as 'code'. In case of STRING, use the format command around it.
+
+ (August 7, 2017)
+ Using KeyUp you can't override default engine action by returning true ( A3 1.72.142342 )
+
+
+ Number
+
+
+
+
+
+ setDynamicSimulationDistance
+
+
+ Sets activation distance of Arma_3_Dynamic_Simulation for given category
+
- https://community.bistudio.com/wiki/else
+ https://community.bistudio.com/wiki/setDynamicSimulationDistance
- Code else Code
+ String setDynamicSimulationDistance Number
- ifCode else elseCode
+ category setDynamicSimulationDistance distance
- $Code$if (a b) then { c = 0 } else { c = 1 };$/Code$
-
- $Code$if (a b) then {
- hint "B is greater than A";
- } else {
- hint "A is greater than B";
- };$/Code$
+ $Code$"Group" setDynamicSimulationDistance 1000;$/Code$
undefined / undefined
+ (March 19, 2017)
+ Desired distances for "Group" and "Vehicle" must be based on viewDistance and fog to exclude any rendering problems with frequently moving objects. Example:
+ $Code$"Group" setDynamicSimulationDistance (( viewDistance * 0.8) - ( viewDistance * fog))
+ // 80% of maximum rendering and fog distance$/Code$
+ But that might impair objects simulations if you are using long-scope optics, so there's a even better solution using cameraView with it:
+ $Code$[] spawn {
+ while { true } do {
+ if ( cameraView isEqualTo "GUNNER") then {
+ "Group" setDynamicSimulationDistance ( viewDistance - ( viewDistance * fog ));
+ // Scoped
+ } else {
+ "Group" setDynamicSimulationDistance (( viewDistance * 0.8) - ( viewDistance * fog ));
+ // Not scoped
+ };
+ uiSleep 0.25;
+ };
+ };
+ $/Code$
- Array
+ Nothing
+
- emptyPositions
+ unitPos
- Returns the number of given positions in the vehicle.
- Positions can be "Commander", "Driver", "Gunner" or "Cargo"
+ Return the unit position rules.
+ The return value is always "Auto" unless the unit has gotten a setUnitPos command. In that case the value is the last stance the unit was ordered to.
+ Available modes are listed at setUnitPos.
- https://community.bistudio.com/wiki/emptyPositions
+ https://community.bistudio.com/wiki/unitPos
- Object emptyPositions String
+ unitPos Object
- vehicle emptyPositions position
+ unitPos unit
- $Code$_freeCargoPositions = vehicle player emptyPositions "cargo";$/Code$
+ $Code$hint str unitPos _unit;$/Code$
- undefined / undefined
+ global / undefined
- Number
+ String
+
- enableAIFeature
+ enableSatNormalOnDetail
- Enable/disable given AI feature. Feature may be one of:
- "AwareFormationSoft", "CombatFormationSoft".
+ Enables/Disables satellite normal map od detail maps.
- https://community.bistudio.com/wiki/enableAIFeature
+ https://community.bistudio.com/wiki/enableSatNormalOnDetail
- String enableAIFeature Boolean
+ enableSatNormalOnDetail Boolean
- feature enableAIFeature enabled
+ enableSatNormalOnDetail state
- $Code$"AwareFormationSoft" enableAIFeature true$/Code$
+ $Code$enableSatNormalOnDetail true;$/Code$
undefined / undefined
@@ -21917,56 +22988,55 @@
- Nothing
+ Nothing
+
- enableAI
+ &&
- Enables parts of the AI behavior that was disabled by disableAI.
- NOTE: When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it _unit enableAI "TeamSwitch" so that the unit continues with waypoints
+ Returns true only if both conditions are true. In case of the alternative syntax (code as right argument), lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely). Identical to: a and b
- https://community.bistudio.com/wiki/enableAI
+ https://community.bistudio.com/wiki/a_%26%26_b
- Object enableAI String
+ Boolean && Boolean/Code
- unit enableAI skilltype
-
+
- $Code$_soldierOne enableAI "Move";$/Code$
-
+
- local / global
+ undefined / undefined
- Nothing
+ Boolean
+
- enableAimPrecision
+ profileNameSteam
- Set whether animation's aim precision affects weapon sway.
+ Returns name of the current Steam profile.
- https://community.bistudio.com/wiki/enableAimPrecision
+ https://community.bistudio.com/wiki/profileNameSteam
- Object enableAimPrecision Boolean
+ profileNameSteam
- unit enableAimPrecision enable
+ profileNameSteam
- $Code$player enableAimPrecision false ;$/Code$
+ $Code$_mySteamProfileName = profileNameSteam ;$/Code$
undefined / undefined
@@ -21974,55 +23044,66 @@
- Nothing
+ String
+
- enableAttack
+ ctrlSetModelDirAndUp
- Set if leader can issue attack commands to the soldiers in his group.
+ Sets orientation of 3D control model. It is similar to setVectorDirAndUp command for an object.
- https://community.bistudio.com/wiki/enableAttack
+ https://community.bistudio.com/wiki/ctrlSetModelDirAndUp
- Object/Group enableAttack Boolean
+ Control ctrlSetModelDirAndUp Array
- group enableAttack enable
+ control ctrlSetModelDirAndUp [dir, up]
- $Code$_group1 enableAttack true$/Code$
+ $Code$_ctrl3D ctrlSetModelDirAndUp [[0,1,0],[0,0,1]]; //default orientation$/Code$
- local / global
+ undefined / undefined
- Nothing
+ Nothing
+
- enableAudioFeature
+ teamMemberNull
- Enable/disable an audio feature, features are: "lowpass", "building_interior". Return previous state
+ A non-existent Team Member. To compare non-existent team members use isNull or isEqualTo :
+ teamMemberNull == teamMemberNull ; // false
+ isNull teamMemberNull ; // true
+ teamMemberNull isEqualTo teamMemberNull ; // true
- https://community.bistudio.com/wiki/enableAudioFeature
+ https://community.bistudio.com/wiki/teamMemberNull
- enableAudioFeature Array
+ teamMemberNull
- enableAudioFeature [feature, enable]
+ teamMemberNull
- $Code$prevState = enableAudioFeature ["lowpass", true ];$/Code$
+ $Code$! isNull teamMemberNull ; // false$/Code$
+
+ $Code$str teamMemberNull ; // NULL - team member$/Code$
+
+ $Code$if (_teamMember isEqualTo teamMemberNull ) then {
+ hint "is null member";
+ };$/Code$
undefined / undefined
@@ -22030,28 +23111,28 @@
- Boolean
+ Team_Member
+
- enableCamShake
+ importance
- Allows camera shake effects via addCamShake. If set to false, then a currently active shake effect will stop immediately.
- By default, shake effects are enabled, but once they have been disabled by this command, they will have to be enabled first, in order to be visible.
+ Returns a location's importance value.
- https://community.bistudio.com/wiki/enableCamShake
+ https://community.bistudio.com/wiki/importance
- enableCamShake Boolean
+ importance Location
- enableCamShake value
+ importance location
- $Code$enableCamShake false ;$/Code$
+ $Code$_locationImportance = importance myLocation$/Code$
undefined / undefined
@@ -22059,204 +23140,229 @@
- Nothing
+ Number
+
- enableCaustics
+ removeCuratorAddons
- Enable/disable caustics drawing.
+ Restrict curator use of given addons.
- https://community.bistudio.com/wiki/enableCaustics
+ https://community.bistudio.com/wiki/removeCuratorAddons
- enableCaustics Boolean
+ Object removeCuratorAddons Array
- enableCaustics bool
+ curatorObj removeCuratorAddons addons
-
+ $Code$curatorModule removeCuratorAddons [addon1,addon2]$/Code$
+
undefined / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Nothing
+
- enableChannel
+ tvExpand
- Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel. If the channel was disabled in description.ext, it can be enabled with this command, however the UI functionality changes will be local to the PC executing this command. What this command cannot do:
- It cannot disable incoming text or voice
- It cannot interrupt own client's transmission in progress
- It cannot affect any Custom Radio channels, only channels 0-5
- It cannot persist, so if user is logged out, the changes are reset
- It has no effect on chat related scripting commands, such as vehicleChat, globalChat, globalRadio, sideRadio, etc.
- So in short, just like with getPlayerChannel, this command provides a nice ability to hack into chat UI with some limitations. And the reason why it is possible to disable entire channels (except Group) in description.ext, is because no one can talk or text, therefore no transmission is happening. NOTE: Group channel cannot be disabled, neither with enableChannel, nor with description.ext param. Channel / Number correspondence:
- 0 = Global
- 1 = Side
- 2 = Command
- 3 = Group
- 4 = Vehicle
- 5 = Direct
- 6-15 = Custom Radio (Is not supported by enableChannel )
+ Expands tree item pointed to by the path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/enableChannel
+ https://community.bistudio.com/wiki/tvExpand
- Number enableChannel Boolean
+ tvExpand Array
- Number enableChannel Array
+ Control tvExpand Array
- channel enableChannel enable
+ tvExpand [idc, path]
- channel enableChannel [chat, VoN]
+ control tvExpand path
- $Code$0 enableChannel false ; // Disable user ability to send voice and text on global channel$/Code$
+ $Code$tvExpand [101, [0]];$/Code$
- $Code$0 enableChannel [ true, false ]; // Enable user ability to send text but disable voice on global channel$/Code$
+ $Code$_ctrl tvExpand [1];$/Code$
- undefined / local
+ local / local
- (June 17, 2016)
- If the user is admin, global channel is fully enabled, regardless of this command.
-
- (July 30, 2016)
- Alternative Syntax supports Custom Radio Channels
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Nothing - Nothing
+ Nothing - Nothing
+
- enableCollisionWith
+ animationNames
- Enable collision between vehicles.
+ Returns Array of Strings where elements are the names of model animations, which should theoretically be available for use with animate command. However in practice this depends on whether animation is also made available for use in scripts via config.
- https://community.bistudio.com/wiki/enableCollisionWith
+ https://community.bistudio.com/wiki/animationNames
- Object enableCollisionWith Object
+ animationNames Object
- vehicle enableCollisionWith vehicle
+ animationNames object
-
+ $Code$_names = animationNames static_AT;
+ // Returns: ["MainTurret", "MainGun", "MainTurret_destructX", "MainTurret_destructY", "MainTurret_destructZ", "MainGun_destructX", "MainGun_destructY", "MainGun_destructZ", "magazine_destruct", "ammo_belt_destruct", "bolt_destruct", "charging_handle_destruct", "damagehideVez_destruct", "damagehideHlaven_destruct", "damagehideRecoil_destruct", "Turret_shake", "Turret_shake_aside", "Magazine_hide", "Ammo_belt_hide", "muzzleFlash", "AddAutonomous_unhide", "bullet001_reload_hide", "bullet002_reload_hide", "bullet003_reload_hide", "bullet004_reload_hide", "bullet005_reload_hide", "bullet006_reload_hide", "bullet007_reload_hide", "bullet008_reload_hide"]$/Code$
+
- local / global
+ undefined / undefined
- (April 5, 2015)
- enableCollisionWith is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the disableCollisionWith command. An example for this is:
- $Code$//name of unit in editor such as player1
- //name of object in editor such as car1
- car1 enableCollisionWith player1;
- //to make your unit go through the car, use the below and make sure you know what your doing!
- car1 disableCollisionWith player1;
- $/Code$
- Both commands enableCollisionWith and disableCollisionWith, are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes.
- Nothing
+ Array
+
- enableCopilot
+ getDammage
- Enables copilot actions.
+ Returns the object damage in the range from 0 to 1. Alias of damage.
- https://community.bistudio.com/wiki/enableCopilot
+ https://community.bistudio.com/wiki/getDammage
- Object enableCopilot Boolean
+ getDammage Object
- vehicle enableCopilot enable
+ getDammage object
- $Code$if (! isCopilotEnabled myHeli) then {
- myHeli enableCopilot true ;
- };$/Code$
+ $Code$_damage = getDammage player ;$/Code$
- local / global
+ undefined / undefined
- (February 17, 2014)
- Only enables the user actions, not who is in control - pilot can lock or unlock co-pilot controls in multiplayer while still true.
- Actions: LockVehicleControl, UnlockVehicleControl, SuspendVehicleControl and TakeVehicleControl
- You can use the Arma 3 Event Handler - ControlsShifted to detect Take and Release actions
+ (, May 9, 2011)
+ getDammage and damage works fine when used on damaged vehicles after a repair from a repairtruck when used in A2 CO patch 1.59.
+
+ Vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the damage command is called. They return a value equal to or less than 0.09.
+ Consequently any vehicle flagged as immobile (as indicated by the canMove command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use setDamage 0 on the vehicle in question, to allow the AI to board.
+
+ In OFP 1.96, it is possible for a unit to be dead and still return a getDammage value well below 1. Use ! alive to check if a unit is dead.
- Nothing
+ Number
+
- enableDebriefingStats
+ setCuratorCoef
- enable debrifing score table.
+ Sets coef for some action (coef have to be bigger than -1 000 000, anything lower is considered as disabled action).
- https://community.bistudio.com/wiki/enableDebriefingStats
+ https://community.bistudio.com/wiki/setCuratorCoef
- enableDebriefingStats Array
+ Object setCuratorCoef Array
- enableDebriefingStats [left, top, width, height]
+ curatorObj setCuratorCoef [action,coef]
- $Code$enableDebriefingStats [0.1, 0.1, 0.8, 0.8];$/Code$
+ $Code$curatorModule setCuratorCoef ["Place", 1]$/Code$
+
+ $Code$curatorModule setCuratorCoef ["Delete", -1e10]$/Code$
undefined / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (March 25, 2015)
+ Possible actions are:
+ place
+ edit
+ delete
+ destroy
+ group
+ synchronize
- Nothing
+ Nothing
+
- enableDiagLegend
+ surfaceNormal
- Enable or disable the legend for diagnostics. Internal dev only
+ Returns surface normal on given position.
- https://community.bistudio.com/wiki/enableDiagLegend
+ https://community.bistudio.com/wiki/surfaceNormal
- enableDiagLegend Boolean
+ surfaceNormal Array
- enableDiagLegend Bool
+ surfaceNormal position
- $Code$enableDiagLegend false$/Code$
+ $Code$_normal = surfaceNormal [300, 500];$/Code$
+
+ $Code$_normal = surfaceNormal position player ;$/Code$
undefined / undefined
@@ -22264,27 +23370,29 @@
- Nothing
+ Array
+
- enableDynamicSimulation
+ load
- Enables or disables Arma_3_Dynamic_Simulation for given non AI object
+ Returns current sum of mass from items stored in all unit's containers. Load is calculated by the following formula:
+ $Code$_loadPlayer = loadAbs player / getNumber ( configFile "CfgInventoryGlobalVariable" "maxSoldierLoad");$/Code$
- https://community.bistudio.com/wiki/enableDynamicSimulation
+ https://community.bistudio.com/wiki/load
- Object/Group enableDynamicSimulation Boolean
+ load Object
- object enableDynamicSimulation enable
+ load unit
- $Code$_myObject enableDynamicSimulation true ;$/Code$
+ $Code$load player ;$/Code$
undefined / undefined
@@ -22292,336 +23400,419 @@
- Nothing
+ Number
+
- enableDynamicSimulationSystem
+ drawLocation
- Enables or disables the whole Arma_3_Dynamic_Simulation system
+ Unknown effect.
- https://community.bistudio.com/wiki/enableDynamicSimulationSystem
+ https://community.bistudio.com/wiki/drawLocation
- enableDynamicSimulationSystem Boolean
+ Control drawLocation Location
- enableDynamicSimulationSystem enable
+ control drawLocation location
- $Code$enableDynamicSimulationSystem true ;$/Code$
-
+
undefined / undefined
- Nothing
+ Unknown
+
- enableEndDialog
+ closeOverlay
- Enables the execution of a custom camera sequence after the players death, coded in the script onPlayerKilled.sqs.
+ Closes the current overlay without committing.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/enableEndDialog
+ https://community.bistudio.com/wiki/closeOverlay
- enableEndDialog
+ closeOverlay Control
- enableEndDialog
+ closeOverlay map
- undefined / local
+ undefined / undefined
- Nothing
+ Nothing
+
- enableEngineArtillery
+ setObjectMaterial
- Enable/disable the artillery engine. This allows the user to use the artillery computer on mortar/artillery, and for AI to use it for indirect fire.
+ Sets material of object selection. The selection number is defined through the hiddenselection []={} array in the vehicle's config (starting with 0).
- https://community.bistudio.com/wiki/enableEngineArtillery
+ https://community.bistudio.com/wiki/setObjectMaterial
- enableEngineArtillery Boolean
+ Object setObjectMaterial Array
- enableEngineArtillery enabled
+ obj setObjectMaterial [selectionNumber, material]
- $Code$enableEngineArtillery false;$/Code$
+ $Code$car setObjectMaterial [0,"A3\Structures_F\Data\Windows\window_set.rvmat"];
+ car setObjectMaterial [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];$/Code$
- undefined / local
+ global / local
- Nothing
+ Nothing
+
- enableEnvironment
+ waypointForceBehaviour
- Enable/disable environmental effects: ambient life and/or ambient sound.
+ Returns true if the waypoint behavior is forced.
- https://community.bistudio.com/wiki/enableEnvironment
+ https://community.bistudio.com/wiki/waypointForceBehaviour
- enableEnvironment Boolean
-
- enableEnvironment Array
+ waypointForceBehaviour Waypoint
- enableEnvironment enabled
-
- enableEnvironment [ambientLife, ambientSound]
+ waypointForceBehaviour waypoint
- $Code$enableEnvironment false ;$/Code$
-
- $Code$enableEnvironment [ false, true ];$/Code$
+ $Code$_isForced = waypointForceBehaviour [groupOne, 1];$/Code$
undefined / undefined
- (28 October, 2013)
- This command has to be executed after mission start to have an effect. So if you add this command in init.sqf make sure you wait until mission is running:
- $Code$//init.sqf
- waitUntil { time 0};
- enableEnvironment false ;$/Code$
- Nothing - Nothing
+ Boolean
+
- enableFatigue
+ htmlLoad
- Enables/Disables the person's fatigue.
+ Load HTML-Files from file or Uri using given control.
+ File path is relative to current mission dir or an absolute path (with drive letter etc.).
+ The command is subject to restrictions, imposed by CfgCommands class.
- https://community.bistudio.com/wiki/enableFatigue
+ https://community.bistudio.com/wiki/htmlLoad
- Object enableFatigue Boolean
+ Control htmlLoad String
- unit enableFatigue enable
+ control htmlLoad filename
- $Code$player enableFatigue false ;$/Code$
+ $Code$_control htmlLoad "briefing.html";$/Code$
- $Code${ _x enableFatigue false ; } forEach ( units group player );$/Code$
+ $Code$_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main // [1]$/Code$
+
+ $Code$// Display news item:
+ 0 = 0 spawn {
+ disableSerialization ;
+ _html = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscHTML", -1];
+ _html ctrlSetBackgroundColor [0,0,0,0.8];
+ _html ctrlSetPosition [ safeZoneX, safeZoneY, safeZoneW, safeZoneH ];
+ _html ctrlCommit 0;
+ _html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main
+ };$/Code$
- local / global
+ undefined / undefined
- (March 24, 2015)
- When the player dies enableFatigue is set to true after the respawn
+ (September 7, 2014)
+ htmlLoad works with URL's as well as html files.
- (January 27, 2016)
- To precise the note of Harmdhast, this command is not persistent (after respawn). So, in MP, you'll have to enableFatigue false, also in onPlayerRespawn.sqf or through the MP eventHandler MPRespawn.
+ (September 7, 2014)
+ While surprisingly htmlLoad does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete. Therefore it is not recommended to use this command in such way.
+
+ (April 21, 2015)
+ Example use of URL can be found in BIS_fnc_GUInewsfeed with the function browser.
+
+ (October 7, 2015)
+ (Arma 3) In order to use URLs, they must be included in CfgCommands - allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported
+ Script Example :
+ $Code$_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player;
+ _ctrlHTML htmlLoad _newsOnline;$/Code$
+ Config Example:
+ $Code$class CfgCommands {
+ allowedHTMLLoadURIs[] += {
+ "http://alivemod.com/alive_news.php*"
+ };
+ };$/Code$
- Nothing
+ Nothing
+
- enableGunLights
+ isText
- Force the AI to use gun lights
+ Check if config entry represents text.
- https://community.bistudio.com/wiki/enableGunLights
+ https://community.bistudio.com/wiki/isText
- Object/Group enableGunLights Boolean
+ isText Config
- thing enableGunLights value
+ isText config
- $Code$_grp enableGunLights true$/Code$
-
- $Code$_unit enableGunLights true$/Code$
+ $Code$_ok = isText (configFile "CfgVehicles")
+ // Result is false$/Code$
- local / global
+ undefined / undefined
- (27 July, 2011)
- This command can be used to force lights on, but not to force lights off. ( Source )
-
- (17 April, 2013)
- In order for this command to work in ARMA 3 you should use groupname enableGunLights "AUTO" or soldierOne enableGunLights "AUTO". Other options are "forceOn" or "forceOff". ( Source )
- Nothing
+ Boolean
+
- enableIRLasers
+ onPlayerDisconnected
- Allows the AI to use IR lasers
+ This command will execute attached code whenever a player is leaving an MP session. The code will receive a number of special variables:
+ _id : Number - is the unique DirectPlay ID. Quite useless as the number is too big for in-built string representation and gets rounded. It is also the same id used for user placed markers.
+ _uid : String - is getPlayerUID of the leaving player. In Arma 3 it is also the same as Steam ID.
+ _name : String - is profileName of the leaving player.
+ _jip : ( since Arma 3 v1.49 ) Boolean - is a flag that indicated whether or not the player joined after the mission has started ( J oined I n P rogress). true - if the player was JIP, otherwise false.
+ _owner : ( since Arma 3 v1.49 ) Number - is owner id of the leaving player. Can be used for kick or ban purposes or just for publicVariableClient.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: PlayerDisconnected
+ In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
- https://community.bistudio.com/wiki/enableIRLasers
+ https://community.bistudio.com/wiki/onPlayerDisconnected
- Object/Group enableIRLasers Boolean
+ onPlayerDisconnected String/Code
- thing enableIRLasers value
+ onPlayerDisconnected code
- $Code$(units group player) enableIRLasers true$/Code$
+ $Code$onPlayerDisconnected " diag_log [_id, _uid, _name]";$/Code$
+
+ $Code$onPlayerDisconnected {
+ if ( count allPlayers == 0) then {
+ endMission "END1";
+ };
+ };$/Code$
- local / global
+ undefined / undefined
-
-
- Nothing
-
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (January 14, 2015)
+ For Arma 3 v1.32 and onward, one might want to consider using instead the HandleDisconnect mission event handler for greater flexibility.
+
+
+ Nothing
+
+
- enableMimics
+ owner
- Enables/disables mimics on a given unit.
+ On server machine, returns the ID of the client where the object is local. Otherwise returns 0. For use on clients clientOwner command is available. To find out the owner of a Group, use groupOwner.
- https://community.bistudio.com/wiki/enableMimics
+ https://community.bistudio.com/wiki/owner
- Object enableMimics Boolean
+ owner Object
- unit enableMimics enabled
+ owner object
- $Code$cursorTarget enableMimics false ;$/Code$
+ $Code$_clientID = owner _someobject;$/Code$
- undefined / undefined
+ global / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
- Nothing
+ Number
+
- enablePersonTurret
+ cutObj
- Enables or disables firing from a vehicle cargo position. To get the turret path use assignedVehicleRole or getCargoIndex command.
+ Displays an object defined in the global config in CfgTitles.
+ For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
- https://community.bistudio.com/wiki/enablePersonTurret
+ https://community.bistudio.com/wiki/cutObj
- Object enablePersonTurret Array
+ cutObj Array
+
+ Number cutObj Array
+
+ String cutObj Array
- vehicle enablePersonTurret [turretPath, enable]
+ cutObj [class, type, speed, showInMap]
+
+ layer cutObj [class, type, speed, showInMap]
+
+ layerName cutObj [class, type, speed, showInMap]
- $Code$heli enablePersonTurret [[1], true ];$/Code$
+ $Code$cutObj ["TVSet", "PLAIN"];
+ cutObj ["TVSet", "PLAIN", 2]$/Code$
+
+ $Code$2 cutObj ["Sphere", "PLAIN"];$/Code$
+
+ $Code$_layer = "layer1" cutObj ["BISLogo", "PLAIN"];$/Code$
- undefined / undefined
+ undefined / local
- Nothing
+ Nothing - Nothing - Number
+
- enableRadio
+ setVariable
- Enable and disable radio messages to be heard and shown in the left lower corner of the screen. This command can be helpful during cutscenes.
+ Set variable to given value in the variable space of given element.
+ To remove a variable, set it to nil (e.g. player setVariable ["varname", nil ];$/Code$ ).
+ When variable is set on Task, it is not actually set on task itself, but on FSM attached to the task. So if there is no FSM setVariable will not work.
+ All available variable spaces which support setVariable :
+ Namespace setVariable Array
+ Object setVariable Array
+ Group setVariable Array
+ Team_Member setVariable Array
+ Task setVariable Array
+ Location setVariable Array
+ Control setVariable Array (since Arma 3 v1.55.133553)
+ Display setVariable Array (since Arma 3 v1.55.133553)
+ In Arma 3 it is possible to broadcast nil value
- https://community.bistudio.com/wiki/enableRadio
+ https://community.bistudio.com/wiki/setVariable
- enableRadio Boolean
+ Namespace/Object/Group/Team_Member/Task/Location/Control/Display setVariable Array
+
+ Namespace/Object/Group setVariable Array
- enableRadio state
+ varspace setVariable [name, value]
+
+ varspace setVariable [name, value, public]
- $Code$enableRadio false$/Code$
+ $Code$_myTruck setVariable ["myPublicVariable", 123, true ];$/Code$
+
+ $Code$_myTruck setVariable ["myLocalVariable", ["321", _var], false ];$/Code$
+
+ $Code$missionNamespace setVariable ["myName", "KK"];
+ hint myName; //KK$/Code$
+
+ $Code$// Get current value of a variable and if it is undefined, define it and get the defined value:
+ private _var = missionNamespace getVariable "varName";
+ if ( isNil "_var") then
+ {
+ missionNamespace setVariable ["varName", 123];
+ _var = 123;
+ };
+ // _var here will contain current value of the variable varName$/Code$
- undefined / local
+ global / local
- (7 August, 2008)
- This command doesn't disable text-chat in multiplayer.
-
- (11 September, 2008)
- Does not affect VON.
+ (December 9, 2015)
+ This command does not work with CfgAmmo or CfgNonAIVehicles objects, like bullets, mines or butterflies (probably because they are local objects Killzone Kid ( talk ) 11:25, 9 July 2017 (CEST)).
- Nothing
+ Nothing - Nothing
+
- enableReload
+ tvSetPictureRightColorDisabled
- Enable / disable reload when magazine is empty.
+ Sets the color of the right picture of a tree item defined by path when item is disabled
- https://community.bistudio.com/wiki/enableReload
+ https://community.bistudio.com/wiki/tvSetPictureRightColorDisabled
- Object enableReload Boolean
+ Control tvSetPictureRightColorDisabled Array
- object enableReload enable
+ control tvSetPictureRightColorDisabled [path, color]
- $Code$_vehicle enableReload false ;$/Code$
+ $Code$_control tvSetPictureRightColorDisabled [[0], [1,0,1,1]]$/Code$
undefined / undefined
@@ -22629,57 +23820,59 @@
- Nothing
+ Nothing
+
- enableRopeAttach
+ getPosATLVisual
- Enable/disable ability to attach or be attached to ropes for given vehicle
+ Returns an object's rendered 3D position ATL (z value above ground) in render time scope.
- https://community.bistudio.com/wiki/enableRopeAttach
+ https://community.bistudio.com/wiki/getPosATLVisual
- Object enableRopeAttach Boolean
+ getPosATLVisual Object
- vehicle enableRopeAttach enable
+ getPosATLVisual object
- $Code$( vehicle player ) enableRopeAttach false ;$/Code$
+ $Code$_playerRenderedPosATL = getPosATLVisual player ;$/Code$
- undefined / undefined
+ global / undefined
- (05 April, 2014)
- Attachable nearby vehicles may not update on Sling Load Assistant until re-opened.
- Nothing
+ Array
+
- enableSatNormalOnDetail
+ getModelInfo
- Enables/Disables satellite normal map od detail maps.
+ Returns object's model info in format [modelName, modelPath, hasSkeleton]. Model path is suitable for use with createSimpleObject command.
- https://community.bistudio.com/wiki/enableSatNormalOnDetail
+ https://community.bistudio.com/wiki/getModelInfo
- enableSatNormalOnDetail Boolean
+ getModelInfo Object
- enableSatNormalOnDetail state
+ getModelInfo object
- $Code$enableSatNormalOnDetail true;$/Code$
+ $Code$_modelInfo = getModelInfo player ;$/Code$
+
+ $Code$_modelInfo = getModelInfo cursorObject ;$/Code$
undefined / undefined
@@ -22687,248 +23880,239 @@
- Nothing
+ Array
+
- enableSaving
+ vectorMultiply
- Enable / disable saving of the game.
- When disabled, the autosave is created (if not forbidden by save == false).
+ Multiplies 3D vector by a scalar.
- https://community.bistudio.com/wiki/enableSaving
+ https://community.bistudio.com/wiki/vectorMultiply
- enableSaving Boolean
-
- enableSaving Array
+ Array vectorMultiply Number
- enableSaving enable
-
- enableSaving [enable, save]
+ vector vectorMultiply scalar
- $Code$enableSaving false ; // Saving disabled and make autosave.
- enableSaving true ; // Saving enabled without autosave.
- enableSaving [ false, false ]; // Saving disabled without autosave.
- enableSaving [ false, true ]; // Saving disabled and make autosave.
- enableSaving [ true, false ]; // Saving enabled without autosave.
- enableSaving [ true, true ]; // Saving enabled and make autosave.$/Code$
+ $Code$_newVector = [1,2,3] vectorMultiply 3; //[3,6,9]$/Code$
undefined / undefined
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector = [x,y,z]; scalar = a;
+ Result = [(x * a),(y * a),(z * a)];
+ $/Code$
+ It is recommended to use vectorMultiply instead of BIS_fnc_vectorMultiply. This is a very useful function, as it can be used with the velocity command to move an object from one position to another. (ie vector1 to vector2 ) - ensure both positions are found using getPosASL.
+ $Code$
+ _obj setVelocity ((( getPosASL _target) vectorDiff ( getPosASL _obj)) vectorMultiply 2);
+ $/Code$
- Nothing - Nothing
+ Array
+
- enableSentences
+ createTeam
- Enables radio transmissions to be heard and seen on screen. It does not affect KBTell conversations.
+ Create a team and name it.
- https://community.bistudio.com/wiki/enableSentences
+ https://community.bistudio.com/wiki/createTeam
- enableSentences Boolean
+ createTeam Array
- enableSentences enable
+ createTeam [type, name]
- $Code$enableSentences false;$/Code$
+ $Code$_team = createTeam ["USMC_Team", "Fire Team Red"];$/Code$
- undefined / local
+ undefined / undefined
- Nothing
+ Team_Member
+
- enableSimulationGlobal
+ faction
- MP command. Enable or disable simulation for given entity, globally. Call this only from the server. Has the same effect as enableSimulation when used in SP.
+ Gets unit faction. Factions are defined under CfgFactionClasses. If the given faction is not defined, the command returns empty string. Standard Factions include:
+ West: "USMC", "CDF"
+ East: "RU", "INS"
+ Guer: "GUE"
+ Civ: "CIV", "CIV_RU"
+ West: "BIS_US", "BIS_CZ", "BIS_GER"
+ East: "BIS_TK", "BIS_TK_INS"
+ Guer: "BIS_TK_GUE", "BIS_UN"
+ Civ: "BIS_TK_CIV", "BIS_CIV_special"
+ British Armed Forces DLC
+ West: "BIS_BAF"
+ Private Military Company DLC
+ Guer: "PMC_BAF"
+ West: "BLU_F" (NATO), "BLU_G_F" (FIA)
+ East: "OPF_F" (CSAT), "OPF_G_F" (FIA)
+ Guer: "IND_F" (AAF), "IND_G_F" (FIA)
+ Civ: "CIV_F" (Civilians)
+ Arma 3 - APEX
+ West: "BLU_T_F" (Pacific NATO), "BLU_CTRG_F" (Pacific CTRG), "BLU_GEN_F" (Gendarmerie)
+ East: "OPF_T_F"
+ Guer: "IND_C_F" (Syndikat)
+ "CIV_IDAP_F"
- https://community.bistudio.com/wiki/enableSimulationGlobal
+ https://community.bistudio.com/wiki/faction
- Object enableSimulationGlobal Boolean
+ faction Object
- entity enableSimulationGlobal enable
+ faction unitName
- $Code$_myObject enableSimulationGlobal false;$/Code$
+ $Code$_playersFaction = faction player ;$/Code$
- global / global
+ global / undefined
- This scripting command must be executed on the server to work properly in multiplayer
-
- (October 21, 2014)
- Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: $Code${ player reveal _x} forEach allUnits ;$/Code$
+ Faction behaves slightly differently to side. Side can refer to the pilot or commander of a vehicle, but faction never changes. It always returns the 'country of manufacture'.
- Nothing
+ String
+
- enableSimulation
+ fogParams
- Enable / disable simulation for given entity.
+ A getter for setFog (Alt Syntax). Returns extended params for the fog
- https://community.bistudio.com/wiki/enableSimulation
+ https://community.bistudio.com/wiki/fogParams
- Object enableSimulation Boolean
+ fogParams
- entity enableSimulation state
+ fogParams
- $Code$player enableSimulation false;$/Code$
+ $Code$_fog = fogParams$/Code$
- global / local
+ undefined / undefined
- (15 July, 2009)
- enableSimulation will "freeze" the unit, including animations, eye blinking, etc ; you cannot switchMove or playMove.
- the unit can still take damages and report status and enemies by radio.
-
- (19 July, 2011)
- Nou/Jaynus have discovered something quite important about the Arma2 engine:
- Orient yourself to the enableSimulation command in ARMA 2:
- If simulation is disabled on objects (this enablesimulation false), they do not send updates across the network, drastically reducing traffic across the network by an order of magnitude. What this means in practicality is that it is possible to have huge mission maker created cities with no or negligible impact on mission performance. Mission placed objects is the most common cause of performance woes - so this is huge news, and was previously undocumented, both on the BIS wiki and elsewhere.
- There are some quirks.
- While an object which has enableSimulation false set on it will take damage, it will not display any animations or damage states until enableSimulation is enabled back onto it. If you want to disable simulation on a unit and then show it as dieing once it is hit or damaged, add an eventhandler onto it which enables simulation on the object when it is hit or killed. Hit handler for best visual, killed handler for best performance.
- This discovery will be the basis of a new unit caching script by Jaynus.
- This also has importance in a technical sense: bandwith is the most significant factor in mission performance. The lower the server bandwith, the better the performance.
-
- (9 Sept, 2011)
- Objects with disabled simulation are not calculated for lightsources beyond the global light (moon/sun), so any light sources you create will not light them.
-
- (12 Nov, 2011)
- Contrary to Krause's suggestions above, using "this enableSimulation False" on static objects has no effect on a dedicated server's bandwidth usage or FPS (as per current 1.59 Release version).
-
- (8 May, 2012)
- re: Homer.
- Yep. That's because this functionality is now part of the basic arma netcode. Pretty nice :)
-
- (October 3, 2014)
- Units with disabled simulation will not be affected by gravity.
-
- (October 21, 2014)
- Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: $Code${ player reveal _x} forEach allUnits ;$/Code$
-
- (May 23, 2015)
- After using enableSimulation false or enableSimulationGlobal false on an object, setPos will still update its position across the network in MP.
-
- (December 2, 2015)
- After using enableSimulation false or enableSimulationGlobal false on a vehicle (car, helo), don't forget to re-enable simulation on this vehicle before a player jumps into it. Otherwise, he will be stick in it, with a black screen and no way to escape!
-
- (February 5, 2016)
- cursorTarget returns a null_object for objects with disabled simulation. But you can find them with other commands such nearEntities.
-
- (September 1, 2016)
- Since Arma 3 1.56 the object can also be returned with cursorObject even if the simulation is not enabled
- Nothing
+ Array
+
- enableStamina
+ resize
- Enable/disable stamina system
+ Changes the size of the given array. The command does not return new array, it resizes the source array to the desired number of elements. If the new size is bigger than the current size, the new places are filled with nils.
- https://community.bistudio.com/wiki/enableStamina
+ https://community.bistudio.com/wiki/resize
- Object enableStamina Boolean
+ Array resize Number
- unit enableStamina enabled
+ array resize count
- $Code$player enableStamina true;$/Code$
+ $Code$_arrayNum = [0,1,2,3,4];
+ _arrayNum resize 2; // _arrayNum is now [0,1]$/Code$
undefined / undefined
+ (November 13, 2014)
+ Use this number to resize the array to the number of elements desired, not the desired index of the final element.
+ resize cannot be used to create a new array.
- Nothing
+ Nothing
+
- enableTeamSwitch
+ asin
- Enable / disable Team Switch. The default setting is enabled.
+ Arcsine of a number, result in Degrees.
- https://community.bistudio.com/wiki/enableTeamSwitch
+ https://community.bistudio.com/wiki/asin
- enableTeamSwitch Boolean
+ asin Number
- enableTeamSwitch enable
+ asin x
-
+ $Code$_degrees=asin 0.5
+ returns 30$/Code$
+
undefined / undefined
- Nothing
+ Number
+
- enableUAVConnectability
+ isIRLaserOn
- Enables unit's AV terminal(s) connecting to UAV.
+ Returns true if there is a linked and enabled IR on the given weapon.
- https://community.bistudio.com/wiki/enableUAVConnectability
+ https://community.bistudio.com/wiki/isIRLaserOn
- Object enableUAVConnectability Array
+ Object isIRLaserOn String
- object enableUAVConnectability [uav, checkAllItems]
+ unit isIRLaserOn weapon
- $Code$unit enableUAVConnectability [uav,true];$/Code$
+ $Code$player isIRLaserOn currentWeapon player ;$/Code$
undefined / undefined
@@ -22936,86 +24120,225 @@
- Nothing
+ Boolean
+
- enableUAVWaypoints
+ addPublicVariableEventHandler
- Enables/disables the option for player to set waypoints for UAV in AV terminal.
+ This event handler will detect if a missionNamespace variable (it is attached to) has been broadcast over network with publicVariable, publicVariableClient or publicVariableServer commands and will execute EH code upon detection. Arguments passed to the code in _this array are:
+ _this select 0: String - broadcast variable name (same variable name EH is attached to)
+ _this select 1: Anything - broadcast variable value
+ _this select 2: Object, Group - target the variable got set on with setVariable (see: alternative syntax)
+ Please note:
+ * EH works only in Multiplayer environment.
+ * EH will not fire on the machine that executed broadcast command, only on the machines that receive the broadcast.
+ * The value of broadcast variable can be exactly the same, it is the actual broadcast that triggers EH not the change in variable.
+ Alt syntax of this command doesn't work as intended
- https://community.bistudio.com/wiki/enableUAVWaypoints
+ https://community.bistudio.com/wiki/addPublicVariableEventHandler
- Object enableUAVWaypoints Boolean
+ String addPublicVariableEventHandler Code
+
+ String addPublicVariableEventHandler Array
- uav enableUAVWaypoints enable
+ varName addPublicVariableEventHandler code
+
+ varName addPublicVariableEventHandler [target, code]
- $Code$_uav enableUAVWaypoints false ;
- hint str waypointsEnabledUAV _uav; // returns false$/Code$
+ $Code$"publicThis" addPublicVariableEventHandler {
+ hint format [
+ "%1 has been updated to: %2",
+ _this select 0,
+ _this select 1
+ ]
+ };$/Code$
+
+ $Code$// Client:
+ "'^:)123BURP,+=lol" addPublicVariableEventHandler { hint ("NUTS are " + (_this select 1))};
+ // Server: missionNamespace setVariable ["'^:)123BURP,+=lol", "craZZZZy"];
+ publicVariable "'^:)123BURP,+=lol";$/Code$
- undefined / undefined
+ global / local
+ (22 Dec, 2007)
+ Please note that varName indicates which variable you want to monitor with this eventhandler.
+ As a result, the example eventhandler on this page will only fire when the variable publicThis has been changed,
+ but not if any other variable was changed by any other client via the publicVariable command.
+
+ (27 Feb, 2014 00:57)
+ Note on using addPublicVariableEventHandler during initialization: If you need a function to call addPublicVariableEventHandler during initialization, you must use postInit. addPublicVariableEventHandler does not work during preInit.
+
+ (27 Feb, 2014 08:40)
+ MulleDK13 note above needs some clarification. You don't "must" use postInit and you absolutely can use preInit function to initialise addPublicVariableEventHandler if you start scheduled script from it.
+ $Code$//script with preInit = 1; in CfgFunctions
+ 0 = 0 spawn {
+ "someVar" addPublicVariableEventHandler {
+ //yourcode
+ };
+ };$/Code$
+
+ (November 23, 2015)
+ While it is true that the event handler will only fire on the machine receiving the broadcast value. Please note that this machine can actually be the same machine broadcasting it in the cases of publicVariableClient and publicVariableServer.
+ Examples: $Code$if ( isServer ) then {
+ "OnServer" addPublicVariableEventHandler { hint "This event handler still fired!"; };
+ publicVariableServer "OnServer";
+ };$/Code$
+ $Code$// This example assumes the client knows their own client ID
+ // It does also work on the server (when the server ID is used) irrespective of the command name
+ "OnClient" addPublicVariableEventHandler { hint "This event handler still fired!"; };
+ client ID publicVariableClient "OnClient";
+ $/Code$
- Nothing
+ Nothing - Nothing
+
- enableVehicleCargo
+ append
- Enable/disable option to transport other vehicles (if configured) or be transported.
+ Appends array2 to the back of array1 modifying array1.
+ NOTE: append does not return array, it modifies existing array. If you need to return a copy, use "+":
+ $Code$array3 = array1 + array2;$/Code$
- https://community.bistudio.com/wiki/enableVehicleCargo
+ https://community.bistudio.com/wiki/append
- Object enableVehicleCargo Boolean
+ Array append Array
- vehicle enableVehicleCargo enable
+ array1 append array2
- $Code$vehicle enableVehicleCargo true ;$/Code$
+ $Code$_arr = [1,2,3];
+ _arr append [4,5,6];
+ hint str _arr; //[1,2,3,4,5,6]$/Code$
undefined / undefined
- (June 20, 2016)
- Setting enableVehicleCargo to true does not mean a vehicle can now load vehicles as cargo. They are still required to be correctly setup as shown on the Vehicle in Vehicle Transport page.
+ (March 9, 2015)
+ $Code$_array1 append _array2$/Code$ is roughly 1.2x faster (depending on array size) than $Code$_array1 = _array1 + _array2$/Code$ (Averaged over 10.000 iterations with two identical arrays containing the numbers 0 through 9)
+ The larger the arrays to append, the faster append is as it does not create a new array, which happens with array addition.
+
+ (May 21, 2015)
+ Array "unshift" implementation using append, a faster alternative to BIS_fnc_arrayUnShift :
+ $Code$KK_fnc_unshift = {
+ private ["_arr", "_tmp"];
+ _arr = _this select 0;
+ _tmp = [_this select 1];
+ _tmp append _arr;
+ _arr resize 0;
+ _arr append _tmp;
+ _arr
+ };
+ // Example
+ arr = [1,2,3];
+ [arr, 0] call KK_fnc_unshift; //both arr and return of function are [0,1,2,3]
+ $/Code$
+
+ (May 21, 2015)
+ Array "insert" implementation using append, much faster alternative to BIS_fnc_arrayInsert :
+ $Code$KK_fnc_insert = {
+ private ["_arr", "_i", "_res"];
+ _arr = _this select 0;
+ _i = _this select 2;
+ _res = [];
+ _res append (_arr select [0, _i]);
+ _res append (_this select 1);
+ _res append (_arr select [_i, count _arr - _i]);
+ _res
+ };
+ // Example
+ arr = [1,2,3,4];
+ [arr, ["a","b"], 2] call KK_fnc_insert; //[1,2,"a","b",3,4]$/Code$
+
+ (May 21, 2015)
+ A faster alternative to BIS_fnc_arrayPushStack using append :
+ $Code$KK_fnc_pushStack = {
+ _this select 0 append (_this select 1);
+ _this select 0
+ };
+ // Example
+ arr = [1,2,3];
+ [arr,[4,5,6]] call KK_fnc_pushStack; //both arr and function return are [1,2,3,4,5,6]$/Code$
- Nothing
+ Nothing
+
- enableVehicleSensor
+ getCompatiblePylonMagazines
- Enable/disable given sensor
+ Get array of compatible pylon magazines
- https://community.bistudio.com/wiki/enableVehicleSensor
+ https://community.bistudio.com/wiki/getCompatiblePylonMagazines
- Object enableVehicleSensor Array
+ Object getCompatiblePylonMagazines Number
+
+ String getCompatiblePylonMagazines Number
- vehicle enableVehicleSensor [componentName, state]
+ vehicle getCompatiblePylonMagazines pylon
+
+ vehicleClass getCompatiblePylonMagazines pylon
- $Code$vehicle player enableVehicleSensor ["PassiveRadarSensorComponent",false]; // disables passive radar$/Code$
+ $Code$vehicle player getCompatiblePylonMagazines 0; // returns array of arrays containing all compatible magazines$/Code$
+
+ $Code$"Plane_Fighter_01_Base_F" getCompatiblePylonMagazines 3; // returns array of compatible magazines for the 3rd pylon$/Code$
+
+ $Code$jet1 getCompatiblePylonMagazines "pylon1"; // returns array of compatible magazines for the 1st pylon$/Code$
+
+ $Code$// Get all pylon names for "Plane_Fighter_01_Base_F"
+ private _allPylons = "true" configClasses (
+ configFile
+
+ "CfgVehicles"
+
+ "Plane_Fighter_01_Base_F"
+
+ "Components"
+
+ "TransportPylonsComponent"
+
+ "pylons"
+ ) apply { configName _x};
+ hint str _allPylons;
+ /* return:
+ [
+ "pylon1",
+ "pylon2",
+ "pylon3",
+ "pylon4",
+ "pylonBayRight1",
+ "pylonBayLeft1",
+ "pylonBayCenter1",
+ "pylonBayCenter2",
+ "pylonBayCenter3",
+ "pylonBayCenter4",
+ "pylonBayCenter5",
+ "pylonBayCenter6"
+ ]*/$/Code$
undefined / undefined
@@ -23023,71 +24346,59 @@
- Nothing
+ Array - Array
+
- enableWeaponDisassembly
+ markerType
- Enables or disables disassembly of static weapons. Could be applied to local player, to another unit or to static weapon directly.
+ Get type of marker. Note: This function is identical to getMarkerType. See cfgMarkers for a list of standard markers.
- https://community.bistudio.com/wiki/enableWeaponDisassembly
+ https://community.bistudio.com/wiki/markerType
- enableWeaponDisassembly Boolean
-
- Object enableWeaponDisassembly Boolean
+ markerType String
- enableWeaponDisassembly enable
-
- entity enableWeaponDisassembly enable
+ markerType markerName
- $Code$enableWeaponDisassembly false ;$/Code$
-
- $Code$soldier1 enableWeaponDisassembly false ;$/Code$
-
- $Code$mortar1 enableWeaponDisassembly false ;$/Code$
+ $Code$if ( markerType "Marker1" == "Empty") then { hint "Marker1 is not an icon!"}$/Code$
- global / global
+ global / undefined
+ (March 17, 2014)
+ Using markerType is a good method to determine if a string is a valid marker name, unless the marker type isn't set. $Code$if (markerType "mark1" != "") then {hint "valid marker"}$/Code$
- Nothing - Nothing
+ String
+
- endLoadingScreen
+ lockedTurret
- Finishes loading screen started by startLoadingScreen.
+ Check whether gunner position of the vehicle turret is locked.
- https://community.bistudio.com/wiki/endLoadingScreen
+ https://community.bistudio.com/wiki/lockedTurret
- endLoadingScreen
+ Object lockedTurret Array
- endLoadingScreen
+ vehicle lockedTurret turretPath
- $Code$startLoadingScreen ["Loading My Mission"];
- //Batch of code
- //Batch of code
- //Batch of code
- progressLoadingScreen 0.5;
- //Batch of code
- //Batch of code
- //Batch of code
- endLoadingScreen ;$/Code$
+ $Code$_locked = tank lockedTurret [0];$/Code$
undefined / undefined
@@ -23095,75 +24406,62 @@
- Nothing
+ Boolean
+
- endMission
+ createGuardedPoint
- Finish the mission.
- The end type can be:
- "CONTINUE"
- "KILLED"
- "LOSER"
- "END1"
- "END2"
- "END3"
- "END4"
- "END5"
- "END6"
- Mission saves are deleted. Use failMission if they should not.
- To maintain Arma 3 visual style, it's recommended to use BIS_fnc_endMission instead.
+ Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in Editor ). A closest AI group in the given side with assigned "GUARD" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules:
+ Given "position" is always considered. It could be Object, Group, Position2D or Position3D. In every case, z coordinate will be ignored and point will be placed on nearest surface.
+ If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact.
+ If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). objNull to ignore. z of the vehicle position will be intact.
+ For use with "GUARD" waypoint. How does "GUARD" waypoint work: Waypoint:Guard
- https://community.bistudio.com/wiki/endMission
+ https://community.bistudio.com/wiki/createGuardedPoint
- endMission String
+ createGuardedPoint Array
- endMission endType
+ createGuardedPoint [side, position, objectMapID, vehicle]
- $Code$endMission "END1";$/Code$
+ $Code$createGuardedPoint [ east, [0,0], -1, vehicle player ];$/Code$
- local / local
+ undefined / undefined
- Nothing
+ Nothing
+
- endl
+ set3DENLinesVisible
- Creates a string containing a line break, similar to lineBreak for text. The name is inspired by c++ std::endl (line end). The command returns "\r\n", which contains control characters rather than printable characters:
- hint str count "\r\n"; // 4
- hint str count endl ; // 2
- The line break works for diag_log and ctrlSetText. It doesn't work with the hint because hint interprets printable "\n" as line break instead. Alternatively one can use toString command to get other characters.
+ Toggle visibility of Eden Editor lines.
- https://community.bistudio.com/wiki/endl
+ https://community.bistudio.com/wiki/set3DENLinesVisible
- endl
+ set3DENLinesVisible Array
- endl
+ set3DENLinesVisible [showMap, showScene]
- $Code$diag_log ("line1" + endl + "line2");$/Code$
-
- $Code$_ctrl = findDisplay 46 ctrlCreate ["RscTextMulti", -1];
- _ctrl ctrlSetPosition [0,0,1,1];
- _ctrl ctrlCommit 0;
- _ctrl ctrlSetText format ["line1%1line2%1line3", endl ];$/Code$
+ $Code$set3DENLinesVisible [ false, false ];
+ // Hide all lines$/Code$
undefined / undefined
@@ -23171,99 +24469,93 @@
- String
+ Nothing
+
- engineOn
+ waypointSpeed
- Activates and deactivates the engine of a vehicle. This command has to be executed where vehicle is local.
- NOTE: Executed on a remote vehicle this command may turn the engine on but then it will get turned off by itself after a short while.
+ Gets the waypoint speed.
+ Possible values are:
+ "UNCHANGED"
+ "LIMITED"
+ "NORMAL"
+ "FULL"
- https://community.bistudio.com/wiki/engineOn
+ https://community.bistudio.com/wiki/waypointSpeed
- Object engineOn Boolean
+ waypointSpeed Array
- vehicle engineOn state
+ waypointSpeed waypoint
- $Code$if (! isEngineOn _jeep) then {_jeep engineOn true };$/Code$
-
- $Code$if ( local vehicle player ) then {
- vehicle player engineOn true ;
- } else {
- hint "Get in the driver seat, soldier!";
- };$/Code$
+ $Code$_speed = waypointSpeed [groupOne,1];$/Code$
- local / global
+ undefined / undefined
- (August 25, 2014)
- To switch engine off can also use setFuel and fuel :
- $Code$ private "_gas";
- _gas = fuel heli;
- heli setFuel 0;
- sleep 0.01;
- heli setFuel _gas;$/Code$
- Also sets helicopter fuel back to original quantity. Works on every other vehicle.
- Nothing
+ String
+
- enginesIsOnRTD
+ setTriggerText
- Returns which engines are producing some work.
+ Sets the text label attached to the trigger object. This is used for example as a radio slot label for radio activated triggers.
- https://community.bistudio.com/wiki/enginesIsOnRTD
+ https://community.bistudio.com/wiki/setTriggerText
- enginesIsOnRTD Object
+ Object setTriggerText String
- enginesIsOnRTD RTD_helicopter
+ trigger setTriggerText text
- $Code$_enginesTaru = enginesIsOnRTD _taru// Returns [true,true]$/Code$
+ $Code$trigger setTriggerText "Call for support"$/Code$
- undefined / undefined
+ global / local
- Array
+ Nothing
+
- enginesRpmRTD
+ editorSetEventHandler
- Returns all engines RPM
+ Sets given event handler of given editor.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/enginesRpmRTD
+ https://community.bistudio.com/wiki/editorSetEventHandler
- enginesRpmRTD Object
+ Control editorSetEventHandler Array
- enginesRpmRTD RTD_helicopter
+ map editorSetEventHandler [handler name,function]
- $Code$_UH80_E1 = ( enginesRpmRTD _UH80) select 0;//engine 1 RPM
- _UH80_E2 = ( enginesRpmRTD _UH80) select 1;//engine 2 RPM$/Code$
+ $Code$_map editorSetEventHandler ["SelectObject",""]$/Code$
undefined / undefined
@@ -23271,28 +24563,53 @@
- Array
+ Nothing
+
- enginesTorqueRTD
+ scriptNull
- Torque produced by engines in N·m (Newton*meter)
+ A non-existing Script or script that has finished ( scriptDone ). To compare non-existent scripts use isNull or isEqualTo :
+ scriptNull == scriptNull ; // ERROR! == cannot be used with script object
+ isNull scriptNull ; // true
+ scriptNull isEqualTo scriptNull ; // true
- https://community.bistudio.com/wiki/enginesTorqueRTD
+ https://community.bistudio.com/wiki/scriptNull
- enginesTorqueRTD Object
+ scriptNull
- enginesTorqueRTD RTD_helicopter
+ scriptNull
- $Code$_UH80_E1 = ( enginesTorqueRTD _UH80) select 0;//engine 1 Torque
- _UH80_E2 = ( enginesTorqueRTD _UH80) select 1;//engine 2 Torque$/Code$
+ $Code$// Wait until previous script is finished before starting a new one:
+ [] spawn
+ {
+ _script = scriptNull ;
+ for "_i" from 1 to 10 do {
+ waitUntil { isNull _script};
+ _script = _i spawn {
+ hint format ["script %1 started", _this];
+ sleep 1;
+ hint format ["script %1 finished", _this];
+ sleep 0.2;
+ };
+ };
+ };$/Code$
+
+ $Code$if ( scriptDone (_obj getVariable ["objScript", scriptNull ])) then {
+ _obj setVariable ["objScript", _obj spawn {
+ waitUntil { damage _this 0.9};
+ hint "Critical Damage!";
+ }];
+ };$/Code$
+
+ $Code$str scriptNull ; // NULL-script$/Code$
undefined / undefined
@@ -23300,107 +24617,129 @@
- Array
+ Script_Handle
+
- entities
+ saveIdentity
- Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored. When empty string "" is passed for the type, all entity types are returned.
- Alternative syntax introduced in Arma 3 v1.65.138685 allows to filter entities by type and alive status as well as to return entities currently in vehicles. Optimisation tip : Keep number of types in both includeTypes and excludeTypes arrays to a minimum by possibly using parent/base classes. If you have to use several types, arrange them in order so that the more common types go at the beginning of the array.
+ Saves person's identity to Objects.sav file in campaign directory as entry name.
- https://community.bistudio.com/wiki/entities
+ https://community.bistudio.com/wiki/saveIdentity
- entities String
-
- entities Array
+ Object saveIdentity String
- entities type
-
- entities [typesInclude, typesExclude, includeCrews, excludeDead]
+ unitName saveIdentity name
- $Code$_allcars = entities "Car";$/Code$
-
- $Code$// Return all alive entities on the map:
- _allalive = entities [[], [], true, true ];$/Code$
-
- $Code$// Return dead and alive entities but logic:
- _notlogic = entities [[], ["Logic"], true ];$/Code$
-
- $Code$// Return all alive west soldiers on foot:
- _footsoldiers = entities [["SoldierWB"], [], false, true ];$/Code$
+ $Code$player saveIdentity "playerid"$/Code$
undefined / undefined
- (Mar 27, 2014)
- In ArmA3 ver 1.14 type (string) can be any children class under configfile "CfgVehicles". e.g. $Code$ entities "All"; //or entities "CAManBase"; etc.$/Code$
-
- (July 12, 2016)
- In A3 1.62 $Code$entities "CAManBase"$/Code$ does not include entities inside vehicles (crew).
-
- (May 2, 2017)
- You can have multiple classnames in both the include and exclude arrays.
- $Code$entities [["SoldierWB", "SoldierEB"],[]] $/Code$
+ (August 12, 2006)
+ Can be also used in singleplayer missions to save player status before cutscenes and load it to player's double.
- Array - Array
+ Boolean
+
- environmentEnabled
+ orderGetIn
- Returns status of enableEnvironment command
+ Force all units in the array to get in or out of their assigned vehicles. Units must be assigned to a vehicle before this command will do anything.
- https://community.bistudio.com/wiki/environmentEnabled
+ https://community.bistudio.com/wiki/orderGetIn
- environmentEnabled
+ Array orderGetIn Boolean
- environmentEnabled
+ unitArray orderGetIn order
- $Code$_enabled = environmentEnabled ;$/Code$
+ $Code$[_unitOne, _unitTwo] orderGetIn true$/Code$
+
+ $Code$[_unitOne, _unitTwo] orderGetIn false$/Code$
- undefined / undefined
+ local / global
+ (8 May, 2014)
+ (ArmA3 ver 1.18), here's a quick reference to unit's embarkation and disembarkation.
+ Command
+ Remote Control
+ Behavior
+ Role Unassigning
+ orderGetIn
+ false
+ orderGetIn won't take effect on player controlled AI units, and which needs to be used together with assaignAs command family. Generally speaking, orderGetIn is a Role Excuator.
+ When orderGetIn was disabled it won't automatically unassign unit's vehicle role but will force the unit get out of the vehicle and stop him re-entering until it was enabled again. orderGetIn false won't stop a unit when he is embarking a vehicle in the half way but unassignVehicle will do. orderGetIn false will wait to fire until the unit enter a vehicle.
+ allowGetIn
+ false
+ allowGetIn won't take effect on player controlled AI units. Different from orderGetIn, this command is a Role Holder, it can control the unit's movement in the half way set by orderGetIn but not by setWaypointType, unit will be forced to get out from a vehicle by allowGetIn false and won't automatically re-enter the vehicle until allowGetIn true
+ allowGetIn won't do anything with unit's vehicle role
+ doGetOut
+ true
+ Works on player controlled ai silently, unit will automatically get back to the vehicle after disembarkation. (Unit won't get out until vehicle is stopped or landed)
+ false
+ commandGetOut
+ true
+ Same as doGetOut with radio message. (Unit won't get out until vehicle is stopped or landed)
+ false
+ leaveVehicle
+ false
+ leaveVehicle can't force a player controlled AI disembark
+ true
+ action ["GetOut",_veh]
+ true
+ Eject immediately without parachute
+ false
+ action ["Eject",_veh]
+ true
+ Eject immediately with parachute if needed
+ false
+ setWaypointType "GETIN"
+ false
+ Waypoint won't be affected by orderGetIn false or allowGetIn false until the unit is on the vehicle.
+ N/A
- Array
+ Nothing
+
- estimatedEndServerTime
+ sendUDPMessage
- Estimated end of MP game in seconds converted to serverTime.
+ Send message to given address using UDP protocol. Returns false if the message has not been delivered
+ Note: Not implemented (see talk page for more info).
- https://community.bistudio.com/wiki/estimatedEndServerTime
+ https://community.bistudio.com/wiki/sendUDPMessage
- estimatedEndServerTime
+ sendUDPMessage Array
- estimatedEndServerTime
+ sendUDPMessage [ip, port, message]
- $Code$// Estimated minutes left:
- _min = ( ceil ( estimatedEndServerTime - serverTime ) / 60);$/Code$
+ $Code$_bool = sendUDPMessage ["192.168.0.1", 2302, "Here goes you message..."];$/Code$
undefined / undefined
@@ -23408,236 +24747,239 @@
- Number
+ Boolean
+
- estimatedTimeLeft
+ action
- Sets the estimated time left in the game. Using this function the designer can provide a "time left" estimate that is shown in the "Game in progress" screen or in the master browser. This command works in MP only and must be executed on the server only. NOTE that since Arma 3 v1.69 the max value that can be set is 10 hours (36000 seconds)
+ Make a unit to perform an action. Use the List of Actions for reference about the available actions and their syntax.
+ NOTES:
+ While this command should be executed where unit is local, it is not always the case. Actions such as "Eject", "GetOut", "GetInXXXX", "MoveToXXXX", etc can be executed on remote units.
+ In SP, when user Alt+Tabs the simulation is paused and so the action will also halt until user returns to the game. For example, player action ["GetInDriver", car] executed while user is Alt+Tabbed will result in user seeing the action happening when he returns to the game screen. This doesn't happen in MP.
- https://community.bistudio.com/wiki/estimatedTimeLeft
+ https://community.bistudio.com/wiki/action
- estimatedTimeLeft Number
+ Object action Array
- estimatedTimeLeft seconds
+ unit action actionArray
- $Code$estimatedTimeLeft 600; //10 min$/Code$
+ $Code$player action ["SitDown", player ];$/Code$
- $Code$// For missions with a hard set limit adjusted via Param1, the following example can be used in the init.sqs file:
- estimatedTimeLeft Param1;$/Code$
+ $Code$_soldier action ["Eject", vehicle _soldier];$/Code$
- undefined / global
+ local / global
- This scripting command must be executed on the server to work properly in multiplayer
+ (28 Aug, 2009)
+ In ArmA 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action.
+
+ (March 27, 2015)
+ This command has no effect when a dead unit is used as input.
+
+ (June 27, 2017)
+ $Code$player action ["SWITCHWEAPON",player,player,-1]$/Code$
+ Switching weapon to the back.
+
+ (July 20, 2017)
+ Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run.
+ The unit must be able to perform the dropping animation in order for the action to properly execute.
+ So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.
+ Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform.
+ There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice.
- Nothing
+ Nothing
+
- evalObjectArgument
+ lock
- Return argument in mission editor of a given object.
- i
- Some Old Editor Command
+ Lock vehicle (disable mounting / dismounting) for player. Similar to setVehicleLock when number is used as param.
- https://community.bistudio.com/wiki/evalObjectArgument
+ https://community.bistudio.com/wiki/lock
- Control evalObjectArgument Array
+ Object lock Boolean
+
+ Object lock Number
- map evalObjectArgument [object, argument]
+ vehicleName lock locked
+
+ vehicleName lock lockstate
- $Code$// returns string "[1009.0351, 1319.4928]"
- ( findDisplay 128 displayCtrl 51) getObjectArgument ["_unit_1", "POSITION"]
- // returns array [1009.0351, 1319.4928]
- ( findDisplay 128 displayCtrl 51) evalObjectArgument ["_unit_1", "POSITION"]$/Code$
+ $Code$_jeepOne lock true ;$/Code$
+
+ $Code$heli lock true ;
+ locked heli; //2
+ heli lock false ;
+ locked heli; //0
+ heli lock 1;
+ locked heli; //1$/Code$
- undefined / undefined
+ local / global
+ (January 9, 2010)
+ Lock prevents AI persons mounting or dismounting vehicles when ordered to do so and players are prevented from doing both too, but AI will dismount when a vehicle is damaged.
+
+ (September 22, 2010)
+ If an AI group (eg Mechanized Infantry) has its vehicule locked with its crew in it, it will mount or dismount it anyway. But a player in this group won't be able to enter the vehicle.
+
+ (April 2, 2013)
+ From Arma 3 version 0.50 can be used Number as lock parameter :
+ 0 - Unlocked
+ 1 - Default
+ 2 - Locked
+ 3 - Locked for player
+
+ (March 4, 2015)
+ 1 - is DEFAULT lock for vehicle placed in editor. Player that is not the leader in a group of AIs will not be able to enter this vehicle.
- Any_Value
+ Nothing - Nothing
+
- everyBackpack
+ pitch
- Returns array of backpacks stored in given crate or vehicle. Used for accessing backpack content of a backpack on ground.
+ Returns the pitch of a persons voice.
- https://community.bistudio.com/wiki/everyBackpack
+ https://community.bistudio.com/wiki/pitch
- everyBackpack Object
+ pitch Object
- everyBackpack box
+ pitch person
- $Code$everyBackpack cursorTarget ;$/Code$
-
- $Code$_vehicleBackpacks = everyBackpack vehicle player ;$/Code$
+ $Code$pitch player$/Code$
undefined / undefined
- (Apr 29, 2014)
- (ArmA3 ver 1.16), here's a quick reference to backpack command family.
- Command
- Operand type
- Return
- Example
- firstBackpack
- Object (WeaponHolder, AmmoCrate, VehicleCrate)
- Object (eg 2bba9d00# 163957: backpack_compact.p3d)
- firstBackpack ( getPos player nearestObject "weaponholder")
- backpackContainer
- Unit( Object )
- Object (eg 2bba9d00# 163957: backpack_compact.p3d)
- backpackContainer player //Currently same as unitBackpack
- unitBackpack
- Unit( Object )
- Object (eg 2bba9d00# 163957: backpack_compact.p3d)
- unitBackpack player //Currently same as backpackContainer
- backpack
- Unit( Object )
- String (eg 2bba9d00# 163957: backpack_compact.p3d)
- backpack player //See also ( typeOf backpackContainer player ) or ( typeOf unitBackpack player )
- backpackCargo
- Object (WeaponHolder, AmmoCrate, VehicleCrate)
- Array of String (eg ["Backpack0","Backpack1"])
- backpackCargo _AmmoCrate
- getBackpackCargo
- Object (WeaponHolder, AmmoCrate, VehicleCrate)
- Array of Array (eg [["Backpack0","Backpack1"],[1,1]])
- getBackpackCargo _AmmoCrate
- everyBackpack
- Object (WeaponHolder, AmmoCrate, VehicleCrate)
- Array of Object (eg [22504f00# 163960: backpack_fast.p3d...])
- everyBackpack _AmmoCrate
- Array
+ Number
+
- everyContainer
+ text
- Returns array of all containers (uniforms, vests, backpacks) stored in given crate or vehicle. Used for accessing containers content stored in ammo box or ground holder.
+ Creates a structured text containing the given plain text if argument is String or returns location's text value if argument is Location (see Alt Syntax)
- https://community.bistudio.com/wiki/everyContainer
+ https://community.bistudio.com/wiki/text
- everyContainer Object
+ text String
+
+ text Location
- everyContainer box
+ text string
+
+ text location
- $Code$everyContainer cursorTarget ;
- // [
- //["V_PlateCarrier1_rgr",2bc06b00# 163955: dummyweapon.p3d],
- //["U_B_CombatUniform_mcam",2bc07900# 163954: dummyweapon.p3d]
- //]$/Code$
+ $Code$_stxt2 = text "Hello world.";$/Code$
+
+ $Code$_townName = text myTownLocation;$/Code$
+
+ $Code$_loc = text nearestLocation [ position player, "NameMarine"]; //"Marina Bay"$/Code$
undefined / undefined
- (July 20, 2017)
- The returned array is in the following format:
- $Code$[
- [containerClassname1, containerObject1],
- [containerClassname2, containerObject2],
- ....
- [containerClassnameN, containerObjectN]
- ]
- $/Code$
- Please do note that typeOf containerObjectN does not return containerClassnameN but rather the containerClass configured in config (usually "supplyN")
- Array
+ Structured_Text - String
+
- execEditorScript
+ say2D
- Execute an editor script for the specified object.
- i
- Some Old Editor Command
+ Plays given sound in 2D
- https://community.bistudio.com/wiki/execEditorScript
+ https://community.bistudio.com/wiki/say2D
- Control execEditorScript Array
+ Object say2D String
+
+ Object say2D Array
+
+ Array say2D String
+
+ Array say2D Array
- map execEditorScript [object,script]
+ from say2D sound
+
+ from say2D [sound, maxTitlesDistance, speed]
+
+ [from, to] say2D sound
+
+ [from, to] say2D [sound, maxTitlesDistance, speed]
- $Code$_map execEditorScript ["_team_1","create"]$/Code$
-
+
- undefined / undefined
+ global / local
- Any_Value
+ Nothing - Nothing - Nothing - Nothing
+
- execFSM
+ assignedDriver
- Executes scripted FSM and returns the FSM handle or 0 when failed. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. Argument (if any) are available in _this variable inside FSM. In Arma 3 FSM handle is also available in _thisFSM variable.
+ Returns the soldier assigned to the given vehicle as a driver.
- https://community.bistudio.com/wiki/execFSM
+ https://community.bistudio.com/wiki/assignedDriver
- Anything execFSM String
-
- execFSM String
+ assignedDriver Object
- arguments execFSM filename
-
- execFSM filename
+ assignedDriver vehicle
- $Code$_id = player execFSM "test.fsm";$/Code$
-
- $Code$_handle = [_a, _b, _c] execFSM "test.fsm";$/Code$
-
- $Code$_handle = execFSM "test.fsm";$/Code$
+ $Code$_driver= assignedDriver vehicleName$/Code$
undefined / undefined
@@ -23645,383 +24987,369 @@
- Number - Number
+ Object
+
- execVM
+ getAllOwnedMines
- Compiles and adds SQF Script to the scheduler queue and returns script handle. The script is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. The script does not execute immediately upon running execVM command, but with some delay. How much delay is unknown as it largely depends on how many other scripts there are in the queue and how busy is VM. The optional argument is passed to the script in private variable _this. In Arma 3 the script handle is also passed to the script in _thisScript variable.
- In order to understand execVM consider the following comparison:
- $Code$ private _handle = _args execVM "someFile.sqf";
- // is practically identical to
- private _handle = _args spawn compile preprocessFileLineNumbers "someFile.sqf";$/Code$
- So if you need multiple execution of the same file, you might want to store it in a function ( Functions Library ), otherwise, for a single execution, execVM is a good choice.
+ Gets all mine objects this unit has ownership over.
- https://community.bistudio.com/wiki/execVM
+ https://community.bistudio.com/wiki/getAllOwnedMines
- Anything execVM String
-
- execVM String
+ getAllOwnedMines Object
- arguments execVM filename
-
- execVM filename
+ getAllOwnedMines unit
- $Code$_handle = execVM "test.sqf";$/Code$
-
- $Code$_handle = player execVM "test.sqf";
- waitUntil { scriptDone _handle};$/Code$
-
- $Code$// In Arma 3 this is also possible:
- _handle = execVM "123.sqf";
- waitUntil { isNull _handle};$/Code$
-
- $Code$[4] execVM "showDamage.sqf";
- // showDamage.sqf
- _damage = _this select 0;
- hint format ["%1", _damage];$/Code$
+ $Code$_mines = getAllOwnedMines player ;$/Code$
undefined / undefined
- (November 23, 2010)
- Passing variables to the script file
- To pass multiple variables to the script file, use an array e.g:
- null = [myunit,1234] execVM "test.sqf";
- Now within test.sqf to access the elements, use the following:
- _myunit = _this select 0;
- _myvar = _this select 1;
- Script_Handle - Script_Handle
+ Array
+
- exec
+ cutText
- Execute a script using (the deprecated but still available).sqs syntax. The argument is passed to the script in the "_this" variable, and magic variable "_time" within the script contains the time in seconds that the script has been running.
- Alternatively use execVM command in combination with.sqf syntax.
- Learn more about scripts under Scripts.
+ Displays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters: cutText ["line1\nline2\nline3", "PLAIN"];. Since Arma 3 v1.73.142260 this command supports Structured Text formatting.
+ For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
- https://community.bistudio.com/wiki/exec
+ https://community.bistudio.com/wiki/cutText
- Any_Value exec String
+ cutText Array
+
+ Number cutText Array
+
+ String cutText Array
- argument exec script
+ cutText [text, type, speed, showInMap, isStructuredText]
+
+ layer cutText [text, type, speed, showInMap, isStructuredText]
+
+ layerName cutText [text, type, speed, showInMap, isStructuredText]
- $Code$[player, _jeep] exec "getin.sqs"$/Code$
+ $Code$cutText ["","BLACK OUT"];
+ cutText ["Hello World!","PLAIN",2];$/Code$
+
+ $Code$2 cutText ["Hello World!","PLAIN",2];$/Code$
+
+ $Code$_layer1 = "normal" cutText ["In The Centre","PLAIN"];
+ _layer2 = "down" cutText ["At The Bottom","PLAIN DOWN"];$/Code$
+
+ $Code$// Since Arma 3 v1.73.142260:
+ cutText [" t color='#ff0000' size='5' RED ALERT! /t br/ ***********", "PLAIN", -1, true, true ];$/Code$
- undefined / undefined
+ undefined / local
+ (September 20, 2013)
+ In Arma 3 "PLAIN" param will display your text where the crosshair is, "PLAIN DOWN" will push the text further down, closer to the bottom of the screen.
+
+ (July 6, 2016)
+ The value for speed has to be greater 0. If 0 is used as speed the default value (1) will be used.
+ If you want to create an "instant" effect you can use a really small value (e.g. 0.001)
- Nothing
+ Nothing - Nothing - Number
+
- exitWith
+ forceMap
- Exits current scope {...} it is executed from if condition evaluates true, creates new scope {...code...} and executes the given code in it. Often used for exiting do, for, count or forEach. Simply exiting waitUntil or onEachFrame scopes with exitWith will have no effect as these scopes are called repeatedly by the engine and require different handling to terminate (see Example 3).
+ Opens non-interactive main map in background that overrides user screen. The user is able to fire but cannot see the world just the map. To force open interactive map use openMap command.
- https://community.bistudio.com/wiki/exitWith
+ https://community.bistudio.com/wiki/forceMap
- If_Type exitWith Code
+ forceMap Boolean
- ifType exitWith code
+ forceMap show
- $Code$if (_x 5) exitWith { echo "_x is too big"; _x}
- // When _x is greater than 5, outputs message and terminates code in current level with value of _x.$/Code$
-
- $Code$for "_j" from 1 to 10 do
- {
- player sideChat format ["%1",_j];
- if (_j==5) exitWith { player sideChat "5 is enough"};
- };
- player sideChat "Complete";
- // Only the "for" loop will exit when the exitWith condition has been fulfilled (not the whole script). Execution will continue after the end of the loop (player sideChat "Complete").$/Code$
-
- $Code$// Most loops will also terminate when their scope exited. To exit and terminate scopes which are called every frame such as onEachFrame and waitUntil use the following examples:
- onEachFrame {
- if (! alive player ) exitWith {
- onEachFrame {}
- }
- }
- _time = time + 10;
- waitUntil {
- if ( time _time) exitWith {
- true
- }
- }$/Code$
+ $Code$forceMap true$/Code$
- undefined / undefined
+ undefined / local
- (May 28, 2010)
- Since ArmA2 uses Blocks in FSM as any ordinary Handle like while, for etc. in Scripts, ExitWith also only closes the Block in the FSM.
-
- (August 04, 2013)
- The command will exit the current scope - no ifs no buts. If the current scope is a loop, it will exit the loop. If the current scope is the main body of a script, it will exit the script. For more understanding of scopes and exitWith have a look at this resource.
-
- (January 06, 2014)
- To further explain Killzone_Kid 's above statement, exitWith does not work as described within any subsequent inner scopes of a loop - it will only simply exit the current scope. For example, this code will not exit the while loop:
- $Code$ while { true } do { // 'while' scope
- if ( player == ( leader player )) then { // 'if-then' scope
- if ( time (5 * 60)) exitWith {}; // This will only exit the 'if-then' scope
- };
- sleep 1;
- };
- hint "Mission Started"; // This code will never execute$/Code$
-
- (March 10, 2016)
- exitWith cannot be used in event handlers with override ability to simply exit with override value. The following is incorrect:
- $Code$// INCORRECT USAGE
- onMapSingleClick { if (! isServer ) exitWith { true }};$/Code$
- The override value must be returned in the main scope of EH, but since it is exited with exitWith, it never happens. The correct way in this case would be:
- $Code$// CORRECT USAGE
- onMapSingleClick { call { if (! isServer ) exitWith { true }}};$/Code$
- exitWith will exit current call scope only and override value therefore will appear in the main scope of the EH, right where we want it.
+ In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
- (October 12, 2016)
- exitWith does not use standard "if-then" syntax, but a unique "if-exitWith" structure.
+ Manually opening the map afterwards won't close the map. Actually it will open the "real" map on top of the forced map, and closing the (top) map with the m -key again will still show the forcefully opened map. (ArmA 1.05)
- Anything
+ Nothing
+
- exit
+ mineDetectedBy
- Stops the execution of a SQS script.
- It's ignored in SQF Scripts.
+ Returns true if mine has been detected by a given side
- https://community.bistudio.com/wiki/exit
+ https://community.bistudio.com/wiki/mineDetectedBy
- exit
+ Object mineDetectedBy Side
- exit
+ mine mineDetectedBy faction
- $Code$exit$/Code$
+ $Code$( allMines select 0) mineDetectedBy west ;$/Code$
- undefined / local
+ undefined / undefined
- Nothing
+ Boolean
+
- expectedDestination
+ lbSetText
- Return expected destination of unit as an array with format: [ Position, planningMode, forceReplan].
+ Sets the text on the left side of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- https://community.bistudio.com/wiki/expectedDestination
+ https://community.bistudio.com/wiki/lbSetText
- expectedDestination Object
+ lbSetText Array
+
+ Control lbSetText Array
- expectedDestination person
+ lbSetText [idc, index, name]
+
+ control lbSetText [index, name]
-
+ $Code$lbSetText [101, 0, "iskoda"];$/Code$
+
+ $Code$_control lbSetText [0, "iskoda"];$/Code$
+
- local / undefined
+ local / local
- (16:24, 3 March 2007 (CET))
- For AI units I have found the following values: planningMode is "LEADER PLANNED" when the unit is ordered by the group leader to go somewhere or if the unit is the group leader and it follows a waypoint. Otherwise planningMode it is "DoNotPlan". Units moving in formation have "DoNotPlan" as long as they don't receive orders by the group leader. Units also have "DoNotPlan" when they don't move. Units executing special formation tasks like engaging or return to formation have "FORMATION PLANNED" as long they haven't fulfilled the task.
+ More information on the LB command family can be found here
- Array
+ Nothing - Nothing
+
- exportJIPMessages
+ camSetDive
- Export list of JIP to a file. Special: BattlEye's RCON variant of this command is #exportJIPqueue (see also Multiplayer_Server_Commands )
+ Sets camera dive angle. Does not commit changes.
+ This command is non-functional !
- https://community.bistudio.com/wiki/exportJIPMessages
+ https://community.bistudio.com/wiki/camSetDive
- exportJIPMessages String
+ Object camSetDive Number
- exportJIPMessages fileName
+ camera camSetDive dive
- $Code$exportJIPMessages "myFileNameWithoutExtension";$/Code$
+ $Code$_camera camSetDive -0.1$/Code$
undefined / undefined
+ (Apr 15, 2010)
+ Command is non-functional. Instead, use fn vbs setPitchBank in VBS2, or setVectorUp or this user function in Arma.
- Nothing
+ Nothing
+
- exp
+ createDiaryRecord
- Let x be a number, then exp (x) is equal to e to the power of x (or e^x)
+ creates a diary entry.
+ Supported tags and their parameters:
+ All
+ image : String - path to image. When present, any element with it will be displayed as image.
+ width : Number - image width in pixels.
+ height : Number - image height in pixels.
+ font
+ color : String - HTML color in format #aarrggbb or #rrggbb
+ size : Number - font height in pixels.
+ face : String - font type (class from CfgFontFamilies)
+ br
+ marker
+ name : String - marker name
+ execute
+ expression : String - executed code
+ executeClose
+ expression : String - executed code, diary is closed afterwards
+ log
+ subject : String - subject name.
+ record : String - record name (e.g. "Record6" or "Unit1059524")
+ gear
+ unit : Number - unit ID
+ teamSwitch
+ unit : Number - unit ID
+ kick
+ id : Number - player ID
+ ban
+ id : Number - player ID
+ mute
+ id : Number - player ID
+ currentTask
+ id : Number - task ID
- https://community.bistudio.com/wiki/exp
+ https://community.bistudio.com/wiki/createDiaryRecord
- exp Number
+ Object createDiaryRecord Array
- exp x
+ unitName createDiaryRecord [subject, text, task, state]
+
+ unitName createDiaryRecord [subject, [title, text], task, state]
- $Code$_result = exp 1
- // returns 2.7182$/Code$
+ $Code$player createDiaryRecord ["Diary", ["Intel", "Enemy base is on grid marker name='enemyBase' 161170 /marker "]]$/Code$
+
+ $Code$player createDiaryRecord ["Diary", "Information gathered. br / img image='wellDone_ca.paa' / "]$/Code$
- undefined / undefined
+ undefined / local
- Note that you cannot exponent a value greater than 88.72283554077147726999 (999 repeating), as this is beyond what the game can calculate.
+ (14:54, 15 January 2011)
+ To insert a link into a diary record that executes code instead of jumping to a marker, use the tag
+ execute expression=" Code to execute " Text /execute
+
+ (March 24, 2017)
+ When adding multiple diary records, be aware that they appear in reverse order. ie the first one you add will appear last and the last one you add will be first.
- Number
+ String
+
- eyeDirection
+ addBackpackGlobal
- Returns the direction object is watching (eyes, or a vehicle primary observer).
+ Adds a backpack to a unit (even non-local)
- https://community.bistudio.com/wiki/eyeDirection
+ https://community.bistudio.com/wiki/addBackpackGlobal
- eyeDirection Object
+ Object addBackpackGlobal String
- eyeDirection unit
+ unit addBackpackGlobal backpack
- $Code$can = "Land_Can_V3_F" createVehicle position player ;
- onEachFrame {
- can setPosASL [
- ( eyePos player select 0) + ( eyeDirection player select 0),
- ( eyePos player select 1) + ( eyeDirection player select 1),
- ( eyePos player select 2) + ( eyeDirection player select 2)
- ]
- }$/Code$
-
- $Code$// Draw AI eye direction (green) and weapon direction (red) in 3D:
- bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"];
- bob setVehiclePosition [ player modelToWorld [0,100,0], [], 0, "NONE"];
- onEachFrame
- {
- _beg = ASLToAGL eyePos bob;
- _endE = (_beg vectorAdd ( eyeDirection bob vectorMultiply 100));
- drawLine3D [ _beg, _endE, [0,1,0,1]];
- _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100));
- drawLine3D [_beg, _endW, [1,0,0,1]];
- };$/Code$
+ $Code$player addBackpackGlobal "B_AssaultPack_khk";$/Code$
- global / undefined
+ global / global
- (May 26, 2014)
- This command should have really been named headDirection instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen. Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
- Array
+ Nothing
+
- eyePos
+ cancelSimpleTaskDestination
- Returns the object's eyes / main turret position.
+ Cancels a simple task destination.
- https://community.bistudio.com/wiki/eyePos
+ https://community.bistudio.com/wiki/cancelSimpleTaskDestination
- eyePos Object
+ cancelSimpleTaskDestination Task
- eyePos object
+ cancelSimpleTaskDestination task
- $Code$eyePos player$/Code$
+ $Code$cancelSimpleTaskDestination myTask;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- face
+ needReload
- Returns the face of a person.
+ Return how much vehicle wants to reload its weapons.
- https://community.bistudio.com/wiki/face
+ https://community.bistudio.com/wiki/needReload
- face Object
+ needReload Object
- face person
+ needReload vehicle
- $Code$face player$/Code$
+ $Code$_seriousness = needReload _vehicle;$/Code$
+
+ $Code$if ( needReload player == 1) then { reload player };$/Code$
undefined / undefined
@@ -24029,236 +25357,246 @@
- String
+ Number
+
- faction
+ ctrlHTMLLoaded
- Gets unit faction. Factions are defined under CfgFactionClasses. If the given faction is not defined, the command returns empty string. Standard Factions include:
- Arma 2 :
- West: "USMC", "CDF"
- East: "RU", "INS"
- Guer: "GUE"
- Civ: "CIV", "CIV_RU"
- Arma 2: Operation Arrowhead :
- West: "BIS_US", "BIS_CZ", "BIS_GER"
- East: "BIS_TK", "BIS_TK_INS"
- Guer: "BIS_TK_GUE", "BIS_UN"
- Civ: "BIS_TK_CIV", "BIS_CIV_special"
- DLC Factions
- Arma 2: British Armed Forces :
- West: "BIS_BAF"
- Arma 2: Private Military Company :
- Guer: "PMC_BAF"
- Arma 3 :
- West: "BLU_F" (NATO), "BLU_G_F" (FIA)
- East: "OPF_F" (CSAT), "OPF_G_F" (FIA)
- Guer: "IND_F" (AAF), "IND_G_F" (FIA)
- Civ: "CIV_F" (Civilians)
+ Returns true when HTML content was successfully loaded.
- https://community.bistudio.com/wiki/faction
+ https://community.bistudio.com/wiki/ctrlHTMLLoaded
- faction Object
+ ctrlHTMLLoaded Control
- faction unitName
+ ctrlHTMLLoaded control
- $Code$_faction = faction _object;$/Code$
+ $Code$_control htmlLoad "test.html";
+ if (! ctrlHTMLLoaded _control) then {
+ hint "Loading test.html failed!";
+ };$/Code$
- global / undefined
+ undefined / undefined
- Faction behaves slightly differently to side. Side can refer to the pilot or commander of a vehicle, but faction never changes. It always returns the 'country of manufacture'.
- String
+ Boolean
+
- fadeMusic
+ ctrlEnabled
- Changes the music volume smoothly within the given time.
+ Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused.
+ Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/fadeMusic
+ https://community.bistudio.com/wiki/ctrlEnabled
- Number fadeMusic Number
+ ctrlEnabled Number
+
+ ctrlEnabled Control
- time fadeMusic volume
+ ctrlEnabled idc
+
+ ctrlEnabled controlName
- $Code$5 fadeMusic 0$/Code$
+ $Code$if (!(ctrlEnabled 100)) then
+ {
+ ctrlEnable [100, true]
+ };$/Code$
+
+ $Code$_enabled = ctrlEnabled _control$/Code$
- undefined / local
+ local / undefined
- Nothing
+ Boolean - Boolean
+
- fadeRadio
+ showLegend
- Causes a smooth change in the radio volume. The change duration is given by time, the target volume by volume. The default radio volume is 1.0.
+ Show/hide map legend.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/fadeRadio
+ https://community.bistudio.com/wiki/showLegend
- Number fadeRadio Number
+ Control showLegend Boolean
- time fadeRadio volume
+ map showLegend bool
- $Code$5 fadeRadio 0.1$/Code$
-
+
- undefined / local
+ undefined / undefined
- (September 11, 2008)
- Does not affect VON
-
- (September 13, 2016)
- Also influences audibility of the missile warning in helicopters.
- Nothing
+ Nothing
+
- fadeSound
+ canTriggerDynamicSimulation
- Changes the sound volume smoothly within the given time.
+ A getter for triggerDynamicSimulation
- https://community.bistudio.com/wiki/fadeSound
+ https://community.bistudio.com/wiki/canTriggerDynamicSimulation
- Number fadeSound Number
+ canTriggerDynamicSimulation Object
- time fadeSound volume
+ canTriggerDynamicSimulation unit
- $Code$5 fadeSound 0$/Code$
+ $Code$hint str canTriggerDynamicSimulation player ;$/Code$
- undefined / local
+ undefined / undefined
- (January 19, 2010)
- This command doesn't work, in Arma 2 1.05.
- Nothing
+ Boolean
+
- fadeSpeech
+ addSwitchableUnit
- Cause a smooth change in the master speech volume. The change duration is given by time, the target volume by volume. The default master is 1.0.
+ Adds a unit into the list of units available for Team Switch. Units marked as playable in editor are automatically switchable. This command allows to add non-playable unit into array of switchableUnits and make them available for teamSwitch. SP only.
- https://community.bistudio.com/wiki/fadeSpeech
+ https://community.bistudio.com/wiki/addSwitchableUnit
- Number fadeSpeech Number
+ addSwitchableUnit Object
- time fadeSpeech volume
+ addSwitchableUnit unitName
- $Code$5 fadeSpeech 0.1;$/Code$
+ $Code$addSwitchableUnit bob$/Code$
- undefined / local
+ undefined / undefined
- Nothing
+ Nothing
+
- failMission
+ say3D
- Finish the mission. If the server is set to run persistent mission, failMission will not end the mission when last player gets kicked to the lobby. Use endMission to end the mission.
- The end type can be:
- "CONTINUE"
- "KILLED"
- "LOSER"
- "END1"
- "END2"
- "END3"
- "END4"
- "END5"
- "END6"
- Mission saves won't be deleted.
- To maintain Arma 3 visual style, it's recommended to use BIS_fnc_endMission instead.
+ Unit or object will say given sound in 3D Space. This allows broadcasting of positional music or sound from a source, without having to script a fade sound or music command. Compare this with say2D which will always play a sound at the location of the player after he has been in the vicinity of a broadcasting sound. Sound is defined in "CfgSounds" of the Description.ext or main config.
+ NOTE : You can stop say3D sound currently playing in 2 ways: delete the source of the sound (from) with deleteVehicle or kill the source with setDamage for example.
- https://community.bistudio.com/wiki/failMission
+ https://community.bistudio.com/wiki/say3D
- failMission String
+ Object say3D String
+
+ Object say3D Array
+
+ Array say3D String
+
+ Array say3D Array
- failMission endtype
+ from say3D sound
+
+ from say3D [sound, maxDistance, pitch]
+
+ [from, to] say3D sound
+
+ [from, to] say3D [sound, maxDistance, pitch]
- $Code$failMission "LOSER";$/Code$
+ $Code$helicopter1 say3D "Fortunateson"$/Code$
- undefined / undefined
+ global / local
+ (7 March 2013)
+ The only difference with this command and say is during cutscenes (when some camera effect is active). In cutscenes, say3D is 3D, say is not.
+
+ (July 19, 2015)
+ In Arma 2 1.63, the object this command is assigned to must be alive for the sound to broadcast. If the object is killed while the sound is still playing, the sound will stop immediately.
+ Here is a link to the forum to get around this issue: [1]
+ I have not tested this in Arma 3 yet.
+
+ (October 13, 2016)
+ This command is local.
+
+ (March 11, 2017)
+ This command creates sound object "#soundonvehicle" which can be detected with allMissionObjects :
+ $Code$ onEachFrame { hintSilent str allMissionObjects "#soundonvehicle"};
+ [] spawn { sleep 1; player say3D "Alarm"};$/Code$
- Nothing
+ Nothing - Nothing - Nothing - Nothing
+
- false
+ diag_enabled
- Always false.
+ Checks whether specific diagnostic mode is activated.
+ Only available in the Arma 3 Diagnostic exe
- https://community.bistudio.com/wiki/false
+ https://community.bistudio.com/wiki/diag_enabled
- false
+ diag_enabled String
- false
+ diag_enabled diag_mode
- $Code$_var = false ;
- systemChat str _var; //false$/Code$
+ $Code$"Animation" diag_enable true ;
+ diag_enabled "Animation";//returns true$/Code$
undefined / undefined
@@ -24266,53 +25604,53 @@
- Boolean
+ Boolean
+
- fillWeaponsFromPool
+ set3DENModelsVisible
- Adds magazines from the campaign pool to the given unit, depending on his weapons.
+ Enables or disables lines visibility in 3DEN
- https://community.bistudio.com/wiki/fillWeaponsFromPool
+ https://community.bistudio.com/wiki/set3DENModelsVisible
- fillWeaponsFromPool Object
+ set3DENModelsVisible Array
- fillWeaponsFromPool unitName
+ set3DENModelsVisible [map, scene]
- $Code$fillWeaponsFromPool _soldier$/Code$
-
+
undefined / undefined
- Nothing
+ Nothing
+
- findCover
+ forEachMemberTeam
- Returns the object around where the unit finds cover. The minDist, visibilityPosition and ignoreObject parameters are optional. Command is not functional since Arma 2.
- This command is not implemented
+ Executes the given command recursively for each team that is a member of the given team. For just agents use forEachMemberAgent. For both teams and agents use forEachMember.
- https://community.bistudio.com/wiki/findCover
+ https://community.bistudio.com/wiki/forEachMemberTeam
- Object findCover Array
+ Code forEachMemberTeam Team_Member
- object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]
+ command forEachMemberTeam team
@@ -24320,241 +25658,168 @@
undefined / undefined
- (17 Oct, 2009)
- Arma 2: v1.04: Usage creates report log message: " MicroAI: Command findCover not implemented ( unit id ) "
-
- (07 Jan, 2011)
- OA: v1.57: Still non functional.
-
- (12 July, 2011)
- CO: v1.59: Still non functional.
-
- (13 February, 2014)
- Arma 3: Still non functional.
-
- (July 4, 2015)
- An alternative function in ArmA 3 might be BIS_fnc_findSafePos
- Object
+ Nothing
+
- findDisplay
+ netId
- Find display by its IDD (which is defined in the description.ext or config).
- If the specified display can't be found displayNull ("No display") is returned, (which can be tested with the isNull command.)
- The primary display uses IDD 46. (eg: findDisplay 46). This will return displayNull on a dedicated server (so be sure to check isDedicated if using this in a waitUntil condition).
+ Unique ID of object or group. As this command is MP only, you can use BIS_fnc_netId, which extends the use to SP as well. See also: BIS_fnc_objectVar
- https://community.bistudio.com/wiki/findDisplay
+ https://community.bistudio.com/wiki/netId
- findDisplay Number
+ netId Object/Group
- findDisplay idd
+ netId var
- $Code$_display = findDisplay 1;$/Code$
+ $Code$_playerNetId = netId player ;$/Code$
undefined / undefined
- (15 June 2008)
- findDisplay does not find displays defined under RscTitles (even when they are visible).
- To access those types of displays, either assign the resource to a global variable, or pass its this value to a script, during the onLoad event:
- e.g. class RscTitles {
- class MyRsc {
- onLoad = "myDisplay = (_this select 0)"; // or
- // onLoad = "_this execVM 'myDialog.sqf'";
- ...
- You can then use the stored value as you would for regular dialogs:
- $Code$(myDisplay displayCtrl 1111) ctrlSetText "hello there");$/Code$
-
- (17 March 2010)
- I posted a tutorial on finding and using displays here.
-
- (07 March 2014)
- The Zeus Display uses IDD 312
-
- (March 25, 2015)
- Display 12 is map
-
- (June 25, 2017)
- I have tested the behavior of this command and I found out that it [ findDisplay ] appears to only return the display AFTER any onLoad event handler of that display is done. So, using findDisplay inside an onLoad event handler is useless.
-
- (August 14, 2017)
- There are some specific cases, where findDisplay will not be able to find an existing display. Here's the cases and how to act on them:
- $Code$//Your display has IDD= -1.
- class RscDisplayNew
- {
- idd=-1;
- scriptName = "RscDisplayNew";
- ...
- };$/Code$
- $Code$//Your display doesn't have IDD
- class RscDisplayNew
- {
- scriptName = "RscDisplayNew";
- ...
- };$/Code$
- $Code$//Your display doesn't have scriptname with IDD = -1
- class RscDisplayNew
- {
- idd=-1;
- ...
- };$/Code$
- $Code$//Your display doesn't have scriptname, neither IDD
- class RscDisplayNew
- {
- ...
- };$/Code$
- 1.
- You actually can find a -1 display, but this means finding a display with this IDD might be a problem, when there are a few displays marked as -1.
- So as you can see, theres an entry called scriptName. You can get a reference to this display by using uiNamespace :
- $Code$(uiNamespace getVariable "RscDisplayNew")$/Code$
- NOTE : Variables are overwritten with a reference of the last declared display under the same scriptName entry. Take a look at case 3 for solution.
- 2.
- Displays without IDD's can actually exist. They can be manipulated only in a way described in the first case using uiNamespace.
- 3.
- You can really have this display seeking it manually in a allDisplays return. This is experimental, but working option.
- 4.
- You will have a problem finding this display, since this display doesn't exist even in allDisplays (?) return. Behaviour unknown.
- Display
+ String
+
- findEditorObject
+ supportInfo
- Return object that matches the provided reference.
- i
- Some Old Editor Command
+ Creates a list of supported operators and type. Each field of array has the format: "x:name" Where x can be:
+ 't' - type
+ 'n' - null operator
+ 'u' - unary operator
+ 'b' - binary operator.
+ 'name' is the operator or type name (in case operator, type of input operands is included).
+ mask parameter can be an empty string, or one of field. In this case, function returns empty array, if operator is not included in the list. Limited wildcard support is available. Type x may be replaced with *, meaning all types. For the mask partial match may be used, like abc*, meaning any operators starting with 'abc' are reported, for example: *:name, t:*, t:name* or *:*.
- https://community.bistudio.com/wiki/findEditorObject
+ https://community.bistudio.com/wiki/supportInfo
- Control findEditorObject Any_Value
+ supportInfo String
- map findEditorObject value
+ supportInfo mask
-
+ $Code$supportInfo "b:select*"; //Returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]$/Code$
+
+ $Code$// Return all available commands:
+ _commands = supportInfo "";$/Code$
+
undefined / undefined
+ (July 22nd, 2012)
+ With CBA one can create a list of all available SQF commands in the RPT
+ [supportInfo ""] call cba_fnc_debug;
+ One can get CBA here.
+
+ (September 24, 2014)
+ To get the list of all supported commands in Arma 3 one can simply:
+ $Code${ diag_log _x} forEach supportInfo "";$/Code$
- String
+ Array
+
- findEmptyPositionReady
+ targets
- Check if findEmptyPosition command can be called without waiting for files.
+ Retrives list of given unit targets matching specified filter. If the filter is not specified, all targets are returned.
- https://community.bistudio.com/wiki/findEmptyPositionReady
+ https://community.bistudio.com/wiki/targets
- Array findEmptyPositionReady Array
+ Object targets Array
- center findEmptyPositionReady [radius,maxDistance]
+ unit targets [enemyOnly, maxDistance, sides, maxAge, alternateCenter]
-
+ $Code$_targets = _unit targets [false, 300, [east,sideEnemy]]; //all targets of east or renegade side in 300m$/Code$
+
+ $Code$_targets = _unit targets [true, 300]; //enemy targets in 300m$/Code$
+
+ $Code$_targets = _unit targets []; //all targets$/Code$
+
- undefined / undefined
+ global / undefined
- Boolean
+ Array
+
- findEmptyPosition
+ diag_lightNewLoad
- Searches for an empty position around specified position. The search starts looking for an empty position at a minimum distance of [minDistance] from the [center] and looks as far away as [maxDistance]. If a [vehicleType] parameter is specified, then the search will look for an empty positions that is big enough to hold that vehicle type. If an empty position isn't found, an empty array is returned.
- This command ignores moving objects present within search area.
+ Allows loading of lightning config during the gameplay (effectively changing the current scene lightning). Filename path can be either absolute or relative. The file must contain only the class LightningNew, which should contain lightning configuration.
+ Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
- https://community.bistudio.com/wiki/findEmptyPosition
+ https://community.bistudio.com/wiki/diag_lightNewLoad
- Array findEmptyPosition Array
+ diag_lightNewLoad String
- center findEmptyPosition [minDistance, maxDistance, vehicleType]
+ diag_lightNewLoad path
- $Code$_position = ( getPosATL player ) findEmptyPosition [0,100];$/Code$
-
- $Code$_position = _center findEmptyPosition [10,100,"UH60M_EP1"];$/Code$
-
- $Code$// Check if exact position is empty:
- _position = _center findEmptyPosition [0,0,"B_Boat_Armed_01_minigun_F"];$/Code$
+ $Code$diag_lightNewLoad "o:\lighting.txt"$/Code$
undefined / undefined
- (November 6, 2013)
- Keep search radius short and sweet, under 50 metres maybe. Searching big area takes long time and will result in your game stop responding until the search is over. isFlatEmpty is probably more suitable for a larger area search.
-
- (March 6, 2012)
- I think the radius parameter should be treated as a 'minimum distance' from the centre position. I found that the parameter name radius wasn't very clear. Also, if radius is greater than max distance then the function will always return an empty array.
- Here is an snippet of code I use to find a safe landing zone for an extraction helicopter. It may be useful for someone.
- $Code$_centre = [ getMarkerPos "marker", random 150, random 360 ] call BIS_fnc_relPos;
- _extraction_point = [];
- _max_distance = 100;
- while{ count _extraction_point 1 } do
- {
- _extraction_point = _centre findEmptyPosition[ 30, _max_distance, "UH60M_EP1" ];
- _max_distance = _max_distance + 50;
- };
- $/Code$
- In the above example, make sure that "_max_distance" is greater than 30, otherwise the while loop will go forever.
- Array
+ Nothing
+
- findNearestEnemy
+ getGroupIconParams
- Finds the nearest enemy to the specified position. Returns a null object if the object's group does not know about any enemies. This command will return nearest object that is known to the unit and is considered enemy. An empty vehicle that is part of enemy group assets (see addVehicle ) can be returned as valid nearest target.
+ Returns group icons params used for command bar drawing such as color, text, scale, visibility, waypoint visibility, waypoint color.
- https://community.bistudio.com/wiki/findNearestEnemy
+ https://community.bistudio.com/wiki/getGroupIconParams
- Object findNearestEnemy Object/Array
+ getGroupIconParams Group
- object findNearestEnemy position
+ getGroupIconParams group
- $Code$_myNearestEnemy = ( units _myGroup select 0) findNearestEnemy player ;$/Code$
-
- $Code$_myNearestEnemy = player findNearestEnemy player ;$/Code$
+ $Code$_iconParams = getGroupIconParams group player ;$/Code$
undefined / undefined
@@ -24562,340 +25827,184 @@
- Object
+ Array
+
- find
+ setLightFlareSize
- Searches for an array element within array or a string within a string. Returns the 0 based index on success or -1 if not found. Test is cASe-seNsItiVE
+ Sets relative size of the flare for the light.
- https://community.bistudio.com/wiki/find
+ https://community.bistudio.com/wiki/setLightFlareSize
- Array find Anything
-
- String find String
+ Object setLightFlareSize Number
- array find x
-
- string find x
+ light setLightFlareSize size
- $Code$["Apples","Oranges","Pears"] find "Oranges"; //result is 1
- [1,[2],[[3]]] find [[3]]; //result is 2$/Code$
-
- $Code$if ( magazines player find "Strela" = 0) then { hint "You've got Strela!"};$/Code$
-
- $Code$hint str ("japa is the man!" find "the man!"); //8$/Code$
+ $Code$myLight setLightFlareSize 5;$/Code$
- undefined / undefined
+ local / local
- (January 4, 2015)
- Using nil on either side of find will make the whole statement return Nothing :
- $Code$_array = [1,2, nil,4,5];
- _result = _array find nil;
- hintSilent str ( isNil "_result"); //true
- _result = nil find 1;
- hintSilent str ( isNil "_result"); //true$/Code$
-
- (April 10, 2015)
- Find doesn't work with multidimensional arrays in OFP/CWA. It will always returns -1.
-
- (May 17, 2016)
- This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 1.58):
- $Code$"abcßdef" find "c"
- - 2
- "abcßdef" find "ß"
- - 3
- "abcßdef" find "d"
- - 5$/Code$
-
- (July 7, 2016 10:56 (UTC))
- Not quite unreliable, just unexpected! Strings are tracked in terms of bytes rather than in actual character positions; all strings are stored in UTF-8 format. In other words, the eszett character is in Unicode, which takes up two bytes rather than one as it is within the 128-255 range of Unicode. (Similar results would be expected for the division symbol, the umlaut, accented e's, etc.) Symbols that are particularly high in the Unicode range may take up three bytes, or even four for the truly exceptional characters, although Arma 3's default fonts are unlikely to render them. This definitely complicates any script which assumes any printable character is a single byte, however, and unfortunately I'm not skilled enough with internationalisation to recommend any robust fix.
- Number - Number
+ Nothing
+
- finishMissionInit
+ scopeName
- Finish world initialization before mission is launched.
+ Defines name of current scope. Name is visible in debugger, and name is also used as reference in some commands like breakOut and breakTo. Scope name should be defined only once per scope. Trying to set a different name on the scope that has already defined scope name will result in error.
- https://community.bistudio.com/wiki/finishMissionInit
+ https://community.bistudio.com/wiki/scopeName
- finishMissionInit
+ scopeName String
- finishMissionInit
+ scopeName name
-
+ $Code$scopeName "main";
+ while {true} do {
+ scopeName "loop1";
+ while {true} do {
+ scopeName "loop2";
+ ...
+ };
+ };$/Code$
+
undefined / undefined
- Nothing
+ Nothing
+
- finite
+ removeMagazineTurret
- True, if number is finite (not infinite and a valid number)
+ Removes the magazine from the turret. Use turret path [-1] for driver's turret.
+ Note: you may create invalid combinations by using this function. When doing so, application behaviour is undefined.
- https://community.bistudio.com/wiki/finite
+ https://community.bistudio.com/wiki/removeMagazineTurret
- finite Number
+ Object removeMagazineTurret Array
- finite x
+ vehicle removeMagazineTurret [magazineName, turretPath]
- $Code$?!finite 10/0 : hint "Infinite"$/Code$
+ $Code$vehicle player removeMagazineTurret ["60rnd_cmflaremagazine",[-1]]$/Code$
+
+ $Code$_tank removeMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]]$/Code$
- undefined / undefined
+ local / global
- (27 Sep, 2013)
- Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:
- $Code$//ArmA 2
- hint str finite (10/0); //true... O_o Huh????
- hint str (10/0); //0... Weird, but that explains it.
- //ArmA 3
- hint str finite (10/0); // Error Zero Divisor
- hint str finite 10; //true
- hint str finite 1000000000000000000000000000000000000000; //false$/Code$
- Boolean
+ Nothing
+
- fireAtTarget
+ enableTeamSwitch
- Remotely forces a unit to fire the given weapon. See also: BIS_fnc_fire
+ Enable / disable Team Switch. The default setting is enabled.
- https://community.bistudio.com/wiki/fireAtTarget
+ https://community.bistudio.com/wiki/enableTeamSwitch
- Object fireAtTarget Array
+ enableTeamSwitch Boolean
- sourceVehicle fireAtTarget [targetVehicle, weaponMuzzleName]
+ enableTeamSwitch enable
- $Code$_handle = this fireAtTarget [groundtarget1,"HellfireLauncher"];$/Code$
-
- $Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [_helicopter, currentWeapon Igla_AA_pod_TK_EP1];$/Code$
-
- $Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [helicopter];$/Code$
-
+
undefined / undefined
- (Sep 16, 2010)
- Most likely only for missiles and for interaction with player only.
-
- (Apr 8, 2014)
- (A3 1.14) Source vehicle is only limited to manned vehicle while any other types won’t be able to active fireAtTarget handle, e.g.
- $Code$
- _handle = _InfantryUnit fireAtTarget [_Infnatrytarget,( weapons _Infantryunit select 0)];
- //false & no bullet shoot
- $/Code$
- Target has no limitation and can be any object:
- $Code$
- _handle = ( vehicle _veh) fireAtTarget [ObjNull,( weapons ( vehicle _veh) select 0)];
- //true & a bullet shoot
- $/Code$
- Handle returns false if weapon class name is inaccurate, e.g.
- $Code$
- _Handle = ( vehicle _veh) fireAtTarget [ObjNull,”UnknownWeapon”];
- //false & no bullet shoot.
- $/Code$
- Handle still returns true even though the vehicle is unavailable to shoot any bullet:
- $Code$
- _weapon = weapons ( vehicle _veh) select 0;
- ( vehicle _veh) setAmmo [_weapon,0];
- _Handle = ( vehicle _veh) fireAtTarget [ObjNull,_weapon];
- //true & no bullet shoot
- $/Code$
- difference
- command
- Source
- Target
- Behavior
- Workaround templets
- fire
- Either Unit or manned vehicle
- N/A
- Fired aiming at air for infantry rifle
- Together with selectWeapon,
- suggested to work with "throw","put" weapon type
- for infantry, or vehicle entity indeed.
- fireAtTarget
- Manned vehicle only
- Any object
- Normal shoot, won’t aim at target automatically
- _veh doWatch _target;
- waitUntil {_veh aimedAtTarget [_target] 0};
- _veh fireAtTarget [_target];
- forceWeaponFire
- Either Unit or manned aircraft (weapon operator)
- N/A
- Normal shoot, can change fire mode
- //E.g. unit won't shoot until he is facing the target.
- _unit doWatch _tar;
- waitUntil {
- _dir = direction _unit;
- _relative = [_unit,_tar] call BIS_fnc_relativeDirTo ;
- if (_dir == _relative) exitWith {
- _unit forceWeaponFire [ currentWeapon _unit,"single"];
- };
- false
- };
- doFire
- Unit only
- Either unit or vehicle
- automatic aiming and shooting
- No special example.
- commandFire
- Unit only
- Either unit or vehicle
- automatic aiming and shooting
- No special example.
- action ["UseWeapon"]
- Either unit or manned vehicle
- N/A
- unexpected behavior
- N/A
- Boolean
+ Nothing
+
- fire
+ terrainIntersectAtASL
- Forces a unit to fire the given weapon.
- NOTE: Just like with forceWeaponFire it is possible to pass remote unit as argument, but this could be unreliable. Considering this command might need to be used in combination with selectWeapon, which takes only local arguments, it would make sense to execute fire command where unit is also local. See also: BIS_fnc_fire
+ Checks for intersection of terrain between two ASL positions. Same as terrainIntersectASL, only returns intersect position instead of Boolean
- https://community.bistudio.com/wiki/fire
+ https://community.bistudio.com/wiki/terrainIntersectAtASL
- Object fire String
-
- Object fire Array
+ terrainIntersectAtASL Array
- unit fire muzzle
-
- unit fire [muzzle, mode, magazine]
+ terrainIntersectAtASL [pos1, pos2]
- $Code$_soldier fire "M16";$/Code$
-
- $Code$_soldier fire "SmokeShellMuzzle";$/Code$
-
- $Code$_soldier fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"];$/Code$
-
- $Code$player playActionNow "PutDown";
- player selectWeapon "DemoChargeMuzzle";
- player fire ["DemoChargeMuzzle", "DemoChargeMuzzle", "DemoCharge_Remote_Mag"];
- player setWeaponReloadingTime [ player, "DemoChargeMuzzle", 0];$/Code$
+ $Code$_posASL = terrainIntersectAtASL [ eyePos player, getPosASL chopper];$/Code$
- local / global
+ undefined / undefined
- (August 17, 2006)
- Sometimes AI won't shoot when you use this command. It can be fixed by placing selectWeapon command before it.
-
- (February 2, 2007)
- In OFP v1.96, when a man class unit is given this command, he will aim up in the air before firing his weapon. This makes it rather useless if you want to make him shoot a target. It does work with vehicles, when the vehicle is first given a doWatch or doTarget command.
-
- (January 20, 2007)
- In ArmA v1.02, this command is not working with weapons in the secondary turrets (like "DSHKM" in t72)
-
- (Jan 15, 2008)
- To place a satchel (pipebomb) the syntax is:
- OFP : unitname Fire ["put", "pipebomb"]
- ArmA : unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"];
- The triggering is done via a " TOUCHOFF " action.
-
- (March 18, 2010)
- In Arma2 AI will automatically shoot straight up. Command seems to be broken.
-
- (November 24, 2010)
- Command is broken - confirmed. Use action "USEWEAPON" instead.
- Place a game logic in the editor. Name it MyGameLogic.
- Use this code to make unit1 fire his primaryweapon:
- MyGameLogic action ["useWeapon",primaryWeapon unit1,unit1,0];
-
- (Feburary 25, 2011)
- Command works just fine in A2/OA. Make sure to execute it on local AI.
-
- (April 06, 2012)
- If it did work at one time, it does no longer. The AI (or player) is forced to look upwards or reacts to a massive recoil force before getting his shot off.
-
- (Feburary 16, 2013)
- Command did not work with ACR 1.62. Used fireAtTarget instead.
-
- (June 4, 2014)
- In Arma 3 in order for AI to place Claymore, for example, it is necessary to execute 3 statements - an animation, weapon select and the actual fire command. Animation is most likely for forcing unit to leave rest state, weapon select and fire kinda both go together anyway: $Code$_unit playActionNow "PutDown";
- _unit selectWeapon "DirectionalMineRemoteMuzzle";
- _unit fire [
- "DirectionalMineRemoteMuzzle",
- "DirectionalMineRemoteMuzzle",
- "ClaymoreDirectionalMine_Remote_Mag"
- ];$/Code$
- Nothing - Nothing
+ Array
+
- firstBackpack
+ setHUDMovementLevels
- Returns the first stored backpack.
+ Set min/max movement borders displayed in HUD gauges. Use -1 to skip some value.
- https://community.bistudio.com/wiki/firstBackpack
+ https://community.bistudio.com/wiki/setHUDMovementLevels
- firstBackpack Object
+ setHUDMovementLevels Array
- firstBackpack box
+ setHUDMovementLevels [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, targetOrPosition]
- $Code$myVariable = firstBackpack myBox;$/Code$
+ $Code$setHUDMovementLevels [20,30,-1,-1,0.23,2.1,[0,0,0]]$/Code$
+
+ $Code$setHUDMovementLevels [20,30,-1,-1,0.23,2.1,player]$/Code$
undefined / undefined
@@ -24903,199 +26012,273 @@
- Object
+ Nothing
+
- flagAnimationPhase
+ addWeaponCargo
- Returns flag position on the flag pole in range of 0..1, where 0 is bottom of the flag pole, 1 is the top of the flag pole. The result is local to the PC on which command is executed
+ Add weapons to the cargo space of vehicles, which can be taken out by infantry units. Ignores available cargo space.
+ In Arma 3, arguments for this command must be local ( ). For global variant see addWeaponCargoGlobal
- https://community.bistudio.com/wiki/flagAnimationPhase
+ https://community.bistudio.com/wiki/addWeaponCargo
- flagAnimationPhase Object
+ Object addWeaponCargo Array
- flagAnimationPhase flag
+ vehicleName addWeaponCargo [weaponName, count]
- $Code$flagAnimationPhase _flag1; //0.5$/Code$
+ $Code$_truck addWeaponCargo ["M16",5]$/Code$
- global / undefined
+ global / local
+ (October 24, 2009)
+ Only works on clients.
+
+ (July 10, 2010)
+ When players add/remove gear directly via the gear menu that gear is synchronized across the network. Since this command is local only, using it during a mission can cause all sorts of weird issues. To get proper synchronization use this command in the object's init line or in a script called from its init line with a call compile preprocessFile command (and not execVM ).
- Number
+ Nothing
+
- flagOwner
+ getPilotCameraPosition
- Returns the global owner of a flag. A getter for setFlagOwner. Note that owner of a flag is Object rather than Number, as how it is usually with other owner commands
+ Returns model space coordinates of the object airplane or helicopter pilotCamera.
- https://community.bistudio.com/wiki/flagOwner
+ https://community.bistudio.com/wiki/getPilotCameraPosition
- flagOwner Object
+ getPilotCameraPosition Object
- flagOwner flag
+ getPilotCameraPosition object
- $Code$_person = flagOwner _flagOne;$/Code$
+ $Code$_pilotCamPos = getPilotCameraPosition vehicle player$/Code$
- global / global
+ global / undefined
- Object
+ Array
+
- flagSide
+ doFSM
- Returns Side of the local instance of the flag. A getter for setFlagSide.
+ Orders a unit to process command defined by FSM file (silently).
+ Unlike with execFSM where _this is passed to the FSM, the following parameters are passed when using doFSM/commandFSM:
+ _leader
+ leader of subgroup with this command
+ _destination
+ command destination/position
+ _target
+ command target
+ _units
+ list of all persons in subgroup
- https://community.bistudio.com/wiki/flagSide
+ https://community.bistudio.com/wiki/doFSM
- flagSide Object
+ Object/Array doFSM Array
- flagSide flag
+ unit doFSM [fsmName, position, target]
- $Code$_flagSide = flagSide flag;$/Code$
+ $Code$_soldierOne doFSM ["move.fsm", position player, player ];$/Code$
- global / local
+ undefined / undefined
+ (August 4, 2010)
+ Do not doStop a unit in a FSM called with doFSM or commandFSM. Doing so nevertheless will halt your FSM, since no links are followed anymore (doing so in an end state should be fine though). Also this may crash your game in certain mysterious circumstances.
+ You may design your FSM so that they may be called with doFSM/commandFSM and execFSM likewise by checking if _units or _this is nil and then init the variables accordingly. Just remember that you should use the low level moveTo (together with moveToCompleted, moveToFailed ) if do-/commandFSM'd, and doMove or commandMove (together with unitReady ) if execFSM'd. A moveTo in an FSM started with execFSM won't do anything, likewise doMove in a FSM started with doFSM or commandFSM wont work either. Think about it for a minute and you will see why. (hint: a unit running a FSM called with doFSM or commandFSM will _never_ return true for (unitReady _unit) )
+ Anyway, if you want to be able to call your FSM either way, a "ready" condition might look light this: (moveToCompleted _unit) || (moveToFailed _unit) || (unitReady _unit), assuming you have a moveTo or a doMove (depending on how the fsm is called) in the prior state.
+
+ (February 14, 2015)
+ Adding to Rübe's note, doFSM can be checked if it has finished by unitReady as of 2015 and it will return true when your FSM has completed.
- Side
+ Nothing
+
- flagTexture
+ sideUnknown
- Returns texture of the local instance of the flag. A getter for setFlagTexture. It will not return flag textures applied using forceFlagTexture, use getForcedFlagTexture for that.
+ The unknown side.
+ Used when the side of a unit is unknown, e.g. for spotted targets with insufficient information.
- https://community.bistudio.com/wiki/flagTexture
+ https://community.bistudio.com/wiki/sideUnknown
- flagTexture Object
+ sideUnknown
- flagTexture flagCarrier
+ sideUnknown
- $Code$_flagTexture = flagTexture _flag1;$/Code$
+ $Code$//soldier1 and soldier2 of different sides and out of sight
+ soldier1 reveal soldier2;
+ hint str (soldier1 nearTargets 1000);
+ //returns: [[[1557.96,5047.4,1.32402],"SoldierWB",UNKNOWN,0.0155183,soldier2,5]]
+ soldier1 reveal [soldier2,1.5];
+ //returns: [[[1556.52,5050.08,1.32402],"SoldierWB",WEST,0.0211193,soldier2,5]]$/Code$
- global / local
+ undefined / undefined
- String
+ Side
+
- flag
+ isHidden
- Returns the original flag pole of the flag the unit is carrying.
+ Return whether the person is hidden (reached the hiding position). For command that tests general visibility of an object use isObjectHidden
- https://community.bistudio.com/wiki/flag
+ https://community.bistudio.com/wiki/isHidden
- flag Object
+ isHidden Object
- flag unit
+ isHidden person
- $Code$_flag = flag _soldier;$/Code$
-
+
global / undefined
+ (January 1, 2017)
+ Tested in 1.67 DEV, seems to always return false
- Object
+ Boolean
+
- fleeing
+ magazinesAmmoFull
- Checks if a unit is fleeing.
+ Returns array of arrays of all vehicle's magazines with extended information about them.
+ Output format :
+ [[magazine1],[magazine2],[magazine3]...[magazineN]]
+ Magazine format :
+ 0: Magazine class name
+ 1: Magazine current ammo count
+ 2: Magazine state (true - loaded, false - not loaded)
+ 3: Magazine type (-1 - n/a, 0 - grenade, 1 - primary weapon mag, 2 - handgun mag, 4 - secondary weapon mag, 65536 - vehicle mag)
+ 4: Magazine location ("Vest", "Uniform", "Backpack", "") or corresponding currentMuzzle
- https://community.bistudio.com/wiki/fleeing
+ https://community.bistudio.com/wiki/magazinesAmmoFull
- fleeing Object
+ magazinesAmmoFull Object
- fleeing unitName
+ magazinesAmmoFull vehicle
- $Code$? (fleeing _east_unit) : player sideChat "We have won!"$/Code$
+ $Code$_magazinesAmmoFull = magazinesAmmoFull player ;
+ /*
+ [
+ ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform"],
+ ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest"],
+ ["16Rnd_9x21_Mag",16,false,-1,"Vest"],
+ ["SmokeShellGreen",1,true,0,"SmokeShellGreenMuzzle"],
+ ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle"],
+ ["HandGrenade",1,true,0,"HandGrenadeMuzzle"],
+ ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F"],
+ ["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F"]
+ ]
+ */$/Code$
+
+ $Code$_magazinesAmmoFull = magazinesAmmoFull Mi_48;
+ /*
+ [
+ ["250Rnd_30mm_APDS_shells",250,false,-1,""],
+ ["250Rnd_30mm_HE_shells",250,true,65536,"gatling_30mm"],
+ ["8Rnd_LG_scalpel",8,true,65536,"missiles_SCALPEL"],
+ ["38Rnd_80mm_rockets",38,true,65536,"rockets_Skyfire"]
+ ]
+ */$/Code$
- global / undefined
+ undefined / undefined
+ (December 20, 2014)
+ When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
+ If you want to get all turrets' magazines, use allTurrets and magazinesTurret.
+ -- Actium ( talk ) 15:40, 20 December 2014 (CET)
+
+ (February 10, 2015)
+ As Actium said, this function seems to extract data from:
+ configfile "CfgVehicles" _the_vehicle_you_want "Turrets" "MainTurret" "magazines".
+ Some vehicles return an empty field {} because magazines are in straight in:
+ configfile "CfgVehicles" _the_vehicle_you_want "magazines" (often dedicated to flares only).
+ This is the case of WY-55 Hellcat. This function returns an empty array.
- Boolean
+ Array
+
- floor
+ max
- Returns the next lowest integer in relation to x.
+ The greater of a,b
- https://community.bistudio.com/wiki/floor
+ https://community.bistudio.com/wiki/max
- floor Number
+ Number max Number
- floor x
+ a max b
- $Code$floor 5.25
- Result is 5$/Code$
-
- $Code$floor -5.25
- Result is -6$/Code$
+ $Code$3 max 2
+ // Result is 3$/Code$
undefined / undefined
@@ -25103,230 +26286,257 @@
- Number
+ Number
+
- flyInHeightASL
+ assignAsGunner
- Sets the minimal ASL height. Final height is max(flyInHeight, flyInHeightASL).
+ Assign a unit as gunner of a vehicle. Used together with orderGetIn to order subordinate units to get in as gunner of a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the gunner place of the vehicle.
- https://community.bistudio.com/wiki/flyInHeightASL
+ https://community.bistudio.com/wiki/assignAsGunner
- Object flyInHeightASL Array
+ Object assignAsGunner Object
- aircraft flyInHeightASL params
+ unitName assignAsGunner vehicleName
- $Code$cobraOne flyInHeightASL [200, 100, 400];$/Code$
+ $Code$_soldier1 assignAsGunner _tank
+ [_soldier1] orderGetIn true$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- flyInHeight
+ lineIntersects
- Sets the flying altitude for aircraft relatively to the ground surface. Avoid too low altitudes, as helicopters and planes won't evade trees and obstacles on the ground. The default flying altitude is 100 meters.
+ Checks for object intersection with a virtual line between two positions. Returns true if intersects with an object.
+ NOTE: Doesn't work under water. Max harcoded distance is 1000m.
- https://community.bistudio.com/wiki/flyInHeight
+ https://community.bistudio.com/wiki/lineIntersects
- Object flyInHeight Number
+ lineIntersects Array
- aircraft flyInHeight altitude
+ lineIntersects [begPos, endPos, objIgnore1, objIgnore2]
- $Code$_helicopter flyInHeight 40$/Code$
+ $Code$lineIntersects [ eyePos player, aimPos chopper, player, chopper]$/Code$
- local / global
+ global / undefined
- (August 4, 2006)
- Notes from before the conversion:
- From version 1.80+ - flyInHeight now affects not only helicopters, but also planes.
-
- (August 4, 2006)
- A planes flyInHeight, is restricted to a minimum of 20 meters.
-
- (December 15, 2008)
- A flyInHeight of 0 will keep the chopper pinned to the ground, even when the engines have been started.
-
- (00:53, 11 April 2009 (CEST))
- If a helo has no waypoints, it will assume a low hover without regard to this setting.
+ (may 31, 2012)
+ Please note the difference :
+ terrainIntersect
+ terrainIntersectASL
+ lineIntersects
+ lineIntersectsWith
+ lineIntersectsObjs
+ intersect
- Nothing
+ Boolean
+
- fogForecast
+ unitAddons
- Returns the forecast fog value. A value of 0 means no fog, 1 means maximum fog.
+ Returns list with addons the unit belongs to.
- https://community.bistudio.com/wiki/fogForecast
+ https://community.bistudio.com/wiki/unitAddons
- fogForecast
+ unitAddons String
- fogForecast
+ unitAddons className
- $Code$_level = fogForecast ;$/Code$
+ $Code$hint str unitAddons typeOf player ; //["A3_Characters_F_BLUFOR"]$/Code$
undefined / undefined
+ (Mar 31, 2014)
+ 1. (A3 1.14) Old BIS function BIS_fnc_unitAddon has been deprecated, please always use unitAddons instead.
+ $Code$ hint str ([player] call BIS_fnc_unitAddon ) // same as unitAddons ( typeOf player )$/Code$
+ 2. To return the addon that a weapon belongs to, use BIS_fnc_weaponAddon instead. E.g.
+ $Code$
+ (( primaryWeapon player ) call BIS_fnc_weaponAddon ); //return: "A3_Weapons_F_Rifles_Khaybar"
+ $/Code$
- Number
+ Array
+
- fogParams
+ ctrlCommit
- A getter for setFog (Alt Syntax). Returns extended params for the fog
+ Commit control animation.
- https://community.bistudio.com/wiki/fogParams
+ https://community.bistudio.com/wiki/ctrlCommit
- fogParams
+ Control ctrlCommit Number
- fogParams
+ controlName ctrlCommit time
- $Code$_fog = fogParams$/Code$
+ $Code$_control ctrlCommit 2$/Code$
undefined / undefined
+ (April 11, 2015)
+ Use this command if you want to for example change the position or size of a control.
- Array
+ Nothing
+
- fog
+ commandMove
- A getter for setFog. Returns the current value of the fog in range 0...1.
+ Order the given unit(s) to move to the given location (via the radio). Exactly the same as doMove, except this command displays a radio message.
- https://community.bistudio.com/wiki/fog
+ https://community.bistudio.com/wiki/commandMove
- fog
+ Object/Array commandMove Array
- fog
+ unitName commandMove position
- $Code$_foglevel = fog ;$/Code$
+ $Code$_soldier1 commandMove ( getMarkerPos "Marker1")$/Code$
- undefined / undefined
+ local / global
- Number
+ Nothing
+
- forEachMemberAgent
+ agents
- Executes the given command recursively for each agent that is a member of the given team. For just teams use forEachMemberTeam. For both teams and agents use forEachMember.
+ Return a list of agents in the current mission.
- https://community.bistudio.com/wiki/forEachMemberAgent
+ https://community.bistudio.com/wiki/agents
- Code forEachMemberAgent Team_Member
+ agents
- command forEachMemberAgent team
+ agents
-
+ $Code${ agent _x moveTo position player } forEach agents ;$/Code$
+
undefined / undefined
+ (April 4, 2012)
+ Note that agents returns a reference to the agent itself, not the object. For example: {alive _x} count agents; would return an error. But you can assign the agent a reference using setVariable, and then reference it, for example: {alive (_x getVariable ["agentObject",objNull]) count agents; would return the number of agents still alive - BUT you would need to define "agentObject" after you create the agent, for example:
+ _agent = createAgent [_type, _position, [], _radius, "NONE"];_agent setVariable["agentObject",_agent,true];
+
+ (August 1, 2013)
+ Alternatively, to get object from agent reference use agent command.
- Nothing
+ Array
+
- forEachMemberTeam
+ hasWeapon
- Executes the given command recursively for each team that is a member of the given team. For just agents use forEachMemberAgent. For both teams and agents use forEachMember.
+ Checks if a unit has the given weapon.
- https://community.bistudio.com/wiki/forEachMemberTeam
+ https://community.bistudio.com/wiki/hasWeapon
- Code forEachMemberTeam Team_Member
+ Object hasWeapon String
- command forEachMemberTeam team
+ unitName hasWeapon weaponName
-
+ $Code$?!( player hasWeapon "M16") : player addWeapon "M16"$/Code$
+
- undefined / undefined
+ global / undefined
+ (September 11, 2014)
+ This command doesn't work for Items in Arma 3, use this instead.
+ $Code$" ItemGPS " in ( items player + assignedItems player ) OR ' ItemGPS ' in ( items player + assignedItems player ) $/Code$
+ Returns true if unit has gps in inventory, assigned or not.
- Nothing
+ Boolean
+
- forEachMember
+ menuDelete
- Executes the given command recursively for both teams and agents that are members of the given team. For teams only use forEachMemberTeam. For agents only use forEachMemberAgent.
+ Deletes menu entry on given path.
- https://community.bistudio.com/wiki/forEachMember
+ https://community.bistudio.com/wiki/menuDelete
- Code forEachMember Team_Member
+ menuDelete Array
- command forEachMember team
+ menuDelete [idc, path, text]
@@ -25336,395 +26546,436 @@
- Nothing
+ Number
+
- forEach
+ distanceSqr
- Executes the given command(s) on every item of an array.
- The array items are represented by the magic variable _x. The array indices are represented by _forEachIndex.
- In ArmA2 & VBS2, the variable _x is always local to the forEach block so it is safe to nest them.
+ Computes the squared distance between two objects or positions.
- https://community.bistudio.com/wiki/forEach
+ https://community.bistudio.com/wiki/distanceSqr
- String/Code forEach Array
+ Object/Position distanceSqr Object/Position
- script forEach array
+ var1 distanceSqr var2
- $Code${ _x setDammage 1; } forEach units group player ;$/Code$
-
- $Code$// This command can also easily be used to execute a single command multiple times without respect to the array items.
- { player addMagazine "M16"; } forEach [1, 2, 3, 4];$/Code$
+ $Code$player distanceSqr ( leader player )$/Code$
- $Code$// You can also use multiple commands in the same block.
- {
- _x setCaptive true ;
- removeAllWeapons _x ;
- doStop _x ;
- } forEach units group this ;$/Code$
+ $Code$_distance = sqrt ((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2);
+ _distanceSqr = (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2;
+ _distance = [x1, y1, z1] distance [x2, y2, z2];
+ _distanceSqr = [x1, y1, z1] distanceSqr [x2, y2, z2];
+ _distance = sqrt ([x1, y1, z1] distanceSqr [x2, y2, z2]);
+ _distanceSqr = ([x1, y1, z1] distance [x2, y2, z2]) ^ 2;$/Code$
+
+
+ undefined / undefined
+
+
+
+
+ Number
+
+
+
+
+
+ breakOut
+
+
+ Breaks the code execution out of scope {} named name. nil is returned. Scope name can be assigned using scopeName command.
+ Since Arma 3 v1.47, breakOut can be used to return a value. It is the closest SQF comes to having "return" like operation.
+
+
+ https://community.bistudio.com/wiki/breakOut
+
+
+ breakOut String
+
+ Anything breakOut String
+
+
+ breakOut name
+
+ value breakOut name
+
+
+ $Code$scopeName "main";
+ while { true } do {
+ scopeName "loop1";
+ while { true } do {
+ scopeName "loop2";
+ if (condition1) then { breakTo "main"}; // Breaks all scopes and return to "main"
+ if (condition2) then { breakOut "loop2"}; // Breaks scope named "loop2"
+ sleep 1;
+ };
+ sleep 1;
+ };$/Code$
- $Code$// To get the index of a forEach loop, use _forEachIndex.
- { systemChat format ["%1", _forEachIndex];} forEach [1,2,3];
- // Will return: "0", "1", "2" in systemChat messages.$/Code$
+ $Code$call {
+ scopeName "main";
+ call {
+ 123 breakOut "main"
+ };
+ 345
+ }; // call returns 123$/Code$
undefined / undefined
- (July 20, 2010)
- If arrays are used in forEach loops, _x uses them by reference, so any changes to _x will be applied to the original:
- $Code$_arr1 = [1,2,3];
- _arr2 = [6,7,8];
- {_x set [1,"x"]} forEach [_arr1,_arr2];$/Code$
- will change _arr1 to [1,"x",3], and _arr2 to [6,"x",8].
-
- (August 29, 2014)
- forEach returns any (the last passed value will be the return value or just Nothing, depends on the function called).
- $Code$
- _var = {_x} forEach [ nil,"s", objNull, configFile ]; // return bin\config.bin
- _var = {_x setCaptive true } forEach allUnits ; // return nothing
+ (19 Aug, 2008)
+ When "name" is nil, the command is ignored.
+ When "name" is an undefined scope name or "", the script quits current scope.
+ $Code$if (true) then {
+ hint "1";
+ breakOut nil;
+ hint "2";
+ }; //result "2"
+ if (true) then {
+ hint "1";
+ breakOut "";
+ hint "2";
+ }; //result "1"
+ if (true) then {
+ hint "1";
+ breakOut "dskfhdsklfh";
+ hint "2";
+ }; //result "1"
$/Code$
- (September 20, 2014)
- Using the foreach loop, since there are no variable for the index like say the for-do loop, there is a variable that you can use to check the index of the foreach loop.
- $Code${
- if ( _forEachIndex == 1) then {
- // Copilot
- _x addUniform "U_B_Soldier_VR";
- } else {
- // Adams
- [_x, "B_Soldier_TL_F"] call BIS_fnc_loadInventory ;
- _x addUniform "U_B_Soldier_VR";
- _x setIdentity "Bootcamp_B_Adams";
+ (August 27, 2015)
+ breakOut can still be used if multiple scopes share identical names. It will simply break out of the nearest scope that matches the name parameter you've used. For example:
+ $Code$call {
+ scopeName "Main"; //Parent Main
+ call {
+ scopeName "Main"; //Child Main
+ "String" breakOut "Main"; //Will break out of child main and return "String" to parent main
+ };
};
- } forEach _crew;
- $/Code$
- So when the array is past from _crew to the loop, index 1 (which is the second element) is the copilot of the "B_Heli_Light_01_F" and he will get "U_B_Soldier_VR" as a uniform. While the pilot which is index 0 (first element), will get the same uniform but will get the loadout of "B_Soldier_TL_F" and the identity of "Bootcamp_B_Adams".
-
- (January 2, 2015)
- Using exitWith inside a forEach loop will make forEach actually return something, namely whatever the exitWith returns:
- $Code$_result = {
- if(_x isEqualTo 3) exitWith {"Hello"}
- } forEach [1,2,3,4,5];
- //_result = "Hello"$/Code$
-
- (June 17, 2016)
- To be more precise, _forEachIndex represents NOT the index of the current array element, but the number of the loop iteration. If array is modified by reference while it is iterated through with forEach loop, _forEachIndex will NOT change to reflect that. For example:
- $Code$_array = ["1","2","3","4","5","6","7","8","9"];
- {
- systemChat str [_x, _forEachIndex, _array];
- _array deleteAt _forEachIndex;
- }
- forEach _array;
- /*result:
- [_x, _forEachIndex, _array]
- ["1",0,["1","2","3","4","5","6","7","8","9"]]
- ["3",1,["2","3","4","5","6","7","8","9"]]
- ["5",2,["2","4","5","6","7","8","9"]]
- ["7",3,["2","4","6","7","8","9"]]
- ["9",4,["2","4","6","8","9"]]*/
$/Code$
+ Therefore you are able to consistently reuse scope names such as "Main", "Child", "Primary", "Secondary", etc throughout functions without worrying about having to ensure you create unique names for each scope.
- Anything
+ Nothing - Anything
+
- forceAddUniform
+ entities
- Create a new uniform and hard link it into slot (without any restrictions).
+ Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored. When empty string "" is passed for the type, all entity types are returned.
+ Alternative syntax introduced in Arma 3 v1.65.138685 allows to filter entities by type and alive status as well as to return entities currently in vehicles. Optimisation tip : Keep number of types in both includeTypes and excludeTypes arrays to a minimum by possibly using parent/base classes. If you have to use several types, arrange them in order so that the more common types go at the beginning of the array.
- https://community.bistudio.com/wiki/forceAddUniform
+ https://community.bistudio.com/wiki/entities
- Object forceAddUniform String
+ entities String
+
+ entities Array
- unit forceAddUniform type
+ entities type
+
+ entities [typesInclude, typesExclude, includeCrews, excludeDead]
- $Code$_unit forceAddUniform "U_B_CombatUniform_mcam";$/Code$
+ $Code$_allcars = entities "Car";$/Code$
+
+ $Code$// Return all alive entities on the map:
+ _allalive = entities [[], [], true, true ];$/Code$
+
+ $Code$// Return dead and alive entities but logic:
+ _notlogic = entities [[], ["Logic"], true ];$/Code$
+
+ $Code$// Return all alive west soldiers on foot:
+ _footsoldiers = entities [["SoldierWB"], [], false, true ];$/Code$
- global / global
+ undefined / undefined
+ (Mar 27, 2014)
+ In ArmA3 ver 1.14 type (string) can be any children class under configfile "CfgVehicles". e.g. $Code$ entities "All"; //or entities "CAManBase"; etc.$/Code$
+
+ (July 12, 2016)
+ In A3 1.62 $Code$entities "CAManBase"$/Code$ does not include entities inside vehicles (crew).
- Nothing
+ Array - Array
+
- forceEnd
+ resetSubgroupDirection
- Sets the flag which tells engine that the mission end was forced. Might need additional endMission execution. Can be used in an "END" trigger to force end conditions in the editor.
+ Resets direction of subgroup.
- https://community.bistudio.com/wiki/forceEnd
+ https://community.bistudio.com/wiki/resetSubgroupDirection
- forceEnd
+ resetSubgroupDirection Object
- forceEnd
+ resetSubgroupDirection unit
- $Code$if (_TerritoryLost) then { forceEnd }$/Code$
+ $Code$resetSubgroupDirection myUnit;$/Code$
- undefined / local
+ undefined / undefined
- Nothing
+ Nothing
+
- forceFlagTexture
+ setFlagTexture
- Forces a flag texture onto a flag carrier (unit, vehicle or flag pole). No flag holder is required. If "" is used as texture, the texture is removed. This will override regularly owned flags. This type of flag texture cannot be retrieved using flagTexture.
- Note : Forced flag texture is an additional flag texture, which visually overrides original flag texture and therefore is very expensive to simulate, so please use the functionality sparingly.
+ Sets flag texture.
+ If texture is "", flag is not drawn.
+ Custom texture can be used, as long as it is in *.jpg format, and has dimensions of 200px*200px.
+ The page Flag Textures shows which textures are available in each game.
+ NOTE : In MP this command has to be executed where Flag Pole is local. If you add Flag Pole in the editor, it will be local to the server, so executing setFlagTexture on the server will change flag texture on all clients. The command is also persistent and is synchronised for JIP clients.
- https://community.bistudio.com/wiki/forceFlagTexture
+ https://community.bistudio.com/wiki/setFlagTexture
- Object forceFlagTexture String
+ Object setFlagTexture String
- object forceFlagTexture texture
+ flag setFlagTexture texture
- $Code$player forceFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";$/Code$
+ $Code$_flagE setFlagTexture "\ca\misc\data\sever_vlajka.paa";$/Code$
+
+ $Code$_flagW setFlagTexture "\ca\misc\data\usa_vlajka.paa";$/Code$
+
+ $Code$flag1 setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";$/Code$
+
+ $Code$flagARMA3 setFlagTexture "\a3\ui_f\data\Logos\arma3_expansion_ca.paa";$/Code$
+
+ $Code$// Capturable OPFOR flag:
+ private _flag = "FlagPole_F" createVehicle position player ;
+ _flag setFlagTexture "\A3\Data_F\Flags\Flag_CSAT_CO.paa";
+ _flag setFlagSide east ;$/Code$
- global / global
+ local / global
- Nothing
+ Nothing
+
- forceMap
+ enableSentences
- Opens non-interactive main map in background that overrides user screen. The user is able to fire but cannot see the world just the map. To force open interactive map use openMap command.
+ Enables radio transmissions to be heard and seen on screen. It does not affect KBTell conversations.
- https://community.bistudio.com/wiki/forceMap
+ https://community.bistudio.com/wiki/enableSentences
- forceMap Boolean
+ enableSentences Boolean
- forceMap show
+ enableSentences enable
- $Code$forceMap true$/Code$
+ $Code$enableSentences false;$/Code$
undefined / local
- In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
-
- Manually opening the map afterwards won't close the map. Actually it will open the "real" map on top of the forced map, and closing the (top) map with the m -key again will still show the forcefully opened map. (ArmA 1.05)
- Nothing
+ Nothing
+
- forceRespawn
+ hcRemoveGroup
- Forces unit to respawn. The effect as if the player pressed RESPAWN button in the game pause menu, the unit is killed only there is no "so and so was killed" message and no score adjustment.
+ Removes group from unit's high command bar.
- https://community.bistudio.com/wiki/forceRespawn
+ https://community.bistudio.com/wiki/hcRemoveGroup
- forceRespawn Object
+ Object hcRemoveGroup Group
- forceRespawn unit
+ unit hcRemoveGroup group
- $Code$forceRespawn player ;$/Code$
-
+
- local / global
+ undefined / undefined
- Nothing
+ Nothing
+
- forceWalk
+ add3DENLayer
- Forces unit to walk even if run or sprint is selected.
+ Add an editing layer in Eden Editor.
- https://community.bistudio.com/wiki/forceWalk
+ https://community.bistudio.com/wiki/add3DENLayer
- Object forceWalk Boolean
+ Number add3DENLayer String
- unit forceWalk value
+ parentLayerID add3DENLayer name
- $Code$player forceWalk true ;$/Code$
+ $Code$_myLayer = -1 add3DENLayer "Enemy Base";
+ _myLayerFort = _myLayer add3DENLayer "Fortifications";
+ _myLayerPatrol = _myLayer add3DENLayer "Patrols";$/Code$
- local / undefined
+ undefined / undefined
- Nothing
+ Number
+
- forceWeaponFire
+ hcShowBar
- The unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given muzzle. The muzzle could belong to a vehicle weapon and unit in this case will be the unit operating this weapon. Doesnt't seem to work for units in FFV positions. See also: BIS_fnc_fire
+ Shows or hides high command bar.
+ There must be some groups under HC command to show HC bar.
- https://community.bistudio.com/wiki/forceWeaponFire
+ https://community.bistudio.com/wiki/hcShowBar
- Object forceWeaponFire Array
+ hcShowBar Boolean
- unit forceWeaponFire [muzzle, firemode]
+ hcShowBar bool
- $Code$soldierOne forceWeaponFire ["arifle_MX_F", "Single"];$/Code$
-
- $Code$player forceWeaponFire ["hgun_ACPC2_F", "hgun_ACPC2_F"];$/Code$
-
- $Code$_unit forceWeaponFire ["HandGrenadeMuzzle","HandGrenadeMuzzle"];
- _unit forceWeaponFire ["MiniGrenadeMuzzle","MiniGrenadeMuzzle"];
- _unit forceWeaponFire ["HandGrenade_Stone","HandGrenade_Stone"];
- _unit forceWeaponFire ["SmokeShellMuzzle","SmokeShellMuzzle"];
- _unit forceWeaponFire ["ChemlightGreenMuzzle","ChemlightGreenMuzzle"];
- _unit forceWeaponFire ["IRGrenade","IRGrenade"];
- _unit forceWeaponFire ["Laserdesignator","Laserdesignator"];$/Code$
+ $Code$hcShowBar true ;$/Code$
- $Code$gunner blackfoot forceWeaponFire ["gatling_20mm", "close"];$/Code$
+ $Code$hcShowBar false ;$/Code$
- local / global
+ undefined / undefined
- (August 25, 2013)
- Here is a neat workaround trick for firemode change from a script:
- $Code$_weapon = currentWeapon player ;
- _ammo = player ammo _weapon;
- player setAmmo [_weapon, 0];
- player forceWeaponFire [_weapon, "FullAuto"];
- player setAmmo [_weapon, _ammo];$/Code$
-
- (April 14, 2014)
- (A3 1.16) forceWeaponFire is no longer only limited to units, but can remote aircrafts weapon firing as well. Passed source unit should be the correct one who controls the weapon, if passed mode is "this", use the weapon name instead:
- $Code$
- _weapon = ( weapons _veh) select 3;
- _mode = ( getArray ( configFile "cfgweapons" _weapon "modes")) select 0;
- if (_mode == "this") then {_mode = _weapon;};
- ( driver _veh) forceWeaponFire [_weapon, _mode];
- //Force a CAS fire a rocket.
- $/Code$
- Currently this command is not available for land vehicle remote fire.
-
- (September 02, 2014)
- Similar to Killzone Kid's note, This fires the units current weapon in its current firemode.
- $Code$_unit forceWeaponFire [ weaponState _unit select 1, weaponState _unit select 2];$/Code$
-
- (January 3, 2015)
- fireAtTarget command can be used to force fire gunner weapon in vehicles. A gunner must be present. $Code$_veh fireAtTarget [ objNull ];$/Code$ Will fire one shot even if player is gunner.
- fire command can also be used to fire vehicle weapon, like smoke launcher for example: $Code$ vehicle player fire "SmokeLauncher";$/Code$ And if this doesn't work, it is possible to force fire via action $Code$tank action ["UseWeapon", tank, commander tank, 0];$/Code$
- Nothing
+ Nothing
+
- forceWeatherChange
+ setParticleRandom
- Forces saved wanted settings for weather to be actual (BEWARE: Will cause lag).
- NOTE The engine has own idea about the weather and will interfere with your scripted weather at every opportunity it gets. So don't give it the opportunity. In the editor's Intel there are Manual Override setting for many aspects of the weather. Select them to disable engine interference. Some commands such as setWaves and setLightnings will not even work until their respective settings are set to manual.
+ Sets randomization of particle source parameters. Correspondence between CfgCloudlets class param names and command array of params:
+ $Code$particleSource setParticleRandom
+ [
+ lifeTimeVar,
+ positionVar,
+ moveVelocityVar,
+ rotationVelocityVar,
+ sizeVar,
+ colorVar,
+ randomDirectionPeriodVar,
+ randomDirectionIntensityVar,
+ angleVar,
+ bounceOnSurfaceVar
+ ];$/Code$
- https://community.bistudio.com/wiki/forceWeatherChange
+ https://community.bistudio.com/wiki/setParticleRandom
- forceWeatherChange
+ Object setParticleRandom Array
- forceWeatherChange
+ particleSource setParticleRandom [lifeTime, position, moveVelocity, rotationVelocity, size, color, randomDirectionPeriod, randomDirectionIntensity, angle, bounceOnSurface]
- $Code$240 setOvercast 1;
- 360 setRain 1;
- forceWeatherChange ; comment "force immediate change overriding smooth transition";$/Code$
+ $Code$_PS setParticleRandom [0, [0.1, 0.1, 0.1], [0, 0, 0.5], 0, 0.1, [0, 0, 0, 0], 0, 0];$/Code$
undefined / undefined
- This scripting command must be executed on the server to work properly in multiplayer
+ (July 03, 2013)
+ Support of parameter bounceOnSurface ( Number - 0-1) is in the game since Arma 3 version 0.74. It's variability in speed's loosing in collision with ground. Requires collisions with ground enabled by script command setParticleParams.
- Nothing
+ Nothing
+
- forcedMap
+ worldToModel
- Returns if map was forced by using forceMap command or openMap command with force option
+ Converts position from world space to object model space.
- https://community.bistudio.com/wiki/forcedMap
+ https://community.bistudio.com/wiki/worldToModel
- forcedMap
+ Object worldToModel Array
- forcedMap
+ model worldToModel position
- $Code$_forceMapForced = forcedMap select 0;
- _openMapForced = forcedMap select 1;$/Code$
+ $Code$_relPos = myObject worldToModel [0,0,0];$/Code$
+
+ $Code$_relPos = player worldToModel position car;$/Code$
+
+ $Code$_relPos = car worldToModel [12000,5000];$/Code$
undefined / undefined
@@ -25732,27 +26983,28 @@
- Array
+ Array
+
- forgetTarget
+ waypointStatements
- Resets info group has about target
+ Gets the waypoint statements.
- https://community.bistudio.com/wiki/forgetTarget
+ https://community.bistudio.com/wiki/waypointStatements
- Group/Object forgetTarget Object
+ waypointStatements Array
- group forgetTarget target
+ waypointStatements waypoint
- $Code$soldier1 forgetTarget soldier2;$/Code$
+ $Code$waypointStatements [groupOne,1]$/Code$
undefined / undefined
@@ -25760,527 +27012,640 @@
- Nothing
+ Array
+
- for
+ simpleTasks
- This operator creates a For Type which is used in the for-constructs (There is the for forspec and the for var syntax available for this construct)
+ Return all simple tasks assigned to given person.
- https://community.bistudio.com/wiki/for
+ https://community.bistudio.com/wiki/simpleTasks
- for String/Array
+ simpleTasks Object
- for arg
+ simpleTasks person
- $Code$for "_i" from 1 to 10 do { debugLog _i;};$/Code$
-
- $Code$for "_i" from 9 to 1 step -2 do { debugLog _i;};$/Code$
-
- $Code$for [{_i=0}, {_i 10}, {_i = _i + 1}] do {hint str _i};$/Code$
-
+
undefined / undefined
- For_Type
+ Array
+
- forceSpeed
+ ctrlAngle
- Force the speed limit on given object (object will never attempt to move faster than given by forceSpeed). Use negative value to return to default behaviour. Used unit is m/s.
+ Gets rotation info of an ST_PICTURE control.
- https://community.bistudio.com/wiki/forceSpeed
+ https://community.bistudio.com/wiki/ctrlAngle
- Object forceSpeed Number
+ ctrlAngle Control
- object forceSpeed speed
+ ctrlAngle control
- $Code$_helicopter forceSpeed 150;$/Code$
+ $Code$ctrlAngle _control;$/Code$
undefined / undefined
- (17:02, 2 March 2007 (CET))
-
- (9 February 2008)
- Does not seem to do anything at the current time (V1.08.5163)
-
- (14 December 2011)
- If a unit (man) has forceSpeed set to anything under jogging (walking only) the unit will refuse to get into vehicles. He will automatically be unassigned from a vehicle everytime he is ordered to get in (via scripts or direct action)
- Nothing
+ Array
+
- formLeader
+ find
- Returns the formation leader of a given unit. This is often the same as the group leader, but not always, for example in cases when a unit is ordered to follow another unit.
+ Searches for an array element within array or a string within a string. Returns the 0 based index on success or -1 if not found. Search is cASe-seNsItiVE
- https://community.bistudio.com/wiki/formLeader
+ https://community.bistudio.com/wiki/find
- formLeader Object
+ Array find Anything
+
+ String find String
- formLeader unitName
+ array find x
+
+ string find x
- $Code$? (formLeader player != leader player) :
- hint "The formation leader is different to the group leader!"
- returns X$/Code$
+ $Code$["Apples","Oranges","Pears"] find "Oranges"; //result is 1
+ [1,[2],[[3]]] find [[3]]; //result is 2$/Code$
+
+ $Code$if ( magazines player find "Strela" = 0) then { hint "You've got Strela!"};$/Code$
+
+ $Code$hint str ("japa is the man!" find "the man!"); //8$/Code$
- global / undefined
+ undefined / undefined
+ (January 4, 2015)
+ Using nil on either side of find will make the whole statement return Nothing :
+ $Code$_array = [1,2, nil,4,5];
+ _result = _array find nil;
+ hintSilent str ( isNil "_result"); //true
+ _result = nil find 1;
+ hintSilent str ( isNil "_result"); //true$/Code$
+
+ (April 10, 2015)
+ Find doesn't work with multidimensional arrays in OFP/CWA. It will always returns -1.
+
+ (May 17, 2016)
+ This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 1.58):
+ $Code$"abcßdef" find "c"
+ - 2
+ "abcßdef" find "ß"
+ - 3
+ "abcßdef" find "d"
+ - 5$/Code$
+
+ (July 7, 2016 10:56 (UTC))
+ Not quite unreliable, just unexpected! Strings are tracked in terms of bytes rather than in actual character positions; all strings are stored in UTF-8 format. In other words, the eszett character is in Unicode, which takes up two bytes rather than one as it is within the 128-255 range of Unicode. (Similar results would be expected for the division symbol, the umlaut, accented e's, etc.) Symbols that are particularly high in the Unicode range may take up three bytes, or even four for the truly exceptional characters, although Arma 3's default fonts are unlikely to render them. This definitely complicates any script which assumes any printable character is a single byte, however, and unfortunately I'm not skilled enough with internationalisation to recommend any robust fix.
- Object
+ Number - Number
+
- formation
+ sliderSetPosition
- Returns the current formation of a group.
+ Set current thumb position of slider idc of topmost user dialog.
- https://community.bistudio.com/wiki/formation
+ https://community.bistudio.com/wiki/sliderSetPosition
- formation Object/Group
+ sliderSetPosition Array
+
+ Control sliderSetPosition Number
- formation grp
+ sliderSetPosition [idc, pos]
+
+ control sliderSetPosition pos
- $Code$formation group player$/Code$
+ $Code$sliderSetPosition [101, 50];$/Code$
- global / undefined
+ undefined / undefined
- (January 9, 2007)
- Additional ARMA Formations: "File" - Column Compact. "DIAMOND" - Delta.
- String
+ Nothing - Nothing
+
- format
+ ctRowControls
- Composes a string containing other variables or other variable types. Converts any variable type to a string. If you want to convert a string back to a number, use parseNumber. NOTE that output of this command is limited to ~8Kb. joinString on the other hand doesn't have such limit.
+ Returns array of controls on the row with the given index.
- https://community.bistudio.com/wiki/format
+ https://community.bistudio.com/wiki/ctRowControls
- format Array
+ Control ctRowControls Number
- format [formatString, var1, var2]
+ Control ctRowControls Number
- $Code$format ["Player:%1, player's side:%2", player, side player ];
- // returns "Player:WEST 1-1-A:1 (Username), player's side:WEST"$/Code$
-
- $Code$player addEventHandler ["HandleDamage", {
- hint format ["You just sustained %1%2 damage!", ceil (( _this select 2) * 100), "%"];
- }];
- // hints "You just sustained 20% damage!"$/Code$
+ $Code$_array = _control ctRowControls 0;$/Code$
- undefined / undefined
+ local / local
- The maximum number of characters returned by the format command seems to depend on the total byte count. For plain ASCII strings the limit is 2048 characters.
-
- In Arma 3 the max length of String returned by format command seems to be 8191 characters. formatText doesn't seem to have this limitation.
-
- (March 28, 2015)
- In addition to the note above, formatTexted strings are Structured Text, hence cannot be used like formatted strings (with most scripting commands). A workaround to get strings of type String with more than 8191 characters is: $Code$ str formatText ["%1", _string]$/Code$
-
- (January 2, 2016)
- In addition to the note above, you may consider using joinString instead of format or formatText workaround. joinString is a fraction faster than format and it has no limit on the length of the string (apart from global String limit obviously)
- String
+ Array
+
- formatText
+ setUnitTrait
- Creates a structured text by replacing %1, %2, etc. in format with plain or structured texts given as arguments.
+ Enables or disables a trait or alters a trait of the given unit. Custom trait can only be a bool.
+ Default traits are:
+ audibleCoef (scalar)
+ camouflageCoef (scalar)
+ engineer (bool) - Ability to repair vehicles and defuse mines using toolkit
+ explosiveSpecialist (bool) - Ability to defuse mines using toolkit
+ loadCoef (scalar) - Equipment weight multiplier affecting fatigue and stamina
+ medic (bool) - Ability to use medikit on self and others
+ UAVHacker (bool)
- https://community.bistudio.com/wiki/formatText
+ https://community.bistudio.com/wiki/setUnitTrait
- formatText Array
+ Object setUnitTrait Array
- formatText [format, arg1, arg2,]
+ unit setUnitTrait [skill_name, value, isCustom]
- $Code$_text = formatText ["Image: %1", image "data\isniper.paa"];$/Code$
+ $Code$player setUnitTrait ["Medic", true ];$/Code$
- undefined / undefined
+ local / global
+ (April 27, 2016)
+ The higher the value for the loadCoef the less stamina a unit has. Negative values will dramatically increase the stamina actually to a point where it extends the stamina bar.
+
+ (October 20, 2017)
+ explosive specialists can defuse mines (ie satchel charges), whilst engineers cannot.
- Structured_Text
+ Nothing
+
- formationDirection
+ clearBackpackCargo
- Return the direction in degrees of the 'unit' watching in formation.
+ Removes all backpacks from ammo box (or any general weapon holder container).
- https://community.bistudio.com/wiki/formationDirection
+ https://community.bistudio.com/wiki/clearBackpackCargo
- formationDirection Object
+ clearBackpackCargo Object
- formationDirection unitName
+ clearBackpackCargo box
- $Code$_degrees = FormationDirection _unit$/Code$
+ $Code$clearBackpackCargo myBox;$/Code$
- local / undefined
+ undefined / undefined
+ (July 6, 2017)
+ This will remove not only backpacks, but vests and uniforms as well.
- Number
+ Nothing
+
- formationLeader
+ setWaypointLoiterRadius
- Return leader of the formation.
+ Assignes loiter radius to waypoint
- https://community.bistudio.com/wiki/formationLeader
+ https://community.bistudio.com/wiki/setWaypointLoiterRadius
- formationLeader Object
+ Waypoint setWaypointLoiterRadius Number
- formationLeader unitName
+ waypoint setWaypointLoiterRadius radius
- $Code$? (formationLeader player != leader player) :
- hint "Formation leader is not the group leader."$/Code$
+ $Code$[_grp, 2] setWaypointLoiterRadius 200;$/Code$
undefined / undefined
- (December 2, 2006)
- Return value is NULL-OBJECT if no group members exist.
- Object
+ Nothing
+
- formationMembers
+ sort
- Return list of units (drivers) in the formation.
+ Attempts to sort given array either in ascending ( true ) or descending ( false ) order. All array elements should be one of the following types:
+ String - array of strings (["a","b","c"...])
+ Number - array of numbers ([1,2,3...])
+ Array - array of subarrays ([["a",1,2],["b",3,4],["c",5,6]...]). Subarrays should be of the same structure. Subarray elements other than String or Number will be ignored during sorting.
+ Mixed arrays (["a",1,[true]...]) are not supported and results are undefined.
- https://community.bistudio.com/wiki/formationMembers
+ https://community.bistudio.com/wiki/sort
- formationMembers Object
+ Array sort Boolean
- formationMembers person
+ array sort order
- $Code$_drivers=FormationMembers _person$/Code$
+ $Code$_arr = [5.21725,1.30859,4,5.03028,1];
+ _arr sort true ;
+ hint str _arr; //[1,1.30859,4,5.03028,5.21725]$/Code$
+
+ $Code$_dev = ["ja","pa","pa","tram","tara"];
+ _dev sort false ;
+ hint str _dev; //["tram","tara","pa","pa","ja"]$/Code$
+
+ $Code$#define ASC true
+ #define DESC false
+ _scores = [[123,"bob",15],[123,"bill",20],[200,"dave",21],[200,"steve",11]];
+ _scores sort DESC;
+ hint str _scores; //[[200,"steve",11],[200,"dave",21],[123,"bob",15],[123,"bill",20]]$/Code$
+
+ $Code$// Sort buildings by distance and return position of the most distant building:
+ _buildings = player nearObjects ["Land_Cargo_Patrol_V1_F", 500];
+ _buildings = _buildings apply { [_x distance player, _x] };
+ _buildings sort false ;
+ hint format [
+ "Most distant building is at %1, distance %2 m",
+ getPos (_buildings select 0 select 1),
+ round (_buildings select 0 select 0)
+ ];$/Code$
undefined / undefined
+ (April 16, 2015)
+ The algorithm for sorting subarrays: compare 1st element, if equal compare 2nd, if equal compare 3rd...etc.
- Array
+ Nothing
+
- formationPosition
+ enableChannel
- Return position of unit in the formation
+ Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel. If the channel was disabled in description.ext, it can be enabled with this command, however the UI functionality changes will be local to the PC executing this command. What this command cannot do:
+ It cannot disable incoming text or voice
+ It cannot interrupt own client's transmission in progress
+ It cannot affect any Custom Radio channels, only channels 0-5
+ It cannot persist, so if user is logged out, the changes are reset
+ It has no effect on chat related scripting commands, such as vehicleChat, globalChat, globalRadio, sideRadio, etc.
+ So in short, just like with getPlayerChannel, this command provides a nice ability to hack into chat UI with some limitations. And the reason why it is possible to disable entire channels (except Group) in description.ext, is because no one can talk or text, therefore no transmission is happening. NOTE: Group channel cannot be disabled, neither with enableChannel, nor with description.ext param. Channel / Number correspondence:
+ 0 = Global
+ 1 = Side
+ 2 = Command
+ 3 = Group
+ 4 = Vehicle
+ 5 = Direct
+ 6-15 = Custom Radio (Is not supported by enableChannel )
- https://community.bistudio.com/wiki/formationPosition
+ https://community.bistudio.com/wiki/enableChannel
- formationPosition Object
+ Number enableChannel Boolean
+
+ Number enableChannel Array
- formationPosition person
+ channel enableChannel enable
+
+ channel enableChannel [chat, VoN]
- $Code$_pos=FormationPosition _person$/Code$
+ $Code$0 enableChannel false ; // Disable user ability to send voice and text on global channel$/Code$
+
+ $Code$0 enableChannel [ true, false ]; // Enable user ability to send text but disable voice on global channel$/Code$
- undefined / undefined
+ undefined / local
+ (June 17, 2016)
+ If the user is admin, global channel is fully enabled, regardless of this command.
+
+ (July 30, 2016)
+ Alternative Syntax supports Custom Radio Channels
- Array
+ Nothing - Nothing
+
- formationTask
+ lineIntersectsWith
- Return the current task of the unit in the formation.
- You can't use it in ArmA 2, it will always returns "NOTHING"
+ Returns objects intersecting with the virtual line from begPos to endPos. By default resulting array of intersecting objects is unsorted. To sort by distance set sortByDistance param to true. NOTE: Doesn't work under water. Max hardcoded distance is 1000m.
- https://community.bistudio.com/wiki/formationTask
+ https://community.bistudio.com/wiki/lineIntersectsWith
- formationTask Object
+ lineIntersectsWith Array
- formationTask person
+ lineIntersectsWith [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]
- $Code$_CurrentTask = FormationTask _person$/Code$
+ $Code$_objects = lineIntersectsWith [ eyePos player, AGLtoASL screenToWorld [0.5,0.5]];$/Code$
+
+ $Code$// Sort by distance:
+ _objects = lineIntersectsWith [ eyePos player, AGLtoASL screenToWorld [0.5,0.5], objNull, objNull, true ];$/Code$
+
+ $Code$// Ignore objects:
+ _objects = lineIntersectsWith [ eyePos player, aimPos chopper, player, chopper];$/Code$
- undefined / undefined
+ global / undefined
+ (may 31, 2012)
+ Please note the difference :
+ terrainIntersect
+ terrainIntersectASL
+ lineIntersect s
+ lineIntersect s With
+ lineIntersect s Objs
+ intersect
- String
+ Array
+
- freeLook
+ lbColor
- Returns true if freelook is active.
+ Returns the text color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ The color is returned in format Color.
- https://community.bistudio.com/wiki/freeLook
+ https://community.bistudio.com/wiki/lbColor
- freeLook
+ lbColor Array
+
+ Control lbColor Number
- freeLook
+ lbColor [idc, index]
+
+ control lbColor index
- $Code$systemChat (if freeLook then {"Quit looking around player!"} else {""});$/Code$
+ $Code$_colour = lbColor [101, 0];$/Code$
+
+ $Code$_color = _control lbColor 0;$/Code$
- undefined / undefined
+ local / local
+ More information on the LB command family can be found here
- Boolean
+ Array - Array
+
- fromEditor
+ allDeadMen
- Return if given team was inserted directly from mission editor.
+ Return a list of dead units including agents. Dead unit might be inside vehicle.
- https://community.bistudio.com/wiki/fromEditor
+ https://community.bistudio.com/wiki/allDeadMen
- fromEditor Team_Member
+ allDeadMen
- fromEditor teamMember
+ allDeadMen
- $Code$_fromEditor = fromEditor _member$/Code$
+ $Code${ deleteVehicle _x } forEach allDeadMen;$/Code$
undefined / undefined
+ (17 Oct, 2009)
+ As dead men are civilian side, don't try to count them with {side _x isEqualTo EAST} count allDeadMen; result will always be 0.
+ Use the configfile "side" instead:
+ 0 = [] spawn {while {true} do {sleep 0.1; _westScore = {getNumber (configfile "CfgVehicles" typeOf _x "side") == 0} count allDeadMen; hintSilent format ["East killed: %1",_westScore]};};
- Boolean
+ Array
+
- from
+ doFire
- Continue sequence of for var construct. It sets the start value of the index variable.
+ Order the given unit(s) to fire on the given target (without radio messages).
+ The target is set with doTarget or commandTarget.
+ The target can be a unit or a vehicle, but not an object.
- https://community.bistudio.com/wiki/from
+ https://community.bistudio.com/wiki/doFire
- For_Type from Number
+ Object/Array doFire Object
- for from b
+ unitName doFire target
- $Code$for "_x" from 10 to 20 do {..code..}$/Code$
+ $Code$_ESoldier1 doFire _WSoldier1;$/Code$
- undefined / undefined
+ local / global
+ (August 3, 2006)
+ Notes from before the conversion:
+ It is often helpful to use doTarget first.
+
+ (March 25, 2007)
+ A unit will not execute this command when his behaviour is set to "careless".
+
+ (Feb 18, 2012)
+ Board dofire not working in arma2 1.11. an entity he throws he shoots not only.
+
+ (June 7, 2012)
+ Unitname dofire objnull does not work like it does in commandfire. Target var has to be real (Arma2 AO) might be different in other versions.
- For_Type
+ Nothing
+
- fuel
+ markerSize
- Checks how much fuel is left in the gas tank of a vehicle.
+ Returns marker size. This command is identical to getMarkerSize.
- https://community.bistudio.com/wiki/fuel
+ https://community.bistudio.com/wiki/markerSize
- fuel Object
+ markerSize String
- fuel vehicle
+ markerSize markerName
- $Code$if ( fuel vehicle player == 0) then { hint "The vehicle is out of fuel!"};$/Code$
+ $Code$_mSize = markerSize "Marker1";$/Code$
global / undefined
- Vehicles refuelled in game with the Fuel trucks e.t.c never get completely refuelled. After refuelling, rather than returning a value of 1 when the fuel command is called. They return a value greater than 0.98 and less than 1.
- Number
+ Array
+
- fullCrew
+ ctrlChecked
- Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.
- NOTE that with introduction of person turrets, the cargo indexes listed in the return are true for moveInCargo command but incompatible with actions such as "GetInCargo" and "MoveToCargo". To find out seats compatible with cargo action commands, execute command with "cargo" filter:
- $Code$ fullCrew [heli, "cargo", true ];$/Code$
- The return array is ordered according to cargo index compatible with action cargo commands, i.e. 1st element has index 0, second - index 1, etc. For example armed WY-55 Hellcat reports:
- [[ NULL-object,"cargo",2,[],false],[ NULL-object,"cargo",3,[],false],[ NULL-object,"cargo",4,[],false],[ NULL-object,"cargo",5,[],false]]
- for cargo positions. The following commands will put player in the same seat:
- $Code$ player moveInCargo [heli, 2];
- player action ["GetInCargo", heli, 0];$/Code$
+ Returns the current state of given checkbox in checkboxes control (CT_CHECKBOXES, type = 7; ). Since Arma 3 v1.71.141591 it is possible to query multiple checkboxes by providing checkbox index. For more information see DialogControls-CheckBoxes.
+ Note: The "onCheckBoxesSelChanged" control EH returns the control, index of changed checkbox and its current checked state. The checked state however is not a Boolean but Number 0 or 1. To convert ctrlChecked command output into number as well, use parseNumber command.
- https://community.bistudio.com/wiki/fullCrew
+ https://community.bistudio.com/wiki/ctrlChecked
- fullCrew Object
+ ctrlChecked Control
- fullCrew Array
+ Control ctrlChecked Number
- fullCrew vehicle
+ ctrlChecked control
- fullCrew [vehicle, type, includeEmpty]
+ control ctrlChecked index
- $Code$_list = fullCrew vehicle player ;$/Code$
+ $Code$ctrlChecked _control;$/Code$
- $Code$_list = fullCrew [ vehicle player, "turret"];$/Code$
+ $Code$_control ctrlChecked 3;$/Code$
- global / undefined
+ undefined / undefined
- (December 13, 2014)
- Be aware that the returned role may or may not be in lowercase. E.g. it's "driver" for the driver, but "Turret" for turret units.
- As of Arma 3 version 1.36, the alternative syntax of this command returns all crew members if the filter is anything except "driver", "commander", "gunner", "turret" or "cargo"
- The filter is not case sensitive.
- Array - Array
+ Boolean - Boolean
+
- gearIDCAmmoCount
+ dynamicSimulationDistanceCoef
- Returns ammo count of assigned magazine.
+ A getter for setDynamicSimulationDistanceCoef
- https://community.bistudio.com/wiki/gearIDCAmmoCount
+ https://community.bistudio.com/wiki/dynamicSimulationDistanceCoef
- gearIDCAmmoCount Number
+ dynamicSimulationDistanceCoef String
- gearIDCAmmoCount idc
+ dynamicSimulationDistanceCoef class
- $Code$ammo = gearIDCAmmoCount _control;$/Code$
+ $Code$hint str dynamicSimulationDistanceCoef "IsMoving";$/Code$
undefined / undefined
@@ -26288,27 +27653,28 @@
- Number
+ Number
+
- gearSlotAmmoCount
+ isTurnedOut
- Returns ammo count of assigned magazine.
+ Returns true if given unit is turned out, otherwise false. The output changes to true after unit finished turning out, however will change to false almost immediately after unit is ordered to turn in.
- https://community.bistudio.com/wiki/gearSlotAmmoCount
+ https://community.bistudio.com/wiki/isTurnedOut
- gearSlotAmmoCount Control
+ isTurnedOut Object
- gearSlotAmmoCount control
+ isTurnedOut unit
- $Code$ammo = gearSlotAmmoCount _control;$/Code$
+ $Code$_commanderOut = isTurnedOut (tank turretUnit [0,0]);$/Code$
undefined / undefined
@@ -26316,53 +27682,29 @@
- Number
+ Boolean
+
- gearSlotData
+ true
- Returns gear slot item name.
+ Always true
- https://community.bistudio.com/wiki/gearSlotData
+ https://community.bistudio.com/wiki/true
- gearSlotData Control
+ true
- gearSlotData control
+ true
- $Code$Open any ammobox and click by any gear slots
- private "_dspl";
- disableSerialization;
- waitUntil {
- _dspl = findDisplay 106;
- ! isNull _dspl;
- };
- uiNamespace setVariable ["/VDMJ/RscDisplayGear/SlotDataEH", {
- _self = _this select 0;
- _weaponName = gearSlotData _self;
- _conf = configFile _confSection _weaponName;
- _name = getText(_conf "displayName");
- _desc = getText(_conf "Library" "libTextDesc");
- _image = getText(_conf "picture");
- hint parseText format[
- ' t size="1.3" align="center" shadow="true" shadowColor="#000000" %1 /t br / img image="%2" size="6" align="center" / br / %3 br / %4',
- _name, _image, _desc
- ];
- }];
- for "_i" from 107 to 145 do {
- _dspl displayCtrl _i ctrlAddEventHandler ["ButtonClick",
- format [
- '_confSection = "%1"; _this call (uiNamespace getVariable "/VDMJ/RscDisplayGear/SlotDataEH");',
- if( _i = 109 && _i = 129 ) then { "CfgMagazines" } else { "CfgWeapons" }
- ]
- ];
- };$/Code$
+ $Code$_var = true ;
+ systemChat str _var; //true$/Code$
undefined / undefined
@@ -26370,60 +27712,59 @@
- String
+ Boolean
+
- get3DENActionState
+ weaponLowered
- Returns state of given action in the Eden Editor.
- See the list of all actions.
+ True if given soldier's weapon is lowered.
- https://community.bistudio.com/wiki/get3DENActionState
+ https://community.bistudio.com/wiki/weaponLowered
- get3DENActionState String
+ weaponLowered Object
- get3DENActionState action
+ weaponLowered unit
- $Code$if ( get3DENActionState "ToggleMap" == 1) then { systemChat "Editor map is open!"};$/Code$
+ $Code$isWeaponLowered = weaponLowered player;$/Code$
undefined / undefined
+ (November 11, 2016)
+ This command seems to work for player only, not for AI.
- Number
+ Boolean
+
- get3DENAttribute
+ position
- Returns value of a given entity's attribute in Eden Editor.
- An attribute is identified by its property ( data when it's engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.
- !
- Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
+ Synonym for getPos.
- https://community.bistudio.com/wiki/get3DENAttribute
+ https://community.bistudio.com/wiki/position
- EdenEntity get3DENAttribute String
+ position Object/Location
- entity get3DENAttribute attribute
+ position object
- $Code$systemChat str (( get3DENMouseOver select 1) get3DENAttribute "name");
- // returns variable name of object under cursor$/Code$
+ $Code$_pos = position player ;$/Code$
undefined / undefined
@@ -26431,126 +27772,125 @@
- Array
+ Array
+
- get3DENCamera
+ setWaypointSpeed
- Returns the camera Object used by the Eden Editor.
+ Switches the group speed mode when the waypoint becomes active.
+ Possible values are:
+ "UNCHANGED"
+ "LIMITED"
+ "NORMAL"
+ "FULL"
- https://community.bistudio.com/wiki/get3DENCamera
+ https://community.bistudio.com/wiki/setWaypointSpeed
- get3DENCamera
+ Array setWaypointSpeed String
- get3DENCamera
+ waypoint setWaypointSpeed mode
- $Code$// set exact yaw, pitch, and roll
- _y = 45; _p = -80; _r = 0;
- get3DENCamera setVectorDirAndUp [
- [ sin _y * cos _p, cos _y * cos _p, sin _p],
- [ [ sin _r,- sin _p, cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D
- ];$/Code$
-
- $Code$//Look at player
- _a = positionCameraToWorld [0,0,0] vectorFromTo ( getPosATL player );
- _y = asin (_a select 0);
- _b = [_a,_y] call BIS_fnc_rotateVector2D ;
- _z = _b select 2;
- _p = asin (_z / sqrt ((_b select 1)^2 + _z^2));
- get3DENCamera setVectorDirAndUp [
- _a,
- [ [0,- sin _p, cos _p],-_y] call BIS_fnc_rotateVector2D
- ];$/Code$
+ $Code$[_grp, 2] setWaypointSpeed "FULL";$/Code$
- undefined / undefined
+ undefined / global
+ This scripting command must be executed on the server to work properly in multiplayer
- Object
+ Nothing
+
- get3DENConnections
+ waypointLoiterType
- Return all connections currently present on an entity.
+ Gets the waypoint loiter type. Waypoint uses format Waypoint.
- https://community.bistudio.com/wiki/get3DENConnections
+ https://community.bistudio.com/wiki/waypointLoiterType
- get3DENConnections EdenEntity
+ waypointLoiterType Waypoint
- get3DENConnections entity
+ waypointLoiterType Waypoint
-
+ $Code$_type = waypointLoiterType [groupOne, 1]$/Code$
+
undefined / undefined
- Array
+ String
+
- get3DENEntity
+ cadetMode
- Returns Eden Entity based on its unique ID. If the ID points to a layer, the ID will be returned instead.
+ Returns if the player is currently playing in cadet or veteran mode.
- https://community.bistudio.com/wiki/get3DENEntity
+ https://community.bistudio.com/wiki/cadetMode
- get3DENEntity Number
+ cadetMode
- get3DENEntity id
+ cadetMode
- $Code$myEntity = get3DENEntity 1$/Code$
+ $Code$? ( cadetMode ) : _AIsoldier setSkill 0.1 //sqs$/Code$
+
+ $Code$if ( cadetMode ) then {_AIsoldier setSkill 0.1}; //sqf$/Code$
undefined / undefined
+ (December 1, 2009)
+ In ArmA II, this command will return true if the difficulty level is set to "Recruit" or "Regular". It returns false for the "Veteran" and "Expert" difficulty levels.
- EdenEntity
+ Boolean
+
- get3DENEntityID
+ diag_activeScripts
- Returns unique index of an Eden Entity. This number remains the same even after saving and loading the scenario.
+ Returns 4 element array with numbers of currently running scripts in format: [ spawn -ed, execVM -ed, exec -ed, execFSM -ed]
- https://community.bistudio.com/wiki/get3DENEntityID
+ https://community.bistudio.com/wiki/diag_activeScripts
- get3DENEntityID EdenEntity
+ diag_activeScripts
- get3DENEntityID entity
+ diag_activeScripts
- $Code$myID = get3DENEntityID player$/Code$
+ $Code$hint str diag_activeScripts ; //[0,0,0,1]$/Code$
undefined / undefined
@@ -26558,59 +27898,71 @@
- Number
+ Array
+
- get3DENGrid
+ removeMPEventHandler
- Returns the grid increment for the given transformation type.
- Transformation types:
- Rotation - "r"
- Translation - "t"
- Scale - "s"
+ Removes MP event handler added by addMPEventHandler. Format of handler is [type,index]. Index is returned by addMPEventHandler. When any handler is removed, all handler indices highter than the deleted one should decremented
- https://community.bistudio.com/wiki/get3DENGrid
+ https://community.bistudio.com/wiki/removeMPEventHandler
- get3DENGrid String
+ Object removeMPEventHandler Array
- get3DENGrid type
+ unitName removeMPEventHandler [event, index]
- $Code$currentMovementIncrement = get3DENGrid "t";// returns 1$/Code$
+ $Code$player removeMPEventHandler ["killed", 0];$/Code$
- undefined / undefined
+ global / global
+ (25 July, 2011)
+ At least for MPKilled it needs to be executed where the target unit is local. The effect (the removal) is global.
- Number
+ Nothing
+
- get3DENIconsVisible
+ setTitleEffect
- Get visibility state of Eden Editor icons.
+ Defines the title effect via [Type, Effect, Text] where
+ 'Type' can be
+ "NONE",
+ "OBJECT",
+ 'Text' defines the shown object, a subclass of CfgTitles.
+ "RES"
+ 'Text' defines a resource class, a subclass of RscTitles.
+ "TEXT"
+ The 'Text' is shown as text itself. 'Effect' defines a subtype: "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT" or "WHITE IN".
- https://community.bistudio.com/wiki/get3DENIconsVisible
+ https://community.bistudio.com/wiki/setTitleEffect
- get3DENIconsVisible
+ Object setTitleEffect Array
+
+ Array setTitleEffect Array
- get3DENIconsVisible
+ trigger setTitleEffect [type, effect, text]
+
+ waypoint setTitleEffect [type, effect, text]
- $Code$if ( get3DENIconsVisible select 0) then { hint "Icons are visible in the map.";};$/Code$
+ $Code$_trigger setTitleEffect ["TEXT", "PLAIN DOWN", "Hello world."]$/Code$
undefined / undefined
@@ -26618,57 +27970,96 @@
- Array
+ Nothing - Nothing
+
- get3DENLayerEntities
+ ctrlMapScreenToWorld
- Return all entities and sub-layer in Eden Entity layer.
+ Convert screen coordinates in map to world coordinates.
- https://community.bistudio.com/wiki/get3DENLayerEntities
+ https://community.bistudio.com/wiki/ctrlMapScreenToWorld
- get3DENLayerEntities Number
+ Control ctrlMapScreenToWorld Array
- get3DENLayerEntities layerID
+ map ctrlMapScreenToWorld [x, y]
- $Code$_myLayer = -1 add3DENLayer "CTRG";
- player set3DENLayer _myLayer;
- _entities = get3DENLayerEntities _myLayer;$/Code$
+ $Code$_WorldCoord = _Control ctrlMapScreenToWorld _ScreenCoord$/Code$
+
+ $Code$_WorldCoord = _Control ctrlMapScreenToWorld [_x,_y]$/Code$
+
+ $Code$_WorldCoord = (findDisplay 12 displayCtrl 51) ctrlMapScreenToWorld [_x,_y]$/Code$
undefined / undefined
+ (April 6, 2007)
+ Notes:
+ You can get the screen coordinates by the UI Event Handlers onMouseButtonDown, onMouseButtonUp, onMouseButtonClick, onMouseButtonDblClick.
+ The return Array is in 2-D, you can use it with all set-position commands.
+ _x = returnArray select 0;
+ _y = returnArray select 1;
+
+ (December 2, 2009)
+ Notes:
+ In VBS2 1.23 this command does not seem to work properly. Therefore when defining UI Event Handlers onMouseButtonClick and onMouseButtonDblClick the functions onMapSingleClick and onDoubleClick (VBS2) can be used instead, these already provide access to the world coordinates of the click event.
+
+ The command parameters are screen position coordinates, which may not equate to to the map control's coordinates. A map control's screen coordinates and size can be found use the ctrlPosition command. This is an issue when using the Arma 3 in-game map, which is not fullscreen (all previous titles used full screen map controls, so map control coords did equate to screen coords).
+
+ (August 28, 2017)
+ This example creates a RscMapControl and hints you the [x,y] position where you clicked.
+ $Code$0 spawn {
+ disableSerialization;
+ _map = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscMapControl", -1];
+ _map ctrlSetPosition [0,0,1,1];
+ _map ctrlCommit 0;
+ _map ctrlAddEventHandler ["mouseButtonDown", {
+ _ctrl = _this select 0;
+ _x = _this select 2;
+ _y = _this select 3;
+ _pos = _ctrl ctrlMapScreenToWorld [_x, _y];
+ hint format ["pos: %1", _pos];
+ }];
+ };$/Code$
- Array
+ Array
+
- get3DENLinesVisible
+ isEqualTypeArray
- Get visibility state of Eden Editor lines.
+ Compares types of all elements of one array to types of all elements of another array.
- https://community.bistudio.com/wiki/get3DENLinesVisible
+ https://community.bistudio.com/wiki/isEqualTypeArray
- get3DENLinesVisible
+ Array isEqualTypeArray Array
- get3DENLinesVisible
+ arr1 isEqualTypeArray arr2
- $Code$if ( get3DENLinesVisible select 0) then { hint "Lines are visible in the map.";};$/Code$
+ $Code$_arr = [1,true,"three"];
+ _arr isEqualTypeArray [0,objNull,""]; // false
+ _arr isEqualTypeArray [0,false,""]; // true$/Code$
+
+ $Code$_arr = [1,2];
+ _arr isEqualTypeArray [0]; // false
+ _arr isEqualTypeArray [0,0]; // true
+ _arr isEqualTypeArray [0,0,0]; // false$/Code$
undefined / undefined
@@ -26676,398 +28067,450 @@
- Array
+ Boolean
+
- get3DENMissionAttribute
+ isRemoteExecuted
- Return value of scenario attribute.
- !
- Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
+ Returns true if the code context is being remote executed by remoteExec or remoteExecCall. In SP always returns false. See also isRemoteExecutedJIP
- https://community.bistudio.com/wiki/get3DENMissionAttribute
+ https://community.bistudio.com/wiki/isRemoteExecuted
- String get3DENMissionAttribute String
+ isRemoteExecuted
- section get3DENMissionAttribute class
+ isRemoteExecuted
- $Code$systemChat str ("Multiplayer" get3DENMissionAttribute "respawn");$/Code$
+ $Code$_remoteExecuted = isRemoteExecuted ;$/Code$
undefined / undefined
- (February 26, 2016)
- The class names of the vanilla sections are:
- General
- Scenario
- Environment
- Intel
- Multiplayer
- Multiplayer
- Garbage Collection
- GarbageCollection
- Preferences
- Preferences
+ (September 11, 2017)
+ NOTE : When remoteExec / remoteExecCall is called from a headless client to client, this will always return as false.
+ This effect also occurs with remoteExecutedOwner - it will return always return 0 from a headless client..
- Anything
+ Boolean
+
- get3DENMouseOver
+ everyContainer
- Returns the Eden Entity the mouse is hovering over in Eden Editor.
+ Returns array of all containers (uniforms, vests, backpacks) stored in given crate or vehicle. Used for accessing containers content stored in ammo box or ground holder.
- https://community.bistudio.com/wiki/get3DENMouseOver
+ https://community.bistudio.com/wiki/everyContainer
- get3DENMouseOver
+ everyContainer Object
- get3DENMouseOver
+ everyContainer box
- $Code$systemChat str get3DENMouseOver ;// returns: ["Object",B Alpha 1-1:1]$/Code$
+ $Code$everyContainer cursorTarget ;
+ // [
+ //["V_PlateCarrier1_rgr",2bc06b00# 163955: dummyweapon.p3d],
+ //["U_B_CombatUniform_mcam",2bc07900# 163954: dummyweapon.p3d]
+ //]$/Code$
undefined / undefined
+ (July 20, 2017)
+ The returned array is in the following format:
+ $Code$[
+ [containerClassname1, containerObject1],
+ [containerClassname2, containerObject2],
+ ....
+ [containerClassnameN, containerObjectN]
+ ]
+ $/Code$
+ Please do note that typeOf containerObjectN does not return containerClassnameN but rather the containerClass configured in config (usually "supplyN")
- Array
+ Array
+
- get3DENSelected
+ forEach
- Returns an array of all selected Eden Editor Entities, including groups, waypoints, and markers.
+ Executes the given command(s) on every item of an array.
+ The array items are represented by the magic variable _x. The array indices are represented by _forEachIndex.
+ In ArmA2 & VBS2, the variable _x is always local to the forEach block so it is safe to nest them.
- https://community.bistudio.com/wiki/get3DENSelected
+ https://community.bistudio.com/wiki/forEach
- get3DENSelected String
+ String/Code forEach Array
- get3DENSelected type
+ script forEach array
- $Code$systemChat str ( get3DENSelected "");
- /* outputs: [
- [B Alpha 2-1:1],//objects
- [B Alpha 2-1],//groups
- [164494: no shape ],//triggers
- [ No center Charlie 1-2:4],//logic
- [ [B Alpha 2-1,0] ],//waypoints
- ["Hotel_Whiskey"]//markers
- ]*/$/Code$
+ $Code${ _x setDammage 1; } forEach units group player ;$/Code$
- $Code$systemChat str ( get3DENSelected "object");
- // outputs: [B Alpha 2-1:1]$/Code$
+ $Code$// This command can also easily be used to execute a single command multiple times without respect to the array items.
+ { player addMagazine "M16"; } forEach [1, 2, 3, 4];$/Code$
+
+ $Code$// You can also use multiple commands in the same block.
+ {
+ _x setCaptive true ;
+ removeAllWeapons _x ;
+ doStop _x ;
+ } forEach units group this ;$/Code$
+
+ $Code$// To get the index of a forEach loop, use _forEachIndex.
+ { systemChat format ["%1", _forEachIndex];} forEach [1,2,3];
+ // Will return: "0", "1", "2" in systemChat messages.$/Code$
undefined / undefined
+ (July 20, 2010)
+ If arrays are used in forEach loops, _x uses them by reference, so any changes to _x will be applied to the original:
+ $Code$_arr1 = [1,2,3];
+ _arr2 = [6,7,8];
+ {_x set [1,"x"]} forEach [_arr1,_arr2];$/Code$
+ will change _arr1 to [1,"x",3], and _arr2 to [6,"x",8].
+
+ (August 29, 2014)
+ forEach returns any (the last passed value will be the return value or just Nothing, depends on the function called).
+ $Code$
+ _var = {_x} forEach [ nil,"s", objNull, configFile ]; // return bin\config.bin
+ _var = {_x setCaptive true } forEach allUnits ; // return nothing
+ $/Code$
+
+ (September 20, 2014)
+ Using the foreach loop, since there are no variable for the index like say the for-do loop, there is a variable that you can use to check the index of the foreach loop.
+ $Code${
+ if ( _forEachIndex == 1) then {
+ // Copilot
+ _x addUniform "U_B_Soldier_VR";
+ } else {
+ // Adams
+ [_x, "B_Soldier_TL_F"] call BIS_fnc_loadInventory ;
+ _x addUniform "U_B_Soldier_VR";
+ _x setIdentity "Bootcamp_B_Adams";
+ };
+ } forEach _crew;
+ $/Code$
+ So when the array is past from _crew to the loop, index 1 (which is the second element) is the copilot of the "B_Heli_Light_01_F" and he will get "U_B_Soldier_VR" as a uniform. While the pilot which is index 0 (first element), will get the same uniform but will get the loadout of "B_Soldier_TL_F" and the identity of "Bootcamp_B_Adams".
+
+ (January 2, 2015)
+ Using exitWith inside a forEach loop will make forEach actually return something, namely whatever the exitWith returns:
+ $Code$_result = {
+ if(_x isEqualTo 3) exitWith {"Hello"}
+ } forEach [1,2,3,4,5];
+ //_result = "Hello"$/Code$
+
+ (November 28, 2017)
+ Be careful when deleting ( deleteAt ) elements from an Array while you iterate over it.
+ _forEachIndex will not move to reflect your change.
+ The forEach code is doing the same as
+ $Code$
+ _forEachIndex = 0;
+ while {_forEachIndex count _array} do {
+ (_array select _forEachIndex) call code;
+ _forEachIndex = _forEachIndex + 1;
+ }
+ $/Code$
+ So if you delete your current element from the array the other elements will shift forward. Meaning you skip one element.
+ Example:
+ $Code$_array = [1,2,3,4,5,6];
+ {_array deleteAt _forEachIndex} forEach _array;
+ $/Code$
+ After the first iteration your Array will be [2,3,4,5,6] and the _forEachIndex will be 1.
+ So on next iteration you get the element at index 1 which will be 3. So you've just skipped the 2.
+ So in the end you will only iterate over 1,3 and 6
- Array
+ Anything
+
- getAimingCoef
+ menuExpand
- Get current aiming coefficient (higher ~ less precise, default is 1)
+ Expands given menu entry on given path and all its parents so entry is visible.
- https://community.bistudio.com/wiki/getAimingCoef
+ https://community.bistudio.com/wiki/menuExpand
- getAimingCoef Object
+ menuExpand Array
- getAimingCoef unit
+ menuExpand [idc, path]
- $Code$_coef = getAimingCoef player$/Code$
-
+
undefined / undefined
- Number
+ Nothing
+
- getAllHitPointsDamage
+ clearItemCargo
- Returns 3 arrays for easy cross reference: 1st - array of hit point names, 2nd - array of hit selection names, 3rd - array of damage values. All values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex. Levels of damage are:
- 0: no damage
- 1: full damage
+ Removes all items from ammo box (or any general weapon holder container).
- https://community.bistudio.com/wiki/getAllHitPointsDamage
+ https://community.bistudio.com/wiki/clearItemCargo
- getAllHitPointsDamage Object
+ clearItemCargo Object
- getAllHitPointsDamage entity
+ clearItemCargo box
- $Code$getAllHitPointsDamage player ;
- //[
- //["HitFace","HitNeck","HitHead","HitPelvis","HitAbdomen","HitDiaphragm","HitChest","HitBody","HitArms","HitHands","HitLegs"],
- //["","neck","head","pelvis","spine1","spine2","spine3","body","","hands","legs"],
- //[0,0.0939002,0.0319932,0.0858595,0.174491,1,1,0.168495,1,0.5,0.195907]
- //]$/Code$
+ $Code$clearItemCargo myBox;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getAllOwnedMines
+ magazinesTurret
- Gets all mine objects this unit has ownership over.
+ Returns all magazines of given turret. Use turret path [-1] for driver's turret. Alternatively, use magazinesAllTurrets
- https://community.bistudio.com/wiki/getAllOwnedMines
+ https://community.bistudio.com/wiki/magazinesTurret
- getAllOwnedMines Object
+ Object magazinesTurret Array
- getAllOwnedMines unit
+ vehicle magazinesTurret turretPath
- $Code$_mines = getAllOwnedMines player ;$/Code$
+ $Code$_mags = vehicle player magazinesTurret [0, 0];$/Code$
+
+ $Code$_mags = _tank magazinesTurret [0];$/Code$
- undefined / undefined
+ global / undefined
- Array
+ Array
+
- getAmmoCargo
+ setDriveOnPath
- Returns the amount of ammo resources in the cargo space of a rearm vehicle.
+ Sets the path to follow for AI driver
- https://community.bistudio.com/wiki/getAmmoCargo
+ https://community.bistudio.com/wiki/setDriveOnPath
- getAmmoCargo Object
+ Object setDriveOnPath Array
- getAmmoCargo vehicle
+ vehicleName setDriveOnPath [points]
- $Code$value = getAmmoCargo myVehicleName;$/Code$
+ $Code$myVehicle setDriveOnPath [[1000,10,1000],[1100,10,1000]]$/Code$
- global / undefined
+ undefined / undefined
- (December 22, 2014)
- If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.
- If the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite.
- Number
+ Nothing
+
- getAnimAimPrecision
+ lbIsSelected
- Returns aim precision for current animation
+ Check whether given row of the given listbox is selected.
- https://community.bistudio.com/wiki/getAnimAimPrecision
+ https://community.bistudio.com/wiki/lbIsSelected
- getAnimAimPrecision Object
+ Control lbIsSelected Number
- getAnimAimPrecision unit
+ control lbIsSelected index
- $Code$getAnimAimPrecision player;$/Code$
+ $Code$_selected = _control lbIsSelected 0;$/Code$
- undefined / undefined
+ local / local
+ More information on the LB command family can be found here
- Number
+ Boolean
+
- getAnimSpeedCoef
+ magazines
- Get coefficient for animation speed.
+ Returns array of type names of all vehicle's magazines.
+ When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazine to get this information for a currently loaded magazine.
- https://community.bistudio.com/wiki/getAnimSpeedCoef
+ https://community.bistudio.com/wiki/magazines
- getAnimSpeedCoef Object
+ magazines Object
- getAnimSpeedCoef unit
+ magazines vehicle
- $Code$getAnimSpeedCoef player ;$/Code$
+ $Code$_mags = magazines player$/Code$
undefined / undefined
+ In OFP v1.96, if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The ammo command can be used to check if a unit has any ammunition into it's last magazine.
+
+ (25 November 2011)
+ This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy.
- Number
+ Array
+
- getArray
+ triggerAttachVehicle
- Extract array from config entry.
+ Specifies the entity which will activate the selected trigger.
+ If [] is given, the trigger is decoupled from the assigned vehicle (example 2).
+ If the activation source is "VEHICLE", "GROUP", "LEADER" or "MEMBER", it's changed to "NONE".
+ If [vehicle] is given, the trigger is coupled to the vehicle or its group.
+ When the source is "GROUP", "LEADER" or "MEMBER", it's coupled to the group, otherwise it's coupled to the vehicle and the source is changed to "VEHICLE".
- https://community.bistudio.com/wiki/getArray
+ https://community.bistudio.com/wiki/triggerAttachVehicle
- getArray Config
+ Object triggerAttachVehicle Array
- getArray config
+ triggerName triggerAttachVehicle objects
- $Code$_array = getArray (configFile "CfgVehicles" "Thing" "threat")$/Code$
+ $Code$trigger triggerAttachVehicle [ player ];$/Code$
+
+ $Code$trigger triggerAttachVehicle [];$/Code$
- undefined / undefined
+ global / local
- (Mar 28, 2014)
- (ArmA3 1.14) It's recommended to use BIS_fnc_GetCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.
- Traditional workaround:
- $Code$
- _cfg = configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type"
- switch ( true ) do
- {
- case ( isNumber _cfg): { getNumber _cfg};
- case ( isText _cfg): { getText _cfg};
- case ( isArray _cfg): { getArray _cfg;};
- default { nil };
- };
- $/Code$
- Recommended workaround:
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_GetCfgData ;
- $/Code$
- To return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_GetCfgData.
- $Code$
- [( configFile "CannonFire" "LightExp"),"lifeTime",0] call BIS_fnc_returnConfigEntry ;//0.5
- $/Code$
- Array
+ Nothing
+
- getArtilleryAmmo
+ loadAbs
- Get list of all available magazines of artillery units on the list. Command returns only unique magazine types and doesn't contain any information about which unit has which magazine.
+ Returns current sum of mass from items stored in all unit's containers, linked items and weapons.
- https://community.bistudio.com/wiki/getArtilleryAmmo
+ https://community.bistudio.com/wiki/loadAbs
- getArtilleryAmmo Array
+ loadAbs Object
- getArtilleryAmmo [unit1, unit2, unit3]
+ loadAbs unit
- $Code$if ("8Rnd_82mm_Mo_Flare_white" in getArtilleryAmmo [
- _mortar1,
- _mortar2,
- _mortar3,
- _mortar4
- ]) then {
- hint "Sir, we have white flares, sir!";
- };$/Code$
+ $Code$// Player weight:
+ _weight = loadAbs player;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Number
+
- getArtilleryComputerSettings
+ setAutonomous
- Returns settings from artillery computer currently opened by player.
+ Sets UAV autonomous mode.
- https://community.bistudio.com/wiki/getArtilleryComputerSettings
+ https://community.bistudio.com/wiki/setAutonomous
- getArtilleryComputerSettings
+ Object setAutonomous Boolean
- getArtilleryComputerSettings
+ uav setAutonomous bool
- $Code$hint str getArtilleryComputerSettings ; //["Semi (medium)","HE Mortar Shells",0]$/Code$
+ $Code$uav setAutonomous true ;$/Code$
undefined / undefined
@@ -27075,150 +28518,168 @@
- Array
+ Nothing
+
- getArtilleryETA
+ camSetRelPos
- Returns ETA to the target in seconds for given artillery unit based on target position and used magazine, -1 if target can't be hit.
+ Sets the position of the given camera relative to its target, set with camSetTarget. Needs a call to camCommit to be conducted. Note, that since it sets relative position to the target, the camSetTarget command should be executed already, before camSetRelPos.
- https://community.bistudio.com/wiki/getArtilleryETA
+ https://community.bistudio.com/wiki/camSetRelPos
- Object getArtilleryETA Array
+ Object camSetRelPos Array
- unit getArtilleryETA [targetPosition, magazineType]
+ camera camSetRelPos position
- $Code$_mortar getArtilleryETA [ getPos _target, getArtilleryAmmo [_mortar] select 0];$/Code$
-
- $Code$_mortar getArtilleryETA [ position _target, currentMagazine _mortar];$/Code$
+ $Code$_cam camSetTarget _car;
+ _cam camSetRelPos [0,10,8];$/Code$
- global / undefined
+ local / local
- (August 26, 2013)
- To avoid wrong ETA readings, position of the target should only be obtained via position or getPos
+ The location of the camera will depend on the direction the target object is facing.
+ The camera does not bank with the target (bug?).
- Number
+ Nothing
+
- getAssignedCuratorLogic
+ armoryPoints
- Returns curator logic to which given player has access.
+ Returns, stored in [USERNAME].ArmaXProfile, value of armoryPoints entry. If the entry doesn't exist, it returns 0.
- https://community.bistudio.com/wiki/getAssignedCuratorLogic
+ https://community.bistudio.com/wiki/armoryPoints
- getAssignedCuratorLogic Object
+ armoryPoints
- getAssignedCuratorLogic player
+ armoryPoints
- $Code$( getAssignedCuratorLogic player ) removeCuratorEditableObjects [ allDead, true ];$/Code$
+ $Code$_points = armoryPoints ;$/Code$
undefined / undefined
- (August 17, 2014)
- This command will return objNull if used immediately after the curator logic is assigned to the unit in question (this includes at mission time 0). To avoid problems use the following beforehand: $Code$ waitUntil {! isNull ( getAssignedCuratorLogic unit)};$/Code$
- Object
+ Number
+
- getAssignedCuratorUnit
+ tvSetPictureRightColorSelected
- Returns unit assigned to curator logic.
+ Sets the color of the right picture of a tree item defined by path when item is selected
- https://community.bistudio.com/wiki/getAssignedCuratorUnit
+ https://community.bistudio.com/wiki/tvSetPictureRightColorSelected
- getAssignedCuratorUnit Object
+ Control tvSetPictureRightColorSelected Array
- getAssignedCuratorUnit curatorObj
+ control tvSetPictureRightColorSelected [path, color]
- $Code$_curatorUnit = getAssignedCuratorUnit ( allCurators select 0);
- _curatorUnit joinAs [ createGroup civilian, 0];$/Code$
+ $Code$_control tvSetPictureRightColorSelected [[0], [1,0,1,1]]$/Code$
undefined / undefined
- (August 17, 2014)
- This command will return objNull if used immediately after the curator unit is assigned to the logic in question (this includes at mission time 0). To avoid problems use the following beforehand: $Code$ waitUntil {! isNull ( getAssignedCuratorUnit logic)};$/Code$
- Object
+ Nothing
+
- getBackpackCargo
+ setVehiclePosition
- Returns all backpack types and count from the cargo space
+ Moves the object to a given position (same as createVehicle placement algorithm). Uses either the position that's defined by the position param, or one of the marker positions from the markers array. The object is placed inside a circle with position as its center and placement as its radius. The type of placement could also be controlled with special.
+ If position is in water and vehicle can float, it is placed on water surface, otherwise it is placed on the ground, even if ground is under water. If roof surfaces support walking, units will be placed on roofs if such position is given.
- https://community.bistudio.com/wiki/getBackpackCargo
+ https://community.bistudio.com/wiki/setVehiclePosition
- getBackpackCargo Object
+ Object setVehiclePosition Array
- getBackpackCargo object
+ object setVehiclePosition [position, markers, placement, special]
- $Code$_content = getBackpackCargo carName;$/Code$
+ $Code$player setVehiclePosition [[1000,2000], ["Pos1","Pos2","Pos3"], 0, "CAN_COLLIDE"];
+ // Will place the player at either [1000,2000], or one of the three markers positions.$/Code$
- $Code$_content = getBackpackCargo ammoBoxName;$/Code$
+ $Code$heli setVehiclePosition [ player, [], 0, "FLY"];$/Code$
+
+ $Code$_cam = "camera" camCreate [0,0,0];
+ _cam setDir random 360;
+ _cam setVehiclePosition [[5000,5000], [], 1000, "NONE"];
+ _cam setPosWorld ( getPosWorld _cam vectorAdd [0,0,1.8]);
+ _cam cameraEffect ["Internal", "Back"];$/Code$
+
+ $Code$private _tablePos = player getRelPos [3, 0];
+ private _table = "Land_CampingTable_F" createVehicle [0,0,0];
+ private _laptop = "Land_Laptop_unfolded_F" createVehicle [0,0,0];
+ _table setPos _tablePos;
+ _laptop setVehiclePosition [_tablePos vectorAdd [0.5, 0.2, 10], [], 0, "CAN_COLLIDE"];
+ _laptop attachTo [_table];$/Code$
- undefined / undefined
+ global / global
+ (June 24, 2015)
+ If you need to set direction as well, set it before using setVehiclePosition. The command will use existing dir of the object for its calculations.
+ $Code$ player setDir random 360;
+ player setVehiclePosition [ player, [], 100, "none"];$/Code$
- Array
+ Boolean
+
- getBleedingRemaining
+ removeCuratorCameraArea
- Returns how many seconds injured unit will continue leaving blood trail. If unit damage is 0.1, the return value is 0 and unit doesn't leave any blood trail. Use setBleedingRemaining to set different remaining time.
+ Removes curator camera area.
- https://community.bistudio.com/wiki/getBleedingRemaining
+ https://community.bistudio.com/wiki/removeCuratorCameraArea
- getBleedingRemaining Object
+ Object removeCuratorCameraArea Number
- getBleedingRemaining unit
+ curatorObj removeCuratorCameraArea cameraAreaID
- $Code$_bleedingRemaining = getBleedingRemaining _unit;$/Code$
+ $Code$myCurator removeCuratorCameraArea 3;$/Code$
undefined / undefined
@@ -27226,332 +28687,270 @@
- Number
+ Nothing
+
- getBurningValue
+ modelToWorldWorld
- Returns amount of damage from fire.
+ Converts position from object model space to world space (usable by setPosWorld for example).
- https://community.bistudio.com/wiki/getBurningValue
+ https://community.bistudio.com/wiki/modelToWorldWorld
- getBurningValue Object
+ Object modelToWorldWorld Array
- getBurningValue unit
+ obj modelToWorldWorld modelPos
-
+ $Code$( getPos player ) modelToWorldWorld [0,1,0]$/Code$
+
undefined / undefined
+ (May 28, 2017)
+ This command produces identical result to modelToWorld command used in conjunction with AGLToASL
+ $Code$obj modelToWorldWorld [1,2,3] isEqualTo AGLToASL (obj modelToWorld [1,2,3]); // true$/Code$
- Number
+ Array
+
- getCameraViewDirection
+ ropeAttachTo
- Returns the direction unit is looking in render time scope. While for AI the origin for the view direction vector can be taken from eyePos unit, for human player the origin should be taken from player camera position positionCameraToWorld [0,0,0]
+ Attach vehicle to rope with optional offset
- https://community.bistudio.com/wiki/getCameraViewDirection
+ https://community.bistudio.com/wiki/ropeAttachTo
- getCameraViewDirection Object
+ Array ropeAttachTo Object
- getCameraViewDirection unit
+ [veh, toPoint, ropeEndDownDir] ropeAttachTo rope
- $Code$// Draw AI eye direction (green), weapon direction (red) and camera direction (blue) in 3D:
- bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"];
- bob setVehiclePosition [ player modelToWorld [0,100,0], [], 0, "NONE"];
- onEachFrame
- {
- _beg = ASLToAGL eyePos bob;
- _endE = (_beg vectorAdd ( eyeDirection bob vectorMultiply 100));
- drawLine3D [ _beg, _endE, [0,1,0,1]];
- _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100));
- drawLine3D [_beg, _endW, [1,0,0,1]];
- _endV = (_beg vectorAdd ( getCameraViewDirection bob vectorMultiply 100));
- drawLine3D [_beg, _endV, [0,0,1,1]];
- };$/Code$
+ $Code$[veh1,[0,0,0],[0,0,-1]] ropeAttachTo ( ropes heli1 select 0);$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getCargoIndex
+ saveJoysticks
- Returns index of the unit in cargo. 0,1,2... or -1 if not in cargo.
+ Saves joysticks key mappings into the joysticks.cfg file. Engine add these joysticks to the Joystick Scheme mapping dialog in options controls section.
- https://community.bistudio.com/wiki/getCargoIndex
+ https://community.bistudio.com/wiki/saveJoysticks
- Object getCargoIndex Object
+ saveJoysticks
- vehicle getCargoIndex unit
+ saveJoysticks
- $Code$player moveInCargo heli;
- hint str (heli getCargoIndex player );$/Code$
-
+
- global / undefined
+ undefined / undefined
- Number
+ Nothing
+
- getCenterOfMass
+ lbSort
- Returns center of mass of an object.
+ Sorts listbox entries alphabetically ascending by their lbText
- https://community.bistudio.com/wiki/getCenterOfMass
+ https://community.bistudio.com/wiki/lbSort
- getCenterOfMass Object
+ lbSort Control
+
+ lbSort Array
+
+ lbSort Number
- getCenterOfMass object
+ lbSort control
+
+ lbSort [control, sortOrder]
+
+ lbSort idc
+
+ lbSort [idc, sortOrder]
- $Code$_com = getCenterOfMass _myCar;$/Code$
+ $Code$lbSort _myControl;$/Code$
+
+ $Code$lbSort [_myControl, "DESC"];$/Code$
+
+ $Code$lbSort 101;$/Code$
+
+ $Code$lbSort [101, "DESC"];$/Code$
- global / undefined
+ undefined / undefined
+ More information on the LB command family can be found here
- Array
+ Nothing - Nothing - Nothing
+
- getClientStateNumber
+ spawn
- Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
- getClientStateNumber
- getClientState
- 0
- "NONE"
- No client (or singleplayer)
- 1
- "CREATED"
- Client is created
- 2
- "CONNECTED"
- Client is connected to server, message formats are registered
- 3
- "LOGGED IN"
- Identity is created
- 4
- "MISSION SELECTED"
- Mission is selected
- 5
- "MISSION ASKED"
- Server was asked to send / not send mission
- 6
- "ROLE ASSIGNED"
- Role was assigned (and confirmed)
- 7
- "MISSION RECEIVED"
- Mission received
- 8
- "GAME LOADED"
- Island loaded, vehicles received
- 9
- "BRIEFING SHOWN"
- Briefing was displayed
- 10
- "BRIEFING READ"
- Ready to play mission
- 11
- "GAME FINISHED"
- Game was finished
- 12
- "DEBRIEFING READ"
- Debriefing read, ready to continue with next mission
+ Adds given code to the scheduler. Exactly when the code will be executed is unknown, it depends on how busy is the engine and how filled up is the scheduler. Therefore spawn does not wait for the supplied code to finish, instead, spawn returns a Script handle to the scheduler task. scriptDone command can be used to check the code completion. Additional arguments are passed to the code in local variable _this. Since Arma 3 v1.55 the script handle also exists inside the code in _thisScript variable.
- https://community.bistudio.com/wiki/getClientStateNumber
+ https://community.bistudio.com/wiki/spawn
- getClientStateNumber
+ Any_Value spawn Code
- getClientStateNumber
+ arguments spawn code
- $Code$_state = getClientStateNumber ;$/Code$
+ $Code$_handle = [] spawn { player globalChat "Hello world!"};$/Code$
- $Code$_inGame = getClientStateNumber 8;$/Code$
+ $Code$// There is no guarantee that spawned scripts will be executed in the same order they spawned:
+ for "_i" from 0 to 100 do
+ {
+ _null = _i spawn
+ {
+ diag_log _this;
+ };
+ };
+ // // Result: 51,1,2...49,50,0,52,53...100$/Code$
undefined / undefined
+ (5 March, 2009)
+ spawn cannot call other local functions on the same scope as itself.
+ It can, however, call other global functions:
+ $Code$_addOne = {TST=TST+1};
+ TST_addOne = {TST=TST+1};
+ _add = {
+ TST=TST+1;
+ player sideChat format ["added: %1",TST];
+ [] call _addOne;
+ player sideChat format ["called local: %1",TST];
+ [] call TST_addOne;
+ player sideChat format ["called global: %1",TST];
+ };
+ TST=0;
+ [] call _add;
+ [] spawn _add;$/Code$
+ The call of _addOne from the spawned function does not do anything.
+
+ (October 21, 2014)
+ spawn requires a script handle when used in the 2D editor. (A3)
+ In scripts and in the debug console, it is not required, but very useful for keeping track of running scripts. Having a script handle also makes it easy to terminate scripts at any time.
+ Since spawn creates a new scheduled environment, having an excess of open threads can make the scheduler queue extremely long, significantly increasing the execution time of each thread. (it takes an extremely large amount of threads, though)
+
+ (August 25, 2015)
+ If you want to call a local function which has NOT been created inside a spawned function, then do this:
+ $Code$_fncOne = { systemChat"This is _fncOne" }; _fncTwo = { call (_this select 0) }; [_fncOne] spawn _fncTwo;$/Code$
- Number
+ Script_Handle
+
- getClientState
+ groupChat
- Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
- getClientStateNumber
- getClientState
- 0
- "NONE"
- No client (or singleplayer)
- 1
- "CREATED"
- Client is created
- 2
- "CONNECTED"
- Client is connected to server, message formats are registered
- 3
- "LOGGED IN"
- Identity is created
- 4
- "MISSION SELECTED"
- Mission is selected
- 5
- "MISSION ASKED"
- Server was asked to send / not send mission
- 6
- "ROLE ASSIGNED"
- Role was assigned (and confirmed)
- 7
- "MISSION RECEIVED"
- Mission received
- 8
- "GAME LOADED"
- Island loaded, vehicles received
- 9
- "BRIEFING SHOWN"
- Briefing was displayed
- 10
- "BRIEFING READ"
- Ready to play mission
- 11
- "GAME FINISHED"
- Game was finished
- 12
- "DEBRIEFING READ"
- Debriefing read, ready to continue with next mission
+ Types text to the group radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
- https://community.bistudio.com/wiki/getClientState
+ https://community.bistudio.com/wiki/groupChat
- getClientState
+ Object groupChat String
- getClientState
+ unitName groupChat chatText
- $Code$_state = getClientState ;$/Code$
+ $Code$_soldierOne groupChat "Show this text";$/Code$
- $Code$if ( getClientState == "BRIEFING READ") then { hint "Let the show begin!"};$/Code$
+ $Code$driver vehicle player sideChat "sideChat";
+ driver vehicle player globalChat "globalChat";
+ driver vehicle player groupChat "groupChat";
+ vehicle player vehicleChat "vehicleChat";
+ driver vehicle player commandChat "commandChat";
+ driver vehicle player customChat [1, "customChat"];
+ systemChat "systemChat";$/Code$
- undefined / undefined
+ global / local
- String
+ Nothing
+
- getCompatiblePylonMagazines
+ boundingBoxReal
- Get array of compatible pylon magazines
+ Returns a bounding box of given object in model coordinates space. This command is similar to boundingBox but gives more precise measurements.
- https://community.bistudio.com/wiki/getCompatiblePylonMagazines
+ https://community.bistudio.com/wiki/boundingBoxReal
- Object getCompatiblePylonMagazines Number
-
- String getCompatiblePylonMagazines Number
+ boundingBoxReal Object
- vehicle getCompatiblePylonMagazines pylon
-
- vehicleClass getCompatiblePylonMagazines pylon
+ boundingBoxReal obj
- $Code$vehicle player getCompatiblePylonMagazines 0; // returns array of arrays containing all compatible magazines$/Code$
-
- $Code$"Plane_Fighter_01_Base_F" getCompatiblePylonMagazines 3; // returns array of compatible magazines for the 3rd pylon$/Code$
-
- $Code$jet1 getCompatiblePylonMagazines "pylon1"; // returns array of compatible magazines for the 1st pylon$/Code$
-
- $Code$// Get all pylon names for "Plane_Fighter_01_Base_F"
- private _allPylons = "true" configClasses (
- configFile
-
- "CfgVehicles"
-
- "Plane_Fighter_01_Base_F"
-
- "Components"
-
- "TransportPylonsComponent"
-
- "pylons"
- ) apply { configName _x};
- hint str _allPylons;
- /* return:
- [
- "pylon1",
- "pylon2",
- "pylon3",
- "pylon4",
- "pylonBayRight1",
- "pylonBayLeft1",
- "pylonBayCenter1",
- "pylonBayCenter2",
- "pylonBayCenter3",
- "pylonBayCenter4",
- "pylonBayCenter5",
- "pylonBayCenter6"
- ]*/$/Code$
+ $Code$_bbr = boundingBoxReal vehicle player ;
+ _p1 = _bbr select 0;
+ _p2 = _bbr select 1;
+ _maxWidth = abs ((_p2 select 0) - (_p1 select 0));
+ _maxLength = abs ((_p2 select 1) - (_p1 select 1));
+ _maxHeight = abs ((_p2 select 2) - (_p1 select 2));$/Code$
undefined / undefined
@@ -27559,56 +28958,59 @@
- Array - Array
+ Array
+
- getConnectedUAV
+ diag_frameNo
- Returns UAV if unit has connection to some UAV.
+ Returns number of frame currently displayed.
- https://community.bistudio.com/wiki/getConnectedUAV
+ https://community.bistudio.com/wiki/diag_frameNo
- getConnectedUAV Object
+ diag_frameNo
- getConnectedUAV unit
+ diag_frameNo
-
+ $Code$_currFrameNo = diag_frameNo ;$/Code$
+
undefined / undefined
+ (November 19, 2014)
+ Avoid using hard-coded frame-specific events, the total amount of drawn frames is persistent across all missions. It does not get reset until the game is closed.
- Object
+ Number
+
- getContainerMaxLoad
+ backpack
- Returns max load value of given container. Currently works only with uniform, vest and backpack classes.
+ Returns a class of a backpack.
- https://community.bistudio.com/wiki/getContainerMaxLoad
+ https://community.bistudio.com/wiki/backpack
- getContainerMaxLoad String
+ backpack Object
- getContainerMaxLoad containerClass
+ backpack unit
- $Code$_maxLoadUniform = getContainerMaxLoad uniform player ;
- _maxLoadVest = getContainerMaxLoad vest player ;
- _maxLoadBackpack = getContainerMaxLoad backpack player ;$/Code$
+ $Code$_classname = backpack player ;$/Code$
undefined / undefined
@@ -27616,170 +29018,158 @@
- Number
+ String
+
- getCursorObjectParams
+ addScore
- Returns object and named selections under cursor and distance to object's surface (to the point cursor points at). If object surface is further away then 50 meters, selections are always an empty array and distance is 1e10 (10^10).
+ Add a number to the score of a unit. This score is shown in multiplayer in the "I" ("P" in Arma 3) screen. Negative values will remove from the score. Server execution only.
+ See also: Arma_3:_Event_Handlers#HandleScore
- https://community.bistudio.com/wiki/getCursorObjectParams
+ https://community.bistudio.com/wiki/addScore
- getCursorObjectParams
+ Object addScore Number
- getCursorObjectParams
+ unit addScore score
- $Code$hint str getCursorObjectParams ;$/Code$
+ $Code$unit addScore 10;$/Code$
- undefined / undefined
+ global / global
+ This scripting command must be executed on the server to work properly in multiplayer
- Array
+ Nothing
+
- getCustomAimCoef
+ expectedDestination
- Returns aimPrecision from animation state with custom value that will directly affects weapon sway size and speed.
+ Return expected destination of unit as an array with format: [ Position, planningMode, forceReplan].
- https://community.bistudio.com/wiki/getCustomAimCoef
+ https://community.bistudio.com/wiki/expectedDestination
- getCustomAimCoef Object
+ expectedDestination Object
- getCustomAimCoef unit
+ expectedDestination person
- $Code$_coef = getCustomAimCoef player$/Code$
-
+
- global / undefined
+ local / undefined
+ (16:24, 3 March 2007 (CET))
+ For AI units I have found the following values: planningMode is "LEADER PLANNED" when the unit is ordered by the group leader to go somewhere or if the unit is the group leader and it follows a waypoint. Otherwise planningMode it is "DoNotPlan". Units moving in formation have "DoNotPlan" as long as they don't receive orders by the group leader. Units also have "DoNotPlan" when they don't move. Units executing special formation tasks like engaging or return to formation have "FORMATION PLANNED" as long they haven't fulfilled the task.
- Number
+ Array
+
- getDLCs
+ drawLine
- Returns array of appIDs of DLCs. Use filter param to get specific type of DLCs:
- 0 - all
- 1 - owned
- 2 - not owned
+ Draw a line on the map.
- https://community.bistudio.com/wiki/getDLCs
+ https://community.bistudio.com/wiki/drawLine
- getDLCs Number
+ Control drawLine Array
- getDLCs filter
+ map drawLine [position1, position2, color]
- $Code$_ownedDLCs = getDLCs 1;$/Code$
-
- $Code$// Is the Karts DLC owned by this client?
- hintSilent str (288520 in ( getDLCs 1));$/Code$
-
+
undefined / undefined
- (May 30, 2014)
- Current list of IDs that correspond to the available DLCs:
- 275700 - Arma 3 Zeus
- 249860 - Arma 3 Soundtrack
- 304400 - Arma 3 DLC Bundle
- 249861 - Arma 3 Maps
- 249862 - Arma 3 Tactical Guide
- 288520 - Arma 3 Karts
- 304380 - Arma 3 Helicopters
- 332350 - Arma 3 Marksmen
-
- (April 7, 2015)
- To add to the note above, app ID can be found in CfgMods. Here is an example path from zeus using the Splendid Config Viewer:
- $Code$ configFile "CfgMods" "Curator" "appId"$/Code$
- This method can be used to find app IDs without having to find a list like the one above.
- I am also pretty sure you are able to define your own app ID for your own mods using this method.
-
- (July 1, 2016)
- The required DLC-IDs equal to the Steam App-IDs of each obtainable DLC.
- To extend Sniperwolfs list:
- 395180 - Arma 3 Apex
+ (March 22, 2014)
+ Map example: $Code$( findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw","
+ ( _this select 0) drawLine [
+ getPos player,
+ [0,0,0],
+ [0,0,1,1]
+ ];
+ "];$/Code$
+ Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
- Array
+ Nothing
+
- getDammage
+ addTorque
- Returns the object damage in the range from 0 to 1. Alias of damage.
+ Applies torque (rotation momentum) to the center of mass of the given object. Torque force is defined as vector [x, y, z] applied in world space. If you need to define torque in model space, convert the torque vector first by vectorModelToWorld or vectorModelToWorldVisual command. The torque applied as impulse. Diagram below explain which way the object would rotate. For more information see NVIDIA docs
- https://community.bistudio.com/wiki/getDammage
+ https://community.bistudio.com/wiki/addTorque
- getDammage Object
+ Object addTorque Array
- getDammage object
+ object addTorque torque
- $Code$_damage = getDammage player ;$/Code$
+ $Code$// Apply torque [1000,0,0] to object not factoring object positioning:
+ _wheel addTorque [1000,0,0];$/Code$
+
+ $Code$// Apply torque [1000,0,0] relative to object:
+ _wheel addTorque (_wheel vectorModelToWorld [1000,0,0]);$/Code$
- undefined / undefined
+ global / global
- (, May 9, 2011)
- getDammage and damage works fine when used on damaged vehicles after a repair from a repairtruck when used in A2 CO patch 1.59.
-
- Vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the damage command is called. They return a value equal to or less than 0.09.
- Consequently any vehicle flagged as immobile (as indicated by the canMove command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use setDamage 0 on the vehicle in question, to allow the AI to board.
-
- In OFP 1.96, it is possible for a unit to be dead and still return a getDammage value well below 1. Use ! alive to check if a unit is dead.
- Number
+ Nothing
+
- getDescription
+ drawLink
- Returns the string representation of unit as an four slots array.
+ The editor will draw a line between the two specified editor objects. Line type can be LINE or ARROW.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/getDescription
+ https://community.bistudio.com/wiki/drawLink
- getDescription Object
+ Control drawLink Array
- getDescription unit
+ map drawLink [from,to,param type,line type,color]
@@ -27787,371 +29177,478 @@
undefined / undefined
- Return value fixed in revision 0.51.103185.
-
- (September 21, 2014)
- Pretty useless command tbh, return is something like this:
- ["B_Soldier_F","Combat Fatigues (MTP)","Carrier Lite (Green)",""] or ["ERROR","ERROR","ERROR","ERROR"]
- Array
+ Nothing
+
- getDirVisual
+ setCameraInterest
- Returns object's heading in the range from 0 to 360 in render time scope.
+ Set camera interest for given entity. Camera interest is by default 0. Any unit which is speaking has its camera interest raised to 50. Camera interest is used to focus camera to control depth of field in cutscenes. Combination of camera interest, unit position of the screen, unit movement, unit type, and some other properties is used to determine which unit to focus at. Higher camera interest increases the chance of the unit being focused.
- https://community.bistudio.com/wiki/getDirVisual
+ https://community.bistudio.com/wiki/setCameraInterest
- getDirVisual Object
+ Object setCameraInterest Number
- getDirVisual object
+ entity setCameraInterest interest
- $Code$_dir = getDirVisual player ;$/Code$
+ $Code$_soldier setCameraInterest 50;$/Code$
- global / undefined
+ undefined / undefined
- Number
+ Nothing
+
- getDir
+ selectionPosition
- Returns the object heading in the range from 0 to 360.
- Since Arma 3 v1.55.133361, an alternative syntax is added that allows to get heading from one object or position to another object or position, the equivalent of BIS_fnc_dirTo
+ Search for selection in the object model (first in the memory level, then in geometry LODs).
+ Returns position in model space. In A1 it returns the initial position of the selection, in A2/3 position of the selection (e.g. when it is animated) in render time scope. If a selection does not exist [0,0,0] is returned.
- https://community.bistudio.com/wiki/getDir
+ https://community.bistudio.com/wiki/selectionPosition
- getDir Object
+ Object selectionPosition String
- Object/Position2D/Position3D getDir Object/Position2D/Position3D
+ Object selectionPosition Array
- getDir object
+ object selectionPosition selectionName
- pos1 getDir pos2
+ object selectionPosition [selectionName, LODName]
- $Code$_azimuth = getDir player ;$/Code$
+ $Code$_inModelPosition = player selectionPosition "head_hit";$/Code$
- $Code$_azimuth = player getDir tank;$/Code$
+ $Code$_inModelPosition = player selectionPosition "pelvis";$/Code$
+
+ $Code$_inModelPosition = player selectionPosition "head";$/Code$
+
+ $Code$_inModelPosition = player selectionPosition "camera";$/Code$
global / undefined
- (October 23, 2013)
- Be careful when using this command in conjunction with BIS_fnc_rotateVector2D ; the latter rotates vectors counterclockwise (mathematically correct), while getDir returns a clockwise angle.
- To counter this, simply negate the output of getDir:
- $Code$[[0,1,0], -( getDir _object ) ] call BIS_fnc_rotateVector2D ;$/Code$
+ (January 5, 2007)
+ To know more selections simply create an eventHandler damage on an object.
+
+ (July 29, 2015)
+ Since 1.49.131660, you can use an alternative syntax:
+ object selectionPosition [selectionName, lodName]
+ lodName: "Memory", "Geometry", "FireGeometry", "LandContact", "HitPoints"
+ If the given selectionName is not found in the given lod, [0,0,0] is returned.
+
+ (June 25, 2017)
+ Do use the filter that comes with Alt Syntax to suit your needs. For example player has 3 selections called "head" and their selectionPositions are quite different from each other:
+ $Code$ player selectionPosition ["head", "Memory"]; // [0.173798,0.330415,1.37783]
+ player selectionPosition ["head", "FireGeometry"]; // [0.14375,0.206039,1.44689]
+ player selectionPosition ["head", "HitPoints"]; // [0.144257,0.306769,1.53471]$/Code$
- Number - Number
+ Array - Array
+
- getEditorCamera
+ joinAsSilent
- Fetches a reference to the mission editor camera.
- i
- Some Old Editor Command
+ Joins the unit to the given group, if position id is available, this one is used. Avoid any radio communication related to joining.
- https://community.bistudio.com/wiki/getEditorCamera
+ https://community.bistudio.com/wiki/joinAsSilent
- getEditorCamera Control
+ Object joinAsSilent Array
- getEditorCamera map
+ unit joinAsSilent [group, id]
-
+ $Code$player joinAsSilent [_group, 4];$/Code$
+
+ $Code$// To get the position id:
+ getUnitPositionId = {
+ private ["_vvn", "_str"];
+ _vvn = vehicleVarName _this;
+ _this setVehicleVarName "";
+ _str = str _this;
+ _this setVehicleVarName _vvn;
+ parseNumber (_str select [(_str find ":") + 1])
+ };
+ player joinAsSilent [ createGroup west, 5];
+ _id = player call getUnitPositionId;
+ hint str _id; //5$/Code$
+
- undefined / undefined
+ global / global
+ I haven't done a thorough test but this function doesn't seem to work for Civilians, use joinSilent instead.
- Object
+ Nothing
+
- getEditorMode
+ showMap
- Returns the current mode of the editor.
- i
- Some Old Editor Command
+ Enable Map (default true )
- https://community.bistudio.com/wiki/getEditorMode
+ https://community.bistudio.com/wiki/showMap
- getEditorMode Control
+ showMap Boolean
- getEditorMode map
+ showMap show
-
+ $Code$showMap false$/Code$
+
undefined / undefined
+ In ArmA 2 - This command no longer works. The map is now an inventory item. It is kept under the weapon class name "itemmap".
+ Example: $Code$unitname removeweapon "itemmap"$/Code$ To add again use $Code$unitname addweapon "itemmap"$/Code$.
- String
+ Nothing
+
- getEditorObjectScope
+ allUnits
- Returns the editor object scope of the specified editor object.
- i
- Some Old Editor Command
+ Return a list of all units (all persons except agents) created on the following sides east, west, resistance / independent and civilian only. Does not contain units of sideLogic. Dead units and units awaiting for respawn are also excluded.
- https://community.bistudio.com/wiki/getEditorObjectScope
+ https://community.bistudio.com/wiki/allUnits
- Control getEditorObjectScope String
+ allUnits
- map getEditorObjectScope object
+ allUnits
-
+ $Code${_x setDamage 0.5; _x groupChat "Braaains"} forEach allUnits ;$/Code$
+
undefined / undefined
+ (July 15, 2011)
+ It returns infantry outside and inside vehicles.
- String
+ Array
+
- getElevationOffset
+ parseNumber
- Returns the map elevation offset from [map]/config.cpp.
- Returns 0 if there's no elevationOffset defined in the config of the current world.
+ An SQF equivalent of C++ atof function. Parses the string, interpreting its content as a floating point number.
+ The command first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of floating point literals, and interprets them as a numerical value. The rest of the string after the last valid character is ignored and has no effect on the behavior of this command.
+ If the first sequence of non-whitespace characters in string does not form a valid floating-point number, or if no such sequence exists because either string is empty or contains only whitespace characters, no conversion is performed and the command returns 0.
- https://community.bistudio.com/wiki/getElevationOffset
+ https://community.bistudio.com/wiki/parseNumber
- getElevationOffset
+ parseNumber String
+
+ parseNumber Boolean
- getElevationOffset
+ parseNumber string
+
+ parseNumber boolean
- $Code$_offset = getElevationOffset ;$/Code$
+ $Code$_number = parseNumber "0.125"; //0.125$/Code$
+
+ $Code$_number = parseNumber "2 abc"; //2$/Code$
+
+ $Code$_number = parseNumber true ; //1$/Code$
undefined / undefined
+ (Aug 28, 2014)
+ (A3 1.26)It only detects the first occurrence of a number in the string, return 0 by default.
+ $Code$ parseNumber "2s4f"; // 2
+ parseNumber "s2f4"; // 0$/Code$
+ parse config or code, currently BIS_fnc_parseNumber, occurrence is only limited with number, return -1 by default.
+ $Code${s3s4f} call BIS_fnc_parseNumber ; // -1$/Code$
- Number
+ Number - Number
+
- getFSMVariable
+ createVehicleLocal
- Return the value of variable in the variable space of given FSM. The FSM handle is the number returned by the execFSM command.
+ Creates an object of the given type. Created object is not transferred through network in MP games. netId of such vehicle in multiplayer will be "0:0". To disable local vehicle creation, use CfgDisabledCommands to blacklist this command
- https://community.bistudio.com/wiki/getFSMVariable
+ https://community.bistudio.com/wiki/createVehicleLocal
- Number getFSMVariable String
-
- Number getFSMVariable Array
+ String createVehicleLocal Position
- FSMhandle getFSMVariable name
-
- FSMhandle getFSMVariable [name, defaultValue]
+ type createVehicleLocal position
- $Code$_handle getFSMVariable "_foo";$/Code$
-
- $Code$_handle getFSMVariable ["_foo", 123];$/Code$
+ $Code$_lightsource = "#lightpoint" createVehicleLocal _pos;$/Code$
- undefined / undefined
+ undefined / local
+ (07:18, 5 June 2008 (CEST))
+ If the object that is created is of the type ammo, then it will created on all clients ( tested only on VBS2 ).
+
+ (18:04, 5 September 2013 (CEST))
+ Indeed the type of Ammo is transfered to ALL clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on Arma 1 - Arma 2 OA (latest patch).
- Anything - Anything
+ Object
+
- getFatigue
+ captiveNum
- Returns fatigue of given unit.
+ Checks whether the unit is a captive. If the unit is a vehicle, its commander is checked instead.
+ If a unit's captivity level was set as a Boolean, then the returned number is either 0 (for false ) or 1 (for true ).
- https://community.bistudio.com/wiki/getFatigue
+ https://community.bistudio.com/wiki/captiveNum
- getFatigue Object
+ captiveNum Object
- getFatigue unit
+ captiveNum unit
- $Code$value = getFatigue player ;$/Code$
+ $Code$_captivity = captiveNum _unit;$/Code$
- $Code$if ( getFatigue player 0.5) then { player sideChat "I'm good to go!" };$/Code$
+ $Code$_unit setCaptive 1024;
+ hint str captive _unit; //true
+ hint str captiveNum _unit; //1024$/Code$
global / undefined
- getFatigue can be applied to remote unit however it will not read the changes made to unit's fatigue with setFatigue command. Only natural changes resulting from unit moving will be counted. When applied to local unit, it will read resulting value of natural fatigue combined with artificial changes added locally by setFatigue. In short, the server wouldn't know the correct value of remote unit's fatigue if you used setFatigue on the unit prior.
- Number
+ Number
+
- getForcedFlagTexture
+ onBriefingNotes
- A getter for forceFlagTexture. Forced texture is different from your normal flag texture, which can be retrieved with flagTexture
+ Select a sound declared in the Description.ext of the mission to be played the first time the Notes tab is selected in the briefing.
- https://community.bistudio.com/wiki/getForcedFlagTexture
+ https://community.bistudio.com/wiki/onBriefingNotes
- getForcedFlagTexture Object
+ onBriefingNotes String
- getForcedFlagTexture object
+ onBriefingNotes soundName
- $Code$getForcedFlagTexture player ;$/Code$
+ $Code$onBriefingNotes "NotesVoiceOver";$/Code$
undefined / undefined
+ (8 Feb, 2007)
+ In OFP it works only with the sound files defined in the mission's description.ext
- String
+ Nothing
+
- getFriend
+ fire
- Returns if sides are friendly or hostile. For a value smaller than 0.6 it results in being enemy, otherwise it's friendly. See also Side relations.
+ Forces a unit to fire the given weapon.
+ NOTE: Just like with forceWeaponFire it is possible to pass remote unit as argument, but this could be unreliable. Considering this command might need to be used in combination with selectWeapon, which takes only local arguments, it would make sense to execute fire command where unit is also local. See also: BIS_fnc_fire
- https://community.bistudio.com/wiki/getFriend
+ https://community.bistudio.com/wiki/fire
- Side getFriend Side
+ Object fire String
+
+ Object fire Array
- side1 getFriend side2
+ unit fire muzzle
+
+ unit fire [muzzle, mode, magazine]
- $Code$value = west getFriend east ;$/Code$
+ $Code$_soldier fire "M16";$/Code$
- $Code$_isEnemy = side _killer getFriend side _victim 0.6;$/Code$
+ $Code$_soldier fire "SmokeShellMuzzle";$/Code$
+
+ $Code$_soldier fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"];$/Code$
+
+ $Code$player playActionNow "PutDown";
+ player selectWeapon "DemoChargeMuzzle";
+ player fire ["DemoChargeMuzzle", "DemoChargeMuzzle", "DemoCharge_Remote_Mag"];
+ player setWeaponReloadingTime [ player, "DemoChargeMuzzle", 0];$/Code$
- global / undefined
+ local / global
+ (August 17, 2006)
+ Sometimes AI won't shoot when you use this command. It can be fixed by placing selectWeapon command before it.
+
+ (February 2, 2007)
+ In OFP v1.96, when a man class unit is given this command, he will aim up in the air before firing his weapon. This makes it rather useless if you want to make him shoot a target. It does work with vehicles, when the vehicle is first given a doWatch or doTarget command.
+
+ (January 20, 2007)
+ In ArmA v1.02, this command is not working with weapons in the secondary turrets (like "DSHKM" in t72)
+
+ (Jan 15, 2008)
+ To place a satchel (pipebomb) the syntax is:
+ OFP : unitname Fire ["put", "pipebomb"]
+ ArmA : unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"];
+ The triggering is done via a " TOUCHOFF " action.
+
+ (March 18, 2010)
+ In Arma2 AI will automatically shoot straight up. Command seems to be broken.
+
+ (November 24, 2010)
+ Command is broken - confirmed. Use action "USEWEAPON" instead.
+ Place a game logic in the editor. Name it MyGameLogic.
+ Use this code to make unit1 fire his primaryweapon:
+ MyGameLogic action ["useWeapon",primaryWeapon unit1,unit1,0];
+
+ (Feburary 25, 2011)
+ Command works just fine in A2/OA. Make sure to execute it on local AI.
+
+ (April 06, 2012)
+ If it did work at one time, it does no longer. The AI (or player) is forced to look upwards or reacts to a massive recoil force before getting his shot off.
+
+ (Feburary 16, 2013)
+ Command did not work with ACR 1.62. Used fireAtTarget instead.
+
+ (June 4, 2014)
+ In Arma 3 in order for AI to place Claymore, for example, it is necessary to execute 3 statements - an animation, weapon select and the actual fire command. Animation is most likely for forcing unit to leave rest state, weapon select and fire kinda both go together anyway: $Code$_unit playActionNow "PutDown";
+ _unit selectWeapon "DirectionalMineRemoteMuzzle";
+ _unit fire [
+ "DirectionalMineRemoteMuzzle",
+ "DirectionalMineRemoteMuzzle",
+ "ClaymoreDirectionalMine_Remote_Mag"
+ ];$/Code$
+
+ (November 25th, 2017)
+ In ArmA 3, as of version 1.76, examples 2 and 3 in the section above for smoke grenades are no longer working. As a workaround (throwing green smoke grenades for example), you can use: $Code$[_soldier, "SmokeShellGreenMuzzle"] call BIS_fnc_fire;$/Code$
- Number
+ Nothing - Nothing
+
- getFuelCargo
+ moonIntensity
- Returns the fuel amount (between 0 and 1) in the cargo space of a refuelling vehicle.
+ Returns the intensity of the moon's brightness in range 0...1.
- https://community.bistudio.com/wiki/getFuelCargo
+ https://community.bistudio.com/wiki/moonIntensity
- getFuelCargo Object
+ moonIntensity
- getFuelCargo vehicle
+ moonIntensity
- $Code$value = getFuelCargo myVehicleName;$/Code$
+ $Code$_intensity = moonIntensity ;$/Code$
- global / undefined
+ undefined / undefined
- (December 22, 2014)
- If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.
- If the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite.
- Number
+ Number
+
- getGroupIconParams
+ ctrlModel
- Returns group icons params used for command bar drawing such as color, text, scale, visibility, waypoint visibility, waypoint color.
+ Returns model used in 3D Dialog Control.
- https://community.bistudio.com/wiki/getGroupIconParams
+ https://community.bistudio.com/wiki/ctrlModel
- getGroupIconParams Group
+ ctrlModel Control
- getGroupIconParams group
+ ctrlModel control
- $Code$_iconParams = getGroupIconParams group player ;$/Code$
+ $Code$_model = ctrlModel _control3D;$/Code$
undefined / undefined
@@ -28159,899 +29656,991 @@
- Array
+ String
+
- getGroupIcons
+ doSuppressiveFire
- Returns all group icons. [id,icon,[offsetx,offsety],[..],..]
+ Order the given unit to suppress a given position or target (without radio messages).
- https://community.bistudio.com/wiki/getGroupIcons
+ https://community.bistudio.com/wiki/doSuppressiveFire
- getGroupIcons Group
+ Object/Array doSuppressiveFire Object/Array
- getGroupIcons group
+ unitName doSuppressiveFire target
-
+ $Code$_soldier doSuppressiveFire [1869.508,5760.962,0.000]$/Code$
+
+ $Code$_soldier doSuppressiveFire cursorTarget$/Code$
+
- global / undefined
+ local / local
+ (October 8, 2016)
+ Command expects position as second argument in format ASL in A3 1.64.138497.
- Array
+ Nothing
+
- getGroupIcon
+ getAssignedCuratorUnit
- Get group icon properties.
+ Returns unit assigned to curator logic.
- https://community.bistudio.com/wiki/getGroupIcon
+ https://community.bistudio.com/wiki/getAssignedCuratorUnit
- Group getGroupIcon Number
+ getAssignedCuratorUnit Object
- group getGroupIcon ID
+ getAssignedCuratorUnit curatorObj
- $Code$_grpIconId = _group getVariable "BIS_MARTA_ICON_TYPE";
- _grpIcon = _group getGroupIcon _grpIconId;$/Code$
+ $Code$_curatorUnit = getAssignedCuratorUnit ( allCurators select 0);
+ _curatorUnit joinAs [ createGroup civilian, 0];$/Code$
- global / undefined
+ undefined / undefined
+ (August 17, 2014)
+ This command will return objNull if used immediately after the curator unit is assigned to the logic in question (this includes at mission time 0). To avoid problems use the following beforehand: $Code$ waitUntil {! isNull ( getAssignedCuratorUnit logic)};$/Code$
- Array
+ Object
+
- getHideFrom
+ onGroupIconOverEnter
- Returns the Position where object believes the enemy to be. If there is no direct line of sight between the object and the enemy, this position is extrapolated based on the last known position and speed of the enemy. A returned position of [0,0,0] implies that object does not knowAbout enemy. If enemy is null it is some position in front of the object or enemy position.
+ Defines an action performed when player moves pointer over group marker (3D or in a map). The code will execute continuously while pointer is over icon.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: GroupIconOverEnter
- https://community.bistudio.com/wiki/getHideFrom
+ https://community.bistudio.com/wiki/onGroupIconOverEnter
- Object getHideFrom Object
+ onGroupIconOverEnter String/Code
- object getHideFrom enemy
+ onGroupIconOverEnter command
-
+ $Code$onGroupIconOverEnter
+ {
+ // Passed values for _this are:
+ _is3D = _this select 0;
+ _group = _this select 1;
+ _wpID = _this select 2;
+ _posx = _this select 3;
+ _posy = _this select 4;
+ _shift = _this select 5;
+ _ctrl = _this select 6;
+ _alt = _this select 7;
+ _message = format ["____ Info ____"];
+ {_message = _message + format ["\n %1",_x]} forEach _this;
+ hint _message;
+ }$/Code$
+
undefined / undefined
- (April 25, 2015)
- This command is definatlely not broken, at least not in A3 1.42. It functions exactly as the description says it does. The reason why the Z value is elevated is because it represents the units torso. When the unit is prone and spotted, the Z value is much less. Here you can see a perfectly working example of this command Talk:getHideFrom#Operation Script Sample
- Array
+ Nothing
+
- getHitIndex
+ configFile
- Return current level of damage for a specific Hit Point (specified by its hit part index). All hit points can be obtained with getAllHitPointsDamage command.
- 0: no damage
- 1: full damage
+ Return root of config entries hierarchy.
+ See AllInOne Config for a full config extract as example.
- https://community.bistudio.com/wiki/getHitIndex
+ https://community.bistudio.com/wiki/configFile
- Object getHitIndex Number
+ configFile
- vehicle getHitIndex hitPartIndex
+ configFile
- $Code$vehicle player getHitIndex 3;$/Code$
+ $Code$_isMyClassActive = isClass ( configFile / "CfgPatches" / "MyClass");$/Code$
- global / undefined
+ undefined / undefined
+ (Jul 19, 2014)
+ (ArmA3 1.24) It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection.
+ $Code$
+ _faces = " true " configClasses ( configFile "Cfgfaces");
+ //same as: _faces = (configfile "CfgFaces") call BIS_fnc_getCfgSubClasses ;
+ $/Code$
+ $Code$
+ //Extract all animals:
+ animals = "(( configName _x) isKindOf 'animal')" configClasses ( configFile "CfgVehicles");
+ /*same as:
+ aniamls = [];
+ [( configFile "CfgVehicles"),{
+ if (( configName _this) isKindOf “animal”) then {
+ animals set [ count animals, _this]
+ }
+ }
+ ] call BIS_fnc_uniqueClasses ;*/
+ $/Code$
+ Return nested subclasses, currently still BIS_fnc_returnChildren
+ $Code$
+ //Return all nested config classes.
+ [( configFile "CfgFaces"),1, true, true ] call BIS_fnc_returnChildren ;
+ $/Code$
- Number/Nothing
+ Config
+
- getHit
+ setWaypointForceBehaviour
- Returns selection damage. Same as getHitPointDamage only argument is selection part instead of hit point. Note: Some part names are in Czech; see translation table.
+ Forces the behavior of waypoint, disables AUTOCOMBAT.
- https://community.bistudio.com/wiki/getHit
+ https://community.bistudio.com/wiki/setWaypointForceBehaviour
- Object getHit String
+ Waypoint setWaypointForceBehaviour Boolean
- vehicle getHit selection
+ waypoint setWaypointForceBehaviour state
- $Code$player getHit "head";$/Code$
-
- $Code$_car getHit "motor";$/Code$
+ $Code$[grp, 2] setWaypointForceBehaviour true ;$/Code$
- global / undefined
+ undefined / undefined
- Number/Nothing
+ Nothing
+
- getHitPointDamage
+ shownCompass
- Return current level of damage for a specific Hit Point (specified by its config class). If you need to get damage of a selection instead of hit point, use getHit.
- 0: no damage
- 1: full damage
+ Checks if client has Compass enabled in description.ext ( showCompass param) or force enabled with showCompass command.
- https://community.bistudio.com/wiki/getHitPointDamage
+ https://community.bistudio.com/wiki/shownCompass
- Object getHitPointDamage String
+ shownCompass
- vehicle getHitPointDamage hitPointName
+ shownCompass
- $Code$(vehicle player) getHitPointDamage "hitEngine";$/Code$
+ $Code$if ( shownCompass ) then { hint "You have Compass enabled"};$/Code$
- global / undefined
+ undefined / undefined
- Common ObjectRTD TKOH Hit Points:
- HitEngine (engine #1)
- HitEngine2 (engine #2)
- HitEngine3 (engine #3)
- HitHRotor (main rotor)
- HitVRotor (tail rotor)
- HitBatteries (electrical systems)
- HitLight (landing light)
- HitHydraulics (entire hydraulics system)
- HitTransmission (engine transmission)
- HitGear (landing gear)
- HitFuel (all fuel tanks)
- HitHStabilizerL1 (first left horizontal stabilizer)
- HitHStabilizerR1 (first right horizontal stabilizer)
- HitVStabilizer1 (first vertical stabilizer)
- HitTail (tail boom)
- HitPitotTube (all pitot tubes)
- HitStaticPort (all static ports)
- HitStarter1 (starter for engine #1)
- HitStarter2 (starter for engine #2)
- HitStarter3 (starter for engine #3)
- HitAvionics
- HitHull
- HitMissiles
- HitRGlass
- HitLGlass
- HitGlass1
- HitGlass2
- HitGlass3
- HitGlass4
- HitGlass5
- HitGlass6
-
- (March 4, 2017)
- Note that vehicles with multiple turrets have multiple HitTurret and HitGun classes that can't be distinguished based on the Hitpoint class name. They can only be distinguished by their selection names. The selection names do not necessarily correspond to a common nomenclature, especially for mod vehicles. There can also be multiple empty Hitpoint Class names on a vehicle or infantry unit. They can be hitpoints for vehicle headlights or be the result of a bad config/model, as hitpoints that have an undefined named selection in their config class or are missing their named selection in the model will result in an empty HitPoint class name.
- Number/Nothing
+ Boolean
+
- getItemCargo
+ configSourceModList
- Returns all items names and count from ammo box (or any general weapon holder container).
+ Returns an array of mods (CfgMods) in which the given config class is defined.
- https://community.bistudio.com/wiki/getItemCargo
+ https://community.bistudio.com/wiki/configSourceModList
- getItemCargo Object
+ configSourceModList Config
- getItemCargo box
+ configSourceModList config
- $Code$hint str getItemCargo cursorTarget ;$/Code$
+ $Code$_mods = configSourceModList ( configFile "CfgVehicles" "Man");
+ hint str _mods; // ["A3","curator","heli"]$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Array
+
- getMagazineCargo
+ ctrlSetAutoScrollSpeed
- Returns all magazines types and count from the cargo space
+ Sets number of second required to scroll to next line. If speed 0, auto-scroll is disabled. Setter for ctrlAutoScrollSpeed.
+ Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
- https://community.bistudio.com/wiki/getMagazineCargo
+ https://community.bistudio.com/wiki/ctrlSetAutoScrollSpeed
- getMagazineCargo Object
+ Control ctrlSetAutoScrollSpeed Number
- getMagazineCargo object
+ control ctrlSetAutoScrollSpeed speed
- $Code$_content = getMagazineCargo carName;$/Code$
-
- $Code$_content = getMagazineCargo ammoBoxName;$/Code$
-
- $Code$hint str getMagazineCargo unitBackpack cursorTarget ;$/Code$
+ $Code$_ctrlGroup ctrlSetAutoScrollSpeed 0.1;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getMarkerColor
+ allMapMarkers
- Returns marker color for given marker. See setMarkerColor. Note: This function is identical to markerColor.
+ Return all markers in map including user placed markers (_USER_DEFINED #).
+ Since Arma 3 v1.57.134377 User defined markers have the following name format: _USER_DEFINED # PlayerID / MarkerID / ChannelID where:
+ PlayerID - unique network id of the player (same as _id in onPlayerConnected )
+ MarkerID - a marker counter id
+ ChannelID - id of the chat channel on which marker was placed (see currentChannel )
- https://community.bistudio.com/wiki/getMarkerColor
+ https://community.bistudio.com/wiki/allMapMarkers
- getMarkerColor String
+ allMapMarkers
- getMarkerColor markerName
+ allMapMarkers
- $Code$"MarkerOne" setMarkerColor "ColorBlack";
- _color = getMarkerColor "MarkerOne"; //returns "ColorBlack"$/Code$
+ $Code$_markers = allMapMarkers ;
+ // returns: ["marker1","_USER_DEFINED #2/0"]$/Code$
+
+ $Code${
+ private "_a";
+ _a = toArray _x;
+ _a resize 15;
+ if ( toString _a == "_USER_DEFINED #") then {
+ deleteMarker _x;
+ }
+ } forEach allMapMarkers ;$/Code$
+
+ $Code$if (_someString in allMapMarkers ) then {
+ hint (_someString + " is a valid marker name");
+ };$/Code$
- global / undefined
+ undefined / undefined
+ (March 17, 2014)
+ A3 1.12 : Markers placed in editor will be in the array as a string of their name. Markers placed by the player will begin with "_USER_DEFINED #."
+
+ (March 17, 2014)
+ To expand on the comment above. In Multiplayer, user created marker will appear in allMapMarkers as _USER_DEFINED #ID/Number, where ID is unique id related to _id param from onPlayerConnected and Number is sequential integer incremented by 1 with each marker placement by the IDed user.
- String
+ Array
+
- getMarkerPos
+ currentZeroing
- Returns the position of a given marker in format [x,y,0]. Array element 3 (height above ground) is always zero. If a non-existing marker is referenced the values returned are [0,0,0].
+ Returns zeroing of unit's weapon.
- https://community.bistudio.com/wiki/getMarkerPos
+ https://community.bistudio.com/wiki/currentZeroing
- getMarkerPos String
+ currentZeroing Object
- getMarkerPos markerName
+ currentZeroing gunner
- $Code$"MarkerOne" setMarkerPos [200,100];
- _pos = getMarkerPos "MarkerOne"
- // _pos is [200,100,0]$/Code$
+ $Code$_zeroing = currentZeroing player ;$/Code$
undefined / undefined
- (September 1, 2016)
- To acomplish getting the altitude of a marker you can do workaround using setMarkerDir as it accepts any number (above 360 or below -360):
- $Code$"Marker" setMarkerPos [200,200];
- "Marker" setMarkerDir 1640;
- $/Code$
- After, setting player position as an example:
- $Code$player setPosASL [(getMarkerPos "Marker") select 0, (getMarkerPos "Marker") select 1,(markerDir "Marker")]$/Code$
- Array
+ Number
+
- getMarkerSize
+ clearGroupIcons
- Returns the size of the given marker. A getter for setMarkerSize and an alias of markerSize.
+ Removes all icon from group.
- https://community.bistudio.com/wiki/getMarkerSize
+ https://community.bistudio.com/wiki/clearGroupIcons
- getMarkerSize String
+ clearGroupIcons Group
- getMarkerSize markerName
+ clearGroupIcons group
- $Code$"MarkerOne" setMarkerSize [100,200];
- _size = getMarkerSize "MarkerOne"; //returns [100,200]$/Code$
-
+
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getMarkerType
+ lbSetColorRight
- Returns the type of a given marker. See cfgMarkers for a list of standard markers.
+ Sets the color of the item (right) with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
+ Colour is in format Color.
- https://community.bistudio.com/wiki/getMarkerType
+ https://community.bistudio.com/wiki/lbSetColorRight
- getMarkerType String
+ lbSetColorRight Array
+
+ Control lbSetColorRight Array
- getMarkerType markerName
+ lbSetColorRight [idc, index, color]
+
+ control lbSetColorRight [index, color]
- $Code$"MarkerOne" setMarkerType "Destroy"
- _type = getMarkerType "MarkerOne"
- returns "Destroy"$/Code$
+ $Code$lbSetColorRight [101, 0, [0, 1, 0, 0.5]];$/Code$
+
+ $Code$_control lbSetColorRight [0, [0, 1, 0, 0.5]];$/Code$
- global / undefined
+ local / local
+ More information on the LB command family can be found here
- String
+ Nothing - Nothing
+
- getMass
+ setRandomLip
- Returns mass of a PhysX object.
+ Enables/Disables random lip. When enabled, the unit continuously moves its lips as if it's talking.
- https://community.bistudio.com/wiki/getMass
+ https://community.bistudio.com/wiki/setRandomLip
- getMass Object
+ Object setRandomLip Boolean
- getMass object
+ unit setRandomLip bool
- $Code$_mass = getMass _myCar$/Code$
+ $Code$player setRandomLip true ;$/Code$
- global / undefined
+ undefined / undefined
- (April 15, 2015)
- This function will return 0 for infantry AI units. That means a manned Blufor Hunter has the same mass than an empty one (8306.63).
- Crates return their initial mass, but if you empty them or load items, magazines and weapons, the mass remains the same. In fact, none of these (non-physx) objects has a mass.
- Number
+ Nothing
+
- getMissionConfig
+ ctCurSel
- Returns Config entry for the given scenario attribute from the 1st tier. The attribute can be config class or config property. If it is defined in multiple places, the command checks them in the following order:
- External Description.ext file
- Eden Editor scenario attribute
- So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
+ Returns index of the selected row. Will take only rows, but not headers into account.
- https://community.bistudio.com/wiki/getMissionConfig
+ https://community.bistudio.com/wiki/ctCurSel
- getMissionConfig String
+ ctCurSel Control
- getMissionConfig attribute
+ ctCurSel ctrl
- $Code$_header = getMissionConfig "Header"
- // Returns scenario header config. Replaces the previous approach which would scan only the external Description.ext file, but ignore the value set in the Eden Editor:_header = missionConfigFile "Header"; // Old approach$/Code$
+ $Code$_curSel = ctCurSel _control;$/Code$
- undefined / undefined
+ local / local
- Config
+ Number
+
- getMissionConfigValue
+ gunner
- Returns value of the given scenario attribute from the 1st tier. Since only config properties have values, the attribute should be config property. If it is not found or config class is given, the return is nil. If the attribute defined in multiple places, the command checks them in the following order:
- External Description.ext file
- Eden Editor scenario attribute
- So if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from Description.ext using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.
+ Returns the gunner of a vehicle.
- https://community.bistudio.com/wiki/getMissionConfigValue
+ https://community.bistudio.com/wiki/gunner
- getMissionConfigValue String
-
- getMissionConfigValue Array
+ gunner Object
- getMissionConfigValue attribute
-
- getMissionConfigValue [attribute, defaultValue]
+ gunner vehicle
- $Code$_respawnDelay = getMissionConfigValue ["respawnDelay",0]
- // Returns respawn delay value. Replaces the previous approach which would scan only the external Description.ext file, but ignore the value set in the Eden Editor:_respawnDelay = getNumber ( missionConfigFile "respawnDelay"); // Old approach$/Code$
+ $Code$(gunner _tank1) action ["getout",_tank1]$/Code$
- undefined / undefined
+ global / undefined
+ (2 January, 2007)
+ The gunner command will only return a single gunner. If the vehicle has occupied, multiple turrets. See this discussion on the official forums, for an alternative:
+ Need an array with a vehicle's cargo units
- Number/String/Array - Number/String/Array
+ Object
+
- getMissionDLCs
+ reloadEnabled
- Returns list of DLCs that are used in the mission. List is created only from units listed in mission.sqm and doesn't detect units created by scripts!
+ Check whether magazine is reloaded whenever emptied.
- https://community.bistudio.com/wiki/getMissionDLCs
+ https://community.bistudio.com/wiki/reloadEnabled
- getMissionDLCs
+ reloadEnabled Object
- getMissionDLCs
+ reloadEnabled unitName
- $Code$_list = getMissionDLCs$/Code$
-
+
undefined / undefined
- Array
+ Boolean
+
- getMissionLayerEntities
+ lnbAddRow
- Returns all entities within specific Eden Editor layer. To be used when the scenario is running, not in the editor workspace.
- Useful for disabling / enabling whole parts of the scenario which you add to specific layer while editing.
+ Adds a row of strings.
- https://community.bistudio.com/wiki/getMissionLayerEntities
+ https://community.bistudio.com/wiki/lnbAddRow
- getMissionLayerEntities String
+ lnbAddRow Array
+
+ Control lnbAddRow Array
- getMissionLayerEntities layerName
+ lnbAddRow [IDC,[ String, String ]]
+
+ _ctrl lnbAddRow [ String, String ]
- $Code$_base = getMissionLayerEntities "Base";$/Code$
+ $Code$lnbAddRow [1,["COL1","COL2"]];$/Code$
- $Code$waitUntil {( player distance _someObject) 800};
- {
- deleteVehicle _x ;
- } forEach (( getMissionLayerEntities "Simple Objects") select 0);//Deletes all objects within that layer after the player is over 800m away from _someObject$/Code$
+ $Code$_ctrl lnbAddRow ["COL1","COL2"];$/Code$
- undefined / undefined
+ local / local
- (October 26, 2016)
- After an object was deleted from a layer, getMissionLayerEntities will return NULL-object for the deleted object.
- Version: 1.65
- Build: 139010
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Array
+ Number - Number
+
- getModelInfo
+ unitReady
- Returns object's model info in format [modelName, modelPath, hasSkeleton]. Model path is suitable for use with createSimpleObject command.
+ Check if the unit is ready. Unit is busy when it is given some command like move, until the command is finished.
- https://community.bistudio.com/wiki/getModelInfo
+ https://community.bistudio.com/wiki/unitReady
- getModelInfo Object
+ unitReady Object
- getModelInfo object
+ unitReady unitName
- $Code$_modelInfo = getModelInfo player ;$/Code$
-
- $Code$_modelInfo = getModelInfo cursorObject ;$/Code$
+ $Code$_it = unitReady _soldierOne;$/Code$
undefined / undefined
+ (August 26, 2010)
+ Keep in mind that a) dead units are unitReady and b) that it takes a while until it get's known to group members that a unit is not alive anymore, which leads to c) the current leader of a group might be actually dead (until another group member takes command).
+ Why this is important? I'll give you an example: if you're using unitReady as a condition inside one of your fsm to advance whatever the fsm/group is doing, you really might wanna check that this unit is actually still alive. Otherwise you might end up with really fast and nasty loops in your fsm, eventually accompanied by a stream of radio commands that will last until finally a living leader is in command again.. and that could take a while... nasty, I tell you :)
+
+ Regarding vehicles, there is only one single unit (from the vehicle crew) whose unitReady-status is affected by giving that vehicle (or that unit) commands. While it's the driver unit for a truck, it is the gunner unit for a mg-jeep or the commander for a tank. Generally it's always the unit "in control" of the vehicle. (because it's only that unit, that is seen as "full unit" to the "outside world". Only he can be adressed with commands.)
+ In consequence you can't just send vehicles around and check if they've arrived with something like:
+ waitUntil{(unitReady (driver _vehicle))}; // don't do this!
+ Because it's not guaranteed, that the driver is in command of the vehicle and only that unit will have it's unitReady status affected.
+ So in conclusion, if you need to check if a vehicle is ready, try something like this: _vehicleReady = {
+ private ["_veh", "_ready"];
+ _veh = _this;
+ _ready = true;
+ {
+ if (!(isNull _x)) then
+ {
+ _ready = _ready && (unitReady _x);
+ };
+ } forEach [
+ (commander _veh),
+ (gunner _veh),
+ (driver _veh)
+ ];
+ _ready
+ };
+
+ (November 21, 2015)
+ To check readiness of a vehicle, don't check it's crew, driver, gunner, commander, etc., but the vehicle itself, e.g.:
+ $Code$unitReady (vehicle driver _YourVehicle);$/Code$
+ Only tested 11/21/2015 by me with A2 1.63.131129 and A3 1.52.132676 but possibly true since 1964. :P
- Array
+ Boolean
+
- getMousePosition
+ playableUnits
- Returns mouse position in UI coordinates.
+ Returns a list of playable units in a multiplayer game (occupied by both AI or players), created on the following sides east, west, resistance / independent and civilian only. Does not contain units of sideLogic. This does not include dead players awaiting for respawn.
- https://community.bistudio.com/wiki/getMousePosition
+ https://community.bistudio.com/wiki/playableUnits
- getMousePosition
+ playableUnits
- getMousePosition
+ playableUnits
- $Code$_pos = getMousePosition ;$/Code$
+ $Code${_x groupChat "I'm a playable unit.";} forEach playableUnits ;$/Code$
+
+ $Code$// All playable units in a group:
+ _playableInGroup = units group player arrayIntersect playableUnits ;$/Code$
+
+ $Code$// All non-playable units in a group:
+ _playableInGroup = units group player - playableUnits ;$/Code$
undefined / undefined
+ (July 13, 2009)
+ In single-player missions, this command will return an empty array.
+
+ (December 23, 2014)
+ To get a list of all player-controlled units:
+ $Code$_allPlayers = [];
+ {
+ if ( isPlayer _x) then
+ {
+ _allPlayers pushBack _x;
+ };
+ } forEach playableUnits ;$/Code$
+
+ (April 15, 2015)
+ Quote: $Code$ Killswitch
+ In single-player missions, this command will return an empty array.$/Code$
+ Use the switchableUnits command instead
+
+ (August 16, 2015)
+ playableUnits will not return dead players, use allPlayers instead.
+
+ (February 14, 2017)
+ Using the Editor (multiplayer attributes) for unchecking "enable AI", or disabling AI(s) in lobby, will make playableUnits as a public variable, updated by each JIP on disabled slot. So, if all slots are diabled AI, playableunits is same as allPlayers
+ Furthermore, in this case, non-played slot (playable and disabled AI) units simply don't exist! i.e. If you name 8 playable units: u1..to u8, then 2 players in game: u3 & u6
+ playableUnits will return [u3,u6], and true for isNil "u1", isNil "u2"... until another player takes the slot.
- Array
+ Array
+
- getNumber
+ enableUAVConnectability
- Extract number from config entry.
+ Enables unit's AV terminal(s) connecting to UAV.
- https://community.bistudio.com/wiki/getNumber
+ https://community.bistudio.com/wiki/enableUAVConnectability
- getNumber Config
+ Object enableUAVConnectability Array
- getNumber config
+ object enableUAVConnectability [uav, checkAllItems]
- $Code$_value = getNumber ( configFile "CfgVehicles" "Thing" "maxSpeed");$/Code$
+ $Code$unit enableUAVConnectability [uav,true];$/Code$
- undefined / undefined
+ undefined / local
- (04:45, 3 March 2007 (CET))
- Use getNumber to get boolean values from a config file. 1 equals true, 0 equals false and if no value is found (when a valid variable is undefined) 0.67 is returned.
-
- (13 September 2011)
- With an not existing entry, getNumber returns 0.
-
- (Mar 28, 2014)
- (ArmA3 1.14), It's recommended to use BIS_fnc_getCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.
- Traditional workaround:
- $Code$
- _cfg = configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type"
- switch ( true ) do
- {
- case ( isNumber _cfg): { getNumber _cfg};
- case ( isText _cfg): { getText _cfg};
- case ( isArray _cfg): { getArray _cfg;};
- default {nil};
- };
- $/Code$
- Recommended workaround:
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_getCfgData ;
- $/Code$
- To return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_getCfgData.
- $Code$
- [( configFile "CannonFire" "LightExp"),"lifeTime",0] call BIS_fnc_returnConfigEntry ;//0.5
- $/Code$
- To compose collected Number into Array, use BIS_fnc_getCfgDataArray instead.
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_getCfgDataArray ;
- $/Code$
- To retype collected Number into Boolean, use BIS_fnc_getCfgDataBool. Anything bigger than 0 is true, otherwise false.
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_getCfgDataBool ;
- $/Code$
- Number
+ Nothing
+
- getObjectArgument
+ endMission
- Return name of object argument in mission editor.
- i
- Some Old Editor Command
+ Finish the mission.
+ The end type can be:
+ "CONTINUE"
+ "KILLED"
+ "LOSER"
+ "END1"
+ "END2"
+ "END3"
+ "END4"
+ "END5"
+ "END6"
+ Mission saves are deleted. Use failMission if they should not.
+ To maintain Arma 3 visual style, it's recommended to use BIS_fnc_endMission instead.
- https://community.bistudio.com/wiki/getObjectArgument
+ https://community.bistudio.com/wiki/endMission
- Control getObjectArgument Array
+ endMission String
- map getObjectArgument [object, argument]
+ endMission endType
- $Code$// returns string "[1009.0351, 1319.4928]"
- ( findDisplay 128 displayCtrl 51) getObjectArgument ["_unit_1", "POSITION"]
- // returns array [1009.0351, 1319.4928]
- ( findDisplay 128 displayCtrl 51) evalObjectArgument ["_unit_1", "POSITION"]$/Code$
+ $Code$endMission "END1";$/Code$
- undefined / undefined
+ local / local
- String
+ Nothing
+
- getObjectChildren
+ markerDir
- Return a list of all the children of the specified object.
- i
- Some Old Editor Command
+ Get marker direction.
- https://community.bistudio.com/wiki/getObjectChildren
+ https://community.bistudio.com/wiki/markerDir
- Control getObjectChildren String
+ markerDir String
- map getObjectChildren object
+ markerDir markerName
-
+ $Code$_mPos = markerDir "markerOne"$/Code$
+
- undefined / undefined
+ global / undefined
+ (April 18, 2010)
+ The direction of the marker is the same as displayed in the editor, so it can both be negative, and be 360 degrees or greater.
- Array
+ Number
+
- getObjectDLC
+ assignAsCargo
- Returns appID of the DLC the object belongs to or nil if object is vanilla.
+ Assign a unit as cargo of a vehicle. Used together with orderGetIn to order a unit to get in as cargo into a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the cargo space of the vehicle.
- https://community.bistudio.com/wiki/getObjectDLC
+ https://community.bistudio.com/wiki/assignAsCargo
- getObjectDLC Object
+ Object assignAsCargo Object
- getObjectDLC obj
+ unitName assignAsCargo vehicleName
- $Code$_appID = getObjectDLC cursorTarget ;
- if (! isNil "_appID") then {
- hint format ["This object belongs to DLC with id: %1", _appID];
- } else {
- hint "This object is vanilla";
- };$/Code$
+ $Code$_soldier1 assignAsCargo _truck
+ [_soldier1] orderGetIn true$/Code$
- global / undefined
+ global / global
- Number/Nothing
+ Nothing
+
- getObjectMaterials
+ setEffectCondition
- Gets all custom materials associated with the object.
+ The statement is executed when the trigger or waypoint is activated and the effects are launched depending on the result.
+ If the result is a boolean and true, the effect is launched.
+ If the result is an object, the effect is launched if the result is the player or the player vehicle.
+ If the result is an array, the effect is launched if the result contains the player or the player vehicle.
- https://community.bistudio.com/wiki/getObjectMaterials
+ https://community.bistudio.com/wiki/setEffectCondition
- getObjectMaterials Object
+ Object setEffectCondition String
+
+ Waypoint setEffectCondition String
- getObjectMaterials obj
+ trigger setEffectCondition statement
+
+ waypoint setEffectCondition statement
- $Code$_materials = getObjectMaterials car;$/Code$
+ $Code$_triggerObj setEffectCondition "thisList";$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing - Nothing
+
- getObjectProxy
+ nearSupplies
- Return the proxy object associated with the given editor object.
- i
- Some Old Editor Command
+ Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.
- https://community.bistudio.com/wiki/getObjectProxy
+ https://community.bistudio.com/wiki/nearSupplies
- Control getObjectProxy String
+ Object/Array nearSupplies Number
- map getObjectProxy object
+ origin nearSupplies radius
- $Code$( findDisplay 128 displayCtrl 51) getObjectProxy "_unit_1"
- // returns the object 'B 1-1-A:1 (Sean Johnson)'$/Code$
+ $Code$_list = player nearSupplies 50;$/Code$
undefined / undefined
- classWorks in BIS RTE only?
- Object
+ Array
+
- getObjectTextures
+ firstBackpack
- Gets all custom textures (hiddenSelectionsTextures) associated with the object.
+ Returns the first stored backpack.
- https://community.bistudio.com/wiki/getObjectTextures
+ https://community.bistudio.com/wiki/firstBackpack
- getObjectTextures Object
+ firstBackpack Object
- getObjectTextures obj
+ firstBackpack box
- $Code$_textures = getObjectTextures player ;$/Code$
+ $Code$myVariable = firstBackpack myBox;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Object
+
- getObjectType
+ configNull
- Returns object type as a number:
- 1 - Primary - Normal object placed in Visitor, part of landscape
- 2 - Network - Road placed in Visitor, part of landscape
- 4 - Temporary - Temporary object (like tracks)
- 8 - TypeVehicle - Some entity added by game
- 16 - TypeTempVehicle - Temporary entity
- 32 - LandDecal - Land decal
+ A non-existing Config.
+ configNull == configNull ; // true
+ isNull configNull ; // true
+ configNull isEqualTo configNull ; // true
- https://community.bistudio.com/wiki/getObjectType
+ https://community.bistudio.com/wiki/configNull
- getObjectType Object
+ configNull
- getObjectType object
+ configNull
- $Code$_objType = getObjectType player ;$/Code$
+ $Code$_config = missionNamespace getVariable ["myConfig", configNull ];$/Code$
- $Code$_objType = getObjectType cursorObject ;$/Code$
+ $Code$str configNull ; // ""$/Code$
undefined / undefined
@@ -29059,27 +30648,28 @@
- Number
+ Config
+
- getObjectViewDistance
+ getPlateNumber
- Gets the values of rendering distances of objects and shadows.
+ Get the license plates from any vehicle which has plates configured.
- https://community.bistudio.com/wiki/getObjectViewDistance
+ https://community.bistudio.com/wiki/getPlateNumber
- getObjectViewDistance
+ getPlateNumber Object
- getObjectViewDistance
+ getPlateNumber vehicle
- $Code$_arr = getObjectViewDistance ;$/Code$
+ $Code$getPlateNumber vehicle player$/Code$
undefined / undefined
@@ -29087,783 +30677,989 @@
- Array
+ String
+
- getOxygenRemaining
+ moveInDriver
- Returns amount of remaining oxygen.
+ Move soldier into vehicle driver position (Immediate, no animation).
- https://community.bistudio.com/wiki/getOxygenRemaining
+ https://community.bistudio.com/wiki/moveInDriver
- getOxygenRemaining Object
+ Object moveInDriver Object
- getOxygenRemaining unit
+ unitName moveInDriver vehicle
- $Code$_oxygen = getOxygenRemaining player;$/Code$
+ $Code$_soldierOne moveInDriver _tankOne$/Code$
- undefined / undefined
+ local / global
- (October 24, 2014)
- Unit will die instantly at 0 oxygen unlike some other games that permit a certain amount of time after oxygen is depleted.
+ (August 4, 2006)
+ Notes from before the conversion:
+ MP Note Functions MoveInDriver can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
+
+ In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Driver" action command.
- Number
+ Nothing
+
- getPersonUsedDLCs
+ setVehicleReportOwnPosition
- Returns a list of all DLCs objects the unit is currently using. For example if a unit is inside a vehicle from DLC, it will return the code of that DLC.
- This command is broken and doesnt work on dedicated server
+ Sets that the vehicle will share its own position via datalink to the Side center.
- https://community.bistudio.com/wiki/getPersonUsedDLCs
+ https://community.bistudio.com/wiki/setVehicleReportOwnPosition
- getPersonUsedDLCs Object
+ Object setVehicleReportOwnPosition Boolean
- getPersonUsedDLCs unit
+ vehicle setVehicleReportOwnPosition report
- $Code$_objects = getPersonUsedDLCs player ;$/Code$
+ $Code$( vehicle player ) setVehicleReportOwnPosition true;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getPilotCameraDirection
+ toFixed
- Returns model space vector of the object airplane or helicopter pilotCamera.
+ Converts a number into a string, keeping the specified number of decimals. If the desired number of decimals is higher than the actual number, nulls are added to create the desired decimal length. This command is almost identical in behaviour to JavaScript toFixed()
+ NOTE: Converted number is never presented in scientific notation unlike with other number to string commands. Also Arma's default string conversion limits numbers to 6 significant figures, whereas with this command it is possible to preserve some extra precision.
+ $Code$ str ( pi /100000); //"3.14159e-005" - scientific notation
+ ( pi /100000) toFixed 10; //"0.0000314159" - no scientific notation
+ str pi ; //"3.14159" - 6 significant figures (default)
+ pi toFixed 6; //"3.141593" - forced to 7 significant figures
+ pi toFixed 7; //"3.1415927" - forced to 8 significant figures$/Code$
+ Since Arma 3 v1.71.141859 an alternative syntax is added, which takes no number and returns Nothing. Instead it acts as keyword and switches engine Number to String global conversion into desired format, from the moment it is applied until the end of script. To reset output back to default at any time, use toFixed -1. For example:
+ $Code$ systemChat str position player ;
+ call
+ {
+ toFixed 6;
+ systemChat str position player ;
+ };
+ systemChat str position player ;
+ toFixed -1;
+ systemChat str position player ;$/Code$
+ The result is:
+ [11580.3,11797.7,0.00146675]
+ [11580.341797,11797.737305,0.001467]
+ [11580.341797,11797.737305,0.001467]
+ [11580.3,11797.7,0.00146675]
+ Ideal to be used when saving data to a database when more precise positioning is required.
- https://community.bistudio.com/wiki/getPilotCameraDirection
+ https://community.bistudio.com/wiki/toFixed
- getPilotCameraDirection Object
+ Number toFixed Number
+
+ toFixed Number
- getPilotCameraDirection object
+ number toFixed decimals
+
+ toFixed decimals
- $Code$_pilotCamVector = getPilotCameraDirection vehicle player$/Code$
+ $Code$123 toFixed 2; //"123.00"$/Code$
+
+ $Code$2.34 toFixed 1; //"2.3"
+ 2.35 toFixed 1; //"2.4"$/Code$
+
+ $Code$// Convert position to string preserving position precision:
+ fn_posToString =
+ {
+ format [
+ "[%1,%2,%3]",
+ _this select 0 toFixed 8,
+ _this select 1 toFixed 8,
+ _this select 2 toFixed 8
+ ]
+ };
+ str getPos player ; // "[3231.05,171.802,0.00143862]"
+ getPos player call fn_posToString; // "[3231.04882813,171.80192566,0.00143862]"$/Code$
+
+ $Code$// Same as Example 3 only using new alternative syntax:
+ str getPos player ; // "[3231.05,171.802,0.00143862]"
+ toFixed 8;
+ str getPos player ; // "[3231.04882813,171.80192566,0.00143862]"$/Code$
- local / undefined
+ undefined / undefined
+ (September 2, 2016)
+ parseNumber (3.56346 toFixed 4); //0.0026 ms (10000 cycles)
+ [3.5634,4] call BIS_fnc_cutDecimals ; //0.0111 ms (10000 cycles)
- Array
+ String - Nothing
+
- getPilotCameraPosition
+ createCenter
- Returns model space coordinates of the object airplane or helicopter pilotCamera.
+ In a nutshell, this command creates game Side. Without side it is not possible to create Groups. So if center for particular side is undefined, no groups can be created for this side. A Unit needs a group to be able to spawn in. So if no center for particular side exists, no groups for this side can be created and therefore no units for this side can be spawned. In Arma 3, the centers for all sides are created for you. An attempt to create center for existing side is ignored. Center can only be created for: east, west, resistance, civilian and sideLogic. These are the only sides groups can be created for.
+ Old description : Creates a new AI HQ for the given side. An 'HQ ' is something each side needs to have to be able to communicate. By default, all centers for units which are present in the mission are created before the mission is started. This command can be used to initialize a side which has no units present in the Mission.sqm, so that you can spawn groups and units for it.
+ For the available sides see Side.
- https://community.bistudio.com/wiki/getPilotCameraPosition
+ https://community.bistudio.com/wiki/createCenter
- getPilotCameraPosition Object
+ createCenter Side
- getPilotCameraPosition object
+ createCenter side
- $Code$_pilotCamPos = getPilotCameraPosition vehicle player$/Code$
+ $Code$_SideHQ = createCenter east$/Code$
- global / undefined
+ undefined / global
+ (17:15, 22 June 2007 (CEST))
+ You need to set the new sides friendly status using the setFriend command, once you have created your Center. Otherwise the newly created AI will not engage you, if you're on the opposing side.
- Array
+ Side
+
- getPilotCameraRotation
+ min
- Returns rotation (relative to the centered camera position) of the object airplane or helicopter pilotCamera.
+ The smaller of a,b
- https://community.bistudio.com/wiki/getPilotCameraRotation
+ https://community.bistudio.com/wiki/min
- getPilotCameraRotation Object
+ Number min Number
- getPilotCameraRotation object
+ a min b
- $Code$_pilotCamRot = getPilotCameraRotation vehicle player$/Code$
+ $Code$3 min 2
+ // Result is 2$/Code$
- local / undefined
+ undefined / undefined
- Array
+ Number
+
- getPilotCameraTarget
+ rankId
- Returns the target of the object airplane or helicopter pilotCamera tracking.
+ Return the rank of the given unit for comparison.
+ Value may be :
+ 0 - Private
+ 1 - Corporal
+ 2 - Sergeant
+ 3 - Lieutenant
+ 4 - Captain
+ 5 - Major
+ 6 - Colonel
- https://community.bistudio.com/wiki/getPilotCameraTarget
+ https://community.bistudio.com/wiki/rankId
- getPilotCameraTarget Object
+ rankId Object
- getPilotCameraTarget object
+ rankId unit
- $Code$_pilotCamTrack = ( getPilotCameraTarget vehicle player ) select 0;
- _pilotCamTargetPos = ( getPilotCameraTarget vehicle player ) select 1;
- _pilotCamTarget = ( getPilotCameraTarget vehicle player ) select 2;$/Code$
+ $Code$_myIdRank = rankId player;$/Code$
- local / undefined
+ undefined / undefined
- Array
+ Number
+
- getPlayerChannel
+ getVariable
- Returns channel number for given player, provided that player is speaking, otherwise -1. Having mic on is not enough, player has to make a sound. There are several limitations to this command:
- It does not work on dedicated server, the return is always -1, only client can detect other client talking.
- It does not detect when someone talks on direct chat at all anywhere.
- The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on.
- In short, this command mimics the speaking icon from the UI. Correspondence between channel and number:
- 0 = Global
- 1 = Side
- 2 = Command
- 3 = Group
- 4 = Vehicle
- 5 = Direct (Is not detected by getPlayerChannel )
- 6-15 = Custom Radio (see radioChannelCreate )
+ Return the value of variable in the variable space assigned to various data types. In case of Alt Syntax usage in Arma 3, the default value will be returned if:
+ Requested variable is either undefined or nil
+ Variable namespace is null ( objNull, grpNull, etc.)
+ All available data types combinations:
+ Namespace getVariable String
+ Namespace getVariable Array (since Arma 2 1.60)
+ Object getVariable String
+ Object getVariable Array
+ Group getVariable String
+ Group getVariable Array
+ Team_Member getVariable String
+ Team_Member getVariable Array
+ Task getVariable String
+ Task getVariable Array (Since Arma 3 v1.67)
+ Location getVariable String
+ Location getVariable Array (Since Arma 3 v1.67)
+ Control getVariable String (since Arma 3 v1.55.133553)
+ Control getVariable Array (since Arma 3 v1.55.133553)
+ Display getVariable String (since Arma 3 v1.55.133553)
+ Display getVariable Array (since Arma 3 v1.55.133553)
+ When variable is set on Task, it is not actually set on task itself, but on FSM attached to the task. So if there is no FSM getVariable will not work.
- https://community.bistudio.com/wiki/getPlayerChannel
+ https://community.bistudio.com/wiki/getVariable
- getPlayerChannel Object
+ Namespace/Object/Display/Control/Group/Location/Task/Team_Member getVariable String
+
+ Namespace/Object/Display/Control/Group/Location/Task/Team_Member getVariable Array
- getPlayerChannel player
+ varspace getVariable name
+
+ varspace getVariable [name, defaultValue]
- $Code$_channel = getPlayerChannel player ;$/Code$
+ $Code$_thePublicVariable = _myTruck getVariable "myPublicVariable";$/Code$
+
+ $Code$_aLocalVariable = _myTruck getVariable ["myLocalVariable", ["Not set", _var]] select 1;$/Code$
+
+ $Code$for "_i" from 0 to 5 do {
+ _car = missionNamespace getVariable ("car" + str _i);
+ _car setDamage 0;
+ };
+ // Sets damage of car0, car1,..., car5 to 0.$/Code$
+
+ $Code$myMissionVar = 2015;
+ missionNamespace getVariable "myMissionVar";//Returns 2015$/Code$
+
+ $Code$// WARNING when using dynamic default value:
+ missionNamespace getVariable ["var", 123 call fnc_abc];
+ /// fnc_abc is always called even when var is defined$/Code$
+
+ $Code$// Get current value of a variable and if it is undefined, define it and get the defined value:
+ private _var = missionNamespace getVariable "varName";
+ if ( isNil "_var") then
+ {
+ missionNamespace setVariable ["varName", 123];
+ _var = 123;
+ };
+ // _var here will contain current value of the variable varName$/Code$
global / undefined
+ (August 13, 2016)
+ NOTE: Arma 2 ONLY! In Arma 3 this will return default value.
+ Warning: the alternative syntax returns undefined when the varspace is an object and that object is null. Example:
+ $Code$_test = objNull getVariable ["test","0"];
+ systemChat _test;$/Code$
+ Errors because _test is undefined. Tested in A2OA 1.63.131129
+
+ (August 31, 2017)
+ You can do typechecking using param :
+ $Code$private _myVar = [player getVariable "myVar"] param [0,"",[""]];$/Code$
+ and params :
+ $Code$[player getVariable "myVar"] params [["_myVar","",[""]]];$/Code$
- Number
+ Anything/Nothing - Anything
+
- getPlayerScores
+ modelToWorld
- In MP: returns the unit's table of scores (infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score). In SP: empty array []
+ Translates relative position from object model space into world position. This command will take into account vectorUp of the object when calculating relative coordinates. For ASL version see modelToWorldWorld
- https://community.bistudio.com/wiki/getPlayerScores
+ https://community.bistudio.com/wiki/modelToWorld
- getPlayerScores Object
+ Object modelToWorld Array
- getPlayerScores unitName
+ model modelToWorld position
- $Code$getPlayerScores BIS_player1;$/Code$
+ $Code$_aboveAndBehindPlayer = player modelToWorld [0,-1,3];$/Code$
undefined / undefined
+ (16 Feb, 2007)
+ The worldPos parameter appears to be a relative offset to the position of object, so it can often simply be [0,0,0].
+ Example: to position an object _obj relative to the position of another object _RelObj with on offset of _Offset, try:
+ _Offset = [_x,_y,_z];
+ _worldPos = _RelObj modelToWorld _Offset;
+ _obj setPos _worldPos;
+
+ (16 Feb, 2007)
+ The object model space has got its Z-Axis along the object's vectorUp, its Y-Axis along the object's vectorDir, while its X-Axis goes along vectorDir x VectorUp (meaning as the X-Axis in a right-handed cartesian coordiante system ).
+
+ (8 May, 2008)
+ If your object requires a new direction, ensure you call setDir prior to setPos when using modelToWorld. Calling setDir afterwards will skew its position otherwise.
+ _ladder setDir _angle;
+ _ladder setPos (_building modelToWorld [_x, _y, _z]);
+
+ (6 Feb, 2011)
+ The z height returned changes dynamically with the height of waves beneath the object, if the object is located over sea. The z height returned by getPosATL and getPosASL does not change like this. This was tested by continuously retrieving the position of a static object, like the cross in the empty/corpses category, placed over sea or land.
+ modelToWorld behaves similar to
+ getPos _obj
+ but it does not give the same result, therefore
+ (_obj modelToWorld [0.0, 0.0, 0.0]) is not the same as (getPos _obj).
- Array
+ Array
+
- getPlayerUID
+ remove3DENEventHandler
- Return an uniqueID of the given unit as string if it's player and empty value if it's AI. The unique ID may be up to 100 characters long and may contain numbers, uppercase letters and underscores (the value can be used to construct a valid variable name by appending to another valid variable name).
- Note: while for ArmA 2 or ArmA 2: Operation Arrowhead until version 1.60 the result always contains a number, it should be always handled as an opaque string. Converting it to a Number can cause precision problems, as Number cannot accurately represent integers above 16777216 (2^24). Moreover, game versions since ArmA 2: Operation Arrowhead 1.61 provide a non-numeric value as a result.
+ Removes Eden Editor event handler of given type and ID.
+ See the list of all Eden Editor Event Handlers.
- https://community.bistudio.com/wiki/getPlayerUID
+ https://community.bistudio.com/wiki/remove3DENEventHandler
- getPlayerUID Object
+ remove3DENEventHandler Array
- getPlayerUID unit
+ remove3DENEventHandler [type,id]
- $Code$_uid = getPlayerUID player ;$/Code$
+ $Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];
+ remove3DENEventHandler ["onUndo",eh];$/Code$
undefined / undefined
- (April 17, 2014)
- In Arma 3 the returned string is the steamID64 of the player. $Code$ _steamProfileUrl = "http://steamcommunity.com/profiles/" + ( getPlayerUID player );$/Code$
- String
+ Nothing
+
- getPosASLVisual
+ ropeCut
- Returns an object's rendered 3D position ASL (z value above sea level) in render time scope. Alias of visiblePositionASL.
+ Cut rope and detach rope from vehicle
- https://community.bistudio.com/wiki/getPosASLVisual
+ https://community.bistudio.com/wiki/ropeCut
- getPosASLVisual Object
+ ropeCut Array
- getPosASLVisual object
+ ropeCut [rope, distance]
- $Code$_playerRenderedPosASL = getPosASLVisual player ;$/Code$
+ $Code$ropeCut [ ropes heli1 select 0, 5];$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing
+
- getPosASLW
+ curatorCoef
- Returns the object position height above sea surface (waves included).
+ Returns current coeficient setting.
- https://community.bistudio.com/wiki/getPosASLW
+ https://community.bistudio.com/wiki/curatorCoef
- getPosASLW Object
+ Object curatorCoef String
- getPosASLW obj
+ curatorObj curatorCoef action
- $Code$_pos = getPosASLW _diver;$/Code$
+ $Code$curatorModule curatorCoef "Place"$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Number
+
- getPosASL
+ curatorEditingArea
- Returns the object position height above sea level.
+ Returns all curator editing areas.
- https://community.bistudio.com/wiki/getPosASL
+ https://community.bistudio.com/wiki/curatorEditingArea
- getPosASL Object
+ curatorEditingArea Object
- getPosASL object
+ curatorEditingArea curatorObj
- $Code$_AslPos = getPosASL player ;$/Code$
-
- $Code$hint format ["position above sea level: %1", ( getPosASL player ) select 2];$/Code$
+ $Code$_editingArea = curatorEditingArea myCurator;$/Code$
- global / undefined
+ undefined / undefined
- (23 Feb, 2007)
- $Code$ getPosASL _obj select 2;$/Code$
- might sometimes return the vertical position above sea level, but over land for stacked objects, it returns the vertical position above the object beneath it or at least affected by this offset. The same problem exists for getPos. There was a discussion thread in the BIS forums which suggested the use of the command modelToWorld instead to get around this issue where an absolute vertical position is required. ArmA Ver 1.02.
-
- (27 Mar, 2014)
- According to Code Optimisation, this function is the fastest (2x) and should be used instead of getPos, getPosATL and position.
- Conversion keep this speed ratio and is structured like: $Code$ ASLtoATL getPosASL Object ;$/Code$
- Array
+ Array
+
- getPosATLVisual
+ findEmptyPosition
- Returns an object's rendered 3D position ATL (z value above ground) in render time scope.
+ Searches for an empty position around specified position. The search starts looking for an empty position at a minimum distance of [minDistance] from the [center] and looks as far away as [maxDistance]. If a [vehicleType] parameter is specified, then the search will look for an empty positions that is big enough to hold that vehicle type. If an empty position isn't found, an empty array is returned.
+ This command ignores moving objects present within search area.
- https://community.bistudio.com/wiki/getPosATLVisual
+ https://community.bistudio.com/wiki/findEmptyPosition
- getPosATLVisual Object
+ Array findEmptyPosition Array
- getPosATLVisual object
+ center findEmptyPosition [minDistance, maxDistance, vehicleType]
- $Code$_playerRenderedPosATL = getPosATLVisual player ;$/Code$
+ $Code$_position = ( getPosATL player ) findEmptyPosition [0,100];$/Code$
+
+ $Code$_position = _center findEmptyPosition [10,100,"UH60M_EP1"];$/Code$
+
+ $Code$// Check if exact position is empty:
+ _position = _center findEmptyPosition [0,0,"B_Boat_Armed_01_minigun_F"];$/Code$
- global / undefined
+ undefined / undefined
+ (November 6, 2013)
+ Keep search radius short and sweet, under 50 metres maybe. Searching big area takes long time and will result in your game stop responding until the search is over. isFlatEmpty is probably more suitable for a larger area search.
+
+ (March 6, 2012)
+ I think the radius parameter should be treated as a 'minimum distance' from the centre position. I found that the parameter name radius wasn't very clear. Also, if radius is greater than max distance then the function will always return an empty array.
+ Here is an snippet of code I use to find a safe landing zone for an extraction helicopter. It may be useful for someone.
+ $Code$_centre = [ getMarkerPos "marker", random 150, random 360 ] call BIS_fnc_relPos;
+ _extraction_point = [];
+ _max_distance = 100;
+ while{ count _extraction_point 1 } do
+ {
+ _extraction_point = _centre findEmptyPosition[ 30, _max_distance, "UH60M_EP1" ];
+ _max_distance = _max_distance + 50;
+ };
+ $/Code$
+ In the above example, make sure that "_max_distance" is greater than 30, otherwise the while loop will go forever.
- Array
+ Array
+
- getPosATL
+ removeUniform
- Returns the position of an object relative to the terrain.
+ Removes uniform from unit.
- https://community.bistudio.com/wiki/getPosATL
+ https://community.bistudio.com/wiki/removeUniform
- getPosATL Object
+ removeUniform Object
- getPosATL object
+ removeUniform unit
- $Code$_objPosition = getPosATL player$/Code$
+ $Code$removeUniform player ;$/Code$
- global / undefined
+ global / global
- (December 18, 2015)
- If one desires to retrieve an object from an array of object, be sure to wrap your array information in parenthesis. e.g. getPosATL ( myArray select 0 ) ;
- Array
+ Nothing
+
- getPosVisual
+ remoteControl
- Returns an object's rendered 3D position (z value above sea when over sea, or above ground when over land) in render time scope. Alias of visiblePosition.
+ Switches on remote control of the unit. Command needs to be executed locally to the player. If driver is remote it will get transferred to players PC.
- https://community.bistudio.com/wiki/getPosVisual
+ https://community.bistudio.com/wiki/remoteControl
- getPosVisual Object
+ Object remoteControl Object
- getPosVisual object
+ who remoteControl whom
- $Code$_playerRenderedPos = getPosVisual player ;$/Code$
+ $Code$// Set player remote control of driver:
+ player remoteControl driver UAV;
+ driver UAV switchCamera "Internal"; //switchCamera required
+ //sometimes switchCamera is not needed
+ player remoteControl driver UAV;$/Code$
+
+ $Code$// Return control to player:
+ objNull remoteControl driver UAV;$/Code$
- global / undefined
+ local / global
+ You must use switchCamera in order to remote control the unit and.
+ You can only remoteControl characters, e.g. if yo want to remote control a car, you have
+ to add a driver and use
+ "player remoteControl driver someVehicle".
+
+ (Jan 25, 2010)
+ Arma 1.05 :
+ You can remoteControl multiple units at the same time.
+ It is not needed to switchCamera to the unit to be able to control it - it is needed to be able to fire with.
+ The switchCamera is fixed : the player can't change internal/external/optics view.
+ Do not think about it like a selectPlayer : it is used to give the control to the vehicle role the unit is in.
+ SwitchCamera to the vehicle the unit is in ; the camera will go depending the role you are remoteControlling.
+ The AI driver won't follow your vehicle move orders.
+ If the player dies, the death screen will appear, not automatically turning back to the player.
+ If you want to stop the remote control, use objNull as remote controller.
+ Example :
+ player remoteControl driver jeep1; // will remoteControl it, you still will have full control of the player
+ jeep1 switchCamera "internal"; // fix the camera to the ''vehicle'' and not to (driver jeep1) !
+ waitUntil { !(alive jeep1) || !(alive player) };
+ objNull remoteControl driver jeep1; // removes the remoteControlling
+ player switchCamera "internal"; // returns to the player
- Array
+ Nothing
+
- getPosWorld
+ configClasses
- Returns PositionWorld, which is PositionASL of the model centre [0,0,0] of an object, rather than transformed boundingCenter or LandContact vertices.
+ Returns an array of config entries which meet criteria in condition code. Command iterates through all available config sub classes of the given config class. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at config to be added to the resulting array. Slightly faster than configProperties, but doesn't account for config properties or inherited entries.
+ The condition code passed to configClasses should only be used for simple filter expressions and nothing more
- https://community.bistudio.com/wiki/getPosWorld
+ https://community.bistudio.com/wiki/configClasses
- getPosWorld Object
+ String configClasses Config
- getPosWorld object
+ condition configClasses config
- $Code$_obj setPosWorld getPosWorld _obj;$/Code$
+ $Code$// collect all CfgVehicles configs:
+ _configs = " true " configClasses ( configFile "CfgVehicles");$/Code$
- $Code$ATLToASL (_groundObj modelToWorld [0,0,0]) isEqualTo getPosWorld _groundObj; //true$/Code$
+ $Code$// Return all classes that can transport 10 and more soldiers:
+ _transporters = " getNumber (_x 'transportSoldier') = 10" configClasses ( configFile "CfgVehicles");$/Code$
- $Code$// Wave height under a boat:
- _h = ((boat modelToWorld [0,0,0]) vectorDiff getPosWorld boat) select 2;$/Code$
+ $Code$// Return all classes that inherit from 'RscText':
+ hint str (" inheritsFrom _x == ( configFile 'RscText')" configClasses configFile );$/Code$
- global / undefined
+ undefined / undefined
+ (oct 19, 2014)
+ A fantastic way to filter stuff. eg; Create an array of west vehicles and spawn then in front of the player in rows of 5
+ $Code$
+ private ["_cfgArray","_xPos","_yPos","_veh"];
+ _cfgArray = "(
+ (getNumber (_x 'scope') = 2) &&
+ {getNumber (_x 'side') == 1 &&
+ {getText (_x 'vehicleClass') in ['Armored', 'Car', 'Air']
+ }
+ }
+ )" configClasses (configFile "CfgVehicles");
+ _xPos = 0;
+ _yPos = 0;
+ {
+ _yPos = _yPos + 20;
+ _veh = createVehicle [ ( configName _x ), player modelToWorld [_xPos, _yPos, 0], [], 0, "None"];
+ if (_yPos = 100) then {
+ _yPos = 0;
+ _xPos = _xPos + 20;
+ };
+ } forEach _cfgArray;
+ $/Code$
+
+ (May 28, 2016)
+ configClasses does not account for inherited subclasses, use configProperties with isClass filter instead
+ $Code$ configProperties [_config, " isClass _x", true ];$/Code$
+
+ (May 28, 2017)
+ this will get a list of ALL locations on the currently loaded world
+ $Code$( "true" configClasses ( configFile "CfgWorlds" worldName "names" ) ) apply {
+ // change each config entry into a location
+ nearestLocation [
+ getArray ( _x "position" ),
+ getText ( _x "type" )
+ ]
+ };$/Code$
- Array
+ Array
+
- getPos
+ isStaminaEnabled
- Returns the object position in format PositionAGLS. Z value is height over the surface underneath.
- Since Arma 3 v1.55.133361, an alternative syntax is added that allows to get position given distance and heading away from original object or position, the equivalent of BIS_fnc_relPos
+ Check if stamina depletion is enabled
- https://community.bistudio.com/wiki/getPos
+ https://community.bistudio.com/wiki/isStaminaEnabled
- getPos Object/Location
-
- Object/Position2D/Position3D getPos Array
+ isStaminaEnabled Object
- getPos object
-
- origin getPos [distance, heading]
+ isStaminaEnabled unit
- $Code$hintSilent str getPos player ;$/Code$
-
- $Code$// getPos vs. other methods (over sea)
- diag_log getPos ship; // [2412.01, 6036.33, -0.839965]
- diag_log getPosATL ship; // [2412.01, 6036.33, 19.4266]
- diag_log getPosASL ship; // [2412.01, 6036.33, -0.920066]
- diag_log getPosASLW ship; // [2412.01, 6036.33, -0.865981]
- diag_log visiblePosition ship; // [2412.02, 6036.33, -0.837952]
- diag_log visiblePositionASL ship; // [2412.02, 6036.33, -0.91798]
- diag_log position ship; // [2412.01, 6036.33, -0.839965]$/Code$
-
- $Code$// getPos vs. other methods (over land)
- diag_log getPos car; // [2508.64, 5681.47, 0.0609589]
- diag_log getPosATL car; // [2508.64, 5681.47, 0.0356369]
- diag_log getPosASL car; // [2508.64, 5681.47, 71.718]
- diag_log getPosASLW car; // [2508.64, 5681.47, 71.718]
- diag_log visiblePosition car; // [2508.64, 5681.47, 0.0609512]
- diag_log visiblePositionASL car; // [2508.64, 5681.47, 71.718]
- diag_log position car; // [2508.64, 5681.47, 0.0609589]$/Code$
-
- $Code$// Find position 100 metres and 45 degrees from player position:
- player getPos [100,45];$/Code$
+ $Code$isStaminaEnabled player;$/Code$
global / undefined
- (16 Feb, 2007)
- getPos obj select 2
- might return the vertical position above ground level, but for a stacked object, it returns the vertical position above the object beneath it. The same problem exists for getPosASL. There was a discussion thread in the BIS forums which suggested the use of the command modelToWorld instead to get around this issue where an absolute vertical position is required. ArmA Ver 1.02.
-
- (6 Feb, 2011)
- The z height returned changes dynamically with the height of waves beneath the object, if the object is located over sea. The z height returned by getPosATL and getPosASL does not change like this. This was tested by continuously retrieving the position of a static object, like the cross in the empty/corpses category, placed over sea or land.
- getPos behaves similar to
- _obj modelToWorld [0.0, 0.0, 0.0]
- but it does not give the same result, therefore
- (_obj modelToWorld [0.0, 0.0, 0.0]) is not the same as (getPos _obj).
-
- (23 Nov, 2011)
- You can use getPos and setPos on triggers.
- Array - Array
+ Boolean
+
- getPylonMagazines
+ tvPicture
- Return array of magazines on pylons
+ Returns name of picture from item pointed to by path. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/getPylonMagazines
+ https://community.bistudio.com/wiki/tvPicture
- getPylonMagazines Object
+ tvPicture Array
+
+ Control tvPicture Array
- getPylonMagazines vehicle
+ tvPicture [idc, [path]]
+
+ _ctrl tvPicture [path]
- $Code$getPylonMagazines ( vehicle player )$/Code$
+ $Code$tvPicture [101, [0]];$/Code$
+
+ $Code$_ctrl tvPicture [0,0,0];$/Code$
- undefined / undefined
+ local / local
- (May 12, 2017)
- The indexes of the returned array's elements are relative to the pylon IDs, such that element 0 is pylon 1, element 1 is pylon 2, etc.
+ (Sep 11 2014)
+ (A3 1.28)tv command family overview
+ $Code$
+ //tv command family available for CT_TREE (type 12)
+ private ["_count","_current","_data","_text","_value","_pic"];
+ _CT_TREE tvAdd [ [],"Parent_A"];
+ _CT_TREE tvAdd [ [0],"Child_A"];
+ _CT_TREE tvAdd [ [0,0],"Grandchild_A"];
+ _CT_TREE tvAdd [ [],"Parent_B"];
+ _CT_TREE tvAdd [ [1],"Child_B"];
+ _count = _CT_TREE tvCount []; //return 2
+ _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A
+ _current = tvCurSel _CT_TREE; //return [0,0,0]
+ _CT_TREE tvSetData [_current,"I'm grandchild_A"];
+ _data = _CT_TREE tvData _current; // "I'm grandchild_A"
+ _text = _CT_TREE tvText _current; //"Grandchild_A"
+ _CT_TREE tvSetValue [_current,14];
+ _value = _CT_TREE tvValue _current; // 14
+ _CT_TREE tvSetPicture [_current, getText ( configFile "CfgWeapons" "optic_NVS" "picture")];
+ _pic = _CT_TREE tvPicture _current;
+ _CT_TREE tvExpand [1];
+ _CT_TREE tvSort [[], false ];
+ _CT_TREE tvSortByValue [[], false ];
+ _CT_TREE tvDelete [0,0]; //remove child_b
+ tvClear 12;
+ _CT_TREE tvCollapse [];
+ $/Code$
- Array
+ String - String
+
- getRelDir
+ setDropInterval
- Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo.
+ Set interval of emitting particles from particle source. In Arma 3 hardcoded limit of how many particles can exist at the same time is 18000. Correspondence between CfgCloudlets class param name and command param:
+ $Code$particleSource setDropInterval interval;$/Code$
- https://community.bistudio.com/wiki/getRelDir
+ https://community.bistudio.com/wiki/setDropInterval
- Object getRelDir Object/Position2D/Position3D
+ Object setDropInterval Number
- object getRelDir position
+ particleSource setDropInterval interval
- $Code$_reldir = player getRelDir tank;$/Code$
+ $Code$_source setDropInterval 0.05;$/Code$
- global / undefined
+ undefined / undefined
- Number
+ Nothing
+
- getRelPos
+ get3DENActionState
- Returns position, which is given distance and relative direction away from original object.
+ Returns state of given action in the Eden Editor.
+ See the list of all actions.
- https://community.bistudio.com/wiki/getRelPos
+ https://community.bistudio.com/wiki/get3DENActionState
- Object getRelPos Array
+ get3DENActionState String
- object getRelPos [distance, direction]
+ get3DENActionState action
- $Code$// Find position 100 metres away at player's 3 o'clock:
- _relpos = player getRelPos [100, 90];$/Code$
+ $Code$if ( get3DENActionState "ToggleMap" == 1) then { systemChat "Editor map is open!"};$/Code$
- global / undefined
+ undefined / undefined
- getPos vs getRelPos: getRelPos operates similarly to getPos except in getRelPos the direction is calculated 'relative' to the current object direction whereas getPos's direction is from North. Thus while getPos can take a position array as it's starting point, getRelPos requires an object with its own azithmus heading.
-
- (3 March, 2016)
- Array
+ Number
+
- getRemoteSensorsDisabled
+ selectDiarySubject
- Get status of disabled raycasts for remote entities. See disableRemoteSensors for detailed description.
+ Select the subject page in a log.
- https://community.bistudio.com/wiki/getRemoteSensorsDisabled
+ https://community.bistudio.com/wiki/selectDiarySubject
- getRemoteSensorsDisabled
+ Object selectDiarySubject String
- getRemoteSensorsDisabled
+ person selectDiarySubject subject
- $Code$_status = getRemoteSensorsDisabled ;$/Code$
-
+
undefined / undefined
- Boolean
+ Nothing
+
- getRepairCargo
+ openMap
- Returns the amount of repair resources from empty (0) to full (1) in the cargo space of a repair vehicle.
+ Shows in-game map. If forced, cannot be closed.
- https://community.bistudio.com/wiki/getRepairCargo
+ https://community.bistudio.com/wiki/openMap
- getRepairCargo Object
+ openMap Boolean
+
+ openMap Array
- getRepairCargo vehicle
+ openMap show
+
+ openMap [show, forced]
- $Code$value = getRepairCargo vehicleName;$/Code$
+ $Code$openMap true ;$/Code$
+
+ $Code$openMap [ true, true ];$/Code$
- global / undefined
+ undefined / local
- (December 22, 2014)
- If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.
- If the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite.
- Number
+ Boolean - Boolean
+
- getResolution
+ setPilotCameraTarget
- Returns an array containing all information about resolution.
- The returned Array is as follow: [width, height, 2D viewport width, 2D viewport height, aspect ratio, UI scale]
- Note: aspect ratio and UI scale are returned as coefficients and not 16:9 for example.
+ Sets an area or target to be tracked by the object airplane or helicopter pilotCamera.
+ To track an object the vehicle has to have appropriate sensors ( scanners ) that can detect the given target type.
+ Using objNull will unlock the camera
- https://community.bistudio.com/wiki/getResolution
+ https://community.bistudio.com/wiki/setPilotCameraTarget
- getResolution
+ Object setPilotCameraTarget Object/Array
- getResolution
+ object setPilotCameraTarget target
- $Code$_res = getResolution ; //some single monitor setup[
- 1360,//width
- 768,//height
- 867,//2D viewport width
- 653,//2D viewport height
- 1.77778,//aspect ratio
- 0.85//UI scale
- ]$/Code$
-
- $Code$_res = getResolution ; //dedicated server[
- 160,//width
- 120,//height
- 136,//2D viewport width
- 102,//2D viewport height
- 1.33333,//aspect ratio
- 0.85//UI scale
- ]$/Code$
+ $Code$_pilotCamTrack = vehicle player setPilotCameraTarget [2100,4200,4.2];$/Code$
- $Code$_res = getResolution ; //some triple monitor setup[
- 5760,//width
- 1080,//height
- 792,//2D viewport width
- 594,//2D viewport height
- 5.33333,//aspect ratio
- 0.55//UI scale
- ]$/Code$
+ $Code$_pilotCamTrack = vehicle player setPilotCameraTarget BIS_Edita;$/Code$
- undefined / undefined
+ local / undefined
- (05:38, 20 December 2010)
- This command can be usefull to play a video (see this function BIS_fnc_playVideo ) in the given format if you've compiled it for different UI scale.
- Array
+ Boolean
+
- getShadowDistance
+ selectMin
- Gets the shadows rendering distance.
+ Returns the array element with minimum numerical value. Engine solution to BIS_fnc_lowestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only. Booleans however are also supported and will be evaluated as Numbers : true - 1, false - 0. nil value treated as 0. Other non Number elements (not recommended) will be evaluated as 0 and Bad conversion: scalar message will be logged into. rpt.
- https://community.bistudio.com/wiki/getShadowDistance
+ https://community.bistudio.com/wiki/selectMin
- getShadowDistance
+ selectMin Array
- getShadowDistance
+ selectMin array
- $Code$_value = getShadowDistance;$/Code$
+ $Code$_min = selectMin [1,2,3,4,5]; //1$/Code$
+
+ $Code$// Same as, for example:
+ _min = _a min _b min _c min _d;
+ // Only faster:
+ _min = selectMin [_a,_b,_c,_d];$/Code$
undefined / undefined
@@ -29871,120 +31667,127 @@
- Number
+ Anything
+
- getShotParents
+ setWaypointVisible
- Returns shot information Array for the given projectile in format [vehicle, instigator], where vehicle is the vehicle the shot was fired from, and the instigator is the person who pulled the trigger. If shot was fired by a soldier on foot or in FFV position in vehicle, the soldier is returned for the vehicle.
+ Sets the visibility of the waypoint.
- https://community.bistudio.com/wiki/getShotParents
+ https://community.bistudio.com/wiki/setWaypointVisible
- getShotParents Object
+ Array setWaypointVisible Boolean
- getShotParents projectile
+ waypoint setWaypointVisible visible
- $Code$_shotParents = getShotParents myProjectile;$/Code$
+ $Code$[grp, 2] setWaypointVisible false ;$/Code$
- $Code$tank addEventHandler ["Fired", { systemChat str getShotParents (_this select 6)}];$/Code$
+ $Code$[ group player, currentWaypoint ( group player )] setWaypointVisible false ;$/Code$
- undefined / undefined
+ undefined / global
+ (September 23, 2015)
+ This does not apply to Zeus/Curator view... so this command won't hide the Waypoint lines and icons from your view as a Zeus when units are in your EditableAddons list.
- Array
+ Nothing
+
- getSlingLoad
+ addPrimaryWeaponItem
- Return object which is sling loaded by vehicle
+ Adds weapon item to the weapon cargo space. This is used for infantry weapons.
+ As of Arma 3 DEV 1.37, this command also supports weapon magazines.
- https://community.bistudio.com/wiki/getSlingLoad
+ https://community.bistudio.com/wiki/addPrimaryWeaponItem
- getSlingLoad Object
+ Object addPrimaryWeaponItem String
- getSlingLoad vehicle
+ unit addPrimaryWeaponItem item
- $Code$_cargo = getSlingLoad heli1;$/Code$
+ $Code$player addPrimaryWeaponItem "muzzle_snds_H";$/Code$
- undefined / undefined
+ local / global
- (05 April, 2014)
- Returns objNull when nothing is sling loaded.
+ (June 22, 2014)
+ If the item being added is not supported by the unit's weapon then the command will simply fail silently. The item is also not added to the unit's inventory in such a case.
- Object
+ Nothing
+
- getSpeed
+ face
- Get the speed for the given speed mode.
- SpeedMode can be:
- "AUTO"
- "SLOW"
- "NORMAL"
- "FAST"
+ Returns the face of a person.
- https://community.bistudio.com/wiki/getSpeed
+ https://community.bistudio.com/wiki/face
- Object getSpeed String
+ face Object
- object getSpeed speedMode
+ face person
- $Code$_spd = player getSpeed "FAST";$/Code$
+ $Code$face player$/Code$
- global / undefined
+ undefined / undefined
- Number
+ String
+
- getStamina
+ diag_captureFrame
- Get current stamina (~ seconds until depletion)
+ This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and captured data UI dialog appears, similar to diag_captureSlowFrame.
+ This can also be executed on a dedicated Server and because a Server has no UI it will behave like diag_captureFrameToFile.
+ Special: BattlEye's RCON variant of this command is #captureFrame
+ Note : Only available in specific builds. See Performance Profiling for details.
- https://community.bistudio.com/wiki/getStamina
+ https://community.bistudio.com/wiki/diag_captureFrame
- getStamina Object
+ diag_captureFrame Number
- getStamina unit
+ diag_captureFrame frame
- $Code$getStamina player;$/Code$
+ $Code$diag_captureFrame 1; //capture the first frame after command execution$/Code$
+
+ $Code$diag_captureFrame 24; //capture 24th frame after command execution$/Code$
undefined / undefined
@@ -29992,27 +31795,28 @@
- Number
+ Nothing
+
- getStatValue
+ ctrlFade
- Returns value of the given stat.
+ Returns the current fade factor of control.
- https://community.bistudio.com/wiki/getStatValue
+ https://community.bistudio.com/wiki/ctrlFade
- getStatValue String
+ ctrlFade Control
- getStatValue name
+ ctrlFade controlName
- $Code$getStatValue "ExpWarlockDown"; //Checks if the "Warlock Down" Achivement was already aquired$/Code$
+ $Code$_scale = ctrlFade _control$/Code$
undefined / undefined
@@ -30020,152 +31824,115 @@
- Number
+ Number
+
- getSuppression
+ ctRemoveHeaders
- Gets the suppression value of given unit. Returns SCALAR between 0 and 1. Suppression is not calculated for player entities.
+ Takes array of header indices as a parameter and removes headers with those indices. Indices of remaining headers will be recomputed.
- https://community.bistudio.com/wiki/getSuppression
+ https://community.bistudio.com/wiki/ctRemoveHeaders
- getSuppression Object
+ Control ctRemoveHeaders Array
- getSuppression unit
+ ctrl ctRemoveHeaders indices
- $Code$getSuppression AI_unit_1;$/Code$
+ $Code$_control ctRemoveHeaders [0, 1, 2];$/Code$
- local / undefined
+ local / local
- Number
+ Nothing
+
- getTerrainHeightASL
+ ctrlMapScale
- Returns the terrain height above the sea for the given position.
+ Returns the current scale of given map control.
- https://community.bistudio.com/wiki/getTerrainHeightASL
+ https://community.bistudio.com/wiki/ctrlMapScale
- getTerrainHeightASL Position2D/Position3D
+ ctrlMapScale Control
- getTerrainHeightASL position
+ ctrlMapScale ctrl
- $Code$_height = getTerrainHeightASL ( position player );$/Code$
-
- $Code$_height = getTerrainHeightASL [5213,3245];$/Code$
-
- $Code$_seadepth = abs ( getTerrainHeightASL getPos player ); // sea depth at players position;$/Code$
+ $Code$_control = ( findDisplay 12) displayCtrl 51; //Arma 3
+ _scale = ctrlMapScale _control; //returns number from 1 to 0.001$/Code$
undefined / undefined
- (June 6, 2017)
- This command can usefully return the depth of water at the given position when in water. Note that the number it returns is the depth, albiet expressed as a negative number. Use abs to always return a positive number. See example 3
- Number
+ Number
+
- getText
+ agent
- Extract text from config entry.
+ Return a person for a given agent.
- https://community.bistudio.com/wiki/getText
+ https://community.bistudio.com/wiki/agent
- getText Config
+ agent Team_Member
- getText config
+ agent teamMember
- $Code$_text = getText ( configFile "CfgVehicles" "Thing" "icon");$/Code$
-
+
undefined / undefined
- (Mar 28, 2014)
- (ArmA3 1.14) It's recommended to use BIS_fnc_GetCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.
- Traditional workaround:
- $Code$
- _cfg = configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type"
- switch ( true ) do
- {
- case ( isNumber _cfg): { getNumber _cfg};
- case ( isText _cfg): { getText _cfg};
- case ( isArray _cfg): { getArray _cfg;};
- default { nil };
- };
- $/Code$
- Recommended workaround:
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_GetCfgData ;
- $/Code$
- To return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_GetCfgData. e.g.
- $Code$
- [( configFile "CannonFire" "LightExp"),"lifeTime",0] call BIS_fnc_returnConfigEntry ;//0.5
- $/Code$
- To compose collected String into Array, use BIS_fnc_getCfgDataArray instead. E.g.
- $Code$
- ( configFile "CfgVehicles" _SomeAddonClassName "DestructionEffects" "Smoke1" "type") call BIS_fnc_getCfgDataArray ;
- $/Code$
- String
+ Object
+
- getUnitLoadout
+ safeZoneWAbs
- Returns an array with all assigned items, weapons, containers and their stored items.
- Detailed explanation of the returned array: Talk:getUnitLoadout
- This command is not final and might be changed in a near future.
+ Returns SafeZone width (of all monitors, in case there's more than one)
- https://community.bistudio.com/wiki/getUnitLoadout
+ https://community.bistudio.com/wiki/safeZoneWAbs
- getUnitLoadout Object
-
- getUnitLoadout String/Config
+ safeZoneWAbs
- getUnitLoadout unit
-
- getUnitLoadout class
+ safeZoneWAbs
- $Code$getUnitLoadout player ;$/Code$
-
- $Code$getUnitLoadout "B_Soldier_F";$/Code$
-
- $Code$getUnitLoadout ( configFile "CfgVehicles" "B_Soldier_F");$/Code$
+ $Code$_szW = safeZoneWAbs;$/Code$
undefined / undefined
@@ -30173,238 +31940,179 @@
- Array - Array
+ Number
+
- getUnitTrait
+ deActivateKey
- Gets the current value of a trait of the given unit.
- Default traits are:
- audibleCoef (scalar)
- camouflageCoef (scalar)
- engineer (bool)
- explosiveSpecialist (bool)
- loadCoef (scalar)
- medic (bool)
- UAVHacker (bool)
+ Deactivates the given keyname for the current user profile. The keys are used to unlock missions or campaigns.
+ See keys, keysLimit and doneKeys in the description.ext file of the missions.
- https://community.bistudio.com/wiki/getUnitTrait
+ https://community.bistudio.com/wiki/deActivateKey
- Object getUnitTrait String
+ deActivateKey String
- unit getUnitTrait skill_name
+ deActivateKey keyname
- $Code$player getUnitTrait "Medic";$/Code$
+ $Code$deActivateKey "Mission04Key"$/Code$
- global / undefined
+ undefined / undefined
- Boolean/Number
+ Nothing
+
- getVariable
+ flagSide
- Return the value of variable in the variable space assigned to various data types. In case of Alt Syntax usage in Arma 3, the default value will be returned if:
- Requested variable is either undefined or nil
- Variable namespace is null ( objNull, grpNull, etc.)
- All available data types combinations:
- Namespace getVariable String
- Namespace getVariable Array (since Arma 2 1.60)
- Object getVariable String
- Object getVariable Array
- Group getVariable String
- Group getVariable Array
- Team_Member getVariable String
- Team_Member getVariable Array
- Task getVariable String
- Task getVariable Array (Since Arma 3 v1.67)
- Location getVariable String
- Location getVariable Array (Since Arma 3 v1.67)
- Control getVariable String (since Arma 3 v1.55.133553)
- Control getVariable Array (since Arma 3 v1.55.133553)
- Display getVariable String (since Arma 3 v1.55.133553)
- Display getVariable Array (since Arma 3 v1.55.133553)
- When variable is set on Task, it is not actually set on task itself, but on FSM attached to the task. So if there is no FSM getVariable will not work.
+ Returns Side of the local instance of the flag. A getter for setFlagSide.
- https://community.bistudio.com/wiki/getVariable
+ https://community.bistudio.com/wiki/flagSide
- Namespace/Object/Display/Control/Group/Location/Task/Team_Member getVariable String
-
- Namespace/Object/Display/Control/Group/Location/Task/Team_Member getVariable Array
+ flagSide Object
- varspace getVariable name
-
- varspace getVariable [name, defaultValue]
+ flagSide flag
- $Code$_thePublicVariable = _myTruck getVariable "myPublicVariable";$/Code$
-
- $Code$_aLocalVariable = _myTruck getVariable ["myLocalVariable", ["Not set", _var]] select 1;$/Code$
-
- $Code$for "_i" from 0 to 5 do {
- _car = missionNamespace getVariable ("car" + str _i);
- _car setDamage 0;
- };
- // Sets damage of car0, car1,..., car5 to 0.$/Code$
-
- $Code$myMissionVar = 2015;
- missionNamespace getVariable "myMissionVar";//Returns 2015$/Code$
-
- $Code$// WARNING when using dynamic default value:
- missionNamespace getVariable ["var", 123 call fnc_abc];
- /// fnc_abc is always called even when var is defined$/Code$
-
- $Code$// Get current value of a variable and if it is undefined, define it and get the defined value:
- private _var = missionNamespace getVariable "varName";
- if ( isNil "_var") then
- {
- missionNamespace setVariable ["varName", 123];
- _var = 123;
- };
- // _var here will contain current value of the variable varName$/Code$
+ $Code$_flagSide = flagSide flag;$/Code$
- global / undefined
+ global / local
- (August 13, 2016)
- NOTE: Arma 2 ONLY! In Arma 3 this will return default value.
- Warning: the alternative syntax returns undefined when the varspace is an object and that object is null. Example:
- $Code$_test = objNull getVariable ["test","0"];
- systemChat _test;$/Code$
- Errors because _test is undefined. Tested in A2OA 1.63.131129
- Anything/Nothing - Anything
+ Side
+
- getVehicleCargo
+ ctrlSetFocus
- Gets a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle.
+ Set the input focus on given control.
- https://community.bistudio.com/wiki/getVehicleCargo
+ https://community.bistudio.com/wiki/ctrlSetFocus
- getVehicleCargo Object
+ ctrlSetFocus Control
- getVehicleCargo vehicle
+ ctrlSetFocus controlName
- $Code$// Blackfish with no cargo vehicles
- _vehicleCargo = getVehicleCargo blackfish; //returns []$/Code$
-
- $Code$// Blackfish with cargo vehicles loaded in the order quad_3, quad_1, quad_2
- _vehicleCargo = getVehicleCargo blackfish; //returns [quad_3, quad_1, quad_2]$/Code$
+ $Code$ctrlSetFocus _control$/Code$
undefined / undefined
+ (June 30, 2017)
+ This command seems to only work on controls that accept any input from keyboard or mouse.
- Array
+ Nothing
+
- getWPPos
+ ctrlAutoScrollSpeed
- Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.
+ Returns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.
+ Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
- https://community.bistudio.com/wiki/getWPPos
+ https://community.bistudio.com/wiki/ctrlAutoScrollSpeed
- getWPPos Array
+ ctrlAutoScrollSpeed Control
- getWPPos [group, index]
+ ctrlAutoScrollSpeed control
- $Code$[_group1,1] setWPPos [200,600,0]; _pos = getWPPos [_group1,1];
- // returns [200,600,0]$/Code$
+ $Code$_ctrlSpeed = ctrlAutoScrollSpeed _ctrlGroup;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Number
+
- getWeaponCargo
+ lbSelection
- Returns all weapons types and count from the cargo space
+ Returns Array of selected rows indices in the given listbox of style LB_MULTI (multi-selection). For single selection listbox use lbCurSel instead.
- https://community.bistudio.com/wiki/getWeaponCargo
+ https://community.bistudio.com/wiki/lbSelection
- getWeaponCargo Object
+ lbSelection Control
- getWeaponCargo object
+ lbSelection control
- $Code$_content = getWeaponCargo carName;$/Code$
-
- $Code$_content = getWeaponCargo ammoBoxName;
- // Sample result returns:
- [["arifle_Katiba_F","launch_B_Titan_short_F"],[2,1]]$/Code$
+ $Code$_indices = lbSelection _control;$/Code$
- global / undefined
+ undefined / undefined
+ (April 10, 2016)
+ This command works fine with listboxs of style LB_MULTI and should not be marked as obsolete as lbCurSel does not provide the same functionality.
- Array
+ Array
+
- getWeaponSway
+ effectiveCommander
- Returns current size of weapon sway of a given unit, in radians
+ Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to. So if in a tank there is a gunner and a commander and AI driver, if the effectiveCommander is gunner, then gunner pressing WASD will give AI orders to move. If gunner jumps out and then enters tank again, the effectiveCommander role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis.
- https://community.bistudio.com/wiki/getWeaponSway
+ https://community.bistudio.com/wiki/effectiveCommander
- getWeaponSway Object
+ effectiveCommander Object
- getWeaponSway unit
+ effectiveCommander vehicle
- $Code$_sway = getWeaponSway player ;$/Code$
+ $Code$_commander = effectiveCommander tank;$/Code$
undefined / undefined
@@ -30412,300 +32120,284 @@
- Number
+ Object
+
- glanceAt
+ setBehaviour
- Control what the unit is glancing at (target or Position ).
- How frequently the unit is glancing there depends on behaviour.
+ Sets group behaviour mode. If a unit is given as argument, behaviour is set for the unit's group. Behaviour is one of:
+ "CARELESS"
+ "SAFE"
+ "AWARE"
+ "COMBAT"
+ "STEALTH".
+ See AIBehaviour for details of the effect of this command on AI units. For Arma 3 see Arma 3 AI Behavior.
- https://community.bistudio.com/wiki/glanceAt
+ https://community.bistudio.com/wiki/setBehaviour
- Object/Array glanceAt Object/Array
+ Group/Object setBehaviour String
- unit glanceAt position
+ groupName setBehaviour behaviour
- $Code$_someSoldier glanceAt _otherSoldier$/Code$
-
- $Code$_otherSoldier glanceAt markerPos "markerOne"$/Code$
+ $Code$_group1 setBehaviour "SAFE";$/Code$
- undefined / undefined
+ local / global
+ Warning! Since ArmA v.1.14 the command setBehaviour "COMBAT" do not work correctly any loger.
+ Units ( Groups ) which are using this behaviour and then get a move order, will not move to the given position.
+
+ Although setBehaviour can be called on an individual unit, the entire group will be affected.
+
+ If setting a behaviour on an individual unit is required, it can be achieved by creating a temporary group, use joinSilent to make the individual unit belong to that group, then change his behaviour, use joinSilent into the original group, then delete the temporary group.
- Nothing
+ Nothing
+
- globalChat
+ formationMembers
- Types text to the global radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
+ Return list of units (drivers) in the formation.
- https://community.bistudio.com/wiki/globalChat
+ https://community.bistudio.com/wiki/formationMembers
- Object globalChat String
+ formationMembers Object
- unitName globalChat chatText
+ formationMembers person
- $Code$_soldierOne globalChat "Show this text";$/Code$
-
- $Code$driver vehicle player sideChat "sideChat";
- driver vehicle player globalChat "globalChat";
- driver vehicle player groupChat "groupChat";
- vehicle player vehicleChat "vehicleChat";
- driver vehicle player commandChat "commandChat";
- driver vehicle player customChat [1, "customChat"];
- systemChat "systemChat";$/Code$
+ $Code$_drivers=FormationMembers _person$/Code$
- global / local
+ undefined / undefined
- In OFP 1.96, this command can be used by a Game_Logic unit, which will result in the text being displayed on screen without any indication of the side of radio source, or quotation marks. For example : gamelogic1 globalchat "hello world" will create the text hello world in the radio log.
- Nothing
+ Array
+
- globalRadio
+ setFormationTask
- Sends the audio message to the global radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
- Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
+ Set the current task of the formation member.
- https://community.bistudio.com/wiki/globalRadio
+ https://community.bistudio.com/wiki/setFormationTask
- Object globalRadio String
+ Object setFormationTask String
- unit globalRadio radioName
+ object setFormationTask task
- $Code$_soldierOne globalRadio "messageOne";$/Code$
-
- $Code$player globalRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
-
+
- global / local
+ undefined / undefined
- (December 3, 2016)
- To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
- $Code$ player globalRadio "#MySound.ogg";$/Code$
+ (16:57, 2 March 2007 (CET))
+ The argument for task can be any String value. This can effectively be used to store a property in String format an retrieve it with formationTask in FSM scripts. By using it outside of FSM scripts you're risking to get it overwritten by other running FSM scripts.
- Nothing
+ Nothing
+
- goggles
+ dynamicSimulationEnabled
- Returns name of currently used goggles (for NVGoggles use hmd ).
+ A getter for enableDynamicSimulation
- https://community.bistudio.com/wiki/goggles
+ https://community.bistudio.com/wiki/dynamicSimulationEnabled
- goggles Object
+ dynamicSimulationEnabled Object/Group
- goggles unit
+ dynamicSimulationEnabled object
- $Code$_goggles = goggles assaultDiver; //G_Diving$/Code$
-
- $Code$_goggles = goggles reconTeamLeader; //G_Shades_Black$/Code$
+ $Code$hint str dynamicSimulationEnabled _myObject;$/Code$
- global / undefined
+ undefined / undefined
- String
+ Boolean
+
- goto
+ setWindDir
- In SQS scripts only: Go to given label.
- String argument is used here.
- Be sure to use double quotes around label name in goto. Define the label with #. Note that Labels are not case sensitive and that labels are searched for from the top of the script, so multiple occurrences of a label will only result in the top most one ever being found.
+ Changes the wind direction smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+ NOTE : Effect is global only when executed on the server. On clients wind direction will sync to server value in a while.
- https://community.bistudio.com/wiki/goto
+ https://community.bistudio.com/wiki/setWindDir
- goto String
+ Number setWindDir Number
- goto label
+ time setWindDir value
-
+ $Code$60 setWindDir 180$/Code$
+
- undefined / undefined
+ undefined / global
- (August 4, 2006)
- Notes from before the conversion:
- This function works only inside of SQS script.
- The search for labels always begins at the top of the script so that if there are multiple occurrences of a label the first occurrence will always be the one found.
- Because of the searching order, it is faster to place loops which are executed often at the top of a script.
- Labels are not case sensitive.
- Loops which look something like the example below should be avoided as many of them could cause the mission to slow down:
- #wait
- if (condition) then { goto "wait"}
- It is better to use the @ command to wait for a condition to be true, or put a small delay into the wait loop.
- Example
- While it is not required to include a delay in a loop, such a loop without a delay can cause the script to slow the game down, as the loop will be executed many times before the game engine interrupts the script.
- Unless you really want the loop to execute multiple times during a frame, you should include a small delay.
- You would need to have many scripts running for this to be a significant issue.
- Deciding whether to use a script with a loop or a trigger or even a @ statement to detect a condition is a complicated matter and should be subject to experimentation.
-
- (August 4, 2006)
- A goto command called within a forEach loop, will only execute a single jump to goto, once the forEach loop has finished:
- { goto "wait"} forEach [0,1,2,3,4]
+ (April 12, 2014)
+ Seems to make wind [0,0] in MP. (ArmA 3 1.00)
- Nothing
+ Nothing
+
- groupChat
+ setMarkerTypeLocal
- Types text to the group radio channel. Must have assigned "ItemRadio" to see or transmit the messages. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec )
+ Set marker type. See cfgMarkers for a list of standard markers.
- https://community.bistudio.com/wiki/groupChat
+ https://community.bistudio.com/wiki/setMarkerTypeLocal
- Object groupChat String
+ String setMarkerTypeLocal String
- unitName groupChat chatText
+ markerName setMarkerTypeLocal type
- $Code$_soldierOne groupChat "Show this text";$/Code$
-
- $Code$driver vehicle player sideChat "sideChat";
- driver vehicle player globalChat "globalChat";
- driver vehicle player groupChat "groupChat";
- vehicle player vehicleChat "vehicleChat";
- driver vehicle player commandChat "commandChat";
- driver vehicle player customChat [1, "customChat"];
- systemChat "systemChat";$/Code$
+ $Code$"MarkerOne" setMarkerTypeLocal "Warning";$/Code$
- global / local
+ undefined / local
- Nothing
+ Nothing
+
- groupFromNetId
+ doTarget
- Get group with given unique ID. For objects use objectFromNetId. As this command is MP only, you can use BIS_fnc_groupFromNetId, which extends the use to SP as well.
+ Order the given unit(s) to target the given target (without radio messages).
- https://community.bistudio.com/wiki/groupFromNetId
+ https://community.bistudio.com/wiki/doTarget
- groupFromNetId String
+ Object/Array doTarget Object
- groupFromNetId id
+ unit doTarget target
- $Code$_group = groupFromNetId "4:45";$/Code$
+ $Code$_ESoldier1 doTarget _WSoldier1;$/Code$
- undefined / undefined
+ local / global
+ It appears doTarget objNull can not be used to stop a unit targeting a previously assigned target. Using doWatch objNull will achieve the desired result. (ArmA v1.12Beta)
+
+ (July 2, 2015)
+ To expand on ceeeb's note, commandWatch objNull will also unassign target;
+
+ (March 28, 2017)
+ Targeting may not work as expected when trying to target a unit on the same side (friendly).
- Group
+ Nothing
+
- groupIconSelectable
+ setMarkerShapeLocal
- Return if groups icon raises onClick and onOver events.
+ Selects the shape (type) of the marker.
+ Shape can be "ICON", "RECTANGLE" or "ELLIPSE".
- https://community.bistudio.com/wiki/groupIconSelectable
+ https://community.bistudio.com/wiki/setMarkerShapeLocal
- groupIconSelectable
+ String setMarkerShapeLocal String
- groupIconSelectable
+ markerName setMarkerShapeLocal shape
-
+ $Code$"Marker1" setMarkerShapeLocal "RECTANGLE";$/Code$
+
- undefined / undefined
+ undefined / local
- Boolean
+ Nothing
+
- groupIconsVisible
+ ASLToATL
- Return group icons are visible.
+ Converts a position from PositionASL to PositionATL
- https://community.bistudio.com/wiki/groupIconsVisible
+ https://community.bistudio.com/wiki/ASLToATL
- groupIconsVisible
+ ASLToATL PositionASL
- groupIconsVisible
+ ASLToATL pos
- $Code$// HC bar active
- if (isNil "BIS_HC_visible") then {BIS_HC_visible = groupIconsVisible};
- setGroupIconsVisible [true,true];$/Code$
+ $Code$ASLToATL ( getPosASL player ) isEqualTo getPosATL player$/Code$
undefined / undefined
@@ -30713,281 +32405,300 @@
- Array
+ PositionATL
+
- groupId
+ setGroupIcon
- Returns group name.
+ Set group icons properties.
- https://community.bistudio.com/wiki/groupId
+ https://community.bistudio.com/wiki/setGroupIcon
- groupId Group
+ Group setGroupIcon Array
- groupId group
+ group setGroupIcon [id, icon, offset]
- $Code$_name = groupId ( group player );$/Code$
+ $Code$_target setGroupIcon [_icon,"hc_selectedEnemy"];
+ _target setGroupIcon [_icon,"flag"];
+ _grp setGroupIcon [_iconsize,_iconsizeclass,_offset];
+ _grp setGroupIcon [_newid,_icon,_offset];
+ _grp setGroupIcon [_icon,_iconclass];$/Code$
- global / undefined
+ undefined / undefined
- String
+ Nothing
+
- groupOwner
+ enableCopilot
- Returns ID of client to which the group is local. Can be run only from server. When called from client, it always returns 0
+ Enables copilot actions.
- https://community.bistudio.com/wiki/groupOwner
+ https://community.bistudio.com/wiki/enableCopilot
- groupOwner Group
+ Object enableCopilot Boolean
- groupOwner group
+ vehicle enableCopilot enable
- $Code$_clientID = groupOwner _someGroup;$/Code$
+ $Code$if (! isCopilotEnabled myHeli) then {
+ myHeli enableCopilot true ;
+ };$/Code$
- global / undefined
+ local / global
- This scripting command must be executed on the server to work properly in multiplayer
+ (February 17, 2014)
+ Only enables the user actions, not who is in control - pilot can lock or unlock co-pilot controls in multiplayer while still true.
+ Actions: LockVehicleControl, UnlockVehicleControl, SuspendVehicleControl and TakeVehicleControl
+ You can use the Arma 3 Event Handler - ControlsShifted to detect Take and Release actions
- Number
+ Nothing
+
- groupRadio
+ pixelGridBase
- Sends the audio message to the group radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
- Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
+ Returns grid size based on screen resolution.
- https://community.bistudio.com/wiki/groupRadio
+ https://community.bistudio.com/wiki/pixelGridBase
- Object groupRadio String
+ pixelGridBase
- unit groupRadio radioName
+ pixelGridBase
- $Code$_soldierOne groupRadio "messageOne";$/Code$
-
- $Code$player groupRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+ $Code$_gridBaseHeight = pixelH * pixelGridBase ;$/Code$
- global / local
+ undefined / undefined
- (December 3, 2016)
- To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
- $Code$ player groupRadio "#MySound.ogg";$/Code$
- Nothing
+ Number
+
- groupSelectUnit
+ createDialog
- Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3... buttons to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader.
+ Create a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.
- https://community.bistudio.com/wiki/groupSelectUnit
+ https://community.bistudio.com/wiki/createDialog
- Object groupSelectUnit Array
+ createDialog String
- player groupSelectUnit [unit, select]
+ createDialog dialogName
- $Code$// After leaving menu, deselect all units (command menu is not opened - no selection)
- {
- player groupSelectUnit [_x, false ];
- } forEach ( groupSelectedUnits player );$/Code$
-
- $Code$// Select all units when player is the leader:
- {
- player groupSelectUnit [_x, true ];
- } forEach units player ;$/Code$
-
- $Code$// Open communication with group leader:
- player groupSelectUnit [ leader player, true ];$/Code$
+ $Code$_ok = createDialog "RscDisplayGame";
+ if (!_ok) then { hint "Dialog couldn't be opened!"};$/Code$
- undefined / undefined
+ undefined / local
+ (July 29, 2017)
+ A user dialog created with createDisplay over mission display ( findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work.
- Nothing
+ Boolean
+
- groupSelectedUnits
+ fadeRadio
- Returns selected units in source group for normal commanding mode (individual units). For the High Command equivalent, see hcSelected.
+ Causes a smooth change in the radio volume. The change duration is given by time, the target volume by volume. The default radio volume is 1.0.
- https://community.bistudio.com/wiki/groupSelectedUnits
+ https://community.bistudio.com/wiki/fadeRadio
- groupSelectedUnits Object
+ Number fadeRadio Number
- groupSelectedUnits unit
+ time fadeRadio volume
- $Code$_selectedUnits = groupSelectedUnits player ;$/Code$
+ $Code$5 fadeRadio 0.1$/Code$
- undefined / undefined
+ undefined / local
+ (September 11, 2008)
+ Does not affect VON
+
+ (September 13, 2016)
+ Also influences audibility of the missile warning in helicopters.
- Array
+ Nothing
+
- group
+ setParticleCircle
- Returns the group a unit is assigned to.
+ Updates particle source, creates particles in circle with given radius. Velocity is transformed and added to total velocity. Correspondence between CfgCloudlets class param names and command array of params:
+ $Code$particleSource setParticleCircle
+ [
+ circleRadius,
+ circleVelocity
+ ];$/Code$
- https://community.bistudio.com/wiki/group
+ https://community.bistudio.com/wiki/setParticleCircle
- group Object
+ Object setParticleCircle Array
- group object
+ particleSource setParticleCircle [radius, velocity]
- $Code$_playerGrp = group player$/Code$
-
+
- global / undefined
+ undefined / undefined
- (August 19, 2006)
- Few rules about group in OFP:R.
- 1) When last man in group die or is moved to other group, group will be destroyed, and it can't be used anymore.
- 2) 1st man joined to empty group will be group leader.
- Group
+ Nothing
+
- grpNull
+ itemsWithMagazines
- A non-existing Group. To compare non-existent groups use isNull or isEqualTo :
- grpNull == grpNull ; // false
- isNull grpNull ; // true
- grpNull isEqualTo grpNull ; // true
+ Returns combined array including all unit's items and all unit's magazines. Loaded magazines such as currentMagazine, primaryWeaponMagazine, secondaryWeaponMagazine, handgunMagazine as well as assignedItems are excluded.
- https://community.bistudio.com/wiki/grpNull
+ https://community.bistudio.com/wiki/itemsWithMagazines
- grpNull
+ itemsWithMagazines Object
- grpNull
+ itemsWithMagazines unit
- $Code$! isNull grpNull ; // false$/Code$
-
- $Code$str grpNull ; // NULL-group$/Code$
+ $Code$itemsWithMagazines player
+ //is essentially the same as
+ items player + magazines player [
+ "FirstAidKit",//item
+ "30Rnd_65x39_caseless_mag",//magazine
+ "16Rnd_9x21_Mag",//magazine
+ "Chemlight_green",//magazine
+ "HandGrenade",//magazine
+ "ToolKit",//item
+ "MineDetector"//item
+ ]$/Code$
- undefined / undefined
+ global / undefined
- Group
+ Array
+
- gunner
+ goggles
- Returns the gunner of a vehicle.
+ Returns name of currently used goggles (for NVGoggles use hmd ).
- https://community.bistudio.com/wiki/gunner
+ https://community.bistudio.com/wiki/goggles
- gunner Object
+ goggles Object
- gunner vehicle
+ goggles unit
- $Code$(gunner _tank1) action ["getout",_tank1]$/Code$
+ $Code$_goggles = goggles assaultDiver; //G_Diving$/Code$
+
+ $Code$_goggles = goggles reconTeamLeader; //G_Shades_Black$/Code$
global / undefined
- (2 January, 2007)
- The gunner command will only return a single gunner. If the vehicle has occupied, multiple turrets. See this discussion on the official forums, for an alternative:
- Need an array with a vehicle's cargo units
- Object
+ String
+
- gusts
+ worldToModelVisual
- Return the current gusts value. Scale is 0 to 1.
+ Converts position from world space to object model space in render time scope.
- https://community.bistudio.com/wiki/gusts
+ https://community.bistudio.com/wiki/worldToModelVisual
- gusts
+ Object worldToModelVisual Array
- gusts
+ object worldToModelVisual worldPosition
- $Code$_gustsval = gusts ;$/Code$
+ $Code$_relPos = myObject worldToModelVisual [0,0,0];$/Code$
+
+ $Code$_relPos = player worldToModelVisual position car;$/Code$
+
+ $Code$_relPos = car worldToModelVisual [12000,5000];$/Code$
+
+ $Code$_relPos = unit worldToModelVisual position tank;$/Code$
undefined / undefined
@@ -30995,27 +32706,28 @@
- Number
+ Array
+
- HUDMovementLevels
+ ppEffectEnabled
- Returns movement borders for HUD [min speed, max speed, min alt, max alt, min dir, max dir, position[x,y,z] or target]
+ Checks whether given post process effect is enabled
- https://community.bistudio.com/wiki/HUDMovementLevels
+ https://community.bistudio.com/wiki/ppEffectEnabled
- HUDMovementLevels
+ ppEffectEnabled Number
- HUDMovementLevels
+ ppEffectEnabled effect
- $Code$HUDMovementLevels;//[0,0,0,0,0,0,[0,0,0]]$/Code$
+ $Code$_enabled = ppEffectEnabled _hndl;$/Code$
undefined / undefined
@@ -31023,323 +32735,474 @@
- Array
+ Boolean
+
- halt
+ useAISteeringComponent
- Stops the program into a debugger. In retail version using halt results in error.
+ Enable the new AI driving, used to test the old and new AI driving.
- https://community.bistudio.com/wiki/halt
+ https://community.bistudio.com/wiki/useAISteeringComponent
- halt
+ useAISteeringComponent Boolean
- halt
+ useAISteeringComponent state
- $Code$? _DbugWanted :halt$/Code$
+ $Code$useAISteeringComponent true$/Code$
- undefined / undefined
+ undefined / global
- Nothing
+ Nothing
+
- handgunItems
+ setCombatMode
- Returns array with all items assigned to the handgun. This command is used for infantry weapons only.
+ Set group combat mode (engagement rules).
+ Mode may be one of:
+ "BLUE" = Never fire
+ "GREEN" = Hold fire - defend only
+ "WHITE" = Hold fire, engage at will
+ "YELLOW" = Fire at will
+ "RED" = Fire at will, engage at will
+ See Arma AI Engagement rules for more informations on combat modes.
- https://community.bistudio.com/wiki/handgunItems
+ https://community.bistudio.com/wiki/setCombatMode
- handgunItems Object
+ Object/Group setCombatMode String
- handgunItems unit
+ groupName setCombatMode mode
- $Code$handgunItems player ;
- /*
- [
- "muzzle_snds_L",//silencer
- "",//laser
- "",//optics
- ""//bipod
- ]
- */$/Code$
+ $Code$_group1 setCombatMode "BLUE";$/Code$
- global / undefined
+ local / global
- Array
+ Nothing
+
- handgunMagazine
+ knowsAbout
- Returns either single element array, containing class name of currently loaded in the handgun magazine, or an empty array if unit has no handgun or handgun is not loaded. This command is used for infantry weapons only.
+ Checks if a group or a side knows about target. If who is a unit, unit's group is considered, if who is a vehicle, commander's group is considered.
- https://community.bistudio.com/wiki/handgunMagazine
+ https://community.bistudio.com/wiki/knowsAbout
- handgunMagazine Object
+ Object/Group knowsAbout Object
+
+ Side knowsAbout Object
- handgunMagazine unit
+ who knowsAbout target
+
+ side knowsAbout target
- $Code$hint handgunMagazine player ; //["16Rnd_9x21_Mag"]$/Code$
+ $Code$_kv = _soldierOne knowsAbout _jeepOne;$/Code$
- $Code$_array = handgunMagazine player ;
- if ( count _array 0) then {
- hint ("Handgun is loaded with " + (_array select 0) + "!");
- } else {
- if ( handgunWeapon player != "") then {
- hint "Handgun is not loaded!";
- } else {
- hint "Player doesn't have a handgun!";
- };
- };$/Code$
+ $Code$_kv = ( side player ) knowsAbout _target;$/Code$
global / undefined
+ (August 4, 2006)
+ Notes from before the conversion:
+ With Resistance (1.91) : No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.105.
+ With CWC (1.46) : No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.7.
+ What this means is, the AI will not fire on an enemy soldier until his 'knowsAbout' level of that enemy has reached the 'magic number' or higher.
+ This suggests that the knowsabout level must reach the magic threshold before a unit knows if another unit is an enemy or a friendly unit.
+ Triggers and knowsabout level: "Detected by xxx" triggers also follow the above rules. For a detected trigger to be set off, the knowsAbout level must reach the magic number.
+ Also... As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away. Vice versa is also true. If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5. Some editors have found, whilst using this command over the years, that the following characteristics have cropped up:
+ AI enemies have a very limited amount of peripheral vision, it's not nearly as good as a human player's. A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase.
+ Depending on the units skill level, it can take a little time for the unit to notice a target. So if you run right past a unit, this value might not increase.
+ Bushes between the unit and the target seem to have little effect on this value, and trees definitely have no affect. You may be in a forest, and can't see the unit, but he can see you.
+ MP Note knowsAbout returns a viable result only if left-hand parameter unit is local.
+
+ (January 15, 2007)
+ In OFP v1.96, KnowsAbout return values range from 0 to 4.
+ All units in a group have equal knowsAbout for any given target. All units in a group always return knowsAbout 4 about each other. This suggests groups share a single knowledge base.
+ Without any contact with the target, the knowsAbout value decays at a linear rate so that it halves over 120 seconds. After this time is up knowsAbout drops instantly to 0.
+ If the distance between the all of unit's group and the target exceeds the viewdistance setting, knowsAbout instantly drops to 0. This is not changed by fog or daylight.
+ Note that in OFP unit see all the targets that his group members see. The data is processed between teammembers freely.
+
+ the magic 'knowsAbout' number is 0.105. It's not that simple.Maybe true for infantry but not all vehicles. "Reveal" command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground. There's only one known way to pass through this - designate target with another fake infantry unit near the target. As soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked rom the air (of course if plane has suitable munition :))
+
+ (July 05, 2009)
+ In ArmA (other not tested), KnowsAbout value will stay at its highest value during approximately 2-3 min and then reinitialized.
+
+ (January 14, 2012)
+ Notes are for OA 1.60 :
+ The KnowsAbout value drops immediately back to zero, if the distance between both units is larger than the local viewDistance value.
+ After 110 seconds without (visible?) contact, the KnowsAbout value drops to zero again. While it seemed to take longer the higher the KnowsAbout value is (at least for a value of 4 it took almost six minutes at one point), I was unable to reproduce/confirm that. It is 110 seconds no matter how high the KnowsAbout value it seems.
+
+ (June 13, 2012)
+ By Suma ( source ):
+ All friendly units within a view distance to each unit [are revealed (to the player? or each friendly?)] on the mission start. The code is half broken, as it does not make the units known, it only sets the "accuracy" value for them. Note: This is not affecting enemy units at all.
+
+ (March 27, 2013)
+ Arma-II OA (1.62.101.480 @ACE), tests with infantry:
+ It is still true, that the command returns values between 0 (lowest) and 4 (most). Freshly Spotted units will have at least 1.5, slowly decreasing when the target disappeared.
+ The following Table shows my test results on a clear day at Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect.
+ 12:00, sunlight, clear sky
+ Distance
+ knowsAbout
+ 1530
+ 1.5
+ 1370
+ 1.5
+ 1250
+ 1.5
+ 1135
+ 1.5
+ 1055
+ 1.52
+ 1022
+ 1.64
+ 990
+ 1.74
+ 833
+ 2.5
+ 720
+ 3.37
+ 600
+ 3.81
+ 505
+ 3.86
+ 400
+ 3.92
+ 380
+ 4
+ 365
+ 4
+ 21:00, bright half moon, clear sky
+ Distance
+ knowsAbout
+ 285
+ 1.5
+ 120
+ 1.5
+ 88
+ 1.89
+ 75
+ 2.3
+ 61
+ 3.9
+ 23:00, pitch black, clear sky, NVG on
+ Distance
+ knowsAbout
+ 600
+ 1.5
+ 487
+ 1.5
+ 390
+ 1.5
+ 289
+ 2.22
+ 278
+ 2.4
+
+ (May 31, 2014)
+ Can also use SIDE in place of UNIT. For example:
+ $Code$EAST knowsAbout player ;$/Code$
- Array
+ Number - Number
+
- handgunWeapon
+ titleFadeOut
- Returns the name of a unit's handgun (an empty string if there is none).
+ Terminate the title effect and set duration of the fade out phase to the given time.
- https://community.bistudio.com/wiki/handgunWeapon
+ https://community.bistudio.com/wiki/titleFadeOut
- handgunWeapon Object
+ titleFadeOut Number
- handgunWeapon unit
+ titleFadeOut duration
- $Code$hint handgunWeapon player ; //"hgun_P07_F"$/Code$
+ $Code$titleText ["Hi", "plain"]; titleFadeOut 2$/Code$
- global / undefined
+ undefined / undefined
- String
+ Nothing
+
- handsHit
+ magazineTurretAmmo
- Checks if a soldier's hands are hit, which results in inaccurate aiming.
+ Returns ammo count of given type from given turret
+ Broken when vehicle has multiple magazines of the same type
- https://community.bistudio.com/wiki/handsHit
+ https://community.bistudio.com/wiki/magazineTurretAmmo
- handsHit Object
+ Object magazineTurretAmmo Array
- handsHit unitName
+ vehicle magazineTurretAmmo [magazineClass, turretPath]
- $Code$? (handsHit player == 1) : player globalChat "Ouch! Don't shoot at my hands dammit!"$/Code$
+ $Code$vehicle player magazineTurretAmmo ["cls", [0]]$/Code$
- global / undefined
+ undefined / undefined
- Number
+ Number
+
- hasInterface
+ actionKeysNames
- Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.
+ Returns a list of button names assigned to the given user action. You can find the action names in config class ControllerSchemes or user action names.
- https://community.bistudio.com/wiki/hasInterface
+ https://community.bistudio.com/wiki/actionKeysNames
- hasInterface
+ actionKeysNames String
+
+ actionKeysNames Array
- hasInterface
+ actionKeysNames userAction
+
+ actionKeysNames [userAction, maxKeys]
+
+ actionKeysNames [userAction, maxKeys, inputDevicePriority]
- $Code$headless = !( hasInterface || isDedicated );$/Code$
-
- $Code$_isHC = ! hasInterface && ! isDedicated ;$/Code$
+ $Code$_list = actionKeysNames "ReloadMagazine"; //"R"$/Code$
undefined / undefined
- (December 21, 2014)
- $Code$ if ( isDedicated ) then {
- //run on dedicated server only
- };
- if ( isServer ) then {
- //run on dedicated server or player host
- };
- if ( hasInterface ) then {
- //run on all player clients incl. player host
- };
- if (! isDedicated ) then {
- //run on all player clients incl. player host and headless clients
- };
- if (! isServer ) then {
- //run on all player clients incl. headless clients but not player host
- };
- if (! hasInterface ) then {
- //run on headless clients and dedicated server
- };
- if (! hasInterface && ! isDedicated ) then {
- //run on headless clients only
- };$/Code$
+ (20:14, 20 January 2010 (CET))
+ The return type is a stacked string. A string inside a string. To compare use first single and inside double quotes:
+ if ((actionKeysNames "User1") == '"W"') then...
+
+ (October 26, 2014)
+ inputDevicePriority 'Controler' is not a spelling mistake in description.
- Boolean
+ String - String
+
- hasPilotCamera
+ admin
- Returns true if the object airplane or helicopter has a pilotCamera.
+ This is dedicated server command, which queries the admin state of any client on the network by their client ( owner ) id. Possible results are:
+ 1 - client is admin that is voted in
+ 2 - client is admin that is logged in
+ In all other cases it returns 0. To self check the admin state of a local client, use BIS_fnc_admin.
- https://community.bistudio.com/wiki/hasPilotCamera
+ https://community.bistudio.com/wiki/admin
- hasPilotCamera Object
+ admin Number
- hasPilotCamera object
+ admin ownerID
- $Code$hasPilotCamera vehicle player$/Code$
+ $Code$_isLoggedInAdmin = admin 3 == 2;$/Code$
+
+ $Code$_adminState = admin owner unit1;$/Code$
- global / undefined
+ undefined / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
- Boolean
+ Number
+
- hasWeapon
+ setObjectTexture
- Checks if a unit has the given weapon.
+ Textures object selection with texture named in array.
+ Array has the form [selectionNumber, "Texture"].
+ The selection number is defined through the hiddenselection []={} array in the vehicle's config (starting with 0).
+ NOTES :
+ Not all objects could be textured this way. To find out, run getObjectTextures command on an object. Empty array [] usually indicates it cannot be textured.
+ All textures must have resolution 2^x / 2^y (e.g. 16 / 16, 16 / 32, 64 / 256, 512 / 512, etc). The largest texture size commonly supported by graphics cards and RV engine is 4096x4096
+ Supported formats:.pac,.paa,.jpg,.jpeg,.ogg,.ogv
- https://community.bistudio.com/wiki/hasWeapon
+ https://community.bistudio.com/wiki/setObjectTexture
- Object hasWeapon String
+ Object setObjectTexture Array
- unitName hasWeapon weaponName
+ object setObjectTexture [selectionNumber,texture]
- $Code$?!( player hasWeapon "M16") : player addWeapon "M16"$/Code$
+ $Code$_objectname setObjectTexture [0, "\pboname\texture.paa"];
+ _objectname setObjectTexture [1, "\pboname\texture2.paa"];$/Code$
+
+ $Code$_obj setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"];$/Code$
+
+ $Code$_obj setObjectTexture [0, "#(argb,512,512,1)r2t(rendersurface,1.333)"];$/Code$
+
+ $Code$// When applying custom texture in Editor on vehicles that have randomization enabled ( Arma 3 Assets ), disable randomization first:
+ this setVariable ["BIS_enableRandomization", false ];
+ this setObjectTexture [0,"#(rgb,8,8,3)color(1,0,0,1)"];$/Code$
- global / undefined
+ global / local
- (September 11, 2014)
- This command doesn't work for Items in Arma 3, use this instead.
- $Code$" ItemGPS " in ( items player + assignedItems player ) OR ' ItemGPS ' in ( items player + assignedItems player ) $/Code$
- Returns true if unit has gps in inventory, assigned or not.
+ (Aug 4, 2006)
+ In MP this command has only local effect. If you want to change a texture on all clients, you have to execute this command on each client (or setObjectTextureGlobal ). This command has also a bug: when a saved game is loaded the texture you have set will disappear and needs to be reset.
+
+ (December 19, 2009)
+ Instead of bitmaps, procedural textures can be used.
+ The syntax for those is #(argb,8,8,3)color(R,G,B,A), where R,G,B stands for Red, Green, Blue, and A stands for Alpha, all values can be anything between 0 and 1 (including decimals). e.g.
+ $Code$_obj setObjectTexture [0,'#(argb,8,8,3)color(0,1,0,1)']$/Code$
+ would color myObj in flat green. See Procedural Textures for more details.
+
+ (August 25, 2014)
+ Also works with absolute path and.jpg files.
+ $Code$_obj setObjectTexture [0, "C:\Folder\Folder\Texture.paa"];
+ _obj setObjectTexture [0, "C:\Folder\Folder\Texture.jpg"];$/Code$
+ Texture can also be blank:
+ $Code$_obj setObjectTexture [2,""];$/Code$
+ This will make the texture selection invisible on certain units without an error message. In some cases this is a desirable effect
+
+ (March 18, 2015)
+ It is also possible to apply texture to unit's backpack, as it also has hidden selection (unfortunately does not work for vests)
+ $Code$(backpackContainer player) setObjectTexture [0,'#(argb,8,8,3)color(0,0,0,1)']$/Code$
+ Also keep in mind that player's custom texture is being reset when you open BIS Arsenal (even without changing any gear)
+
+ (May 13, 2015)
+ You can also use the gameinternal skins: List of MH9 Skins $Code$_obj setObjectTexture [0, "\a3\air_f\heli_light_01\data\skins\heli_light_01_ext_digital_co.paa"];$/Code$
+
+ (October 24, 2016)
+ Sometimes it could be necessary to set default material on an object for the texture to take effect:
+ $Code$_block = createVehicle ["Land_VR_Block_02_F", player getPos [20, getDir player ], [], 0, "CAN_COLLIDE"];
+ _block setObjectMaterial [0, "\a3\data_f\default.rvmat"];
+ _block setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"];$/Code$
+ Courtesy of Larrow
- Boolean
+ Nothing
+
- hcAllGroups
+ ctrlEnable
- Returns selected groups in high command.
+ Enable or disable a control of the currently active user dialog. Disabled controls cannot be clicked onto.
+ Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/hcAllGroups
+ https://community.bistudio.com/wiki/ctrlEnable
- hcAllGroups Object
+ ctrlEnable Array
+
+ Control ctrlEnable Boolean
- hcAllGroups unit
+ ctrlEnable [idc, enable]
+
+ controlName ctrlEnable enable
-
+ $Code$ctrlEnable [100, false]$/Code$
+
+ $Code$_ctrl ctrlEnable false$/Code$
+
- undefined / undefined
+ local / local
+ (July 20, 2017)
+ Please do note that enabled controls can gain focus upon click. Therefore do not enable background controls or else they will cover any controls on top of them.
+ As a general rule of thumb, enabled controls should only be already on the top of the GUI.
- Array
+ Nothing - Nothing
+
- hcGroupParams
+ teamSwitchEnabled
- Returns parameters describing group in high command bar.
- Return value is [string, float[4]]
+ Check if Team Switch is currently enabled.
+ Team Switch is enabled by default.
- https://community.bistudio.com/wiki/hcGroupParams
+ https://community.bistudio.com/wiki/teamSwitchEnabled
- Object hcGroupParams Group
+ teamSwitchEnabled
- unit hcGroupParams group
+ teamSwitchEnabled
@@ -31349,201 +33212,210 @@
- Array
+ Boolean
+
- hcLeader
+ setGroupIconParams
- Returns group's high command commander.
+ Set group icons parameters. [color,string,float,bool]
- https://community.bistudio.com/wiki/hcLeader
+ https://community.bistudio.com/wiki/setGroupIconParams
- hcLeader Group
+ Group setGroupIconParams Array
- hcLeader group
+ group setGroupIconParams properties
- $Code$_leader = hcLeader groupName;$/Code$
+ $Code$_grp setGroupIconParams [_color,_text,_scale,_visible];
+ _grp setGroupIconParams [[0,0,0,0],"",1,false];$/Code$
undefined / undefined
- (September 2, 2009)
- hcLeader returns 'NULL_OBJECT' if you use it on your HC commander's group in a HC setup with subordinates. It seems to work as expected if you don't use subordinates.
- Object
+ Nothing
+
- hcRemoveAllGroups
+ tvSetPictureColorDisabled
- Remove all groups from unit's high command bar.
+ Sets the color of left picture of a tree item defined by path when item is disabled
- https://community.bistudio.com/wiki/hcRemoveAllGroups
+ https://community.bistudio.com/wiki/tvSetPictureColorDisabled
- hcRemoveAllGroups Object
+ Control tvSetPictureColorDisabled Array
- hcRemoveAllGroups unit
+ control tvSetPictureColorDisabled [path, color]
-
+ $Code$_control tvSetPictureColorDisabled [[0], [1,0,1,1]]$/Code$
+
undefined / undefined
- Nothing
+ Nothing
+
- hcRemoveGroup
+ waypoints
- Removes group from unit's high command bar.
+ Returns an array of waypoints for the specified unit/group.
- https://community.bistudio.com/wiki/hcRemoveGroup
+ https://community.bistudio.com/wiki/waypoints
- Object hcRemoveGroup Group
+ waypoints Group
- unit hcRemoveGroup group
+ waypoints groupName
-
+ $Code$waypoints player ;$/Code$
+
+ $Code$_wPosArray = waypoints group10;
+ // could return [[EAST 1-1-A,0],[EAST 1-1-A,1],[EAST 1-1-A,2]]$/Code$
+
- undefined / undefined
+ global / undefined
- Nothing
+ Array
+
- hcSelectGroup
+ speed
- Select given group in high command bar.
+ Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to: 3.6 * ( velocityModelSpace _obj select 1)
- https://community.bistudio.com/wiki/hcSelectGroup
+ https://community.bistudio.com/wiki/speed
- Object hcSelectGroup Array
+ speed Object
- unit hcSelectGroup array
+ speed object
-
+ $Code$if ( speed _truck1 = 100) then { hint "You're going too fast!"};$/Code$
+
undefined / undefined
- Nothing
+ Number
+
- hcSelected
+ turretOwner
- Returns selected groups in high command.
+ Returns id of the owner of the turret. Server only. Returns 0 on non-server and SP.
+ Some info on turrets: A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is local. When gunner leaves turret it is supposed to change locality to the locality of the vehicle. A vehicle can have one owner while turrets have different owners.
- https://community.bistudio.com/wiki/hcSelected
+ https://community.bistudio.com/wiki/turretOwner
- hcSelected Object
+ Object turretOwner Array
- hcSelected unit
+ vehicle turretOwner turretPath
- $Code$array = hcSelected unit;$/Code$
+ $Code$_ownerId = vehicle player turretOwner [0];$/Code$
- undefined / undefined
+ global / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
- Array
+ Number
+
- hcSetGroup
+ setPosASL
- Add group to unit's high command bar.
- Array parameters are group, group-name and team (teammain, teamred, teamgreen, teamblue, teamyellow).
- Group is the only necessary parameter.
+ Sets the object position above sea level. The pos array uses the PositionASL format.
- https://community.bistudio.com/wiki/hcSetGroup
+ https://community.bistudio.com/wiki/setPosASL
- Object hcSetGroup Array
+ Object setPosASL Array
- unit hcSetGroup array
+ object setPosASL pos
- $Code$unit hcSetGroup [group, "HQ", teamred];$/Code$
+ $Code$player setPosASL [ getPosASL player select 0, ( getPosASL player select 1) + 10, getPosASL player select 2];$/Code$
- $Code$player hcSetGroup [group];$/Code$
+ $Code$this setPosASL [ position this select 0, position this select 1, 9]; //[ X, Y, Z]$/Code$
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- hcShowBar
+ setText
- Shows or hides high command bar.
- There must be some groups under HC command to show HC bar.
+ Sets the text associated with a location. This text will be displayed on the game map at the location's position.
- https://community.bistudio.com/wiki/hcShowBar
+ https://community.bistudio.com/wiki/setText
- hcShowBar Boolean
+ Location setText String
- hcShowBar bool
+ location setText text
- $Code$hcShowBar true ;$/Code$
-
- $Code$hcShowBar false ;$/Code$
+ $Code$myLocation setText "Rahmadi Village"$/Code$
undefined / undefined
@@ -31551,749 +33423,653 @@
- Nothing
+ Nothing
+
- hcShownBar
+ setVelocity
- Return true if the high command bar is shown/active.
+ Set velocity (speed vector) of a vehicle. Units are in metres per second.
- https://community.bistudio.com/wiki/hcShownBar
+ https://community.bistudio.com/wiki/setVelocity
- hcShownBar
+ Object setVelocity Array
- hcShownBar
+ vehicleName setVelocity [x, y, z]
- $Code$if ( hcShownBar ) then { hint "HC bar is active";};$/Code$
+ $Code$_truck1 setVelocity [20, 0, 0];$/Code$
+
+ $Code$// Advanced method used for relative acceleration:
+ _vel = velocity _vehicle;
+ _dir = direction _vehicle;
+ _speed = 10; comment "Added speed";
+ _vehicle setVelocity [
+ (_vel select 0) + ( sin _dir * _speed),
+ (_vel select 1) + ( cos _dir * _speed),
+ (_vel select 2)
+ ];$/Code$
- undefined / undefined
+ local / global
+ (20 Jun, 2014)
+ (ArmA3 1.22) setVelocity will be affected by setDir and setVectorDirAndUp. So use it after them.
- Boolean
+ Nothing
+
- headgear
+ setOwner
- Returns headgear of unit.
+ From server machine, change the ownership of an object to a given client. Returns true if locality was changed.
+ Since Arma 3 v1.40, this command should not be used to transfer ownership of units with AI ( agents are an exception to this rule).
+ Using command in an unintended way will display an on-screen warning and log a message to.rpt file.
+ To transfer ownership of all AI units in a group properly, use setGroupOwner instead.
- https://community.bistudio.com/wiki/headgear
+ https://community.bistudio.com/wiki/setOwner
- headgear Object
+ Object setOwner Number
- headgear unit
+ object setOwner clientID
- $Code$hint headgear player ; //H_HelmetB$/Code$
+ $Code$_someObject setOwner 12;$/Code$
+
+ $Code$_someObject setOwner ( owner _playerObject);$/Code$
- global / undefined
+ undefined / undefined
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (January 7, 2015)
+ The ownership can only be given from server to client. For some reason the server cannot return ownership back with this command. This is fixed in Arma 3 1.40
+
+ (August 22, 2017)
+ NOTE : There are some interesting behaviour about the specific owner digits like 0 -2 and 2 :
+ 1. Any mission objects (generated from SQM) initially have 0 owner state, but it is not local to ANYONE (0) like it is expected to be, but actually only to a SERVER (2). You can't make any object owner to be 0 once it was changed.
+ 2. Trying to change ownership to any negative digit will always result in attempt to transfer ownership to SERVER (2). Once it is unit (non-agent) it will fail and revert* to initial ownership.
+ 3. *Changing ownership of a unit (non-agent) actually gives a result for a brief time after this action is performed. What actually happens next - ownership is getting reverted with a message to RPT of a server. This can be seen by reading results of (owner _object) in really fast cycle.
- String
+ Boolean
+
- hideBody
+ lnbDeleteRow
- Hides dead body of the given unit. After a short delay, the body slowly sinks into the ground. After awhile, when group of the unit becomes grpNull, the body gets deleted and becomes objNull. If applied to alive unit, nothing happens until unit dies, then the unit's body gets hidden. If a dead unit is human player, the body is hidden but not deleted until player respawns.
+ Removes row with the given index from the given listbox or combobox.
- https://community.bistudio.com/wiki/hideBody
+ https://community.bistudio.com/wiki/lnbDeleteRow
- hideBody Object
+ Control lnbDeleteRow Number
- hideBody unit
+ _ctrl lnbDeleteRow row
- $Code$hideBody player1;$/Code$
+ $Code$_ctrl lnbDeleteRow 1;$/Code$
- local / global
+ undefined / undefined
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Nothing
+ Nothing
+
- hideObjectGlobal
+ enableAttack
- This command is designed for MP. Hides object on all connected clients as well as JIP. Call on the server only. Can be used on all objects with class names, i.e. ( typeOf object != ""). In SP this command behaves just like hideObject.
+ Set if leader can issue attack commands to the soldiers in his group.
- https://community.bistudio.com/wiki/hideObjectGlobal
+ https://community.bistudio.com/wiki/enableAttack
- hideObjectGlobal Object
-
- Object hideObjectGlobal Boolean
+ Object/Group enableAttack Boolean
- hideObjectGlobal object
-
- object hideObjectGlobal hidden
+ group enableAttack enable
- $Code$hideObjectGlobal nearestBuilding [2500,2500,0];$/Code$
-
- $Code$objectname hideObjectGlobal true;$/Code$
+ $Code$_group1 enableAttack true$/Code$
- global / global
+ local / global
- This scripting command must be executed on the server to work properly in multiplayer
-
- (June 27, 2015)
- hideObject and hideObjectGlobal disable object collision in addition to rendering. A3 1.45.131175
- (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
-
- (September 1, 2016)
- As of A3 1,62.134494 running hideObjectGlobal in big loop may cause some objects not to be hidden for a players already connected or passed JIP. To avoid players rendering desync consider running that in preInit schedule of a server.
-
- (August 7, 2017)
- In A3 1.72.142342 when you hide object via hideObjectGlobal, model sounds still be audible.
- For e.g. if you delete apex house from map, you still hear a conditioner sound at this spot
- Nothing - Nothing
+ Nothing
+
- hideObject
+ soundVolume
- Hide entity. Can be used on soldiers and vehicles, also on static objects.
+ Check current sound volume (set by fadeSound ).
- https://community.bistudio.com/wiki/hideObject
+ https://community.bistudio.com/wiki/soundVolume
- hideObject Object
-
- Object hideObject Boolean
+ soundVolume
- hideObject object
-
- object hideObject hidden
+ soundVolume
- $Code$hideObject unitName;$/Code$
-
- $Code$objectName hideObject true;$/Code$
+ $Code$_vol = soundVolume$/Code$
- global / local
+ undefined / undefined
- (July 15, 2010)
- This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.
-
- Use MP framework to activate this comand on all players from server or any other maschine
- $Code$_nic = [nil, mantohide, "per", rHideObject, true ] call RE; //In A3 use hideObjectGlobal instead.$/Code$
-
- you can use code as in example 2, where true = ON and false = OFF, if using it like in example 1, you can only turn it ON
-
- using this locally causes the player/object disappear only locally; has to be executed serverside if used in MP. Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds. Usefull for creating objects the map-creator doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units.
-
- The above comment is partially incorrect, if the effects of the command are local then it must be executed in every machine so it has global effect. If it is run only on the server machine, it will only be hidden on the server, while clients still see it.
-
- (March 5, 2014)
- As of today this now finally has a Global counterpart, just released on the Stable branch. Added it's link under See also.
-
- (October 30, 2014)
- When used on player, it only has an effect on third person mode. First person LOD is still visible. (A3 Dev 1.33)
-
- (June 27, 2015)
- hideObject and hideObjectGlobal disable object collision in addition to rendering. A3 1.45.131175
- (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
-
- (January 26, 2016)
- Sometimes it´s easier to teleport the object about 100m under the ground (also JiP Support):
- $Code$_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)-100];$/Code$
- And to unhide:
- $Code$_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)+100];$/Code$
- Nothing - Nothing
+ Number
+
- hideSelection
+ showWaypoint
- Hides or enables the given selection for the object
+ Sets the condition determining when the waypoint is shown.
+ Possible values are:
+ "NEVER" - never show it
+ "EASY" - show only in cadet mode
+ "ALWAYS" - always show it
- https://community.bistudio.com/wiki/hideSelection
+ https://community.bistudio.com/wiki/showWaypoint
- object hideSelection Array
+ Array showWaypoint String
- object hideSelection [selection, hidden]
+ waypoint showWaypoint show
-
+ $Code$[_grp, 2] showWaypoint "ALWAYS";$/Code$
+
- local / global
+ undefined / undefined
- (April 28, 2016)
- Only seems to work for objects created with createSimpleObject, and will only work for certain selections.
- Nothing
+ Nothing
+
- hintCadet
+ getPersonUsedDLCs
- Shows a text hint only when in cadetMode.
- The text can contain several lines. \n is used to indicate the end of a line.
+ Returns a list of all DLCs objects the unit is currently using. For example if a unit is inside a vehicle from DLC, it will return the code of that DLC.
+ This command is broken and doesnt work on dedicated server
- https://community.bistudio.com/wiki/hintCadet
+ https://community.bistudio.com/wiki/getPersonUsedDLCs
- hintCadet String
+ getPersonUsedDLCs Object
- hintCadet text
+ getPersonUsedDLCs unit
- $Code$hintCadet "Press W to move forward";$/Code$
+ $Code$_objects = getPersonUsedDLCs player ;$/Code$
- undefined / local
+ global / undefined
- hintCadet can be used with formatting like this:
- $Code$ hintCadet format ["Hello %1", player ]$/Code$
- Nothing
+ Array
+
- hintC
+ apply
- Displays attractive hint in the center of the screen. Player control is taken away until user presses "Continue". After user confirmation, the content of the hintC is repeated again in a normal hint. This type of hint can also have a title. It is also possible to drag this type of hint around the screen.
+ Applies given code to each element of the array and returns resulting array. The value of the current array element, to which the code will be applied, is stored in variable _x.
- https://community.bistudio.com/wiki/hintC
+ https://community.bistudio.com/wiki/apply
- hintC String
-
- String hintC Array
-
- String hintC Structured_Text
-
- String hintC String
+ Array apply Code
- hintC content
-
- title hintC [content1, content2,]
-
- title hintC content
-
- title hintC content
+ array apply code
- $Code$hintC "Press W to move forward";$/Code$
-
- $Code$// Same as the above in Arma3 but without second hint displayed:
- hintC "Press W to move forward";
- hintC_EH = findDisplay 57 displayAddEventHandler ["unload", {
- 0 = _this spawn {
- _this select 0 displayRemoveEventHandler ["unload", hintC_EH];
- hintSilent "";
- };
- }];$/Code$
-
- $Code$"Instructions" hintC [
- "Press W to move forward.",
- "Press S to move backwards.",
- "Use the mouse to turn right or left.",
- "Press V for weapon sights."
- ];$/Code$
+ $Code$_arr = [1,2,3,4,5,6,7,8,9,0] apply {[1,0] select (_x % 2 == 0)}; //[1,0,1,0,1,0,1,0,1,0]$/Code$
- $Code$// Same as the above in Arma3 but without second hint displayed:
- "Instructions" hintC [
- "Press W to move forward.",
- "Press S to move backwards.",
- "Use the mouse to turn right or left.",
- "Press V for weapon sights."
- ];
- hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
- 0 = _this spawn {
- _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
- hintSilent "";
- };
- }];$/Code$
+ $Code$_arr = [1,2,3,4,5,6,7,8,9,0] apply {_x ^ _x}; //[1,4,27,256,3125,46656,823543,16777216,387420480,1]$/Code$
- $Code$_separator1 = parseText " br / ------------------------ br / ";
- _image = "\ca\ui\textures\aus_flag.paa";
- _txt = composeText [ image _image, "Heading Text", _separator1, "Content"];
- "" hintC _txt;$/Code$
+ $Code$_arr1 = [];
+ _arr1 resize 20;
+ _arr2 = _arr1 apply {0}; //[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]$/Code$
- undefined / local
+ undefined / undefined
- This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command.
-
- To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed. hintC "foo"; sleep 0.1; hintC "bar"; Without a sleep statement hintC will not suspend the script it has been called from.
-
- HintC can be used with formatting like this: HintC format["Hello %1",player].
+ (February 18, 2016)
+ (to anyone else wondering, I took a minute to get it): This is Array.map() is JavaScript
- (March 19, 2015)
- "Titled" hintC all use display #72 while "untitled" one uses display #57. If you are trying examples in Arma 3 debug console, add little delay like this: $Code$[] spawn {sleep 0.5;....your example code goes here...};$/Code$ or no hintC will be displayed.
+ (February 11, 2018)
+ if performance really is an issue, apply seems to be (very) slightly faster than forEach (by more or less one percent, 0.7-1.5% in my tests to be precise).
- Nothing - Nothing - Nothing - Nothing
+ Array
+
- hintSilent
+ addMagazineTurret
- Same as hint, but without a sound.
+ Adds a magazine to the turret. Use turret path [-1] for driver's turret.
+ Note: you may create invalid combinations by using this function, for example by adding 20 grenades. When doing so, application behaviour is undefined. Since Arma 3 v1.55.133817 it is possible to set custom ammo count in added magazine.
- https://community.bistudio.com/wiki/hintSilent
+ https://community.bistudio.com/wiki/addMagazineTurret
- hintSilent String/Structured_Text
+ Object addMagazineTurret Array
- hintSilent text
+ vehicle addMagazineTurret [magazineName, turretPath, ammoCount]
- $Code$hintSilent "You texte comes here !"$/Code$
+ $Code$_tank addMagazineTurret ["SmokeLauncherMag",[0,0]];$/Code$
+
+ $Code$_tank addMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]];$/Code$
- undefined / local
+ local / global
- Nothing
+ Nothing
+
- hint
+ addVest
- Outputs a multi-line hint message in the left upper corner of the screen (in the right upper corner in Arma). This version of hint is supposed to play a sound when hint is shown, but this varies between games and versions. Use hintSilent for soundless hint.
- The effect of this command is local, i.e. the hint will only show on the computer command was executed.
+ Create a new vest and try to link it into vest slot.
- https://community.bistudio.com/wiki/hint
+ https://community.bistudio.com/wiki/addVest
- hint String/Structured_Text
+ Object addVest String
- hint text
+ unit addVest type
- $Code$hint "Press W to move forward. \nPress S to move backwards."
- outputs the following message:
- Press W to move forward.
- Press S to move backwards.
- Known Problems: Avoid hint messages that exceed the screen, as this may lead to crashes.$/Code$
+ $Code$player addVest "V_TacVest_blk_POLICE";$/Code$
- undefined / local
+ undefined / undefined
- Hint can be used with formatting like this:
- $Code$ hint format ["Hello %1", player ]$/Code$
-
- To remove the hint box from the screen, pass a null string ( "" ) to the command.
- $Code$ hint ""$/Code$
-
- hint happily accepts structured text :
- $Code$_starL = " img image='\ca\ui\data\debr_star.paa' align='left'/ ";
- _starL = _starL + _starL + _starL;
- _starR = " img image='\ca\ui\data\debr_star.paa' align='right'/ ";
- _starR = _starR + _starR + _starR;
- _title = " t color='#ff0000' size='1.2' shadow='1' shadowColor='#000000' align='center' TITLE /t ";
- _text = "Bla bla bla bla bla...";
- hint parseText (_starL + _starR + _title + _text);
- $/Code$
- (Tested with 1.14, 1.15 beta and 1.16 beta)
-
- (October 20, 2014)
- Be careful when using hints to visualize the effects of commands using the Debug Console. Hint can accept an undefined variable and neither the error nor the hint is shown, the command simply fails. Also notice how the hint command should be "hint str _o;"
- $Code$for "_i" from 0 to 50 do
- {
- hint _o;
- };$/Code$
- tested in A3 1.32.127785 In a script, an "undefined variable" error will be shown as expected.
-
- (October 21, 2014)
- Contrary to what's written under "Examples", Arma 3 will happily display hints that far exceed screen space. However, as hints get longer, FPS suffers tremendously.
- (tested in Debug Console, A3 1.32.127785, using:
- $Code$hint str (( nearestObjects [player, ["BUILDING"], 100]) - [player]); [] spawn { sleep 5; systemChat str diag_fps;};
- hint str (( nearestObjects [player, ["BUILDING"], 1000]) - [player]); [] spawn { sleep 5; systemChat str diag_fps;};$/Code$
- Results were: 59.7015 and 5.17297, respectively. Drawing a hint even longer than this, such as nearestObjects with a radius of 10,000 or 100,000 reduces your FPS so much Arma 3 appears to crash, though it doesn't.
- Unrelated: Hints will stay on screen for 30 seconds, then fade away over the course of 5 seconds. Tested with: (A3 1.32.127785)
- $Code$hint "a";[] spawn{_counter = 0;while {true} do{sleep 1;_counter = _counter + 1;systemChat str _counter;};};$/Code$
-
- (February 17, 2015)
- An open dialog will pause the 30-second hint fade timer.
- (A3 1.38.128937)
-
- (March 25, 2017)
- The hint sound is audible only when you have the music volume turned up above 0 in the audio settings. Otherwise, it seems to act the same as hintSilent.
- This is important because if you are running a hint that fires at 30 fps or more, the hint will slow down machines that have the music volume turned up but won't slow down machines that have the music volume turned off.
- Best practice is to use hint for an alert to the player and use hintSilent for a makeshift display of data to the player that is updated fairly often.
- Nothing
+ Nothing
+
- hmd
+ createMine
- Returns class name of currently used Head Mounted Display. Returns an empty string if the slot is empty.
+ Creates a mine of the given type (type is the name of the subclass of CfgVehicles). If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used. The mine is placed inside a circle with this position as its center and placement as its radius.
- https://community.bistudio.com/wiki/hmd
+ https://community.bistudio.com/wiki/createMine
- hmd Object
+ createMine Array
- hmd unit
+ createMine [type, position, markers, placement]
- $Code$_nvgs = hmd player ; //NVGoggles$/Code$
+ $Code$_mine = createMine ["MineMine", position player, [], 0];$/Code$
- global / undefined
+ undefined / undefined
+ (June 5, 2017)
+ Note that this command uses AGL (very similar to ASL) positions, so if you want to use the moored or seabed mine, you'll have to find the appropriate negative z value that is underwater and convert that to ASL.
+ Also note that you can't adjust the positions of sea mines after they've been created. The command is either ignored or not propagated across the network to clients.
- String
+ Object
+
- hostMission
+ showCuratorCompass
- Host the mp mission described by config class. Should be called as reaction to some UI action in some dialog.
- For example you can start a MP scenario from a button. It creates a host and takes you to the lobby with the scenario loaded.
- You need to provide the display which is active when the hostMission command is called.
+ Hides or shows compass in curator interface.
- https://community.bistudio.com/wiki/hostMission
+ https://community.bistudio.com/wiki/showCuratorCompass
- hostMission Array
+ showCuratorCompass Boolean
- hostMission [pConfig, pDisplay]
+ showCuratorCompass bool
- $Code$hostMission [configMissionName, display];$/Code$
-
- $Code$hostMission [ configFile /"CfgMissions"/"MPMissions"/_scenarioClassName, _currentlyActiveDisplay];$/Code$
-
- $Code$// Launch host mission dialog in Arma 3 from a client on dedicated server
- hostMission [
- configFile "CfgMissions" "MPmissions" "MP_COOP_m01",
- findDisplay 46
- ];$/Code$
+ $Code$showCuratorCompass true;$/Code$
undefined / undefined
- (January 03, 2011)
- The command must be called in the main menu or something similar menu it seems.
- Nothing
+ Nothing
+
- htmlLoad
+ lbColorRight
- Load HTML from file to given control. File path is relative to current mission dir or an absolute path (with drive letter etc.). The command is subject to restrictions, imposed by CfgCommands class.
+ Returns the text color of the item (right) with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ The color is returned in format Color.
- https://community.bistudio.com/wiki/htmlLoad
+ https://community.bistudio.com/wiki/lbColorRight
- Control htmlLoad String
+ lbColorRight Array
+
+ Control lbColorRight Number
- control htmlLoad filename
+ lbColorRight [idc, index]
+
+ control lbColorRight index
- $Code$_control htmlLoad "briefing.html";$/Code$
-
- $Code$_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main // [1]$/Code$
+ $Code$_colour = lbColorRight [101, 0];$/Code$
- $Code$// Display news item:
- 0 = 0 spawn {
- disableSerialization ;
- _html = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscHTML", -1];
- _html ctrlSetBackgroundColor [0,0,0,0.8];
- _html ctrlSetPosition [ safeZoneX, safeZoneY, safeZoneW, safeZoneH ];
- _html ctrlCommit 0;
- _html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main
- };$/Code$
+ $Code$_color = _control lbColorRight 0;$/Code$
- undefined / undefined
+ local / local
- (September 7, 2014)
- htmlLoad works with URL's as well as html files.
-
- (September 7, 2014)
- While surprisingly htmlLoad does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete. Therefore it is not recommended to use this command in such way.
-
- (April 21, 2015)
- Example use of URL can be found in BIS_fnc_GUInewsfeed with the function browser.
-
- (October 7, 2015)
- (Arma 3) In order to use URLs, they must be included in CfgCommands - allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported
- Script Example :
- $Code$_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player;
- _ctrlHTML htmlLoad _newsOnline;$/Code$
- Config Example:
- $Code$class CfgCommands {
- allowedHTMLLoadURIs[] += {
- "http://alivemod.com/alive_news.php*"
- };
- };$/Code$
+ More information on the LB command family can be found here
- Nothing
+ Array - Array
+
- humidity
+ setFriend
- Returns the current humidity value. 0 is no humidity and 1 is 100% humidity. Humidity value quickly changes from 0 to 1 when rain starts, then slowly changes from 1 to 0 when rain stops.
+ Sets how friendly side1 is with side2. For a value smaller than 0.6 it results in being enemy, otherwise it's friendly.
+ Intended to be used on mission start. Changing value during mission can cause unexpected errors in AI behavior. See also Side relations.
- https://community.bistudio.com/wiki/humidity
+ https://community.bistudio.com/wiki/setFriend
- humidity
+ Side setFriend Array
- humidity
+ side1 setFriend [side2, value]
- $Code$currentHumidity = humidity ;$/Code$
-
- $Code$skipTime -24;
- 86400 setOvercast 1;
- skipTime 24;
- [] spawn {
- 10 setRain 1;
- sleep 10;
- 10 setRain 0;
- };
- onEachFrame {
- hintSilent str [ round ( rain * 10) / 10, round ( humidity * 10) / 10];
- };$/Code$
+ $Code$west setFriend [ resistance, 0];$/Code$
- undefined / undefined
+ undefined / global
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (18:49, 28 December 2006)
+ This command might be buggy in ArmA (or the description regarding enemy status is wrong). See this discussion.
+
+ (11:25, 30 November 2007)
+ Setting the civilian side to be the enemy of any other side will result in the other side attacking inanimate mission editor placed objects such as empty vehicles and static objects, since these objects belong to the civilian side.
+
+ (15:57, 27 February 2008)
+ Be aware that this command only sets the friendliness of one side. If you want to have both sides attacking each other, you have to set both: $Code$Resistance setFriend [East, 0];
+ East setFriend [Resistance, 0];$/Code$
+
+ (October 11, 2014)
+ (Arma 3 1.30 stable) It is possible to make a side hostile towards itself.
+ $Code$ west setFriend [ west, 0]; $/Code$
+ It is only possible to do so with west / blufor, east / opfor, independent / resistance and civilian. This essentially creates a free for all deathmatch. Affects AI behaviour too.
- Number
+ Nothing
+
- if
+ comment
- This operator creates a If Type which is used in the if-construct as described here.
+ Define a comment.
+ Mainly used in SQF Syntax, as you're able to introduce comment lines with semicolons in a SQS script.
- https://community.bistudio.com/wiki/if
+ https://community.bistudio.com/wiki/comment
- if Boolean
+ comment String
- if condition
+ comment commentMsg
- $Code$_retVal = if (1 0) then { "It's true" } else { "It's false" };
- hint str _retVal$/Code$
+ $Code$// script.sqs
+ comment "This is a commented line"$/Code$
- $Code$_val = if ( true ) then [ { "true" }, { "false" } ];
- hint _val;$/Code$
+ $Code$// function.sqf
+ comment "This is a commented line";$/Code$
undefined / undefined
- (Jan 31, 2007)
- Any _local variables you declare within the body of an if / then statement (ie between the curly braces) are local to that 'if' statement, and are destroyed at the end of the statement. If you know you want to use the variable outside the 'if' statement, make sure your declare it before the 'if' statement.
+ (September 12, 2009)
+ Like ArmA, you can't use brackets to make a multi-lines comment. But, in a sqf file, you can make a comment as follow :
+ $Code$ comment "
+ first line
+ seconde line";$/Code$
- (Jan 17, 2010)
- (A2 1.05) If the condition is nil then neither the "then" nor the "else" section get executed, but the script will proceed with no error messages.
- Example code:
- $Code$
- hint "script started"; //will get executed
- if (nil) then
- {
- hint "true"; // will never get executed
- }
- else
- {
- hint "false"; // will never get executed
- };
- sleep 3;
- hint "script ended"; //will get executed$/Code$
+ (November 4, 2016)
+ If a file is loaded with preprocessFile, execVM or spawn (but not loadFile), you may also define C-like comments using //... and /*...*/.
- (June 5, 2015)
- If you only need to choose between 2 raw values, it is possible to use the following trick to avoid using code blocks, as required by the if command, which results in greater atomicity and faster execution:
- $Code$_result = [falseValue, trueValue] select condition;$/Code$
- The select command treats "false" as 0 and "true" as 1, therefore you can feed it a condition determining the array index of the value to be returned. Here is another example:
- $Code$_result = [1,-1] select (_this 0); // If _this is less than 0, _result will be equal to -1, otherwise it will be 1$/Code$
- This feature was added in Arma 3.
+ (November 4, 2016)
+ comment can also be used to create comments inside trigger activation fields where // or */...*/ does not work.
- If_Type
+ Nothing
+
- image
+ step
- Creates a structured text containing the given image.
+ Optionally can set step. If you want to count down, step must be specified, and set negative. Default value is 1.
- https://community.bistudio.com/wiki/image
+ https://community.bistudio.com/wiki/step
- image String
+ For_Type step Number
- image filename
+ for step stepSize
- $Code$_txt1 = image "data\isniper.paa";$/Code$
+ $Code$for "_x" from 20 to 10 step -2 do {..code..}$/Code$
undefined / undefined
- (March 21, 2009)
- Although there is a dedicated image command, parseText gives more options:
- $Code$_imageText = parseText " img size='5' color='#ff0000' image='fish.paa'/ "$/Code$
- Structured_Text
+ For_Type
+
- importAllGroups
+ setPosATL
- Imports all groups into the RTE.
- i
- Some Old Editor Command
+ Sets the position of an object relative to the terrain.
- https://community.bistudio.com/wiki/importAllGroups
+ https://community.bistudio.com/wiki/setPosATL
- importAllGroups Control
+ Object setPosATL Array
- importAllGroups map
+ object setPosATL pos
-
+ $Code$player setPosATL [ getPosATL player select 0, ( getPosATL player select 1) - 10, getPosATL player select 2];$/Code$
+
- undefined / undefined
+ global / global
+ (Feb 26, 2012)
+ Please Note : this command demands PositionATL format ; one does not simply give 2D position, as this function won't do anything.
+
+ (November 11, 2014)
+ If you plan on creating bases through script, setPosATL and getPosATL will be your friends. Other commands like getPos or getPosASL will return the position relative to any objects that are underneath. I wrote a base building helper script and through multiple tests, I have found that getPosATL is the absolute best way to get position for objects that are over land.
- Nothing
+ Nothing
+
- importance
+ preloadTitleObj
- Returns a location's importance value.
+ Object title - Preload data the object can be defined in the Description.ext file.
- https://community.bistudio.com/wiki/importance
+ https://community.bistudio.com/wiki/preloadTitleObj
- importance Location
+ preloadTitleObj Array
- importance location
+ preloadTitleObj [name, type]
+
+ preloadTitleObj [name, type, speed, showInMap]
- $Code$_locationImportance = importance myLocation$/Code$
+ $Code$_ok=preloadTitleObj ["BISLogo","plain"]$/Code$
undefined / undefined
@@ -32301,265 +34077,202 @@
- Number
+ Boolean
+
- inAreaArray
+ ctSetRowTemplate
- Filters given list of Objects and/or Positions in relation to the given area, defined by a trigger, marker, location or array. Returns array of Objects and/or Positions from the list that are inside the area
+ Takes config path to the new row template. Clears the whole RscControlsTable and sets the new row template (Deleting all rows and headers is easier to implement than replacing the rows and filling them with new data. IDCs could overflow etc.).
- https://community.bistudio.com/wiki/inAreaArray
+ https://community.bistudio.com/wiki/ctSetRowTemplate
- Array inAreaArray Object
-
- Array inAreaArray String
-
- Array inAreaArray Location
-
- Array inAreaArray Array
+ Control ctSetRowTemplate Config
- positions inAreaArray trigger
-
- positions inAreaArray marker
-
- positions inAreaArray location
-
- positions inAreaArray [center, a, b, angle, isRectangle, c]
+ Control ctSetRowTemplate Config
- $Code$vehicles inAreaArray trigger_1;$/Code$
-
- $Code$allUnits inAreaArray marker_1;$/Code$
-
- $Code$allPlayers inAreaArray location_1;$/Code$
-
- $Code$allDead inAreaArray [[100, 100, 0], 20, 30, 45, false, 10];$/Code$
+ $Code$_control ctSetRowTemplate _configPath;$/Code$
- undefined / undefined
+ local / local
- (June 11, 2017)
- The array you send the command can be filtered. For example:
- $Code$ vehicles inAreaArray "mymarker" select {_x isKindOf "StaticWeapon"}$/Code$
- Will return only the statics inside the given marker
- Array - Array - Array - Array
+ Nothing
+
- inArea
+ setFormDir
- Checks whether given position is inside given area. The area is usually a rectangle or an ellipse defined similar to triggerArea format. Hence argument for this command could be a trigger, a marker, a location or an array in format [center, a, b, angle, isRectangle, c]. This command also supports hexagon area which can be created from ellipse when both a and b are negative. Hexagon ellipses are also supported by both marker creation and drawEllipse.
- Alternatively, use inAreaArray to check multiple positions/objects within area.
+ Set group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this value is overriden by movement direction.
- https://community.bistudio.com/wiki/inArea
+ https://community.bistudio.com/wiki/setFormDir
- Array/Object inArea Object
-
- Array/Object inArea String
-
- Array/Object inArea Location
-
- Array/Object inArea Array
+ Object/Group setFormDir Number
- position inArea trigger
-
- position inArea marker
-
- position inArea location
-
- position inArea [center, a, b, angle, isRectangle, c]
+ group setFormDir heading
- $Code$_playerIsInside = player inArea _myTrigger;$/Code$
+ $Code$_group1 setFormDir 180;$/Code$
- $Code$_positionIsInside = _myPosition inArea [[100, 100, 0], 20, 30, 45, false ];$/Code$
+ $Code$_unit1 setFormDir random 360;$/Code$
+
+ $Code$//center the main turret
+ ( group BIS_Crew1) setFormDir ( getDir BIS_Armor);$/Code$
- undefined / undefined
+ local / global
+ (November 22, 2014)
+ When applied to AI, setFormDir will set unit formation direction, which in turn will force unit to change direction to match formation direction, however unit will stop turning as soon as unit direction is +/- 30 degrees of the formation direction. To precisely match formation direction, additional setDir is required:
+ $Code$_unit setFormDir 45;
+ _unit setDir 45;
+ hint str direction _unit; //45$/Code$
- Boolean - Boolean - Boolean - Boolean
+ Nothing
+
- inGameUISetEventHandler
+ mod
- Sets given event handler of in-game UI. If EH function returns true, performed action is overridden. Event handlers available are:
- "PrevAction" - mouse scroll up
- "Action" - action key press
- "NextAction" - mouse scroll down
- This is "set" type EH, which means it will replace previously set EH of the same type. So to remove EH, set another one with empty string "" for the function.
- Since Arma 3 v1.49.131743 this EH returns array of params for selected/activated action in _this variable:
- 0: Object - target object to which action is attached
- 1: Object - caller object, basically player
- 2: Number - index of the action in action menu (0 - top most)
- 3: String - engine based action name ("User" for user added actions)
- 4: String - localized action plain text as seen by the caller
- 5: Number - action priority value
- 6: Boolean - action showWindow value
- 7: Boolean - action hideOnUse value
- 8: String - action shortcut name or ""
- 9: Boolean - action menu visibility (on first scroll or action press the menu is still invisible, so no action is performed, only menu is shown)
- 10: String - EH event name
+ Remainder of a divided by b.
- https://community.bistudio.com/wiki/inGameUISetEventHandler
+ https://community.bistudio.com/wiki/mod
- inGameUISetEventHandler Array
+ Number mod Number
- inGameUISetEventHandler [handlerName, function]
+ a mod b
- $Code$inGameUISetEventHandler ["Action","hint 'Lights, Camera, Action!'; true "];$/Code$
-
- $Code$inGameUISetEventHandler ["PrevAction", " hint str _this; false "];
- inGameUISetEventHandler ["NextAction", " hint str _this; false "];
- inGameUISetEventHandler ["Action", " hint str _this; false "];$/Code$
-
- $Code$// Deny any weapon disassembly:
- inGameUISetEventHandler ["Action", "
- if (_this select 3 == 'DisAssemble') then {
- hint 'You are not allowed to do this';
- true
- }
- "];$/Code$
-
- $Code$// Detect explosive/mine placement:
- onMagazineUse = '
- params ["_target", "", "", "_action", "", "", "", "", "", "", "_event"];
- if (_action == "UseMagazine") then {
- if (_event == "Action") then {
- 0 = _target spawn {
- waitUntil {!(all_magazines isEqualTo magazines _this)};
- {
- 0 = all_magazines deleteAt (all_magazines find _x);
- } count magazines _this;
- hint format ["Magazine Used: %1", all_magazines select 0];
- }
- } else {
- all_magazines = magazines _target;
- };
- };
- false
- ';
- inGameUISetEventHandler ["PrevAction", onMagazineUse];
- inGameUISetEventHandler ["NextAction", onMagazineUse];
- inGameUISetEventHandler ["Action", onMagazineUse];$/Code$
+ $Code$_rem = 3 mod 2;
+ // Result is 1$/Code$
- undefined / local
+ undefined / undefined
- (May 12, 2016)
- In case of the "Action" event, (param 6 || param 9) also denotes if the action is performed or not. For example, if the action menu is closed or fading off, pressing Spacebar will bring it up and trigger an "Action" event; in that case, param 9 (action menu visibility) is false. But if the action menu is open, and Spacebar is pressed to perform the selected action, then param 9 will be true. If param 6 (showWindow) is true, then it means the action was performed, regardless of param 9.
-
- (February 08, 2017)
- This powerful command can override the actions (previous/next/action), depending on true/false return. But, the command overrides itself, no matter of the returned value. That means, if two mods or scripts are using the same command parameter, say 'action', the last inGameUISetEventHandler 'action' will override the first one. Example: trigger1 :
- $Code$inGameUISetEventHandler ["Action","hint 'action for mod 1';true "];// true or false doesn't matter here$/Code$
- trigger2 (delayed):
- $Code$inGameUISetEventHandler ["Action","false "];// true or false doesn't matter here$/Code$
- trigger2 will run after trigger1, then, you'll never see the hint, what ever the trigger2 action code could be. What ever could be the last code, it will override all previous ones. You have to group these codes in a same event handler. But, beyond this, inGameUISetEventHandler is not stackable and implies a competition between scripts (or mods) using it.
+ (01:34, 16 April 2006)
+ Remainder is calculated in real domain.
+ mod is identical to a % b
+ You can use mod to round a decimal number down to the nearest whole number. For example: If you wanted to use the command random to generate a whole number between 0 and 5, you could put this in a script:
+ $Code$_rand = random 6;
+ _num = _rand - (_rand mod 1);
+ $/Code$
+ In A1, the new commands round, floor or ceil would be the easier way to round.
- Nothing
+ Number
+
- inPolygon
+ setAnimSpeedCoef
- Checks whether position is inside given polygon
+ Sets a coefficient for animation speed
- https://community.bistudio.com/wiki/inPolygon
+ https://community.bistudio.com/wiki/setAnimSpeedCoef
- Array inPolygon Array
+ Object setAnimSpeedCoef Number
- position inPolygon polygon
+ unit setAnimSpeedCoef coef
- $Code$_isInside = [100,100,0] inPolygon [[0,0,0],[1000,1000,0],[1000,0,0]];$/Code$
+ $Code$player setAnimSpeedCoef 0.75;$/Code$
undefined / undefined
+ (November 14, 2016)
+ Increasing animation speed of a unit also increases its run/walk speed (thanks to Killzone Kid )
+
+ (November 27, 2016)
+ Setting negative values with this makes animations act in reverse or make you stuck sliding in unknown directions.
- Boolean
+ Nothing
+
- inRangeOfArtillery
+ profileNamespace
- Returns true if all given units are able to fire at given position with given magazineType.
+ Returns the global namespace attached to the active user profile. Use setVariable and getVariable to save and load data to and from this Namespace. A variable can be deleted by setting its value to nil. By default the variables set in this namespace will exist while the game is running. In order to make variables save permanently, use saveProfileNamespace before the game is over.
+ The variables are stored next to the user profile in a file named myUsername.vars.GAMENAME (e.g. in the My Documents\Take On Helicopters folder).
- https://community.bistudio.com/wiki/inRangeOfArtillery
+ https://community.bistudio.com/wiki/profileNamespace
- Position inRangeOfArtillery Array
+ profileNamespace
- pos inRangeOfArtillery [[unit], magazineType]
+ profileNamespace
- $Code$_isInRange = getMarkerPos "myTarget" inRangeOfArtillery [[myArty], "32Rnd_155mm_Mo_shells"]$/Code$
+ $Code$_namespace = profileNamespace ;$/Code$
+
+ $Code$profileNamespace setVariable ["var_kills",10000];
+ _playerKills = profileNamespace getVariable "var_kills";$/Code$
- global / undefined
+ undefined / undefined
- (July 10, 2015)
- Using an empty artillery vehicle will return false.
+ The variables are loaded when the user profile is loaded or changed.
- Boolean
+ Namespace
+
- incapacitatedState
+ tvSetPictureColorSelected
- Returns the incapacitated state of the given unit.
+ Sets the color of the left picture of a tree item defined by path when item is selected
- https://community.bistudio.com/wiki/incapacitatedState
+ https://community.bistudio.com/wiki/tvSetPictureColorSelected
- incapacitatedState Object
+ Control tvSetPictureColorSelected Array
- incapacitatedState person
+ control tvSetPictureColorSelected [path, color]
- $Code$_result = incapacitatedState player;$/Code$
+ $Code$_control tvSetPictureColorSelected [[0], [1,0,1,1]]$/Code$
undefined / undefined
@@ -32567,312 +34280,453 @@
- String
+ Nothing
+
- independent
+ switchCamera
- Pre-defined variable for the independent side.
- Alias for resistance.
+ Switch camera to given vehicle / camera. Mode is one of:
+ "INTERNAL" : 1st person
+ "GUNNER" : optics / sights
+ "EXTERNAL" : 3rd person
+ "GROUP" : group
+ "CARGO" : same as "INTERNAL"
+ If you switch to a unit in a vehicle, this command uses the correct turret. Control over the unit is not given to the player. Use selectPlayer or a combination of switchCamera and remoteControl to achieve this.
- https://community.bistudio.com/wiki/independent
+ https://community.bistudio.com/wiki/switchCamera
- independent
+ Object switchCamera String
+
+ switchCamera Object
- independent
+ target switchCamera mode
+
+ switchCamera target
- $Code$// SQF:
- if (( side _unit) == independent ) then {
- hint "This is a independent unit!";
- };$/Code$
+ $Code$player switchCamera "Gunner";$/Code$
+
+ $Code$vehicle player switchCamera "External";$/Code$
undefined / undefined
+ (May 16, 2015)
+ Force top down view: $Code$cam = "Land_HandyCam_F" createVehicleLocal [0,0,0];
+ cam hideObject true ;
+ cam attachTo [ player, [0,0,10]];
+ cam setVectorUp [0,0.99,0.01];
+ cam switchCamera "Internal";
+ findDisplay 46 displayAddEventHandler ["MouseButtonDown", {
+ if (_this select 1 == 0) then {
+ player forceWeaponFire [ currentMuzzle player, currentWeaponMode player ];
+ };
+ false
+ }];
+ findDisplay 46 displayAddEventHandler ["KeyDown", {
+ if (_this select 1 in actionKeys "ReloadMagazine") then {
+ reload player ;
+ };
+ false
+ }];$/Code$
- Side
+ Nothing - Nothing
+
- in
+ drawLine3D
- Checks whether value is in array, unit in vehicle or position inside location. In case of value in array check, String values will be compared on CaSEseNsiTIve basis (see Example 2). Note: In Arma 2 you can not test for arrays within arrays using this command.
+ Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D".
- https://community.bistudio.com/wiki/in
+ https://community.bistudio.com/wiki/drawLine3D
- Anything in Array
-
- Object in Object
-
- Array in Location
+ drawLine3D Array
- value in array
-
- unit in vehicle
-
- position in location
+ drawLine3D [start, end, color]
- $Code$1 in [0,1,2]; //true$/Code$
-
- $Code$"lol" in ["Lol", "LOL", "loL"]; //false
- "loL" in ["Lol", "LOL", "loL"]; //true$/Code$
-
- $Code$// Arma 3:
- [1,2,3] in [[1,2,3],[4,5,6]]; //true$/Code$
-
- $Code$_isInCar = player in car;$/Code$
-
- $Code$_isInside = [1000,2000,0] in myLocation;$/Code$
+ $Code$onEachFrame {
+ drawLine3D [ getPos player, getPos cursorTarget, [1,1,1,1]];
+ };$/Code$
undefined / undefined
- (15:58, 18 January 2007 (CET))
- For a case- insensitive test use count :
- $Code${_x == "lol"} count ["Lol", "LOL", "loL"]; //returns 3.$/Code$
- Checking if an array (for example a position) is in another array doesn't produce an error, but it will always return false. e.g.
- $Code$[0,0,0] in [[0,0,0],[1,4,3],[5,3,1]]; //returns: false.$/Code$
+ (August 31, 2013)
+ As command syntax indicates, this command expects starting and ending position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW. Use additional ASLToAGL and AGLToASL commands wherever is necessary.
+ $Code$ addMissionEventHandler ["Draw3D", {
+ drawLine3D [ ASLToAGL eyePos soldier1, ASLToAGL eyePos soldier2, [1,0,0,1]];
+ }];$/Code$
- (August 23, 2014)
- As of Arma 3 1.26:
- $Code$[0,0,0] in [[0,0,0],[1,4,3],[5,3,1]]; //returns true
- [1,2,3] in [[1,2,3],[4,5,6]]; //returns true
- $/Code$
- Assuming it is now using comparison as found in isEqualTo
+ (February 18, 2015)
+ Visible through fog and past draw distance.
- Boolean - Boolean - Boolean
+ Nothing
+
- inflamed
+ ctrlText
- Checks if fireplace is inflamed (burning) or not. To check if a unit is receiving damage from fire, use isBurning command.
+ Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path.
+ Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/inflamed
+ https://community.bistudio.com/wiki/ctrlText
- inflamed Object
+ ctrlText Number
+
+ ctrlText Control
- inflamed fireplace
+ ctrlText idc
+
+ ctrlText controlName
- $Code$_inflamed = inflamed _fireplaceOne;$/Code$
+ $Code$_text = ctrlText 100$/Code$
+
+ $Code$_text = ctrlText _control$/Code$
- global / undefined
+ local / undefined
- Boolean
+ String - String
+
- inflame
+ nearestObjects
- Control fireplace burning. Set inflame to true (on) or false (off).
+ Returns a list of nearest objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered by proximity, the closest one will be first in the array. Alternatively, you use nearObjects command, which doesn't sort results.
+ position can use the format:
+ [[x,y,z], ["ClassName",...], radius]
+ or
+ [object, ["ClassName",...], radius]
+ To use it without any ClassName filter:
+ [object or position, [], radius].
+ A list of ClassName types (Tanks eg) can be found in CfgVehicles
+ Since Arma 3 v1.65.138818 it is possible to switch search and sorting mode between 2D and 3D
- https://community.bistudio.com/wiki/inflame
+ https://community.bistudio.com/wiki/nearestObjects
- Object inflame Boolean
+ nearestObjects Array
- fireplace inflame burn
+ nearestObjects [position, types, radius, 2Dmode]
- $Code$_fireplaceOne inflame true ;$/Code$
+ $Code$nearestObjects [ player, ["Car","Tank"], 200];$/Code$
+
+ $Code$nearestObjects [ player, ["house"], 200];$/Code$
+
+ $Code$nearestObjects [[2716,2949,0], ["Car","Truck"], 100];$/Code$
+
+ $Code$// Return every object in 50 metres radius around player:
+ nearestObjects [ player, [], 50]$/Code$
- global / global
+ undefined / undefined
+ (unknown)
+ To get a list with alive targets for various situations use this construct:
+ $Code$_nearestTargets = nearestObjects [_submunScanPos, ["VBS2_TANK","TANK"], _scanArea];
+ _validNearestTargets = [];
+ { if ( alive _x) then {_validNearestTargets set [( count _validNearestTargets),_x];};} forEach _nearestTargets;
+ $/Code$
+ results in _validNearestTargets being filled with targets == alive.. (you could use other conditions there, of course!)
+ -- Vigilante
+
+ (10. Aug. 2010)
+ Passing an empty array to define the types will also return objects with no class at all (such as trees, bushes, stones,...).
+ Example:
+ $Code$_objects = nearestObjects [_position, [], _radius];$/Code$
+ Passing the array ["All"] is not the same and will only return objects that have some sort of class.
+
+ (11.09.2013)
+ If you want to detect nearby grenades for the position of a unit, for example, using 'nearestObjects' won't work. You have to use
+ 'nearObjects' instead.
+ $Code$ count ( nearestObjects [_unit, ["GrenadeHand"], 30]) // WON'T WORK$/Code$
+ Won't ever return anything but 0.
+ $Code$ count (_unit nearObjects ["GrenadeHand", 30]) // WORKS!$/Code$
+ Will work.
+
+ (March 22, 2014)
+ The distance from which an object is determined to be inside the radius is calculated from its model center (object modelToWorld [0,0,0]), and not the position returned by getPos/ATL/ASL. If an object is used as the origin from which to scan, distance is calculated from its model center as well.
+
+ (October 26, 2014)
+ Return all trees in 100m radius around player:
+ $Code$trees = [];
+ {
+ if ( str _x find ": t_" -1) then {
+ trees pushBack _x;
+ };
+ } forEach nearestObjects [ player, [], 100];$/Code$
+
+ (August 27, 2015)
+ If you use "Man" as the class to look for, it will only find dismounted men. IE, men in vehicles will NOT be found.
+
+ (January 8, 2016)
+ The first call to this command can take significantly longer then consecutive calls. But even after the objects in given radius were cached, the sorting this command performs could be quite expensive. For example to sort ~7000 object it might take up to 100ms. For performance reasons you can use nearObjects instead, which is basically the same command but without added sorting.
+
+ (March 2, 2016)
+ In Arma 3, nearestObjects is partially broken and is unable to return nearby placed explosive charges or mines when searching by classnames. Use nearObjects, nearestObject or allMines instead.
+ Example of non-functional code:
+ $Code$//always returns nothing, even if there are objects that should be returned
+ nearestObjects [position player, ["APERSMine_Range_Ammo", "SatchelCharge_Remote_Ammo"], 10]$/Code$
+
+ (October 31, 2016)
+ Since Arma 3 v1.65.138818 the default sorting is done according to 3D distance not distance2D as before. This is an attempt to correct some very old bug in implementation.
- Nothing
+ Array
+
- inheritsFrom
+ removePrimaryWeaponItem
- Returns base entry of config entry.
+ Removes given weapon item from the primary weapon cargo space.
+ As of Arma 3 DEV 1.37, this command also supports weapon magazines.
- https://community.bistudio.com/wiki/inheritsFrom
+ https://community.bistudio.com/wiki/removePrimaryWeaponItem
- inheritsFrom Config
+ Object removePrimaryWeaponItem String
- inheritsFrom config
+ unit removePrimaryWeaponItem item
- $Code$_base = inheritsFrom ( configFile "CfgVehicles" "Car");
- // Result is Config entry for class "LandVehicle"$/Code$
-
- $Code$// Print parent tree of given config class:
- fnc_printParents =
- {
- disableSerialization ;
- if (! isClass _this) exitWith { hint "Argument is not a config Class"};
- private _parents = [];
- while {! isNull _this} do
- {
- _parents pushBack configName _this;
- _this = inheritsFrom _this;
- };
- reverse _parents;
- private _tv = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscTree", -1];
- _tv ctrlSetPosition [0,0,1,1];
- _tv ctrlSetBackgroundColor [0,0,0,0.5];
- _tv ctrlCommit 0;
- private _path = [];
- {
- _tv tvAdd [_path, _x];
- _path pushBack 0;
- }
- forEach _parents;
- tvExpandAll _tv;
- };
- // Example:
- ( configFile "CfgVehicles" typeOf player ) call fnc_printParents;$/Code$
+ $Code$player removePrimaryWeaponItem "acc_flashlight";$/Code$
- undefined / undefined
+ local / global
- (Apr 2, 2014)
- (A3 1.14)Use BIS_fnc_returnParents if a parents' collection of the given entry is needed.
- $Code$
- [( configFile "CfgVehicles" "Land_Atm_02_F"), true ] call BIS_fnc_returnParents ;
- //return: ["Land_Atm_02_F","House_Small_F","House_F","House","HouseBase","NonStrategic","Building","Static","All"]
- $/Code$
- Not all entries have parent, and please differ parents from path.
- $Code$
- inheritsFrom ( configFile "CfgUIColors" "IGUI" "Presets" "PresetA1" "Variables");
- //return: Nothing
- $/Code$
- Config
+ Nothing
+
- initAmbientLife
+ setHitIndex
- Initialize the ambient life.
+ Set the current level of damage for a specific Hit Point (specified by its hit part index). All hit points can be obtained with getAllHitPointsDamage command.
+ 0: no damage
+ 1: full damage
- https://community.bistudio.com/wiki/initAmbientLife
+ https://community.bistudio.com/wiki/setHitIndex
- initAmbientLife
+ Object setHitIndex Array
- initAmbientLife
+ vehicle setHitIndex [hitPartIndex, damage, useEffects]
-
+ $Code$vehicle player setHitIndex [1, 1];$/Code$
+
+ $Code$player setHitIndex [7, 0.5];$/Code$
+
- undefined / undefined
+ local / global
- Nothing
+ Nothing
+
- inputAction
+ currentNamespace
- Return the state of input devices mapped to given input action.
- For Arma 3 inputActions see: inputAction/actions.
- For Arma 3 inputActions bindings see: inputAction/actions/bindings.
- For earlier Arma editions see Category:Key Actions.
+ Returns current global namespace the script runs in.
- https://community.bistudio.com/wiki/inputAction
+ https://community.bistudio.com/wiki/currentNamespace
- inputAction String
+ currentNamespace
- inputAction name
+ currentNamespace
- $Code$inputAction "leanLeft"
- // Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.$/Code$
-
- $Code$[] spawn {
- waitUntil { inputAction "reloadMagazine" 0};
- hint "Reload Key Pressed";
- };$/Code$
+ $Code$if ( currentNamespace isEqualTo uiNamespace ) then { hint "This is uiNamespace"};$/Code$
undefined / undefined
- (07:38, 15 October 2010 (CEST))
- This command also returns values other than 0 and 1 (like 0.02 or 1.3). Any value greater than zero usually signals that the key or button is pressed. inputAction does not work reliably when used in RscDisplayMission's onKeyDown event handler (the same is probably true for other input related event handlers).
+
+
+ Namespace
+
+
+
+
+
+ setSpeaker
+
+
+ Sets the speaker of a person. In order to setSpeaker dynamically in MP, the command needs to run on every computer with exactly the same params otherwise the speaking unit could appear silent on other PCs. Run this on server:
+ [bob, "Male02GRE"] remoteExecCall ["setSpeaker", 0];
+
+
+ https://community.bistudio.com/wiki/setSpeaker
+
+
+ Object setSpeaker String
+
+
+ person setSpeaker speaker
+
+
+ $Code$unit1 setSpeaker "Male02GRE";$/Code$
+
+
+ local / local
+
+
+ (September 19, 2013)
+ speaker can be any of the following:
+ Male01ENG
+ Male01ENGB
+ Male01GRE
+ Male01PER
+ Male02ENG
+ Male02ENGB
+ Male02GRE
+ Male02PER
+ Male03ENG
+ Male03ENGB
+ Male03GRE
+ Male03PER
+ Male04ENG
+ Male04ENGB
+ Male04GRE
+ Male05ENG
+ Male06ENG
+ Male07ENG
+ Male08ENG
+ Male09ENG
- (May 8, 2014)
- inputAction does not return the actual state of the queried key when a dialog screen is open. Instead, it will always return 0.
+ (January 12, 2014)
+ speakers available in Arma 3 (v1.08) :
+ Gender
+ Profile setting
+ US English (B) for EN-GB available
+ Greek
+ Persian
+ Male
+ Male01_F
+ Male01ENG(B)
+ Male01GRE
+ Male01PER
+ Male02_F
+ Male02ENG(B)
+ Male02GRE
+ Male02PER
+ Male03_F
+ Male03ENG(B)
+ Male03GRE
+ Male03PER
+ Male04_F
+ Male04ENG(B)
+ Male04GRE
+ Male01PER
+ Male05_F
+ Male05ENG
+ Male05GRE
+ Male02PER
+ Male06_F
+ Male06ENG
+ Male02GRE
+ Male03PER
+ Male07_F
+ Male07ENG
+ Male03GRE
+ Male01PER
+ Male08_F
+ Male08ENG
+ Male04GRE
+ Male02PER
+ Male09_F
+ Male09ENG
+ Male01GRE
+ Male03PER
+ Female
+ -
+ -
+ -
+ -
- (July 31, 2015)
- inputAction is capable of returning the state of analog inputs. This includes mouse, joystick, and even TrackIR. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be 1.
- Right mouse click is currently not supported, but right mouse hold is. http://feedback.arma3.com/view.php?id=25015
+ (November 10, 2014)
+ In order to stop a unit from talking you can use:
+ $Code$_unit setSpeaker "NoVoice"$/Code$
+ This will have no negative effect on the ability to command the unit.
- Number
+ Nothing
+
- insertEditorObject
+ deleteEditorObject
- Insert an object to the editor and assign arguments. Create script is,not called. Returns the ID of the new EditorObject. Subtype class is,optional.
+ Delete the editor object. Requires all editor object links to be removed prior.
i
Some Old Editor Command
- https://community.bistudio.com/wiki/insertEditorObject
+ https://community.bistudio.com/wiki/deleteEditorObject
- Control insertEditorObject Array
+ Control deleteEditorObject String
- map insertEditorObject [type,value,[name1,value1,],subtype class]
+ map deleteEditorObject object
@@ -32880,102 +34734,63 @@
undefined / undefined
- (May 7, 2015)
- "This works only in the old 3D editor" - KM
- String
+ Any_Value
+
- intersect
+ menuURL
- Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. lodName could be one of the following:
- "FIRE"
- "VIEW"
- "GEOM"
- "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
+ Returns current URL set in entry on given path.
- https://community.bistudio.com/wiki/intersect
+ https://community.bistudio.com/wiki/menuURL
- Array intersect Array
+ menuURL Array
- [object, lodName] intersect [begPos, endPos]
+ menuURL [idc, path]
- $Code$[_tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]];$/Code$
-
- $Code$sphere = "Sign_Sphere10cm_F" createVehicle [0,0,0];
- onEachFrame {
- _begPos = positionCameraToWorld [0,0,0];
- _begPosASL = AGLToASL _begPos;
- _endPos = positionCameraToWorld [0,0,1000];
- _endPosASL = AGLToASL _endPos;
- _ins = lineIntersectsSurfaces [_begPosASL, _endPosASL, player, objNull, true, 1, "FIRE", "NONE"];
- if (_ins isEqualTo []) exitWith {sphere setPosASL [0,0,0]};
- _ins select 0 params ["_pos", "_norm", "_obj", "_parent"];
- if !( getModelInfo _parent select 2) exitWith {sphere setPosASL [0,0,0]};
- _ins2 = [_parent, "FIRE"] intersect [_begPos, _endPos];
- if (_ins2 isEqualTo []) exitWith {sphere setPosASL [0,0,0]};
- _ins2 select 0 params ["_name", "_dist"];
- _posASL = _begPosASL vectorAdd ((_begPosASL vectorFromTo _endPosASL) vectorMultiply _dist);
- drawIcon3D ["", [1,1,1,1], ASLToAGL _posASL, 0, 0, 0, _name, 1, 0.03, "PuristaMedium"];
- sphere setPosASL _posASL;
- };$/Code$
-
+
- global / undefined
+ undefined / undefined
- (Jul 25, 2007)
- The most common LOD is " FIRE ", which identifies the most detailled hitbox used for ammunition.
-
- (Mar 27, 2014)
- Example (In ArmA3 ver 1.14) display returned arrays on cursor entities:
- $Code$
- Sto = [];
- Fn = {
- {
- Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoagl (eyepos player)),(screentoworld [0.5,0.5])]];
- } foreach ["FIRE","VIEW","GEOM","IFIRE"];
- hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3];
- };
- ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler;
- $/Code$
- Return FIRE: [something], VIEW: [something], GEOM: [something], IFIRE: [something].
-
- (August 20, 2015)
- intersect will spam.rpt if passed to it object has no skeleton. Use getModelInfo to filter out those objects.
- Array
+ String
+
- is3DENMultiplayer
+ taskNull
- Returns true if the Eden Editor is in multiplayer mode. Returns true in the following cases:
- Multiplayer Preview launched directly from 3DEN - true in preview and only for the creator
- MP mission is chosen for editing when creating a server: Multiplayer - Server Browser - Host Server. When 3D EDITOR button is clicked for selected mission and 3DEN is launched, command returns true within the editor environment. (see also is3DEN )
+ A non-existing Task. To compare non-existent tasks use isNull or isEqualTo :
+ taskNull == taskNull ; // false
+ isNull taskNull ; // true
+ taskNull isEqualTo taskNull ; // true
- https://community.bistudio.com/wiki/is3DENMultiplayer
+ https://community.bistudio.com/wiki/taskNull
- is3DENMultiplayer
+ taskNull
- is3DENMultiplayer
+ taskNull
- $Code$if is3DENMultiplayer then { systemChat "Your hosting a test server!"};$/Code$
+ $Code$! isNull taskNull ; // false$/Code$
+
+ $Code$str taskNull ; // No task$/Code$
undefined / undefined
@@ -32983,27 +34798,28 @@
- Boolean
+ Task
+
- is3DEN
+ setVehicleReportRemoteTargets
- Returns true if the Eden Editor is currently being used. true when inside editor environment, false during preview. (see also is3DENMultiplayer )
+ Sets that the vehicle will share targets that were acquired by its own sensors via datalink to the Side center.
- https://community.bistudio.com/wiki/is3DEN
+ https://community.bistudio.com/wiki/setVehicleReportRemoteTargets
- is3DEN
+ Object setVehicleReportRemoteTargets Boolean
- is3DEN
+ vehicle setVehicleReportRemoteTargets bool
- $Code$if is3DEN then { systemChat "Welcome to Eden Editor!"};$/Code$
+ $Code$( vehicle player ) setVehicleReportRemoteTargets true;$/Code$
undefined / undefined
@@ -33011,113 +34827,142 @@
- Boolean
+ Nothing
+
- isAbleToBreathe
+ setWindForce
- If unit is diving and doesn't have a re-breather, it returns false. Diving means the unit's head is underwater. If unit is underwater and has a re-breather, the command returns true.
+ Set max. wind overall wind changes in time. A time of zero means there will be an immediate change. A wind level of zero is minimal changes and a wind level of one means that wind can change rapidly.
- https://community.bistudio.com/wiki/isAbleToBreathe
+ https://community.bistudio.com/wiki/setWindForce
- isAbleToBreathe Object
+ Number setWindForce Number
- isAbleToBreathe unit
+ time setWindForce wind
-
+ $Code$1800 setWindForce 0.5$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- isAgent
+ setFog
- Check if team member is an agent.
+ Changes the fog smoothly over the the given TransitionTime (in seconds). A time of zero means there will be an immediate change. A fog intensity of zero is minimum fog and a fog level of one is maximum fog.
+ NOTE : Since Arma 3 this command is MP synchronised, if executed on server, the changes will propagate globally. If executed on client effect is temporary as it will soon change to the server setting.
+ A little information about how Alt Syntax works. The fogValue is normal fog value that could be set independently with original setFog command. fogBase is the ASL altitude at which the fog will start. 0 is the sea level. fogDecay is how defined the fog start is. The more defined, the denser is the fog. 1 (or -1) are the max values. If it is positive the fog will be generated below fogBase line, if negative, above it. If fogDecay is small, the fog will transition more smoothly from no fog to full fog, and because of that it will cross fogBase line by quite a lot, depending on how small is fogDecay value. Current values of fogDecay and fogBase can be retrieved with fogParams
- https://community.bistudio.com/wiki/isAgent
+ https://community.bistudio.com/wiki/setFog
- isAgent Team_Member
+ Number setFog Number
+
+ Number setFog Array
- isAgent teamMember
+ time setFog fog
+
+ time setFog [fogValue, fogDecay, fogBase]
-
+ $Code$15 setFog 0.5;$/Code$
+
+ $Code$// Force no fog:
+ 0 setFog 0;
+ forceWeatherChange ;
+ 999999 setFog 0;$/Code$
+
+ $Code$0 setFog [1, 0.01, 0];$/Code$
+
+ $Code$// Mountain fog, starts from 70m ASL and thickens more the higher you climb:
+ 0 setFog [1, -1, 70];$/Code$
+
+ $Code$// Valley fog, starts from 60m ASL and thickens more the lower you descend:
+ 0 setFog [1, 1, 60];$/Code$
+
+ $Code$// Fooooog on the waaaater:
+ 0 setFog [1, 1, 0];$/Code$
+
- undefined / undefined
+ undefined / global
- (May 19, 2017)
- One can check if a unit is an agent via
- $Code$ isAgent teamMember _unit$/Code$
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ Only one script command induced weather change (either setOvercast or setFog) can be happening at a time. Starting a new weather change will immediately halt the current weather change. SetRain changes are independent and can occur simultaneously to a weather change.
+
+ (December 15, 2015)
+ setTimeMultiplier DOES affect transition time.
- Boolean
+ Nothing - Nothing
+
- isArray
+ setAirplaneThrottle
- Check if config entry represents array.
+ Sets a wanted throttle position, works only on player's vehicle.
- https://community.bistudio.com/wiki/isArray
+ https://community.bistudio.com/wiki/setAirplaneThrottle
- isArray Config
+ Object setAirplaneThrottle Number
- isArray config
+ airplane setAirplaneThrottle value
- $Code$_ok = isArray (configFile "CfgVehicles")
- // Result is false$/Code$
-
+
undefined / undefined
- Boolean
+ Nothing
+
- isAutoHoverOn
+ addMagazinePool
- Return true if vehicle has enabled auto hover. (always returns false if the vehicle can't set auto hover)
+ Add magazines to the magazine pool, of which the player may choose in the following mission. Available in campaigns only.
- https://community.bistudio.com/wiki/isAutoHoverOn
+ https://community.bistudio.com/wiki/addMagazinePool
- isAutoHoverOn Object
+ addMagazinePool Array
- isAutoHoverOn vehicle
+ addMagazinePool [magazineName, count]
- $Code$status = isAutoHoverOn vehicle player;$/Code$
+ $Code$addMagazinePool ["M16", 20];$/Code$
undefined / undefined
@@ -33125,493 +34970,443 @@
- Boolean
+ Nothing
+
- isAutonomous
+ waypointBehaviour
- Returns true if UAV is in autonomous mode.
+ Gets the waypoint behavior.
- https://community.bistudio.com/wiki/isAutonomous
+ https://community.bistudio.com/wiki/waypointBehaviour
- isAutonomous Object
+ waypointBehaviour Array
- isAutonomous uav
+ waypointBehaviour waypoint
- $Code$bool = isAutonomous uav;$/Code$
+ $Code$waypointBehaviour [groupOne,1]$/Code$
- global / undefined
+ undefined / undefined
- Boolean
+ String
+
- isAutotest
+ saveVar
- Returns true if game was started with autotest parameter
+ Save variable value into the campaign space. This variable is available to all following missions in the campaign.
- https://community.bistudio.com/wiki/isAutotest
+ https://community.bistudio.com/wiki/saveVar
- isAutotest
+ saveVar String
- isAutotest
+ saveVar varname
- $Code$_bool = isAutotest$/Code$
+ $Code$saveVar "varOne"$/Code$
undefined / undefined
+ (January 28, 2009)
+ If you try to saveVar a vehicle saved in your variable (SavedVars = [Car1]; saveVar "SavedVars"), then Car1 will not be properly "saved", refering to ObjNull if you try to use it in subsequent missions, even if a vehicle with the same vehicle varname exists. To get around this, save the vehicle's varname as a string (SavedVars = [str(Car1)]) and then when you need it just use call compile to "unstring" the varname (_car = call compile (SavedVars select 0);).
- Boolean
+ Nothing
+
- isBleeding
+ removeDrawLinks
- Returns whether the unit is bleeding.
+ Remove all drawn links for the given editor object for the given editor,object type. Pass an empty string as param type to remove all draw,links for an object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/isBleeding
+ https://community.bistudio.com/wiki/removeDrawLinks
- isBleeding Object
+ Control removeDrawLinks Array
- isBleeding unit
+ map removeDrawLinks [from,param type]
- $Code$if ( isBleeding player ) then { player groupChat "I'm bleeding!!"; }$/Code$
-
+
undefined / undefined
- Boolean
+ Nothing
+
- isBurning
+ benchmark
- Returns whether the unit is burning.
- This returns true only if unit is damaged by nearby fire, it does not check whether a fireplace is burning, use inflamed command for that.
+ Returns the value of "3D Performance" in OFP Preferences (flashpoint.cfg). This can be used to estimate the computer performance to adapt CPU and GPU demanding settings like view distance dynamically in missions.
- https://community.bistudio.com/wiki/isBurning
+ https://community.bistudio.com/wiki/benchmark
- isBurning Object
+ benchmark
- isBurning unit
+ benchmark
- $Code$if ( isBurning player ) then { player groupChat "I'm burning!!"; }$/Code$
+ $Code$? (benchmark 2000) : setViewDistance 2000$/Code$
undefined / undefined
+ (14 March 2014)
+ The command is obsolete, it was used in OFP to measure PC performance. In A3 it returns 2000.
- Boolean
+ Number
+
- isClass
+ resistance
- Check if config entry represents config class.
+ Resistance side.
+ When used in a format statement ( hint format ["%1",resistance] ), the string returned is "GUER".
- https://community.bistudio.com/wiki/isClass
+ https://community.bistudio.com/wiki/resistance
- isClass Config
+ resistance
- isClass config
+ resistance
- $Code$_ok = isClass ( configFile "CfgVehicles");
- // Result is true.$/Code$
+ $Code$// SQS:
+ ?((side _unit) == resistance ) : hint "This is a resistance unit!"$/Code$
+
+ $Code$// SQF:
+ if (( side _unit) == resistance ) then {
+ hint "This is a resistance unit!";
+ };$/Code$
undefined / undefined
- (March 2, 2007)
- This command allows you to check for the presence of an addon.
- isClass (configFile "cfgVehicles" "MyCustomCar")
- will return true if the addon "MyCustomCar" is installed, and false if it is not installed.
- You will have to know under which class the addon is categorized (in this case "cfgVehicles") to be able to use the right config path.
-
- (Mar 31, 2014)
- (ArmA3 ver 1.14) According to BI Dev Karel Mořický, BIS_fnc_getCfgIsClass provides a comfortable workaround with custom config under description.ext compared with isClass. (But as a function created specifically for A3 campaign, it is in no way intended as a replacement for isClass. So it is not suggested to use it for configFile classes. But isClass instead.)
- E.g.
- $Code$["Something1","Something2","Something3"] call bis_fnc_getCfgIsClass //Same as isClass (missionconfigfile "Something1" "Something2" "Something3")$/Code$
- Boolean
+ Side
+
- isCollisionLightOn
+ clearOverlay
- Returns true if vehicle collision lights are on otherwise false.
+ Clear the current overlay.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/isCollisionLightOn
+ https://community.bistudio.com/wiki/clearOverlay
- isCollisionLightOn Object
+ clearOverlay Control
- isCollisionLightOn vehicle
+ clearOverlay map
- $Code$_collisionLightOn = isCollisionLightOn heli;$/Code$
+ $Code$clearOverlay _map,$/Code$
- global / undefined
+ undefined / undefined
- (April 6, 2015)
- Bind Collision light action to UserAction 2
- $Code$this addAction ["", {
- _this select 1 action [
- ["CollisionLightOn", "CollisionLightOff"] select isCollisionLightOn (_this select 0),
- _this select 0
- ];
- }, "", -10, false, true, "User2", "_this == driver _target"];$/Code$
- Boolean
+ Nothing
+
- isCopilotEnabled
+ playMoveNow
- Returns true if copilots actions are enabled.
+ When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded.
+ List of moves in ArmA 2 List of moves in Armed Assault List of moves in Operation Flashpoint: Resistance
+ The difference between playMove and playMoveNow is that playMove adds another move to the move queue, while playMoveNow replaces the whole move queue with new move:
+ $Code$ player switchMove "amovpercmstpsraswrfldnon";
+ [] spawn
+ {
+ sleep 0.5;
+ player playMove "amovppnemstpsraswrfldnon"; // player goes prone
+ player playMove "amovpknlmstpsraswrfldnon"; // player gets up on one knee
+ };$/Code$
+ Compared to:
+ $Code$ player switchMove "amovpercmstpsraswrfldnon";
+ [] spawn
+ {
+ sleep 0.5;
+ player playMove "amovppnemstpsraswrfldnon"; // player never goes prone
+ player playMoveNow "amovpknlmstpsraswrfldnon"; // player goes down on one knee straight away
+ };$/Code$
- https://community.bistudio.com/wiki/isCopilotEnabled
+ https://community.bistudio.com/wiki/playMoveNow
- isCopilotEnabled Object
+ Object playMoveNow String
- isCopilotEnabled vehicle
+ soldier playMoveNow moveName
- $Code$if (! isCopilotEnabled myHeli) then {
- myHeli enableCopilot true ;
- };$/Code$
+ $Code$player playMoveNow "AmovPercMevaSlowWrflDf"$/Code$
- global / undefined
+ local / global
- (February 17, 2014)
- Only returns whether or not the actions are enabled and shown to the pilot and co-pilot. This will still return TRUE if the pilot uses the 'Lock Controls' action to disable co-pilot controls.
- You can use the Arma 3 Event Handler - Controls Shifted to detect 'Take Controls' or 'Release Controls' actions
- Boolean
+ Nothing
+
- isDLCAvailable
+ isBurning
- Returns true if the DLC is marked as available. (Steam)
+ Returns whether the unit is burning.
+ This returns true only if unit is damaged by nearby fire, it does not check whether a fireplace is burning, use inflamed command for that.
- https://community.bistudio.com/wiki/isDLCAvailable
+ https://community.bistudio.com/wiki/isBurning
- isDLCAvailable Number
+ isBurning Object
- isDLCAvailable appid
+ isBurning unit
- $Code$_Karts = 288520;
- isDLCAvailable _Karts;//Returns true$/Code$
+ $Code$if ( isBurning player ) then { player groupChat "I'm burning!!"; }$/Code$
undefined / undefined
- (October 19, 2014)
- appid can be taken from Steam DLC url.
- Karts url is http://store.steampowered.com/app/ 288520 /
- Zeus url is http://store.steampowered.com/app/ 275700 /
- DLC bundle url is http://store.steampowered.com/app/ 304400 /
- Boolean
+ Boolean
+
- isDamageAllowed
+ playAction
- A getter for allowDamage command. The command indicates if damage is allowed at current locality, hence local effect of the command. A complete solution for being able to tell whether or not an object can be damaged at current locality looks like this:
- $Code$_canBeDamaged = local _obj && isDamageAllowed _obj;$/Code$
+ When used on a person, a smooth transition to the given action will be initiated.
+ For Arma 3 actions see: playAction/actions.
- https://community.bistudio.com/wiki/isDamageAllowed
+ https://community.bistudio.com/wiki/playAction
- isDamageAllowed Object
+ Object playAction String
- isDamageAllowed object
+ soldier playAction action
- $Code$_isGod = ! isDamageAllowed player ;$/Code$
+ $Code$soldierOne playAction "SitDown"$/Code$
- global / local
+ local / global
- Boolean
+ Nothing
+
- isDedicated
+ terminate
- Return true if the machine (executing the command) is a dedicated multiplayer server. In single player returns false.
+ Terminate (abort) spawned or execVM 'd script. Note : The given script will not terminate immediately upon terminate command execution, it will do so the next time the script is processed by the scheduler.
- https://community.bistudio.com/wiki/isDedicated
+ https://community.bistudio.com/wiki/terminate
- isDedicated
+ terminate Script_Handle
- isDedicated
+ terminate scriptHandle
- $Code$if ( isDedicated ) then { diag_log "Dedicated Server on the run !";};$/Code$
+ $Code$_script = [] execVM "script.sqf";
+ sleep 5;
+ terminate _script;
+ hint "'script.sqf' has been terminated after 5 seconds";$/Code$
undefined / undefined
- (December 21, 2014)
- $Code$ if ( isDedicated ) then {
- //run on dedicated server only
- };
- if ( isServer ) then {
- //run on dedicated server or player host
- };
- if ( hasInterface ) then {
- //run on all player clients incl. player host
- };
- if (! isDedicated ) then {
- //run on all player clients incl. player host and headless clients
- };
- if (! isServer ) then {
- //run on all player clients incl. headless clients but not player host
- };
- if (! hasInterface ) then {
- //run on headless clients and dedicated server
- };
- if (! hasInterface && ! isDedicated ) then {
- //run on headless clients only
- };$/Code$
- Boolean
+ Nothing
+
- isEngineOn
+ currentMuzzle
- Returns true if engine is on, false if it is off.
+ Returns current muzzle of unit's weapon.
+ This command will return 0 Number if given object is a unit that is in a vehicle.
- https://community.bistudio.com/wiki/isEngineOn
+ https://community.bistudio.com/wiki/currentMuzzle
- isEngineOn Object
+ currentMuzzle Object
- isEngineOn vehicle
+ currentMuzzle gunner
- $Code$_OnOff = isEngineOn _carOne$/Code$
+ $Code$_muzzle = currentMuzzle player ;$/Code$
+
+ $Code$_muzzle = currentMuzzle ( gunner ( vehicle player ));$/Code$
- global / undefined
+ undefined / undefined
- (March 20, 2015)
- isEngineOn returns true for static objects without an engine
-
- (April 6, 2015)
- Bind Engine action to User Action 1
- $Code$this addAction ["",
- {
- _this select 1 action
- [
- ["EngineOn", "EngineOff"] select isEngineOn (_this select 0),
- _this select 0
- ];
- }, "", -10, false, true, "User1", "_this == driver _target"];$/Code$
- Boolean
+ String
+
- isEqualTo
+ getShadowDistance
- Performs strict comparison between var1 and var2 and returns true if equal, otherwise false. Strict means that it would check that both arguments are of the same data type and then compare the values.
- Some differences between isEqualTo and == :
- It performs case sensitive comparison on Strings
- It doesn't throw error when comparing different types, i.e. ("eleven" isEqualTo 11)
- It can compare Arrays, Scripts and Booleans ( alive player isEqualTo true )
- It can compare non-existent game objects ( grpNull isEqualTo grpNull )
- It can compare Namespaces ( As of Arma 3 v1.47 )
- It is slightly faster than ==, especially when comparing Strings
+ Gets the shadows rendering distance.
- https://community.bistudio.com/wiki/isEqualTo
+ https://community.bistudio.com/wiki/getShadowDistance
- Anything isEqualTo Anything
+ getShadowDistance
- val1 isEqualTo val2
+ getShadowDistance
- $Code$_arr1 = [1,[2,[3]]];
- _arr2 = [1,[2,[3]]];
- if (_arr1 isEqualTo _arr2) then { hint "Arrays match!"}$/Code$
-
- $Code$if (a isEqualTo b) then { hint "a is equal to b"};
- if !(a isEqualTo b) then { hint "a is not equal to b"};$/Code$
+ $Code$_value = getShadowDistance;$/Code$
undefined / undefined
- (July 19, 2014)
- The behavior of "var1 isEqualTo var2" is pretty much equivalent to "var1 in [var2]", plus the ability to compare arrays, and slightly better performance.
-
- (December 3, 2014)
- Simply put, "isEqualTo" is a binary comparison. Therefor it is very fast but only accepts 100% identical matches. In some other languages this is known as "===" instead of "==".
-
- (November 3, 2016)
- When comparing with nil result is Nothing.
- "nil isEqualTo player" returns "Nothing" instead of expected "false"
- $Code$diag_log [nil isEqualTo player];$/Code$
- Will print "[bool]"
- $Code$diag_log (str (nil isEqualTo player)) + "test";$/Code$
- Will throw Generic error in expression
- "+: Type Nothing, expected Number,Array,String,Not a Number"
- Boolean
+ Number
+
- isEqualTypeAll
+ clearItemCargoGlobal
- Compares types of all elements of an array to the type of a single value.
+ Removes all items from ammo box (or any general weapon holder container).
- https://community.bistudio.com/wiki/isEqualTypeAll
+ https://community.bistudio.com/wiki/clearItemCargoGlobal
- Array isEqualTypeAll Anything
+ clearItemCargoGlobal Object
- arr isEqualTypeAll val
+ clearItemCargoGlobal box
- $Code$_arr = [1,2,3,4,5,6,7,8,9,0];
- _arr isEqualTypeAll ""; //false
- _arr isEqualTypeAll 0; //true$/Code$
-
+
- undefined / undefined
+ global / global
- (November 25, 2015)
- This command will return false if the array on the left side is empty ([]) regardless of the sample value.
- $Code$[] isEqualTypeAll ""
- - false
- $/Code$
- Boolean
+ Nothing
+
- isEqualTypeAny
+ modelToWorldVisual
- Compares type of given value to every type in the given array and if match is found, true is returned.
+ Converts position from object model space to world space in render time scope. For ASL version see modelToWorldVisualWorld.
- https://community.bistudio.com/wiki/isEqualTypeAny
+ https://community.bistudio.com/wiki/modelToWorldVisual
- Anything isEqualTypeAny Array
+ Object modelToWorldVisual Array
- val isEqualTypeAny types
+ object modelToWorldVisual modelPos
- $Code$_var = [1,2,3];
- _var isEqualTypeAny [0,"", objNull ]; //false
- _var isEqualTypeAny [0,"", objNull,[]]; //true$/Code$
+ $Code$_aboveAndBehindPlayer = player modelToWorldVisual [0,-1,3];$/Code$
undefined / undefined
@@ -33619,65 +35414,63 @@
- Boolean
+ Array
+
- isEqualTypeArray
+ camDestroy
- Compares types of all elements of one array to types of all elements of another array.
+ Destroy an object created with camCreate. camDestroy is conducted immediately, the command doesn't wait for camCommit.
+ NOTE: Destroying camera object does not terminate camera effect automatically.
- https://community.bistudio.com/wiki/isEqualTypeArray
+ https://community.bistudio.com/wiki/camDestroy
- Array isEqualTypeArray Array
+ camDestroy Object
- arr1 isEqualTypeArray arr2
+ camDestroy object
- $Code$_arr = [1,true,"three"];
- _arr isEqualTypeArray [0,objNull,""]; //false
- _arr isEqualTypeArray [0,false,""]; //true$/Code$
+ $Code$camDestroy _cam;$/Code$
+
+ $Code$_cam cameraEffect ["terminate","back"];
+ camDestroy _cam;$/Code$
- undefined / undefined
+ local / local
- Boolean
+ Nothing
+
- isEqualTypeParams
+ kbHasTopic
- Compares types of all elements of input array to types of all elements of template array. Similar to isEqualTypeArray however this command is designed for fast validation of functions params, so there are differences:
- Input can be anything but will be expected to be an Array, otherwise false is returned
- Input array can be longer but not shorter than template array, will return false if shorter
- nil could be used in template type array as a wild card to allow any type match
+ Check if conversation topic was registered to given person. See Conversations for more details.
- https://community.bistudio.com/wiki/isEqualTypeParams
+ https://community.bistudio.com/wiki/kbHasTopic
- Anything isEqualTypeParams Array
+ Object kbHasTopic String
- input isEqualTypeParams template
+ person kbHasTopic topicName
- $Code$[1,2, player,"10"] isEqualTypeParams [0,0, objNull,""]; //true
- 123 isEqualTypeParams [0,0, objNull,""]; //false
- [] isEqualTypeParams [0,0, objNull,""]; //false
- [1,2, player ] isEqualTypeParams [0,0, objNull,""]; //false
- [1,2, player,"10", true ] isEqualTypeParams [0,0, nil,""]; //true
- [1,2, getPos player,"10", true ] isEqualTypeParams [0,0, nil,""]; //true$/Code$
+ $Code$_obiHasTopic = player kbHasTopic "helloThereGeneralK";$/Code$
+
+ $Code$if ( player kbHasTopic "dontShoot") then { player kbRemoveTopic "dontShoot"; };$/Code$
undefined / undefined
@@ -33685,29 +35478,28 @@
- Boolean
+ Boolean
+
- isEqualType
+ isAutotest
- Compares 2 values by their type. A much faster alternative to typeName a == typeName b.
+ Returns true if game was started with autotest parameter
- https://community.bistudio.com/wiki/isEqualType
+ https://community.bistudio.com/wiki/isAutotest
- Anything isEqualType Anything
+ isAutotest
- val1 isEqualType val2
+ isAutotest
- $Code$_var = [1,2,3];
- _var isEqualType 0; //false
- _var isEqualType []; //true$/Code$
+ $Code$_bool = isAutotest$/Code$
undefined / undefined
@@ -33715,164 +35507,148 @@
- Boolean
+ Boolean
+
- isFilePatchingEnabled
+ ctrlMapAnimCommit
- Returns true if file patching is enabled otherwise false
+ Plays the map animation.
- https://community.bistudio.com/wiki/isFilePatchingEnabled
+ https://community.bistudio.com/wiki/ctrlMapAnimCommit
- isFilePatchingEnabled
+ ctrlMapAnimCommit Control
- isFilePatchingEnabled
+ ctrlMapAnimCommit controlName
-
+ $Code$// Center map on player:
+ _ctrl ctrlMapAnimAdd [0, 0.05, player ];
+ ctrlMapAnimCommit _ctrl;$/Code$
+
- undefined / undefined
+ local / local
- Boolean
+ Nothing
+
- isFlashlightOn
+ lbSetCurSel
- Returns true if there is a linked and enabled flashlight on a given weapon.
+ Selects the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ To deselect all, use -1: _ctrl lbSetCurSel -1; For listbox of style LB_MULTI use lbSetSelected instead.
- https://community.bistudio.com/wiki/isFlashlightOn
+ https://community.bistudio.com/wiki/lbSetCurSel
- Object isFlashlightOn String
+ lbSetCurSel Array
+
+ Control lbSetCurSel Number
- unit isFlashlightOn weapon
+ lbSetCurSel [idc, index]
+
+ control lbSetCurSel index
- $Code$player isFlashlightOn ( currentWeapon player );$/Code$
+ $Code$lbSetCurSel [101, 0];$/Code$
+
+ $Code$_control lbSetCurSel 0;$/Code$
undefined / undefined
+ More information on the LB command family can be found here
+
+ (November 29, 2014)
+ lbSetCurSel -1 has no effect while the listbox is populated. You should use lbClear first, then lbSetCurSel -1, then re-populate the listbox.
+
+ (March 1, 2015)
+ Keep in mind that running this command against control will fire attached 'onLBSelChanged' event handler.
- Boolean
+ Nothing - Nothing
+
- isFlatEmpty
+ selectMax
- Checks given position against given filter params. Filter includes checks for:
- If there are any objects closer than given distance from given position (in 2D)
- If the area around position is flat enough to match given gradient
- If the given position is over water or land
- If the given position is over shore line
- The gradient seems to correlate with general hill steepness: 0.1 (10%) ~6 o, 0.5 (50%) ~27 o, 1.0 (100%) ~45 o, etc.There are also some oddities about this command that need to be noted:
- Objects accounted for proximity check seem to be static objects. Nearby vehicles and units do not seem to affect the output
- Given position will be magically transferred into given position + getTerrainHeightASL value
- The second element must be -1 ( = 0 really) at all times, otherwise command becomes unusable
- The command might be a bit heavy on computations so avoid frequent and large area checks
- See also: BIS_fnc_findSafePos
+ Returns the array element with maximum numerical value. Engine solution to BIS_fnc_greatestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only. Booleans however are also supported and will be evaluated as Numbers : true - 1, false - 0. nil value treated as 0. Other non Number elements (not recommended) will be evaluated as 0 and Bad conversion: scalar message will be logged into. rpt.
- https://community.bistudio.com/wiki/isFlatEmpty
+ https://community.bistudio.com/wiki/selectMax
- Array isFlatEmpty Array
+ selectMax Array
- position isFlatEmpty [minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]
+ selectMax array
- $Code$// Check if player position is over land:
- _overLand = !( position player isFlatEmpty [-1, -1, -1, -1, 0, false ] isEqualTo []);$/Code$
-
- $Code$// Check if player position is over shore line:
- _overShore = !( position player isFlatEmpty [-1, -1, -1, -1, 0, true ] isEqualTo []);$/Code$
-
- $Code$// Check if player position is over water:
- _overWater = !( position player isFlatEmpty [-1, -1, -1, -1, 2, false ] isEqualTo []);$/Code$
-
- $Code$// Check if no object is closer than 5m to player position:
- _isEmpty = !( position player isFlatEmpty [5, -1, -1, -1, -1, false, player ] isEqualTo []);$/Code$
-
- $Code$// Check if area 10m around player position is relatively flat:
- _isFlat = !( position player isFlatEmpty [-1, -1, 0.3, 10, -1] isEqualTo []);$/Code$
+ $Code$_max = selectMax [1,2,3,4,5]; //5$/Code$
- $Code$// Check if area 15m around player position is very flat and empty:
- _isFlatEmpty = !( position player isFlatEmpty [15, -1, 0.1, 15, -1, false, player ] isEqualTo []);$/Code$
+ $Code$// Same as, for example:
+ _max = _a max _b max _c max _d;
+ // Only faster:
+ _max = selectMax [_a,_b,_c,_d];$/Code$
undefined / undefined
- (April 24, 2016)
- When this command is instructed to check if area at given position is empty it takes into account the radius of the bounding sphere of surrounding objects. Because of this, the high voltage columns such as "Land_HighVoltageColumnWire_F" and such objects may appear extremely large to the calculations and the position will be rejected even if visually it doesn't look too bad. To avoid this, use findEmptyPosition command first to find guaranteed empty position, then pass the result to isFlatEmpty making sure you switched off proximity check by setting 1st param to -1. For example:
- $Code$// Check if given position is flat and empty within 1m radius
- [4274.66,12113,0.00139618] isFlatEmpty [1, -1, 0.1, 1, -1, false, objNull ]; //[]$/Code$
- The result suggests it is not flat and empty.
- $Code$// Check if given position is flat within 1m radius
- [4274.66,12113,0.00139618] isFlatEmpty [-1, -1, 0.1, 1, -1, false, objNull ]; //[4274.66,12113,48.3209]$/Code$
- The result suggests it is.
- $Code$// Check if given position is empty within 1m radius
- [4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, -1, -1, false, objNull ]; //[]$/Code$
- The result suggests it is not empty. But the position is in the middle of a road and there is nothing within 1m but there is "Land_HighVoltageColumnWire_F" not far.
- $Code$// Check if given position is empty within 1m radius ignoring nearest "Land_HighVoltageColumnWire_F"
- [4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, 1, -1, false, nearestObject [[4274.66,12113,0.00139618], "Land_HighVoltageColumnWire_F"]]; //[4274.66,12113,48.3209]$/Code$
- The result now suggests it is empty. So instead of relying on internal proximity check we can combine both commands:
- $Code$fnc_isFlatEmpty =
- {
- params ["_pos", "_params"];
- _pos = _pos findEmptyPosition [0, _params select 0];
- if (_pos isEqualTo []) exitWith {[]};
- _params =+ _params;
- _params set [0, -1];
- _pos = _pos isFlatEmpty _params;
- if (_pos isEqualTo []) exitWith {[]};
- _pos
- };
- // Test
- [[4274.66,12113,0.00139618], [1, -1, 0.1, 1, -1, false, objNull ]] call fnc_isFlatEmpty; //[4274.53,12113,48.3175]
+ (December 19, 2016)
+ Returns either number or boolean value, in case max value in array 0, command will return either 0 or false, which ever comes first.
+ Same for 1 and true values.
+ $Code$selectMax [false,0] // returns false
+ selectMax [0,false] // returns 0
+ selectMax [true,1] // returns true
+ selectMax [1,true] // returns 1
$/Code$
+ in case all values are equal or less than zero, command may also return other type of values
+ $Code$selectMax ["",false,0,-1] // returns ""
+ $/Code$
+ if nil value appears in array, other values are equal or less than zero, command returns nil
- Array
+ Anything
+
- isForcedWalk
+ uniform
- Returns true if player is forced to walk with forceWalk.
+ Returns name of uniform.
- https://community.bistudio.com/wiki/isForcedWalk
+ https://community.bistudio.com/wiki/uniform
- isForcedWalk Object
+ uniform Object
- isForcedWalk unitName
+ uniform unit
- $Code$_bool = isForcedWalk player ;$/Code$
+ $Code$_uniform = uniform _unit$/Code$
undefined / undefined
@@ -33880,168 +35656,281 @@
- Boolean
+ String
+
- isFormationLeader
+ setShadowDistance
- Returns true if the specified unit is subgroup leader.
+ Sets the shadows rendering distance.
- https://community.bistudio.com/wiki/isFormationLeader
+ https://community.bistudio.com/wiki/setShadowDistance
- isFormationLeader Object
+ setShadowDistance Number
- isFormationLeader unit
+ setShadowDistance value
- $Code$_isLeader = isFormationLeader player ;$/Code$
+ $Code$setShadowDistance 1000$/Code$
- undefined / undefined
+ undefined / local
- Boolean
+ Nothing
+
- isGroupDeletedWhenEmpty
+ tvCollapseAll
- Checks if the given group marked for auto-deletion when empty. See deleteGroupWhenEmpty.
+ Collapses all tree items for the given Tree View.
- https://community.bistudio.com/wiki/isGroupDeletedWhenEmpty
+ https://community.bistudio.com/wiki/tvCollapseAll
- isGroupDeletedWhenEmpty Group
+ tvCollapseAll Number
+
+ tvCollapseAll Control
- isGroupDeletedWhenEmpty group
+ tvCollapseAll idc
+
+ tvCollapseAll control
- $Code$_isMarked = isGroupDeletedWhenEmpty _group;$/Code$
+ $Code$tvCollapseAll 101;$/Code$
+
+ $Code$tvCollapseAll _ctrl;$/Code$
- undefined / undefined
+ local / local
- Boolean
+ Nothing - Nothing
+
- isHidden
+ cutRsc
- Return whether the person is hidden (reached the hiding position). For command that tests general visibility of an object use isObjectHidden
+ Display a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.
+ For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
- https://community.bistudio.com/wiki/isHidden
+ https://community.bistudio.com/wiki/cutRsc
- isHidden Object
+ cutRsc Array
+
+ Number cutRsc Array
+
+ String cutRsc Array
- isHidden person
+ cutRsc [class, type, speed, showInMap]
+
+ layer cutRsc [class, type, speed, showInMap]
+
+ layerName cutRsc [class, type, speed, showInMap]
-
+ $Code$cutRsc ["binocular", "PLAIN"];
+ cutRsc ["binocular", "PLAIN", 2];
+ cutRsc ["binocular", "PLAIN", 2, false ];$/Code$
+
+ $Code$2 cutRsc ["binocular", "PLAIN", 2];$/Code$
+
+ $Code$_layer = "layer1" cutRsc ["binocular", "PLAIN", 2];$/Code$
+
+ $Code$// Create IGUI display:
+ "someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
+ _display = uiNamespace getVariable "RscTitleDisplayEmpty";$/Code$
+
- global / undefined
+ undefined / local
- (January 1, 2017)
- Tested in 1.67 DEV, seems to always return false
+ (30 Jun, 2008)
+ Using cutRsc (instead of titleRsc ) for a HUD has the benefits of:
+ having the HUD automatically hide itself when you access the map and redisplay itself after closing the map.
+ using the 'Direct communication' chat channel messages will not interfere with the HUD by hiding it.
+
+ (17 Oct, 2013)
+ Regarding removing current resource with cutRsc ["Default", "PLAIN"]. If it does't work and it gives you error message that "Default" is not found, add it by yourself to RscTitles in description.ext so it looks like this:
+ class RscTitles
+ {
+ class Default
+ {
+ idd = - 1 ;
+ fadein = 0 ;
+ fadeout = 0 ;
+ duration = 0 ;
+ };
+ };
+ Alternatively, you can use cutText, yes cutText command to cancel your resources. As Karel Moricky explains: "All 'cut' commands are in the same layer, the same as all 'title' commands are in another one." So to remove cutRsc resource execute cutText on the same layer:
+ $Code$ cutRsc ["myRsc", "PLAIN"]; //show
+ cutText ["", "PLAIN"]; //remove$/Code$
+ $Code$10 cutRsc ["myRsc", "PLAIN"]; //show
+ 10 cutText ["", "PLAIN"]; //remove$/Code$
+ Also if you use layers would be a good idea to register them with BIS_fnc_rscLayer to avoid possible clashes with other layers:
+ $Code$("myLayerName" call BIS_fnc_rscLayer ) cutRsc ["myRsc","PLAIN"]; //show
+ ("myLayerName" call BIS_fnc_rscLayer ) cutText ["","PLAIN"]; //remove$/Code$
+ You can also immediately remove resource with cutFadeOut command: $Code$123 cutFadeOut 0;$/Code$
- Boolean
+ Nothing - Nothing - Number
+
- isIRLaserOn
+ hintC
- Returns true if there is a linked and enabled IR on the given weapon.
+ Displays attractive hint in the center of the screen. Player control is taken away until user presses "Continue". After user confirmation, the content of the hintC is repeated again in a normal hint. This type of hint can also have a title. It is also possible to drag this type of hint around the screen.
- https://community.bistudio.com/wiki/isIRLaserOn
+ https://community.bistudio.com/wiki/hintC
- Object isIRLaserOn String
+ hintC String
+
+ String hintC Array
+
+ String hintC Structured_Text
+
+ String hintC String
- unit isIRLaserOn weapon
+ hintC content
+
+ title hintC [content1, content2,]
+
+ title hintC content
+
+ title hintC content
- $Code$player isIRLaserOn currentWeapon player ;$/Code$
+ $Code$hintC "Press W to move forward";$/Code$
+
+ $Code$// Same as the above in Arma3 but without second hint displayed:
+ hintC "Press W to move forward";
+ hintC_EH = findDisplay 57 displayAddEventHandler ["unload", {
+ 0 = _this spawn {
+ _this select 0 displayRemoveEventHandler ["unload", hintC_EH];
+ hintSilent "";
+ };
+ }];$/Code$
+
+ $Code$"Instructions" hintC [
+ "Press W to move forward.",
+ "Press S to move backwards.",
+ "Use the mouse to turn right or left.",
+ "Press V for weapon sights."
+ ];$/Code$
+
+ $Code$// Same as the above in Arma3 but without second hint displayed:
+ "Instructions" hintC [
+ "Press W to move forward.",
+ "Press S to move backwards.",
+ "Use the mouse to turn right or left.",
+ "Press V for weapon sights."
+ ];
+ hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
+ 0 = _this spawn {
+ _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
+ hintSilent "";
+ };
+ }];$/Code$
+
+ $Code$_separator1 = parseText " br / ------------------------ br / ";
+ _image = "\ca\ui\textures\aus_flag.paa";
+ _txt = composeText [ image _image, "Heading Text", _separator1, "Content"];
+ "" hintC _txt;$/Code$
- undefined / undefined
+ undefined / local
+ This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command.
+
+ To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed. hintC "foo"; sleep 0.1; hintC "bar"; Without a sleep statement hintC will not suspend the script it has been called from.
+
+ HintC can be used with formatting like this: HintC format["Hello %1",player].
+
+ (March 19, 2015)
+ "Titled" hintC all use display #72 while "untitled" one uses display #57. If you are trying examples in Arma 3 debug console, add little delay like this: $Code$[] spawn {sleep 0.5;....your example code goes here...};$/Code$ or no hintC will be displayed.
- Boolean
+ Nothing - Nothing - Nothing - Nothing
+
- isInRemainsCollector
+ setGroupIconsVisible
- Checks if unit or vehicle is queued for disposal after death.
+ Sets if group icons are visible.
- https://community.bistudio.com/wiki/isInRemainsCollector
+ https://community.bistudio.com/wiki/setGroupIconsVisible
- isInRemainsCollector Object
+ setGroupIconsVisible Array
- isInRemainsCollector remain
+ setGroupIconsVisible array
- $Code$if ( isInRemainsCollector unit1) then { hint "unit1 is queued for disposal"};$/Code$
+ $Code$setGroupIconsVisible [true,true];//[show markers on map, show markers on player hud]
+ setGroupIconsVisible [true,false]; //Show only 2D
+ setGroupIconsVisible [false,false];$/Code$
- global / undefined
+ undefined / undefined
- Boolean
+ Nothing
+
- isInstructorFigureEnabled
+ progressPosition
- Returns the status of INSTRUCTOR FIGURE setting in UI (OPTIONS GAME GENERAL INSTRUCTOR FIGURE).
+ Returns the current position in the progress bar.
- https://community.bistudio.com/wiki/isInstructorFigureEnabled
+ https://community.bistudio.com/wiki/progressPosition
- isInstructorFigureEnabled
+ progressPosition Control
- isInstructorFigureEnabled
+ progressPosition control
- $Code$hint str isInstructorFigureEnabled ;$/Code$
+ $Code$_pos = progressPosition _control;$/Code$
undefined / undefined
@@ -34049,28 +35938,28 @@
- Boolean
+ Number
+
- isKeyActive
+ enableReload
- Checks whether the given key is active in the current user profile.
- See keys, keysLimit and doneKeys in the description.ext file of the missions.
+ Enable / disable reload when magazine is empty.
- https://community.bistudio.com/wiki/isKeyActive
+ https://community.bistudio.com/wiki/enableReload
- isKeyActive String
+ Object enableReload Boolean
- isKeyActive keyName
+ object enableReload enable
- $Code$_ok = isKeyActive "Mission04Key"$/Code$
+ $Code$_vehicle enableReload false ;$/Code$
undefined / undefined
@@ -34078,568 +35967,587 @@
- Boolean
+ Nothing
+
- isKindOf
+ setUnitPos
- Checks whether the object is (a subtype) of the given type. While main syntax and alt syntax support only CfgVehicles, CfgAmmo and CfgNonAIVehicles, alt syntax 2 allows to specify any config, including mission config.
-
-
- https://community.bistudio.com/wiki/isKindOf
+ Set unit position rules. Mode may be one of:
+ "DOWN" - unit goes prone and stays prone.
+ "UP" - unit stands and stays standing.
+ "MIDDLE" - Kneel Position. ArmA version 1.04 (Unit will not kneel if it is unarmed )
+ "AUTO" - unit chooses mode according to circumstances.
+ This command will not change the stance of the human player, even though it will change the output of unitPos command. To change player stance use playAction or playActionNow :
+ $Code$ player playAction "PlayerProne"; // DOWN
+ player playAction "PlayerStand"; // UP
+ player playAction "PlayerCrouch"; // MIDDLE$/Code$
+
+
+ https://community.bistudio.com/wiki/setUnitPos
- Object isKindOf String
-
- String isKindOf String
-
- String isKindOf Array
+ Object setUnitPos String
- object isKindOf typeName
-
- typeName1 isKindOf typeName2
-
- typeName1 isKindOf [typeName2, targetConfig]
+ unit setUnitPos mode
- $Code$vehicle player isKindOf "Tank";$/Code$
-
- $Code$"BMP2" isKindOf "Tank";$/Code$
-
- $Code$currentWeapon player isKindOf ["Rifle", configFile "CfgWeapons"];$/Code$
+ $Code$_soldier setUnitPos "UP";$/Code$
- undefined / undefined
+ local / global
- (April 23, 2007)
- This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for "HMMWV50", "Car", "LandVehicle", etc., all of which would return true.)
-
- (16 Apr, 2008)
- It appears isKindOf is limited to the CfgVehicles branch of the class hierachy.
- So CfgWeapons, CfgMagazines, etc will return false for checks like:
- ("M9" isKindOf "Pistol") returns false
-
- (8 Nov, 2009)
- In a2 isKindOf also works for CfgAmmo in addition to CfgVehicles: ("M_9M311_AA" isKindOf "MissileBase") returns true. NOT for CfgWeapons, CfgMagazines and others..
+ (18 September 2008)
+ Command most likely only works if run before join into group after createUnit.
- (June 16, 2015)
- In case you cannot use isKindOf because of the reasons stated, just use BIS fnc returnParents with class names as return value:
- $Code$ _isKindOf = "Rifle" in [( configFile "CfgWeapons" "BWA3_G36K"), true ] call BIS_fnc_returnParents ; // is true$/Code$
+ (11 March 2011)
+ The above comment by Dwarden about 'an additional join required' is no longer true for Operation Arrowhead.
- (September 6, 2015)
- In A3 isKindOf works well with CfgWeapons and CfgMagazines using the syntax from example 3.
- It should be prefered to James' solution as it performs more than 25x faster. Tested in debug console with the following code snippets:
- $Code$bool = "CA_Magazine" in ([( configFile "CfgMagazines" "HandGrenade"),true] call BIS_fnc_returnParents ); -- 0.12111ms$/Code$
- $Code$bool = "HandGrenade" isKindOf ["CA_Magazine", configFile "CfgMagazines"]; -- 0.00439453ms$/Code$
- When checking in CfgVehicles the syntax from example 2 performs a little faster.
+ (26 September 2013)
+ A unit might not always go prone when ordered to setUnitPos "DOWN", if the unit doesn't agree with the command. To force the unit to go prone, stop the unit from firing by setCombatMode "BLUE" and then order the unit to prone.
- Boolean - Boolean - Boolean
+ Nothing
+
- isLightOn
+ removeAllAssignedItems
- Returns true if vehicle headlights are on otherwise false.
+ Unassigns and deletes all linked items from inventory. The commands operates on assignedItems array, which doesnt include goggles or headgear. Use removeGoggles and removeHeadgear for those.
- https://community.bistudio.com/wiki/isLightOn
+ https://community.bistudio.com/wiki/removeAllAssignedItems
- isLightOn Object
+ removeAllAssignedItems Object
- isLightOn vehicle
+ removeAllAssignedItems unit
- $Code$_lightsOn = isLightOn vehicle player ;$/Code$
-
- $Code$_pilotLightOn = isLightOn heli;$/Code$
+ $Code$removeAllAssignedItems player ;$/Code$
- global / undefined
+ local / global
- Boolean
+ Nothing
+
- isLocalized
+ setVectorUp
- Checks whether given string name is localized.
+ Set object's up vector. Direction of the object remain unchanged. Default object's vectorUp is [0,0,1].
+ In Multiplayer, setVectorUp must be executed on the machine where the object it applied to is local.
- https://community.bistudio.com/wiki/isLocalized
+ https://community.bistudio.com/wiki/setVectorUp
- isLocalized String
+ Object setVectorUp Array
- isLocalized stringName
+ object setVectorUp [x, y, z]
- $Code$if ( isLocalized "STR_DN_SNAKE") then {
- hint localize "STR_DN_SNAKE";
- } else {
- hint "STR_DN_SNAKE";
- diag_log "ToDo: STR_DN_SNAKE is not localized";
- };$/Code$
+ $Code$// Turn object upside down:
+ _obj setVectorUp [0,0,-1];$/Code$
+
+ $Code$// Align object with the terrain underneath:
+ _obj setVectorUp surfaceNormal position _obj;$/Code$
- undefined / undefined
+ local / global
+ setVectorUp can only influence an object's bank. It can not influence pitch. Example:
+ player setVectorUp [0,1,0]
+ If the player is facing 0 degrees (north), then this will do NOTHING.
+ If the player is facing 90 degrees (east), then this will make him bank 90 degrees to his left.
+
+ (March 22, 2007)
+ An in-depth discussion on the concept of vectors is available here.
+
+ (March 16, 2008)
+ Command can be also used to rotate camera in all three axis (which also mean it's possible to set camera bank).
+
+ (October 3, 2013)
+ It is possible to change both pitch and bank of an object ( surfaceNormal application for instance). Assuming an ammo box in the following example is facing North (default direction is 0): $Code$_ammobox setVectorUp [0,1,0]; //box is pitched 90 degrees forward
+ _ammobox setVectorUp [1,0,0]; //box is banked 90 degrees to the right$/Code$
+ However the above will stop working as soon as you attach the box to something. The following trick however will work in this case:
+ $Code$_ammobox attachTo [ player, [0,2,1]];
+ _ammobox setVectorUp [0,0.99,0.01]; //box is pitched ~90 degrees forward
+ _ammobox setVectorUp [0.99,0,0.01]; //box is banked ~90 degrees to the right$/Code$
- Boolean
+ Nothing
+
- isManualFire
+ magazinesAllTurrets
- Returns true if manual fire is on. Manual fire could either be selected in vehicle action menu (if available) or with action "ManualFire" and "ManualFireCancel". Always returns false for a soldier.
+ Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts.
- https://community.bistudio.com/wiki/isManualFire
+ https://community.bistudio.com/wiki/magazinesAllTurrets
- isManualFire Object
+ magazinesAllTurrets Object
- isManualFire vehicleName
+ magazinesAllTurrets vehicle
- $Code$_bool = isManualFire vehicle player ;$/Code$
+ $Code$_mags = magazinesAllTurrets vehicle player ;$/Code$
global / undefined
- (February 5, 2017)
- Manual fire means the effectiveCommander of the vehicle controls firing (but not aiming) of the gunner turret weapons (usually path [0]), while unable to fire his own weapons.
- Boolean
+ Array
+
- isMarkedForCollection
+ gusts
- Checks whether the object is marked for weapons collection.
+ Return the current gusts value. Scale is 0 to 1.
- https://community.bistudio.com/wiki/isMarkedForCollection
+ https://community.bistudio.com/wiki/gusts
- isMarkedForCollection Object
+ gusts
- isMarkedForCollection object
+ gusts
- $Code$_marked = isMarkedForCollection _truck$/Code$
+ $Code$_gustsval = gusts ;$/Code$
- global / undefined
+ undefined / undefined
- Boolean
+ Number
+
- isMultiplayerSolo
+ camSetFov
- Returns true when playing a game in solo multiplayer (for example Apex coop campaign PLAY SOLO option).
+ Set the zoom level ( F ield O f V iew) of the given camera.
+ The zoom level is from 0.01 for the nearest and 8.5 for the furthest zoom value, with a default zoom level of 0.75
+ The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio.
- https://community.bistudio.com/wiki/isMultiplayerSolo
+ https://community.bistudio.com/wiki/camSetFov
- isMultiplayerSolo
+ Object camSetFov Number
- isMultiplayerSolo
+ camera camSetFov level
-
+ $Code$_cam camSetFov 0.75;$/Code$
+
- undefined / undefined
+ local / local
- Boolean
+ Nothing
+
- isMultiplayer
+ drawTriangle
- Return true if multiPlayer.
+ Draws a single triangle or multiple triangles on the map. Triangle is defined by 3 positions of its verticies: p0, p1, p2 in a single array [ p0, p1, p2 ]. Next 3 positions in the same array [p0, p1, p2, p0, p1, p2 ] will be used to draw second triangle, another 3 positions [p0, p1, p2, p0, p1, p2, p0, p1, p2 ] to draw 3rd and so on.
+ NOTE : when fill param is absent or is an empty string "", the triangle is drawn with lines of the color set in color param. In order to draw color filled triangle of the same color as color param, set fill param to opaque white procedural texture "#(rgb,1,1,1)color(1,1,1,1)".
- https://community.bistudio.com/wiki/isMultiplayer
+ https://community.bistudio.com/wiki/drawTriangle
- isMultiplayer
+ Control drawTriangle Array
- isMultiplayer
+ map drawTriangle [vertices, color, fill]
- $Code$if (isMultiplayer) then {
- //...block
- }$/Code$
+ $Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
+ {
+ _this select 0 drawTriangle
+ [
+ [
+ player getRelPos [100, 0],
+ player getRelPos [100, -135],
+ player getRelPos [100, 135]
+ ],
+ [1,0,0,0.5],
+ "#(rgb,1,1,1)color(1,1,1,1)"
+ ];
+ }];$/Code$
undefined / undefined
+ (July 16, 2017)
+ Example youtube video: [1] $Code$_ctrl = findDisplay 12 displayCtrl 51;
+ _ctrl setVariable ["data", [1, "#(rgb,1,1,1)color(1,1,1,1)", 1000, position player,
+ {
+ params ["_p", "_r", "_a", "_sr", "_ba"];
+ _sr = _r * 0.382;
+ _pb = _p getPos [_sr, _a + 180];
+ [
+ _p getPos [_r, _a], _p getPos [_sr, _a + 36], _p getPos [_sr, _a - 36],
+ _pb, _p getPos [_r, _a - 72], _p getPos [_r, _a + 72],
+ _p getPos [_r, _a - 144], _p getPos [_sr, _a - 108], _pb,
+ _p getPos [_r, _a + 144], _p getPos [_sr, _a + 108], _pb
+ ]
+ }]];
+ _ctrl ctrlRemoveAllEventHandlers "Draw";
+ _ctrl ctrlAddEventHandler ["Draw",
+ {
+ _map = _this select 0;
+ _data = _map getVariable "data";
+ _data params ["_i", "_fill", "_dist", "_pos", "_fn"];
+ _data set [0, _i + 1];
+ _size = _i % _dist;
+ if (_size == 0) then
+ {
+ _data set [0, 1];
+ _data set [1, ["#(rgb,1,1,1)color(1,1,1,1)", ""] select (random 1 0.3)];
+ _data set [2, 250 + round random 750];
+ };
+ _alpha = linearConversion [_dist, 0, _dist - _size, 1, 0];
+ _map drawEllipse [_pos, _size * 2, _size * 2, 0, [0,0,1,_alpha], _fill];
+ _map drawTriangle [[_pos getPos [_size, -_size], _size, _size] call _fn, [1,0,0,_alpha], _fill];
+ _map drawTriangle [[_pos getPos [_size, -_size + 120], _size, _size] call _fn, [0,1,0,_alpha], _fill];
+ _map drawTriangle [[_pos getPos [_size, -_size - 120], _size, _size] call _fn, [1,1,0,_alpha], _fill];
+ }];
+ openMap true;$/Code$
- Boolean
+ Nothing
+
- isNil
+ nearObjects
- Tests whether the variable defined by the String argument is undefined, or whether an expression result passed as Code is undefined.
- The command returns true if the variable or the expression result is undefined (i.e. the expression result is Void ), and false in all other cases.
+ Find objects in a sphere with given radius. The first object in the returned array is not necessarily the closest one. If you need returned objects to be sorted by distance, use nearestObjects. If typeName is given, only objects of given type (or its subtype) are listed.
- https://community.bistudio.com/wiki/isNil
+ https://community.bistudio.com/wiki/nearObjects
- isNil String
+ Position/Position2D/Object nearObjects Number
- isNil Code
+ PositionAGL/Position2D/Object nearObjects Array
- isNil variableName
+ position nearObjects radius
- isNil code
+ position nearObjects [typeName, radius]
- $Code$if ( isNil "_pokus") then {_pokus = 0};$/Code$
+ $Code$_list = position player nearObjects 50;$/Code$
- $Code$isNil { player getVariable "someVar"};$/Code$
+ $Code$_list = [_xpos,_ypos] nearObjects ["House", 20];$/Code$
+
+ $Code$_list = player nearObjects 20;$/Code$
undefined / undefined
- I recently had a strange experience with this command. I forgot to wrap the name of the variable with quotes, and it returned the opposite of the true null status of the variable. Just something to watch out for.
-
- ^ If you don't wrap the name of the variable in quotes, then it will instead read the value of the variable itself. If that variable is a string or code, then the command will use that string or code held by the variable. Example:
- _myvar = "_hisvar";
- isnil _myvar;
- //will return true if _hisvar is null
- _myvar = {tank1};
- sleep (random 50);
- isnil _myvar;
- //will return if tank1 is nil, at the time the isnil command is checked (not at the time _myvar is established)
- -- General Barron 10:37, 30 December 2009 (CET)
-
- isNil is also able to check if an expression is undefined. As such, an alternative way to check variables would be:
- isNil {variable}
- you can use this method to also check if variables defined using setVariable exist as well:
- isNil {player getVariable "Something"}
- As well as testing if a function returns a value
- func_ChangeVehicleName =
- {
- _this setVehicleVarName "newName";
- };
- if (isNil {player call func_ChangeVehicleName}) // returns true, because this function does not return anything
-
- (September 25, 2014)
- While isNil isn't available in OFP/CWA you can easily emulate it with something like this:
- _nil = format["%1",_nilstring];
- ?(format["%1",foo]==_nil): foo = "Hello World!"
+ (June 30, 2007)
+ Units in vehicles are not detected via this command.
- (October 25, 2014)
- You can also use isNil to check if an array element exists or if a setVariable variable exists
- $Code$_array = [0,1,2,3];
- if (isNil {_array select 4}) then {hint "Element does not exist";};$/Code$
- $Code$if ( isNil { missionNamespace getVariable "MY_VARIABLE"})$/Code$
- When trying to test array elements, you can only test elements that are 1 element out of range. Testing elements 2 or more elements out of range will result in a script error.
+ (December 15, 2011)
+ In the second example, you can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use "All" as an alternative to leaving it out. (CO 1.59)
- (June 25, 2017)
- isNil in combination with code will execute that code so be aware.
+ (January 3, 2013)
+ If you use the first example, it will return objects many more objects such as pollen, honeybees and crucially, triggers. Triggers will show in the returned array as "no shape" but you can use typeOf to get the classname, which will give "EmptyDetector". This will not return objects that don't have classnames such as plants, stones and some map objects like vehicle wrecks. nearestObjects will find objects without classnames.
- (July 18, 2017)
- isNil CODE will execute the code in unscheduled environment
+ (August 8, 2017)
+ The example 2 means that the command will include all types which inherit from the given type. As an example, when using "Helipad_Base_F", the command will detect all types of helipads (Land_HelipadSquare_F, Land_HelipadCircle_F, Land_HelipadEmpty_F, etc) in the given radius.
- Boolean - Boolean
+ Array - Array
+
- isNull
+ copyWaypoints
- Checks whether the tested item is Null.
- Which null type the item has to be equal to depends on the type of game entity tested:
- Objects - objNull
- Controls - controlNull
- Displays - displayNull
- Groups - grpNull
- Locations - locationNull (since ARMA 2)
- Tasks - taskNull (since ARMA 2)
- Scripts - scriptNull (since Arma 3 1.29.127075)
- Configs - configNull (since Arma 3 1.53.133130)
- Note: A test via == does not work, because, for example, objNull is not equal to anything, not even to itself. Use isEqualTo.
+ Copy the chain of waypoints from source to target group. The target group will start to process waypoints from the first one.
- https://community.bistudio.com/wiki/isNull
+ https://community.bistudio.com/wiki/copyWaypoints
- isNull Object/Control/Display/Group
+ Group copyWaypoints Group
- isNull entity
+ groupTo copyWaypoints groupFrom
- $Code$if ( isNull obj) then { hint "doesn't exist";};$/Code$
+ $Code$group1 copyWaypoints group2;$/Code$
- global / undefined
+ undefined / undefined
- (December 9, 2015)
- isNull does not work with the TEAM_MEMBER type.
- Use this instead:
- $Code$_tmember isEqualTo teamMemberNull$/Code$
-
- (December 9, 2015)
- The note in the description does not apply to the CONFIG type, probably due to backwards compatibility.
- $Code$configNull == configNull
- - true
- $/Code$
- Boolean
+ Nothing
+
- isNumber
+ getCustomAimCoef
- Check if config entry represents number.
+ Returns aimPrecision from animation state with custom value that will directly affects weapon sway size and speed.
- https://community.bistudio.com/wiki/isNumber
+ https://community.bistudio.com/wiki/getCustomAimCoef
- isNumber Config
+ getCustomAimCoef Object
- isNumber config
+ getCustomAimCoef unit
- $Code$_ok = isNumber (configFile "CfgVehicles")
- // Result is false$/Code$
+ $Code$_coef = getCustomAimCoef player$/Code$
- undefined / undefined
+ global / undefined
- Boolean
+ Number
+
- isObjectHidden
+ addMPEventHandler
- Checks visibility of a given object on the local machine.
+ Adds MP event handler (EH) to the given object and returns EH handle. MP event handlers are added globally to every client on network in multiplayer and will fire on every client too upon event. If EH has some data to return upon event (e.g. the "MPKilled" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For more information see: Arma_3:_Event_Handlers#addMPEventHandler
- https://community.bistudio.com/wiki/isObjectHidden
+ https://community.bistudio.com/wiki/addMPEventHandler
- isObjectHidden Object
+ Object addMPEventHandler Array
- isObjectHidden object
+ object addMPEventHandler [type, expression]
- $Code$_bobIsHidden = isObjectHidden bob;$/Code$
+ $Code$_index = player addMPEventHandler ["mpkilled", {Null = _this execVM "playerkilled.sqf";}];$/Code$
- global / local
+ global / global
+ (May 8, 2015)
+ MP EHs are added on every PC and execute on every PC, apart from MPRespawn, that only executes at the locality where unit respawns.
- Boolean
+ Number
+
- isObjectRTD
+ ropeCreate
- Returns true if RTD model is loaded
+ Create a rope (PhysX rope in Arma 3).
- https://community.bistudio.com/wiki/isObjectRTD
+ https://community.bistudio.com/wiki/ropeCreate
- isObjectRTD Object
+ ropeCreate Array
- isObjectRTD helicopter
+ ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
+
+ ropeCreate [fromObject, fromPoint, length, segments, unroll]
- $Code$_heliRTD = isObjectRTD vehicle player ;$/Code$
+ $Code$myRope = ropeCreate [ vehicle player, "slingload0", myCargo, [0, 0, 0], 10]; //A3 example$/Code$
+
+ $Code$myRope = ropeCreate [ vehicle player, "fastrope0", 10, 10, true ]; //TakeOn example$/Code$
+
+ $Code$myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34$/Code$
undefined / undefined
+ (November 8, 2014)
+ Doesn't work well for towing vehicles on the ground.
+ Their wheels don't turn freely and have a LOT of friction. You'll most likely end up flipping the vehicle over if you try to tow it.
+ Also note that ropes can be destroyed/cut by shooting at them.
+
+ (January 4, 2015)
+ Pay special attention to what is your fromObject and what is your toObject as this will have an impact on the physics of the rope.
+ For example: If you want to tow an Assault CRRC from a heavier Speedboat Minigun, attach two boats together with a rope. If you drive the Speedboat Minigun and set the CRRC as the fromObject, the rope will have almost no elasticity and the CRRC will yank around as you tow it. However, if you set the CRRC as the toObject, the rope will have more elasticity and will be a little friendlier for the CRRC when you are towing it.
+
+ (July 9, 2015)
+ Parameters segments and unroll are not supported in Arma 3. Segments are set automatically according the length of a rope.
- Boolean
+ Object
+
- isOnRoad
+ showWarrant
- Checks if given position is on road. Same as roadAt, only return is boolean instead of road object.
+ Enable ID card (default false ). Obsolete command.
- https://community.bistudio.com/wiki/isOnRoad
+ https://community.bistudio.com/wiki/showWarrant
- isOnRoad Object/Array
+ showWarrant Boolean
- isOnRoad position
+ showWarrant show
- $Code$_objOnRoad = isOnRoad player ;$/Code$
-
- $Code$_posOnRoad = isOnRoad ASLToAGL getPosASL player ;$/Code$
-
+
- global / undefined
+ undefined / undefined
- Boolean
+ Nothing
+
- isPipEnabled
+ className
- Returns true if Picture in Picture (Render to Texture) is enabled.
+ Returns short name of location.
- https://community.bistudio.com/wiki/isPipEnabled
+ https://community.bistudio.com/wiki/className
- isPipEnabled
+ className Location
- isPipEnabled
+ className loc
- $Code$PIPon = isPipEnabled;$/Code$
-
+
undefined / undefined
- Boolean
+ String
+
- isPlayer
+ getBurningValue
- Checks if given person is player. Returns true for headless clients as well.
+ Returns amount of damage from fire.
- https://community.bistudio.com/wiki/isPlayer
+ https://community.bistudio.com/wiki/getBurningValue
- isPlayer Object
+ getBurningValue Object
- isPlayer person
+ getBurningValue unit
- $Code$if ( isPlayer _Soldier1) then {
- _Soldier1 setDamage 1;
- };$/Code$
-
- $Code$_playerCount = { isPlayer _x} count playableUnits ;$/Code$
-
+
- global / undefined
+ undefined / undefined
- (1 August, 2006)
- This is not the same as testing object == player, because in MP it tests for any player, not only for the local one. If object is a vehicle, the test is done for the vehicle commander.
- Boolean
+ Number
+
- isRealTime
+ leaderboardDeInit
- Returns true if the mission editor is operating in real time mode.
- i
- Some Old Editor Command
+ Deletes internal class for the leaderboard with given name. Returns true if the board has been found and deinitialized.
- https://community.bistudio.com/wiki/isRealTime
+ https://community.bistudio.com/wiki/leaderboardDeInit
- isRealTime Control
+ leaderboardDeInit String
- isRealTime map
+ leaderboardDeInit boardName
- $Code$_isRealTime = isRealTime _map$/Code$
+ $Code$leaderboardDeInit "TT01"$/Code$
undefined / undefined
@@ -34647,62 +36555,61 @@
- Boolean
+ Boolean
+
- isRemoteExecutedJIP
+ getArtilleryETA
- Returns true if the code context is being remote executed from the JIP queue by remoteExec or remoteExecCall (when JIP param was set). It is a subset of isRemoteExecuted :
- Normal remote execution:
- isRemoteExecuted - true
- isRemoteExecutedJIP - false
- Remote execution from JIP queue:
- isRemoteExecuted - true
- isRemoteExecutedJIP - true
- In SP always returns false.
+ Returns ETA to the target in seconds for given artillery unit based on target position and used magazine, -1 if target can't be hit.
- https://community.bistudio.com/wiki/isRemoteExecutedJIP
+ https://community.bistudio.com/wiki/getArtilleryETA
- isRemoteExecutedJIP
+ Object getArtilleryETA Array
- isRemoteExecutedJIP
+ unit getArtilleryETA [targetPosition, magazineType]
- $Code$_remoteExecutedJIP = isRemoteExecutedJIP ;$/Code$
+ $Code$_mortar getArtilleryETA [ getPos _target, getArtilleryAmmo [_mortar] select 0];$/Code$
+
+ $Code$_mortar getArtilleryETA [ position _target, currentMagazine _mortar];$/Code$
- undefined / undefined
+ global / undefined
+ (August 26, 2013)
+ To avoid wrong ETA readings, position of the target should only be obtained via position or getPos
- Boolean
+ Number
+
- isRemoteExecuted
+ groupSelectedUnits
- Returns true if the code context is being remote executed by remoteExec or remoteExecCall. In SP always returns false. See also isRemoteExecutedJIP
+ Returns selected units in source group for normal commanding mode (individual units). For the High Command equivalent, see hcSelected.
- https://community.bistudio.com/wiki/isRemoteExecuted
+ https://community.bistudio.com/wiki/groupSelectedUnits
- isRemoteExecuted
+ groupSelectedUnits Object
- isRemoteExecuted
+ groupSelectedUnits unit
- $Code$_remoteExecuted = isRemoteExecuted ;$/Code$
+ $Code$_selectedUnits = groupSelectedUnits player ;$/Code$
undefined / undefined
@@ -34710,109 +36617,97 @@
- Boolean
+ Array
+
- isServer
+ <=
- Returns true if the machine (executing the command) is the server in a multiplayer game or is running single player. isServer will return true for both, dedicated server and player hosted. Dedicated server could be detected with isDedicated command. Hosted by player server can be detected by presense of UI: isServer && hasInterface
+ Checks if the left number is smaller than or equal to the right one
- https://community.bistudio.com/wiki/isServer
+ https://community.bistudio.com/wiki/a_less%3D_b
- isServer
+ Number <= Number
- isServer
-
+
- $Code$if (! isServer ) exitWith {};$/Code$
-
+
undefined / undefined
- (April 8, 2011)
- You can use isServer inside the condition of a trigger to have the trigger activate only for the server. All other conditions for the trigger will be checked across all machines, but it will only activate the trigger created on the server. For example: $Code$this && isServer $/Code$
-
- (December 21, 2014)
- $Code$ if ( isDedicated ) then {
- //run on dedicated server only
- };
- if ( isServer ) then {
- //run on dedicated server or player host
- };
- if ( hasInterface ) then {
- //run on all player clients incl. player host
- };
- if (! isDedicated ) then {
- //run on all player clients incl. player host and headless clients
- };
- if (! isServer ) then {
- //run on all player clients incl. headless clients but not player host
- };
- if (! hasInterface ) then {
- //run on headless clients and dedicated server
- };
- if (! hasInterface && ! isDedicated ) then {
- //run on headless clients only
- };$/Code$
- Boolean
+ Boolean
+
- isShowing3DIcons
+ camSetTarget
- Returns true if the editor is set to draw 3D icons.
- i
- Some Old Editor Command
+ Set the target object or position where the given camera should point at. Needs the call of camCommit to be conducted.
- https://community.bistudio.com/wiki/isShowing3DIcons
+ https://community.bistudio.com/wiki/camSetTarget
- isShowing3DIcons Control
+ Object camSetTarget Object
+
+ Object camSetTarget Array
- isShowing3DIcons map
+ camera camSetTarget target
+
+ camera camSetTarget position
-
+ $Code$_camera camSetTarget player ;$/Code$
+
+ $Code$_camera camSetTarget [2540,1503,26];$/Code$
+
+ $Code$_cam = "camera" camCreate ( player modelToWorld [0,100,10]);
+ _cam camSetTarget player ;
+ _cam camSetRelPos [0, 0.5, 1.5];
+ _cam cameraEffect ["internal", "back"];
+ _cam camCommit 1;
+ player setRandomLip true ;$/Code$
+
- undefined / undefined
+ local / local
- Boolean
+ Nothing - Nothing
+
- isSimpleObject
+ createDiarySubject
- Returns true if given object is simple object
+ Create a new subject page in a log.
- https://community.bistudio.com/wiki/isSimpleObject
+ https://community.bistudio.com/wiki/createDiarySubject
- isSimpleObject Object
+ Object createDiarySubject Array
- isSimpleObject object
+ person createDiarySubject [subject, displayName, picture]
- $Code$_isSimple = isSimpleObject _obj1;$/Code$
+ $Code$_index = player createDiarySubject ["myPage","My page"];$/Code$
undefined / undefined
@@ -34820,55 +36715,58 @@
- Boolean
+ Number
+
- isSprintAllowed
+ enableCaustics
- Returns true if player is allowed to sprint
+ Enable/disable caustics drawing.
- https://community.bistudio.com/wiki/isSprintAllowed
+ https://community.bistudio.com/wiki/enableCaustics
- isSprintAllowed Object
+ enableCaustics Boolean
- isSprintAllowed unit
+ enableCaustics bool
- $Code$isSprintAllowed player;$/Code$
-
+
undefined / undefined
+ (October 23, 2017)
+ Setting this to false will disable a light refraction on "liquid" objects like sea water. This has no effect on solid (static) objects.
- Boolean
+ Nothing
+
- isStaminaEnabled
+ getObjectViewDistance
- Check if stamina depletion is enabled
+ Gets the values of rendering distances of objects and shadows.
- https://community.bistudio.com/wiki/isStaminaEnabled
+ https://community.bistudio.com/wiki/getObjectViewDistance
- isStaminaEnabled Object
+ getObjectViewDistance
- isStaminaEnabled unit
+ getObjectViewDistance
- $Code$isStaminaEnabled player;$/Code$
+ $Code$_arr = getObjectViewDistance ;$/Code$
undefined / undefined
@@ -34876,34 +36774,28 @@
- Boolean
+ Array
+
- isSteamMission
+ atan
- Returns true if the current mission is a Steam Workshop mission.
+ ArcTangent of a number, result in Degrees.
- https://community.bistudio.com/wiki/isSteamMission
+ https://community.bistudio.com/wiki/atan
- isSteamMission
+ atan Number
- isSteamMission
+ atan x
- $Code$if ( isSteamMission ) then
- {
- hint "Thank you for subscribing to my mission on Steam!";
- }
- else
- {
- hint "Thank you for downloading my mission off the Internet!";
- };$/Code$
+ $Code$_degrees = atan 1; //45$/Code$
undefined / undefined
@@ -34911,27 +36803,28 @@
- Boolean
+ Number
+
- isStreamFriendlyUIEnabled
+ teamType
- Returns the status of STREAM FRIENDLY UI setting in UI (OPTIONS GAME GENERAL STREAM FRIENDLY UI).
+ Returns a type of given team.
- https://community.bistudio.com/wiki/isStreamFriendlyUIEnabled
+ https://community.bistudio.com/wiki/teamType
- isStreamFriendlyUIEnabled
+ teamType Team_Member
- isStreamFriendlyUIEnabled
+ teamType team
- $Code$hint str isStreamFriendlyUIEnabled ;$/Code$
+ $Code$_type = teamType _team;$/Code$
undefined / undefined
@@ -34939,127 +36832,145 @@
- Boolean
+ String
+
- isText
+ unitsBelowHeight
- Check if config entry represents text.
+ Returns units in group/array below given height Above The Land (ATL). Current unit height ATL could be found with
+ _height = ( getPosATL _unit) select 2;
- https://community.bistudio.com/wiki/isText
+ https://community.bistudio.com/wiki/unitsBelowHeight
- isText Config
+ Group/Array unitsBelowHeight Number
- isText config
+ units unitsBelowHeight height
- $Code$_ok = isText (configFile "CfgVehicles")
- // Result is false$/Code$
+ $Code$_allOnGroudUnits = group player unitsBelowHeight 10;$/Code$
+
+ $Code$_units = allUnits unitsBelowHeight 30;$/Code$
- undefined / undefined
+ global / undefined
+ (Nov 12, 2009)
+ the height is calculated above terrain level (ATL), not water level or building level.
- Boolean
+ Array
+
- isTouchingGround
+ ctrlSetTextColor
- Returns true if object is touching the ground.
+ Sets text color of given control. Color is in format Color. As of Arma 3 v1.40 this command could also be used to change fill colour or the DialogControls-ProgressBar.
- https://community.bistudio.com/wiki/isTouchingGround
+ https://community.bistudio.com/wiki/ctrlSetTextColor
- isTouchingGround Object
+ Control ctrlSetTextColor Array
- isTouchingGround object
+ display ctrlSetTextColor color
- $Code$if ( isTouchingGround player ) then { hint "Terraferma!";};$/Code$
+ $Code$_control ctrlSetTextColor [1, 0, 0, 1]$/Code$
- global / undefined
+ undefined / undefined
- (June 1, 2014)
- If you are using this command as a validation method, it should not be the sole thing you are checking for, as the result is often inaccurate. For example, it returns false for some helicopters when landed on the roof of certain buildings, and it always returns false for boats, even if they are beached.
-
- (September 29, 2016)
- In addition to previous statement: That behaviour is true, simply because isTouchingGround applied to a player unit (or any unit) is frozen to a last state when unit enters vehicle.
- To get proper return from this command you should go for units vehicle :
- $Code$_var = isTouchingGround player // Unreliable
- _var = isTouchingGround (vehicle player) // Pretty reliable
- $/Code$
-
- (November 10, 2016)
- This command returns always true if the falling object is attached to some other object with the command attachTo, like for vehicle air drop with parachute.
+ (April 10, 2015)
+ When used on a RscProgress control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
- (April 26, 2017)
- Be aware: it's not reliable on remote objects.
+ (March 4, 2018)
+ This command can be used to change the color of the light that is illuminating a texture in a display. By default, textures are lit with white light at 100% [1,1,1,1];
- Boolean
+ Nothing
+
- isTurnedOut
+ compileFinal
- Returns true if given unit is turned out, otherwise false. The output changes to true after unit finished turning out, however will change to false almost immediately after unit is ordered to turn in.
+ Compile expression and makes it final, preventing it from:
+ repeated compile or compileFinal
+ removal by nil
+ remote rewrite using publicVariable, publicVariableClient and publicVariableServer
- https://community.bistudio.com/wiki/isTurnedOut
+ https://community.bistudio.com/wiki/compileFinal
- isTurnedOut Object
+ compileFinal String
- isTurnedOut unit
+ compileFinal expression
- $Code$_commanderOut = isTurnedOut (tank turretUnit [0,0]);$/Code$
+ $Code$myCode = compileFinal "a = a + 1";
+ call myCode;
+ //--- Repeated compile won't have any effect
+ myCode = compileFinal "a = a + 2";
+ //--- Duplicate code will be final as well
+ myDuplicateCode = myCode;$/Code$
- undefined / undefined
+ undefined / local
+ (August 14, 2013)
+ When broadcasting a compileFinal'ed variable using publicVariable or its variants, the variable also becomes final on the other client(s) and/or the server.
+ Also, compileFinal does not prevent event handlers from being removed or overwritten.
+
+ (May 27, 2017)
+ in ArmA 3 1.70.141838, compileFinal also works for profileNamespace and uiNamespace. But be careful with that.
- Boolean
+ Code
+
- isTutHintsEnabled
+ tvTooltip
- Returns the status of TUTORIAL HINTS setting in UI (OPTIONS GAME GENERAL TUTORIAL HINTS).
+ Gets the tooltip text associated with the specified tree view path.
- https://community.bistudio.com/wiki/isTutHintsEnabled
+ https://community.bistudio.com/wiki/tvTooltip
- isTutHintsEnabled
+ tvTooltip Array
+
+ Control tvTooltip Array
- isTutHintsEnabled
+ tvTooltip [idc, path]
+
+ ctrl tvTooltip path
- $Code$hint str isTutHintsEnabled ;$/Code$
+ $Code$_text = tvTooltip [101, [0,2]];$/Code$
+
+ $Code$_text = _treeCtrl tvTooltip [0,2];$/Code$
undefined / undefined
@@ -35067,27 +36978,28 @@
- Boolean
+ String - String
+
- isUAVConnectable
+ from
- Returns true if UAV is connectable by AV terminal(s).
+ Continue sequence of for var construct. It sets the start value of the index variable.
- https://community.bistudio.com/wiki/isUAVConnectable
+ https://community.bistudio.com/wiki/from
- Object isUAVConnectable Array
+ For_Type from Number
- object isUAVConnectable [uav, checkAllItems]
+ for from b
- $Code$connectable = unit isUAVConnectable [uav,true];$/Code$
+ $Code$for "_x" from 10 to 20 do {..code..}$/Code$
undefined / undefined
@@ -35095,614 +37007,704 @@
- Boolean
+ For_Type
+
- isUAVConnected
+ lnbSetText
- Returns true if UAV is connected to some terminal.
+ Sets the additional text (invisible) in the item with the given position of the 2D listbox.
- https://community.bistudio.com/wiki/isUAVConnected
+ https://community.bistudio.com/wiki/lnbSetText
- isUAVConnected Object
+ lnbSetText Array
+
+ Control lnbSetText Array
- isUAVConnected uav
+ lnbSetText [idc,[row,column],data]
+
+ _ctrl lnbSetText [ [row,column],data]
- $Code$bool = isUAVConnected cursorTarget ;$/Code$
+ $Code$lnbSetText [101, [0,1], "#1"];$/Code$
+
+ $Code$_ctrl lnbSetText [ [0,1], "#1"];$/Code$
- undefined / undefined
+ local / local
+ (Sep 9 2014)
+ (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
+ $Code$
+ //Set same value to one position of a Control
+ _ctrl lnbSetData [ [0,0],"#1"];
+ lnbSetColumnsPos [102, [0,1], 1];
+ _ctrl lnbSetText [ [0,1], "#1"];
+ _ctrl lnbSetValue [ [0,0],1];
+ //Accessing the value disregard affecting one another.
+ _ctrl lnbData [0,0]; //"#1"
+ lnbGetColumnsPosition _ctrl //[1];
+ _ctrl lnbText [0,0];//"#1"
+ _ctrl lnbValue [0,0];//1
+ $/Code$
+ For a direct visible control over CT_LISTNBOX:
+ $Code$
+ 0 = [_CT_LISTNBOX] spawn {
+ private ["_CT_LISTNBOX","_color","_current","_pic"];
+ disableSerialization ;
+ _CT_LISTNBOX = _this select 0;
+ {
+ _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
+ _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
+ } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
+ _CT_LISTNBOX lnbSetCurSelRow 0;
+ _current = lnbCurSelRow _CT_LISTNBOX;
+ _color = _CT_LISTNBOX lnbColor [_current,0];
+ _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
+ _CT_LISTNBOX lnbDeleteColumn 0;
+ _CT_LISTNBOX lnbDeleteRow 1;
+ sleep 1;
+ lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ };
+ $/Code$
+ A combined use of both invisible and visible data processing commands alive the Control.
- Boolean
+ Nothing - Nothing
+
- isUIContext
+ onBriefingPlan
- Returns true if the script originated from some UI control event, for example from "onButtonDown" EH. Exists within parent scope and immediate child scopes.
+ Select a sound declared in the Description.ext of the mission to be played the first time the Plan tab is selected in the briefing.
- https://community.bistudio.com/wiki/isUIContext
+ https://community.bistudio.com/wiki/onBriefingPlan
- isUIContext
+ onBriefingPlan String
- isUIContext
+ onBriefingPlan soundName
- $Code$if ( isUIContext ) then { hint "UI control event"};$/Code$
+ $Code$onBriefingPlan "PlanVoiceOver"$/Code$
undefined / undefined
+ (January 20, 2007)
+ In OFP 1.96 only sound files defined in the mission description can be played in this way.
- Boolean
+ Nothing
+
- isUniformAllowed
+ setFuelCargo
- Check whether given uniform can be dressed by target soldier.
+ Sets fuel amount in cargo space of refuel vehicle from empty (0) to full (1)
+ Note, the carrying capacity of each side's refuel trucks differ.
- https://community.bistudio.com/wiki/isUniformAllowed
+ https://community.bistudio.com/wiki/setFuelCargo
- Object isUniformAllowed String
+ Object setFuelCargo Number
- unit isUniformAllowed type
+ vehicle setFuelCargo amount
- $Code$_canUse = _unit isUniformAllowed "U_B_CombatUniform_mcam";$/Code$
+ $Code$_refuelTruckOne setFuelCargo 0;$/Code$
- global / undefined
+ local / global
+ (July 10, 2015)
+ (ArmA 3 1.44) setFuelCargo will have no effect if the vehicle doesn't support getFuelCargo.
- Boolean
+ Nothing
+
- isVehicleCargo
+ removeAllItems
- Return transporting vehicle if vehicle is loaded in one.
+ Removes all special items from the unit.
- https://community.bistudio.com/wiki/isVehicleCargo
+ https://community.bistudio.com/wiki/removeAllItems
- isVehicleCargo Object
+ removeAllItems Object
- isVehicleCargo vehicle
+ removeAllItems unit
- $Code$// Blackfish with given variable name blackfish, with a vehicle inside called quad
- _transportingVehicle = isVehicleCargo quad; //returns blackfish
- //Vehicle called quad that is not being transported as cargo
- _transportingVehicle = getVehicleCargo quad; //returns objNull$/Code$
+ $Code$removeAllItems unitName;$/Code$
- undefined / undefined
+ local / global
+ (June 18, 2013)
+ Arma 3, version 0.70 - removes only items listed by command items.
- Object
+ Nothing
+
- isVehicleRadarOn
+ deleteGroupWhenEmpty
- Returns true if vehicle has active sensors on
+ Marks given group for auto-deletion when group is empty. true will mark the group for auto-deletion, however false will only unmark the group that was marked previously. There are other engine group auto-deletion mechanisms in place, which are not affected by this.
+ NOTE: It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.
- https://community.bistudio.com/wiki/isVehicleRadarOn
+ https://community.bistudio.com/wiki/deleteGroupWhenEmpty
- isVehicleRadarOn Object
+ Group deleteGroupWhenEmpty Boolean
- isVehicleRadarOn vehicle
+ group deleteGroupWhenEmpty delete
- $Code$isVehicleRadarOn vehicle player ; // returns true if radar is turned on$/Code$
+ $Code$_group deleteGroupWhenEmpty true ;$/Code$
- undefined / undefined
+ global / global
+ (February 8, 2018)
+ It seems, that the argument has to be local (like for deleteGroup).
+ So if you run it on a server and the group isn't local to the server this wouldn't work:
+ $Code$_group deleteGroupWhenEmpty true;$/Code$
+ But this would work:
+ $Code$if (local _group) then {
+ _group deleteGroupWhenEmpty true;
+ } else {
+ [_group, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _group];
+ };$/Code$
- Boolean
+ Nothing
+
- isVehicleSensorEnabled
+ removeDrawIcon
- Returns class name (to identify list based on component name) and info if given sensor is enabled
+ Removes an icon for an editor object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/isVehicleSensorEnabled
+ https://community.bistudio.com/wiki/removeDrawIcon
- Object isVehicleSensorEnabled String
+ Control removeDrawIcon Array
- vehicle isVehicleSensorEnabled componentName
+ map removeDrawIcon [object,string identifier]
- $Code$vehicle player isVehicleSensorEnabled "PassiveRadarSensorComponent"; // [ ["PassiveRadarSensorComponent",true] ]$/Code$
-
+
undefined / undefined
- Array
+ Nothing
+
- isWalking
+ assignedVehicleRole
- Returns true if walk is toggled (W+S in Arma 3).
+ Return the role a unit is assigned to within its assigned vehicle.
+ The array which is returned contains:
+ [] - Not assigned to any vehicle
+ ["Driver"] - Assigned as driver
+ ["Cargo"] (or ["Cargo", [turret path]] since Arma 3 1.31.127272) - Assigned as cargo
+ ["Turret", [turret path]] - Assigned to a turret
+ If no vehicle role is assigned, an empty array is returned.
- https://community.bistudio.com/wiki/isWalking
+ https://community.bistudio.com/wiki/assignedVehicleRole
- isWalking Object
+ assignedVehicleRole Object
- isWalking unitName
+ assignedVehicleRole unitName
- $Code$_bool = isWalking player ;$/Code$
+ $Code$_RoleArray = assignedVehicleRole player ;$/Code$
+
+ $Code$// Get weapons available to player at player occupied turret:
+ _weaponsTurret = vehicle player weaponsTurret ( assignedVehicleRole player select 1);$/Code$
global / undefined
- (March 8, 2015)
- To expand on the limited description, this command doesn't necessarily say whether or not the unit is currently walking. All it says is that walking is toggled on or off. This command can still return true when the unit is sprinting. When walking is toggled on, the unit will return to walking pace when not sprinting. When walking is toggled off, the unit will return to jogging pace when not sprinting. This command is not intended to gauge a units current movement speed.
+ (August 31, 2013)
+ When unit with unassigned vehicle role enters a vehicle, it gets assigned vehicle role automatically. The unit then will hold on to its assigned role after exiting the vehicle. To add, when player is in the group of AIs and is not the leader, assignedVehicleRole of the player could be unpredictable and absolutely not related to the position player occupies. In short, forget about this command, it is unreliable and has been broken too many times in the past.
+
+ (November 15, 2014)
+ In multiplayer (tested in v1.34), this only works reliably on the server.
+ Behaviour is as follows:
+ On a client, the command will return empty arrays for every unit that is not local.
+ On the server, the command correctly returns the position, regardless of the units locality.
- Boolean
+ Array
+
- isWeaponDeployed
+ ==
- Returns true if weapon is currently deployed.
+ Check if one value is equal to another. Both values need to be of the same type.
- https://community.bistudio.com/wiki/isWeaponDeployed
+ https://community.bistudio.com/wiki/a_%3D%3D_b
- isWeaponDeployed Object
+ Anything == Anything
- isWeaponDeployed unit
-
+
- $Code$_dep = isWeaponDeployed player ;$/Code$
-
+
- global / undefined
+ undefined / undefined
- (July 1, 2015)
- You can force a unit out of bipod or resting with:
- $Code$_unit playMove "";$/Code$
-
- (March 4, 2017)
- playMove, as well as switchMove, appear to not work when forcing a player out of being deployed. A more reliable method is: $Code$_player setPos (_player modelToWorld [0,0,0]);$/Code$
- Boolean
+ Boolean
+
- isWeaponRested
+ ppEffectDestroy
- Returns true if weapon is currently rested.
+ Destroy Post process effects given by handle or array of handles.
- https://community.bistudio.com/wiki/isWeaponRested
+ https://community.bistudio.com/wiki/ppEffectDestroy
- isWeaponRested Object
+ ppEffectDestroy Number
+
+ ppEffectDestroy Array
- isWeaponRested unit
+ ppEffectDestroy effect
+
+ ppEffectDestroy [effect1,]
- $Code$_rest = isWeaponRested player ;$/Code$
+ $Code$ppEffectDestroy _hndl;$/Code$
+
+ $Code$ppEffectDestroy [_hndl0, _hndl1, _hndl2];$/Code$
- local / undefined
+ undefined / undefined
- (July 1, 2015)
- You can force a unit out of bipod or resting with:
- $Code$_unit playMove "";$/Code$
-
- (July 12, 2015)
- As of 1.49 $Code$ isWeaponRested player $/Code$ is the only current use of this command. You cannot detect remote player and you cannot detect local unit that is not a player. Might as well be a nullar command without argument.
- Boolean
+ Nothing - Nothing
+
- itemCargo
+ camPrepareTarget
- Get array with items from ammo box (or any general weapon holder container).
+ Prepares the camera target to a position or to a target.
- https://community.bistudio.com/wiki/itemCargo
+ https://community.bistudio.com/wiki/camPrepareTarget
- itemCargo Object
+ Object camPrepareTarget Array
+
+ Object camPrepareTarget Object
- itemCargo box
+ camera camPrepareTarget position
+
+ camera camPrepareTarget target
- $Code$hint str itemCargo vestContainer player ;$/Code$
+ $Code$_camera camPrepareTarget getPos player$/Code$
+
+ $Code$_camera camPrepareTarget player$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Nothing - Nothing
+
- itemsWithMagazines
+ combatMode
- Returns combined array including all unit's items and all unit's magazines. Loaded magazines such as currentMagazine, primaryWeaponMagazine, secondaryWeaponMagazine, handgunMagazine as well as assignedItems are excluded.
+ Returns the combat mode of the given unit. See setCombatMode for more information about combat modes.
- https://community.bistudio.com/wiki/itemsWithMagazines
+ https://community.bistudio.com/wiki/combatMode
- itemsWithMagazines Object
+ combatMode Object/Group
- itemsWithMagazines unit
+ combatMode grp
- $Code$itemsWithMagazines player
- //is essentially the same as
- items player + magazines player [
- "FirstAidKit",//item
- "30Rnd_65x39_caseless_mag",//magazine
- "16Rnd_9x21_Mag",//magazine
- "Chemlight_green",//magazine
- "HandGrenade",//magazine
- "ToolKit",//item
- "MineDetector"//item
- ]$/Code$
+ $Code$if (( combatMode _grp1) == "BLUE") then {_grp1 setCombatMode "GREEN"};$/Code$
global / undefined
+ (August 3, 2006)
+ Notes from before the conversion:
+ Use setCombatMode to set the combat mode. The definitions of the colours are given under that command.
+
+ In OFP v1.96, combatMode return value does not change when unit's combat mode is set with radio commands, ie troops under the player's command.
- Array
+ String
+
- items
+ flyInHeightASL
- Returns an array of names of all special items of a vehicle or a soldier.
+ Sets the minimal ASL height. Final height is max(flyInHeight, flyInHeightASL).
- https://community.bistudio.com/wiki/items
+ https://community.bistudio.com/wiki/flyInHeightASL
- items Object
+ Object flyInHeightASL Array
- items unit
+ aircraft flyInHeightASL params
- $Code$_itemsplayer = items player ;$/Code$
-
- $Code$player sideChat format ["%1", items player ];$/Code$
+ $Code$cobraOne flyInHeightASL [200, 100, 400];$/Code$
- global / undefined
+ undefined / undefined
- (June 18, 2013)
- Arma 3, version 0.70 - magazines, explosives, grenades and all items currently linked on the unit are not returned now.
- Array
+ Nothing
+
- joinAsSilent
+ objStatus
- Joins the unit to the given group, if position id is available, this one is used. Avoid any radio communication related to joining.
+ Sets the status of an objective that was defined in briefing.html.
+ Status may be one of:
+ "ACTIVE"
+ "FAILED"
+ "DONE"
+ "HIDDEN"
+ To refer to an objective that is named "OBJ_1", for example, use only the index number in this command (i.e. "1" objStatus "HIDDEN").
- https://community.bistudio.com/wiki/joinAsSilent
+ https://community.bistudio.com/wiki/objStatus
- Object joinAsSilent Array
+ String objStatus String
- unit joinAsSilent [group, id]
+ objectivenumber objStatus status
- $Code$player joinAsSilent [_group, 4];$/Code$
-
- $Code$// To get the position id:
- getUnitPositionId = {
- private ["_vvn", "_str"];
- _vvn = vehicleVarName _this;
- _this setVehicleVarName "";
- _str = str _this;
- _this setVehicleVarName _vvn;
- parseNumber (_str select [(_str find ":") + 1])
- };
- player joinAsSilent [ createGroup west, 5];
- _id = player call getUnitPositionId;
- hint str _id; //5$/Code$
+ $Code$"1" objStatus "DONE"
+ Marks the objective named "OBJ_1" as completed.$/Code$
- global / global
+ undefined / undefined
- I haven't done a thorough test but this function doesn't seem to work for Civilians, use joinSilent instead.
- Nothing
+ Nothing
+
- joinAs
+ taskCustomData
- Joins the unit to the given group, if position id is available, this one is used.
+ Returns custom data attached to the local task or an empty array if there are no custom data attached.
- https://community.bistudio.com/wiki/joinAs
+ https://community.bistudio.com/wiki/taskCustomData
- Object joinAs Array
+ taskCustomData Task
- unit joinAs [group, id]
+ taskCustomData task
- $Code$player joinAs [_group, 4];$/Code$
-
- $Code$// To get the position id:
- getUnitPositionId = {
- private ["_vvn", "_str"];
- _vvn = vehicleVarName _this;
- _this setVehicleVarName "";
- _str = str _this;
- _this setVehicleVarName _vvn;
- parseNumber (_str select [(_str find ":") + 1])
- };
- player joinAs [ createGroup west, 5];
- _id = player call getUnitPositionId;
- hint str _id; //5$/Code$
-
+
- global / global
+ undefined / undefined
- Nothing
+ Array
+
- joinSilent
+ setWaypointType
- Join all units in the array to given group silently (without radio message). To have a group member leave a group, join him with the grpNull group (e.g. [guy1] joinSilent grpNull ), but beware, as brand new group is created for the leaving unit and this could result in the number of groups in a mission growing out of control.
+ Changes the waypoint type.
+ Type can be:
+ "MOVE"
+ "DESTROY"
+ "GETIN"
+ "SAD"
+ "JOIN"
+ "LEADER"
+ "GETOUT"
+ "CYCLE"
+ "LOAD"
+ "UNLOAD"
+ "TR UNLOAD"
+ "HOLD"
+ "SENTRY"
+ "GUARD" (for use with GUARDED BY trigger or createGuardedPoint )
+ "TALK"
+ "SCRIPTED"
+ "SUPPORT"
+ "GETIN NEAREST"
+ "DISMISS"
+ "LOITER" (new in Arma 3)
+ "AND" (only for game logics)
+ "OR" (only for game logics)
+ More details at Waypoint types.
- https://community.bistudio.com/wiki/joinSilent
+ https://community.bistudio.com/wiki/setWaypointType
- Array joinSilent Object/Group
+ Array setWaypointType String
- unitArray joinSilent group
+ waypoint setWaypointType type
- $Code$[_unitOne, _unitTwo] joinSilent ( group player );$/Code$
-
- $Code$[_unitOne, _unitTwo] joinSilent player ;$/Code$
+ $Code$[_grp, 2] setWaypointType "HOLD";$/Code$
- global / global
+ undefined / undefined
- (August 4, 2014)
- If all units of a group are joined to another group then the first group will be NULL-group afterward.
+ (07:44, 23 November 2007)
+ For waypoint types description look at
+ ArmA: Mission_Editor
+ OFP: Mission_Editor
+ Using Move With a game logic group will move the logic to the set location just like setpos. In the editor only AND and OR type of waypoints are available for GAME LOGICS but you can use CYCLE type as well in setWaypointType.
+ $Code$_wp = group logic1 addWaypoint [ getPos player, 1];
+ [ group logic1, 1] setWPPos getPos player ;
+ [ group logic1, 1] setWaypointType "move";$/Code$
+
+ (23:07, 18 October 2013 (CEST))
+ To clear up any confusion regarding the syntax, follow this example where grp01 is the name of a group of AI units:
+ $Code$_wp = grp01 addWaypoint [[25295,21919,85], 0];
+ _wp setWaypointType "MOVE";
+ _wp1 = grp01 addWaypoint [[25381,21882,70], 0];
+ _wp1 setWaypointType "MOVE";
+ _wp2 = grp01 addWaypoint [[ 25332,21782,78], 0];
+ _wp2 setWaypointType "CYCLE"; //Use the variable (_wp2), not [grp01, 0]$/Code$
+
+ (December 22, 2015)
+ To spawn a helicopter with troops inside and make them land and unload.
+
+ (May 6, 2017)
+ To use the LAND function in a waypoint, you must set "A3\functions_f\waypoints\fn_wpLand.sqf" as the script for that waypoint.
+
+ (May 30, 2017)
+ In ArmA3 1.70.141838, if you add a MOVE waypoint very soon after a LOITER waypoint, ( assuming that the index of the MOVE waypoint is HIGHER than the index of the LOITER waypoint )
+ then the LOITER waypoint will be considered as a MOVE waypoint.
+ And, if you add another waypoint after ( for example ) more than 1 second after adding the LOITER waypoint,
+ then the LOITER waypoint will NOT complete even when its condition has been met.
+ There are two ways to quit an existing LOITER waypoint that was added more than about 1 second ago; use the setCurrentWaypoint command OR add a waypoint that has the same ID as the LOITER waypoint.
+ The difference between those two methods is that the lather prevents the LOITER waypoint from executing its statement.
- Nothing
+ Nothing
+
- joinString
+ removeAction
- Joins array into String with provided separator. Array can be of mixed types, all elements will be converted to String prior to joining, but the fastest operation is on the array of Strings.
+ Removes user added action with given id index. This only removes actions added with the addAction command. You cannot remove default game actions, such as reload.
+ This command has local effect. The action will only be removed on the computer that executes the command.
- https://community.bistudio.com/wiki/joinString
+ https://community.bistudio.com/wiki/removeAction
- Array joinString String
+ Object removeAction Number
- array joinString separator
+ unit removeAction index
- $Code$_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"]
- _str joinString " "; // "This is a sample string"$/Code$
-
- $Code$["This","is","sparta"] joinString " ~ "; // "This ~ is ~ sparta"$/Code$
-
- $Code$["1",2, text "3"] joinString ""; // "123"$/Code$
-
- $Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
-
- $Code$"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"$/Code$
-
- $Code$// Remove all \r\n from file:
- loadFile "somefile.txt" splitString toString [13,10] joinString " "$/Code$
+ $Code$player removeAction 0;$/Code$
- undefined / undefined
+ global / local
- String
+ Nothing
+
- join
+ setHorizonParallaxCoef
- Join all units in the array to given group.
- Maximum number of group members is:
- OFP: 12
- Arma: ?
- Arma 2: ?
- Arma 3: "unlimited" (3000+)
- VBS 2: "unlimited" (260+)
- To have a group member leave a group, join him with the grpNull group (e.g. [guy1] join grpNull ), but beware, as brand new group is created for the leaving unit and this could result in the number of groups in a mission growing out of control.
+ Sets coef used to shift horizon position based on camera height (use 0 to disable shifting).
- https://community.bistudio.com/wiki/join
+ https://community.bistudio.com/wiki/setHorizonParallaxCoef
- Array join Group/Object
+ setHorizonParallaxCoef Number
- unitArray join group
+ setHorizonParallaxCoef coef
- $Code$[_unitOne, _unitTwo] join player ;$/Code$
-
- $Code$[_unitOne, _unitTwo] join ( group player );$/Code$
+ $Code$setHorizonParallaxCoef 1;$/Code$
- global / global
+ undefined / undefined
- Nothing
+ Nothing
+
- kbAddDatabaseTargets
+ setGusts
- Register target list knowledge base database to given person.
+ Changes the gusts value smoothly during the given time (in seconds). A time of zero means there will be an immediate change. Value is 0 to 1.
- https://community.bistudio.com/wiki/kbAddDatabaseTargets
+ https://community.bistudio.com/wiki/setGusts
- Object kbAddDatabaseTargets String
+ Number setGusts Number
- person kbAddDatabaseTargets filename
+ time setGusts value
- $Code$_unit kbAddDatabase "chat.txt"$/Code$
+ $Code$60 setGusts 0.75;$/Code$
- undefined / undefined
+ undefined / local
- Boolean
+ Nothing
+
- kbAddDatabase
+ speaker
- Register knowledge base database to given person.
+ Returns the speaker of a person.
- https://community.bistudio.com/wiki/kbAddDatabase
+ https://community.bistudio.com/wiki/speaker
- Object kbAddDatabase String
+ speaker Object
- person kbAddDatabase filename
+ speaker person
- $Code$_unit kbAddDatabase "chat.txt"$/Code$
+ $Code$speaker player$/Code$
undefined / undefined
@@ -35710,110 +37712,112 @@
- Boolean
+ String
+
- kbAddTopic
+ addToRemainsCollector
- Register conversation topic to given person.
+ Adds an array of vehicles/units to disposal manager for automatic wreck/body removal. The disposal manager follows wreck/body removal values set in description.ext
- https://community.bistudio.com/wiki/kbAddTopic
+ https://community.bistudio.com/wiki/addToRemainsCollector
- Object kbAddTopic Array
+ addToRemainsCollector Array
- person kbAddTopic [TopicName, filenamebikb, filenamefsm, event_handler]
+ addToRemainsCollector remains
- $Code$player kbAddtopic["myTest", "myTest.bikb", "myTest.fsm", {call compile preprocessFileLineNumbers "myTest.sqf"}];$/Code$
+ $Code$addToRemainsCollector [unit1, unit2, vehicle1];$/Code$
- undefined / undefined
+ global / global
- .bikb extension is by convention only. It can be anything.
- There is no default extension.
- Even tho bikb's are standard class text they cannot be raPified.
- Nothing
+ Nothing
+
- kbHasTopic
+ commandArtilleryFire
- Check if conversation topic was registered to given person.
+ Orders a unit to reload defined magazine commence fire burst on the given position (via the radio).
- https://community.bistudio.com/wiki/kbHasTopic
+ https://community.bistudio.com/wiki/commandArtilleryFire
- Object kbHasTopic String
+ Object commandArtilleryFire Array
- person kbHasTopic TopicName
+ unit commandArtilleryFire [position, type, rounds]
-
+ $Code$mortar1 commandArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- kbReact
+ removeGoggles
- Pass a non-verbal communication to the receiver.
+ Removes goggles from unit (diver goggles for example). This command does not remove NVGoggles. Use unassignItem and removeItem or just unlinkItem for latter.
- https://community.bistudio.com/wiki/kbReact
+ https://community.bistudio.com/wiki/removeGoggles
- Object kbReact Array
+ removeGoggles Object
- person kbReact [receiver,topic,sentenceID,[argumentName,argumentValue,argumentText,argumentSpeech],]
+ removeGoggles unit
-
+ $Code$removeGoggles assaultDiver;$/Code$
+
- undefined / undefined
+ global / global
- Nothing
+ Nothing
+
- kbRemoveTopic
+ >=
- Unregister conversation topic from given person.
+ Checks if the left number is greater than or equal to the right one
- https://community.bistudio.com/wiki/kbRemoveTopic
+ https://community.bistudio.com/wiki/a_greater%3D_b
- Object kbRemoveTopic String
+ Number >= Number
- person kbRemoveTopic TopicName
-
+
@@ -35822,94 +37826,56 @@
- Nothing
+ Boolean
+
- kbTell
+ >>
- Make the person tell to the receiver the sentence.
+ Returns subentry of config entry with given name. Identical to config/name.
- https://community.bistudio.com/wiki/kbTell
+ https://community.bistudio.com/wiki/config_greater_greater_name
- Object kbTell Array
+ Config >> String
- person kbTell [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech],,forceRadio]
-
+
undefined / undefined
- // In Config file
- class CfgIdentities
- {
- class SSMHQ
- {
- name = $STR_DN_WARFARE_HQ_BASE_UNFOLDED;
- face = "Face97";
- glasses = "None";
- speaker = "MaleA0EN";
- pitch = 1.0;
- };
- };
- // IN BIKB
- class Sentences
- {
- class AirstrikeRequest
- {
- text = "%team requesting close air support at grid %location ";
- speech[]={%Team,RequestingCloseAirSupportAtGrid,%Location};
- class Arguments
- {
- class Team {type = "simple";};
- class Location {type = "simple";};
- };
- };
- };
- class Arguments{};
- class Special {};
- startWithVocal[] = {};
- startWithConsonant[] = {};
- // In Script file
- BIS_SSM_HQWEST = (createGroup west) createUnit ["Logic", [10,10,1000], [], 0, "NONE"];
- BIS_SSM_HQWEST setGroupId ["Headquaters", "SIX"];
- BIS_SSM_HQWEST setIdentity "SSMHQ_EN";
- player kbAddtopic["Airstrike", BIKB];
- BIS_SSM_HQWEST kbAddtopic["Airstrike", BIKB];
- player kbTell [BIS_SSM_HQWEST,"Airstrike","AirstrikeRequest", ["Team",{},"Anvil",["Anvil"]],["Location",{},"Strelka",["Strelka"]],true];
-
- (may 02, 2010)
- Jezuro help on BIforum : [1]
- Nothing
+ Config
+
- kbWasSaid
+ move3DENCamera
- Check if given item was said by person to someone.
+ Moves Eden Editor camera to given position, with or without offset.
+ Default camera offset: [0,-25,25]
- https://community.bistudio.com/wiki/kbWasSaid
+ https://community.bistudio.com/wiki/move3DENCamera
- Object kbWasSaid Array
+ move3DENCamera Array
- person kbWasSaid [receiver, topic, sentenceID, maxAge]
+ move3DENCamera [position,useOffset]
- $Code$myPlayer kbWasSaid [myReceiver, "myTopic", "mySentenceID", 3];$/Code$
+ $Code$move3DENCamera [ getPos player,true];$/Code$
undefined / undefined
@@ -35917,27 +37883,33 @@
- Boolean
+ Nothing
+
- keyImage
+ currentMagazineDetail
- Returns a structured text, containing an image or name (if no image is found) of the button, on the keyboard, mouse or joystick, with the given code.
+ Returns description of vehicle's currently loaded magazine, its ammo count (current/default) and its id.
- https://community.bistudio.com/wiki/keyImage
+ https://community.bistudio.com/wiki/currentMagazineDetail
- keyImage Number
+ currentMagazineDetail Object
- keyImage dikCode
+ currentMagazineDetail vehicle
- $Code$_name = keyImage 28; //result is "Enter"$/Code$
+ $Code$_currentMagazineDetail = currentMagazineDetail player ; //"6.5mm 30Rnd STANAG Mag(30/30)[id:0]"$/Code$
+
+ $Code$_currentMagazineDetail = currentMagazineDetail Mi_48; //"30mm HE Shells(250/250)[id:21]"$/Code$
+
+ $Code$_cmd = currentMagazineDetail player ; //"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]"
+ _cmd splitString "([ ]/:)"; //["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]$/Code$
undefined / undefined
@@ -35945,27 +37917,28 @@
- Structured_Text
+ String
+
- keyName
+ nameSound
- Returns the name of a button (on the keyboard, mouse or joystick) with the given code.
+ Returns the nameSound of a person.
- https://community.bistudio.com/wiki/keyName
+ https://community.bistudio.com/wiki/nameSound
- keyName Number
+ nameSound Object
- keyName dikCode
+ nameSound person
- $Code$_name = keyName 28; //result is "Enter"$/Code$
+ $Code$nameSound player$/Code$
undefined / undefined
@@ -35973,1521 +37946,1421 @@
- String
+ String
+
- knowsAbout
+ sunOrMoon
- Checks if a group or a side knows about target. If who is a unit, unit's group is considered, if who is a vehicle, commander's group is considered.
+ Returns the sun to moon transition state in range 0...1
- https://community.bistudio.com/wiki/knowsAbout
+ https://community.bistudio.com/wiki/sunOrMoon
- Object/Group knowsAbout Object
-
- Side knowsAbout Object
+ sunOrMoon
- who knowsAbout target
-
- side knowsAbout target
+ sunOrMoon
- $Code$_kv = _soldierOne knowsAbout _jeepOne;$/Code$
-
- $Code$_kv = ( side player ) knowsAbout _target;$/Code$
+ $Code$_transitionState = sunOrMoon ;$/Code$
- global / undefined
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- With Resistance (1.91) : No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.105.
- With CWC (1.46) : No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.7.
- What this means is, the AI will not fire on an enemy soldier until his 'knowsAbout' level of that enemy has reached the 'magic number' or higher.
- This suggests that the knowsabout level must reach the magic threshold before a unit knows if another unit is an enemy or a friendly unit.
- Triggers and knowsabout level: "Detected by xxx" triggers also follow the above rules. For a detected trigger to be set off, the knowsAbout level must reach the magic number.
- Also... As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away. Vice versa is also true. If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5. Some editors have found, whilst using this command over the years, that the following characteristics have cropped up:
- AI enemies have a very limited amount of peripheral vision, it's not nearly as good as a human player's. A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase.
- Depending on the units skill level, it can take a little time for the unit to notice a target. So if you run right past a unit, this value might not increase.
- Bushes between the unit and the target seem to have little effect on this value, and trees definitely have no affect. You may be in a forest, and can't see the unit, but he can see you.
- MP Note knowsAbout returns a viable result only if left-hand parameter unit is local.
-
- (January 15, 2007)
- In OFP v1.96, KnowsAbout return values range from 0 to 4.
- All units in a group have equal knowsAbout for any given target. All units in a group always return knowsAbout 4 about each other. This suggests groups share a single knowledge base.
- Without any contact with the target, the knowsAbout value decays at a linear rate so that it halves over 120 seconds. After this time is up knowsAbout drops instantly to 0.
- If the distance between the all of unit's group and the target exceeds the viewdistance setting, knowsAbout instantly drops to 0. This is not changed by fog or daylight.
- Note that in OFP unit see all the targets that his group members see. The data is processed between teammembers freely.
-
- the magic 'knowsAbout' number is 0.105. It's not that simple.Maybe true for infantry but not all vehicles. "Reveal" command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground. There's only one known way to pass through this - designate target with another fake infantry unit near the target. As soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked rom the air (of course if plane has suitable munition :))
-
- (July 05, 2009)
- In ArmA (other not tested), KnowsAbout value will stay at its highest value during approximately 2-3 min and then reinitialized.
-
- (January 14, 2012)
- Notes are for OA 1.60 :
- The KnowsAbout value drops immediately back to zero, if the distance between both units is larger than the local viewDistance value.
- After 110 seconds without (visible?) contact, the KnowsAbout value drops to zero again. While it seemed to take longer the higher the KnowsAbout value is (at least for a value of 4 it took almost six minutes at one point), I was unable to reproduce/confirm that. It is 110 seconds no matter how high the KnowsAbout value it seems.
-
- (June 13, 2012)
- By Suma ( source ):
- All friendly units within a view distance to each unit [are revealed (to the player? or each friendly?)] on the mission start. The code is half broken, as it does not make the units known, it only sets the "accuracy" value for them. Note: This is not affecting enemy units at all.
-
- (March 27, 2013)
- Arma-II OA (1.62.101.480 @ACE), tests with infantry:
- It is still true, that the command returns values between 0 (lowest) and 4 (most). Freshly Spotted units will have at least 1.5, slowly decreasing when the target disappeared.
- The following Table shows my test results on a clear day at Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect.
- 12:00, sunlight, clear sky
- Distance
- knowsAbout
- 1530
- 1.5
- 1370
- 1.5
- 1250
- 1.5
- 1135
- 1.5
- 1055
- 1.52
- 1022
- 1.64
- 990
- 1.74
- 833
- 2.5
- 720
- 3.37
- 600
- 3.81
- 505
- 3.86
- 400
- 3.92
- 380
- 4
- 365
- 4
- 21:00, bright half moon, clear sky
- Distance
- knowsAbout
- 285
- 1.5
- 120
- 1.5
- 88
- 1.89
- 75
- 2.3
- 61
- 3.9
- 23:00, pitch black, clear sky, NVG on
- Distance
- knowsAbout
- 600
- 1.5
- 487
- 1.5
- 390
- 1.5
- 289
- 2.22
- 278
- 2.4
+ (September 21, 2014)
+ Note that at a 0.99 value, the twilight is still quite dark.
+ Can be tested with :
+ $Code$//test
+ onEachFrame
+ {
+ systemchat format ["%1",sunOrMoon];
+ };$/Code$
- (May 31, 2014)
- Can also use SIDE in place of UNIT. For example:
- $Code$EAST knowsAbout player ;$/Code$
+ (May 18, 2017)
+ As of Arma 3 1.7, this returns either 1 for sun or 0 for moon. Nothing in between.
- Number - Number
+ Number
+
- landAt
+ forceWeaponFire
- Order an AI airplane to land at a given airport. ID is the number to identify which airport on the island you want. Since Arma 3 v1.68 it is possible to order a helicopter to land on designated helipad.
+ The unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given muzzle. The muzzle could belong to a vehicle weapon and unit in this case will be the unit operating this weapon. Doesnt't seem to work for units in FFV positions. Works on player. See also: BIS_fnc_fire
- https://community.bistudio.com/wiki/landAt
+ https://community.bistudio.com/wiki/forceWeaponFire
- Object landAt Number
-
- Object landAt Object
+ Object forceWeaponFire Array
- plane landAt id
-
- heli landAt helipad
+ unit forceWeaponFire [muzzle, firemode]
- $Code$_plane1 landAt 1;$/Code$
+ $Code$_unit forceWeaponFire ["arifle_MX_F", "Single"];
+ _unit forceWeaponFire ["hgun_ACPC2_F", "hgun_ACPC2_F"];
+ _unit forceWeaponFire ["HandGrenadeMuzzle","HandGrenadeMuzzle"];
+ _unit forceWeaponFire ["MiniGrenadeMuzzle","MiniGrenadeMuzzle"];
+ _unit forceWeaponFire ["HandGrenade_Stone","HandGrenade_Stone"];
+ _unit forceWeaponFire ["SmokeShellMuzzle","SmokeShellMuzzle"];
+ _unit forceWeaponFire ["ChemlightGreenMuzzle","ChemlightGreenMuzzle"];
+ _unit forceWeaponFire ["IRGrenade","IRGrenade"];
+ _unit forceWeaponFire ["Laserdesignator","Laserdesignator"];$/Code$
- $Code$_heli1 land "LAND";
- _heli1 landAt _helipad;$/Code$
+ $Code$gunner blackfoot forceWeaponFire ["gatling_20mm", "close"];$/Code$
local / global
- ARMA 3:
- Altis :
- 0 = Airbase
- 1 = AAC Airfield
- 2 = Krya Nera Airstrip
- 3 = Selakeno Airfield
- 4 = Molos Airfield
- 5 = Almyra Salt Lake Airstrip
- Posted 17:56, 21 September 2010 (CEST)
+ (August 25, 2013)
+ Here is a neat workaround trick for firemode change from a script:
+ $Code$_weapon = currentWeapon player ;
+ _ammo = player ammo _weapon;
+ player setAmmo [_weapon, 0];
+ player forceWeaponFire [_weapon, "FullAuto"];
+ player setAmmo [_weapon, _ammo];$/Code$
- ARMA 2 OA:
- Takistan :
- 0 = Airport NorthWest
- 1 = Airport SouthEast
- Planes approach all airports from South West
- ARMA 2:
- Utes :
- 0 = There is only one airport
- Chernarus :
- 0 = Airport NorthWest close to Grishno
- 1 = Airport NorthEast close to Kranostav
- 2 = Airport SouthWest close to Balota
- 3 = Nearest Airport
- Planes approach all airports from South East
- ARMA:
- Sahrani :
- 0: - Paraiso
- 1: - Rahmadi
- 2: - Pita
- 3: - Antigua
+ (April 14, 2014)
+ (A3 1.16) forceWeaponFire is no longer only limited to units, but can remote aircrafts weapon firing as well. Passed source unit should be the correct one who controls the weapon, if passed mode is "this", use the weapon name instead:
+ $Code$_weapon = ( weapons _veh) select 3;
+ _mode = ( getArray ( configFile "cfgweapons" _weapon "modes")) select 0;
+ if (_mode == "this") then {_mode = _weapon;};
+ ( driver _veh) forceWeaponFire [_weapon, _mode];
+ //Force a CAS fire a rocket.
+ $/Code$
+ Currently this command is not available for land vehicle remote fire.
- (November 8, 2014)
- In Arma 3 (1.34) landAt only works for fixed-wing aircraft. Rotary-wing craft ignore this command.
+ (September 02, 2014)
+ Similar to Killzone Kid's note, This fires the units current weapon in its current firemode.
+ $Code$_unit forceWeaponFire [ weaponState _unit select 1, weaponState _unit select 2];$/Code$
- (June 19, 2016)
- ARMA 3 : Tanoa
- 0 = Aeroport de Tanoa
- 1 = Tuvanaka Airbase
- 2 = Saint-George Airstrip
- 3 = Bala Airstrip
- 4 = La Rochelle Aerodome
- ARMA 3 : Stratis
- 0 = Stratis Airbase
+ (January 3, 2015)
+ fireAtTarget command can be used to force fire gunner weapon in vehicles. A gunner must be present. $Code$_veh fireAtTarget [ objNull ];$/Code$ Will fire one shot even if player is gunner.
+ fire command can also be used to fire vehicle weapon, like smoke launcher for example: $Code$ vehicle player fire "SmokeLauncher";$/Code$ And if this doesn't work, it is possible to force fire via action $Code$tank action ["UseWeapon", tank, commander tank, 0];$/Code$
- Nothing - Nothing
+ Nothing
+
- landResult
+ ctrlRemoveEventHandler
- Return the result of helicopter landing position searching (performed, after land command). The value can be "Found" (position found),"NotFound" (position not found), "NotReady" (position searching is,still in progress) or empty string when wrong argument given.
+ Remove a given event handler from the given control.
- https://community.bistudio.com/wiki/landResult
+ https://community.bistudio.com/wiki/ctrlRemoveEventHandler
- landResult Object
+ Control ctrlRemoveEventHandler Array
- landResult helicopter
+ control ctrlRemoveEventHandler [handler name,id]
-
+ $Code$_map ctrlRemoveEventHandler ["Draw", _id];$/Code$
+
undefined / undefined
- String
+ Nothing
+
- land
+ shownWarrant
- Force helicopter landing. Landing mode may be:
- "LAND" (complete stop)
- "GET IN" (hovering very low, for another unit to get in)
- "GET OUT" (hovering low,for another unit to get out)
- "NONE" (cancel a landing) Available since ArmA 2 57463 build.
+ Check if player has ID card enabled. Obsolete command.
- https://community.bistudio.com/wiki/land
+ https://community.bistudio.com/wiki/shownWarrant
- Object land String
+ shownWarrant
- helicopter land mode
+ shownWarrant
- $Code$_cobraOne land "LAND"$/Code$
-
+
- local / global
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in ArmA).
-
- To make a helicopter LAND correctly and not hovering over the landing position use unitReady to check if the helicopter already has reached his destination.
- You can fix a landing bug by using a short delay bevore checking the unitReady command.
- _helicopter move (getPos _destination);
- sleep 3;
- while { ( (alive _helicopter) && !(unitReady _helicopter) ) } do
- {
- sleep 1;
- };
- if (alive _helicopter) then
- {
- _helicopter land "LAND";
- };
- Nothing
+ Boolean
+
- language
+ moveTime
- Returns current game language.
+ Returns the current time of the most important RTM animation currently being played on the soldier.
- https://community.bistudio.com/wiki/language
+ https://community.bistudio.com/wiki/moveTime
- language
+ moveTime Object
- language
+ moveTime soldier
-
+ $Code$moveTime player ;$/Code$
+
undefined / undefined
- String
+ Number
+
- laserTarget
+ missionStart
- Returns laser target object created by given unit (gunner in vehicle or on foot) when using "Laserdesignator" or another laser targeting device. Laser target object is global and can be retrieved from any PC.
+ Returns date and time when mission started in format [year, month, day, hour, minute, second].
+ Works only in multiplayer, in singleplayer all values are equal to zero → [0,0,0,0,0,0]
+ NOTE : Because missionStart contains the time of the actual start of the mission, it might not be available in pre-init or init, but is guaranteed to be available in post-init when time 0.
- https://community.bistudio.com/wiki/laserTarget
+ https://community.bistudio.com/wiki/missionStart
- laserTarget Object
+ missionStart
- laserTarget unitName
+ missionStart
- $Code$_target = laserTarget gunner heli;$/Code$
+ $Code$setDate ( missionStart select [0,5]);$/Code$
- $Code$_designatedPos = position laserTarget player;$/Code$
+ $Code$// Set real date:
+ //postInit = 1;
+ if ( isServer ) then {
+ waitUntil { time 0};
+ setDate ( missionStart select [0,5]);
+ };$/Code$
- global / undefined
+ undefined / undefined
- (December 15, 2010)
- Need to be try with a soldier and laser designator
+ (September 25, 2014)
+ Returns array with date indicating when the mission has started (after briefing screen). In OFP this command is bugged – it works only in multiplayer on a player‐hosted machine and on a client. In single player it would return [0,0,0,0,0,0] and on a dedicated server – [1970,1,1,0,0,0]. In CWA this command is fixed.
- (December 19, 2010)
- Works with either infantry or vehicles. Returns objNull if no target is present
+ (December 30, 2014)
+ In arma 3 this command returns [0,0,0,0,0,0] in SP, [1970,1,1,0,0,0] on dedicated server and [1970,1,1,0,0,0] initially and then server real time on local headless client. On player clients it shows client's local date and time. Since Arma 3 v1.49 the dedicated server also returns correct mission start date.
+
+ (August 27, 2015)
+ ArmA 3 1.50: This command now returns the correct values on dedicated server.
- Object
+ Array
+
- lbAdd
+ disableMapIndicators
- Adds an item with the given text to the listbox or combobox with id idc of the topmost user dialog.
- It returns the index of the newly added item.
+ Command allows suppressing visualization of FRIENDLY, ENEMY, MINES and/or PING map indicators from difficulty setting EXTENDED MAP CONTENT.
- https://community.bistudio.com/wiki/lbAdd
+ https://community.bistudio.com/wiki/disableMapIndicators
- lbAdd Array
-
- Control lbAdd String
+ disableMapIndicators Array
- lbAdd [idc, text]
-
- control lbAdd text
+ disableMapIndicators [disableFriendly,disableEnemy,disableMines,disablePing]
- $Code$_index = lbAdd [101, "First item"];$/Code$
-
- $Code$_index = _control lbAdd "First item";$/Code$
+ $Code$// Disable visualization of friendly and enemy units:
+ disableMapIndicators [true,true,false,false];$/Code$
- local / local
+ undefined / local
- More information on the LB command family can be found here
-
- (April 12, 2015)
- This command can be very very frustrating to use because it does not output any errors if unable to function.
- Often, the 2nd provided syntax needs to be used like this:
- $Code$_giveYourControlAname = (findDisplay 7) displayCtrl 9;
- _addThisToListBox = "Option";
- _giveYourControlAname lbAdd _addThisToListBox;$/Code$
- Where "7" is the "idd" of the dialog you made in your ".hpp" file and where "9" is the "idc" of the RscListBox or RscComboBox.
- The code above will add an option named "Option" to the ListBox or ComboBox.
- Number - Number
+ Nothing
+
- lbClear
+ sideRadio
- Clear all items in listbox or combobox with id idc of topmost user dialog.
+ Sends the audio message to the side radio channel. Must have assigned "ItemRadio" to send or receive the transmission. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+ Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
- https://community.bistudio.com/wiki/lbClear
+ https://community.bistudio.com/wiki/sideRadio
- lbClear Number
+ Object sideRadio String
- lbClear Control
+ Array sideRadio String
- lbClear idc
+ unit sideRadio radioName
- lbClear control
+ [side, identity] sideRadio radioName
- $Code$lbClear 101;$/Code$
+ $Code$_soldierOne sideRadio "messageOne";$/Code$
- $Code$lbClear _ctrl;$/Code$
+ $Code$player sideRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
+
+ $Code$[ west, "Base"] sideRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
- local / local
+ global / local
- More information on the LB command family can be found here
+ (03:47, 12 February 2007)
+ In OFP v1.96, sideRadio messages can be sent from 2 abstract sources: "Papa_Bear" and "Base FireFly". Use sideRadio on an array in the form [SIDE,"base"],[SIDE,"HQ"],[SIDE,"Papa_bear"] or [SIDE,"airbase"], where SIDE is the side broadcasting. "HQ", "base" and "Papa_bear" seem to be the same object. The callsign strings can be re-defined using a stringTable.csv file, using STR_CFG_PAPABEAR and STR_CFG_FIREFLYBASE. Example : [EAST,"base"] sideRadio "returnToBase".
+
+ (December 3, 2016)
+ To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
+ $Code$ player sideRadio "#MySound.ogg";$/Code$
- Nothing - Nothing
+ Nothing - Nothing
+
- lbColor
+ vehicleReportRemoteTargets
- Returns the text color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- The color is returned in format Color.
+ Gets whether the vehicle shares acquired targets via datalink with the Side center.
- https://community.bistudio.com/wiki/lbColor
+ https://community.bistudio.com/wiki/vehicleReportRemoteTargets
- lbColor Array
-
- Control lbColor Number
+ vehicleReportRemoteTargets Object
- lbColor [idc, index]
-
- control lbColor index
+ vehicleReportRemoteTargets vehicle
- $Code$_colour = lbColor [101, 0];$/Code$
-
- $Code$_color = _control lbColor 0;$/Code$
+ $Code$vehicleReportRemoteTargets ( vehicle player );$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
- Array - Array
+ Boolean
+
- lbCurSel
+ deleteVehicle
- Returns the index of the selected item of the listbox or combobox with id idc of the topmost user dialog. For listbox LB_MULTI (multi-selection) use lbSelection.
+ Deletes an object. Only units inserted in the mission editor and units created during the game's progress can be deleted by this command. Island objects and player units cannot be removed. Deleting a vehicle, which is still being accessed by a running script, can result in a CTD.
+ NOTE : Actual object deletion, when object becomes objNull, happens on the next frame after command execution, but there are some object modifications that happen immediately. For example if the object is unit in a group, it immediately becomes groupless isNull group _unit; //true
- https://community.bistudio.com/wiki/lbCurSel
+ https://community.bistudio.com/wiki/deleteVehicle
- lbCurSel Number
-
- lbCurSel Control
+ deleteVehicle Object
- lbCurSel idc
-
- lbCurSel control
+ deleteVehicle object
- $Code$_index = lbCurSel 101;$/Code$
+ $Code$deleteVehicle _house1;$/Code$
- $Code$lbCurSel _ctrl;$/Code$
+ $Code${
+ _x action ["Eject", car];
+ } forEach crew car;
+ deleteVehicle car;$/Code$
+
+ $Code$// Objects such as
+ //test_EmptyObjectForBubbles
+ //test_EmptyObjectForFireBig
+ //test_EmptyObjectForSmoke
+ //create additional emitters that needs to be deleted first before deleting the object itself:
+ ///--- function to delete test object (MP compatible)
+ fnc_deleteTestObj = {
+ _this addMPEventHandler ["MPKilled", {
+ _this = _this select 0;
+ {
+ deleteVehicle _x;
+ } forEach (_this getVariable ["effects", []]);
+ if ( isServer ) then {
+ deleteVehicle _this;
+ };
+ }];
+ _this setDamage 1;
+ };
+ ///--- example
+ [] spawn {
+ _fire = "test_EmptyObjectForFireBig" createVehicle position player ;
+ sleep 5;
+ _fire call fnc_deleteTestObj;
+ };$/Code$
- undefined / undefined
+ global / global
- More information on the LB command family can be found here
-
- (July 11, 2014)
- If nothing is selected this command returns -1
- Number - Number
+ Nothing
+
- lbData
+ shownCuratorCompass
- Returns the additional text (invisible) in an item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ Returns true if compass is shown.
- https://community.bistudio.com/wiki/lbData
+ https://community.bistudio.com/wiki/shownCuratorCompass
- lbData Array
-
- Control lbData Number
+ shownCuratorCompass
- lbData [idc, index]
-
- control lbData index
+ shownCuratorCompass
- $Code$_data = lbData [101, 0];$/Code$
-
- $Code$_data = _control lbData 0;$/Code$
-
+
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
- String - String
+ Boolean
+
- lbDelete
+ allCurators
- Removes the item with the given index from the listbox or combobox with id idc of the topmost user dialog.
+ Returns list of all curators.
- https://community.bistudio.com/wiki/lbDelete
+ https://community.bistudio.com/wiki/allCurators
- lbDelete Array
-
- Control lbDelete Number
+ allCurators
- lbDelete [idc, index]
-
- control lbDelete index
+ allCurators
- $Code$lbDelete [101, 0];$/Code$
-
- $Code$_control lbDelete 0;$/Code$
+ $Code$_myVariable = allCurators;$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
+ (June 20, 2015)
+ This returns all curator logic units, not the units assigned to the logic.
- Nothing - Nothing
+ Array
+
- lbIsSelected
+ suppressFor
- Check whether given row of the given listbox is selected.
+ Force suppressive fire from the unit.
- https://community.bistudio.com/wiki/lbIsSelected
+ https://community.bistudio.com/wiki/suppressFor
- Control lbIsSelected Number
+ Object suppressFor Number
- control lbIsSelected index
+ unit suppressFor duration
- $Code$_selected = _control lbIsSelected 0;$/Code$
+ $Code$_soldier1 suppressFor 10
+ // Will force soldier1 to do suppressive fire to known enemies during 10 seconds$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
- Boolean
+ Nothing
+
- lbPicture
+ isFlashlightOn
- Returns the picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ Returns true if there is a linked and enabled flashlight on a given weapon.
- https://community.bistudio.com/wiki/lbPicture
+ https://community.bistudio.com/wiki/isFlashlightOn
- lbPicture Array
-
- Control lbPicture Number
+ Object isFlashlightOn String
- lbPicture [idc, index]
-
- control lbPicture index
+ unit isFlashlightOn weapon
- $Code$_picture = lbPicture [101, 0];$/Code$
-
- $Code$_picture = _control lbPicture 0;$/Code$
+ $Code$player isFlashlightOn ( currentWeapon player );$/Code$
undefined / undefined
- More information on the LB command family can be found here
- String - String
+ Boolean
+
- lbSelection
+ showHUD
- Returns Array of selected rows indices in the given listbox of style LB_MULTI (multi-selection). For single selection listbox use lbCurSel instead.
+ Enable / disable showing of HUD. Defines visibility of weapon crosshair and any informational tags that appear when pointing the weapon at an object as well as availability of the default action menu. Unfortunately, it also hides icons drawn with drawIcon3D.
+ Appearance of HUD can also be controlled with showHUD param in description.ext. NOTE: As of Arma 3 v1.49.131879 there is a showHUD[] array param, that is identical in format to the extended showHUD command. When showHUD[] array param is present in description.ext, it will disable showHUD command entirely, allowing mission makers to permanently alter visibility of some HUD elements.
- https://community.bistudio.com/wiki/lbSelection
+ https://community.bistudio.com/wiki/showHUD
- lbSelection Control
+ showHUD Boolean
+
+ showHUD Array
- lbSelection control
+ showHUD enable
+
+ showHUD [hud, info, radar, compass, direction, menu, group, cursors, panels]
- $Code$_indices = lbSelection _control;$/Code$
+ $Code$showHUD false ;$/Code$
+
+ $Code$// Hide vehicle radar and compass:
+ showHUD [ true, true, false, false, true, true, true, true ];$/Code$
+
+ $Code$// Check if HUD visibility is hardcoded in mission config and showHUD command is overriden:
+ _disabledShowHUD = isArray ( missionConfigFile "showHUD");$/Code$
- undefined / undefined
+ undefined / local
- (April 10, 2016)
- This command works fine with listboxs of style LB_MULTI and should not be marked as obsolete as lbCurSel does not provide the same functionality.
+ (August 17, 2015)
+ Last param, "cursors" controls visibility of the action menu as well as weapon cursors. However if 1st param "hud" hides and disables action menu, last param "cursors" only hides it. So you get invisible action menu that is fully operational. inGameUISetEventHandler will still fire on interaction, giving the information about selected item on the action menu even if you cannot see it. Unfortunately it also hides icons drawn with drawIcon3D.
- Array
+ Nothing - Nothing
+
- lbSetColor
+ showCompass
- Sets the color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
- Colour is in format Color.
+ Shows or hides the compass on the map screen, if enabled for the mission and you possess the item. (default true )
- https://community.bistudio.com/wiki/lbSetColor
+ https://community.bistudio.com/wiki/showCompass
- lbSetColor Array
-
- Control lbSetColor Array
+ showCompass Boolean
- lbSetColor [idc, index, color]
-
- control lbSetColor [index, color]
+ showCompass show
- $Code$lbSetColor [101, 0, [0, 1, 0, 0.5]];$/Code$
-
- $Code$_control lbSetColor [0, [0, 1, 0, 0.5]];$/Code$
+ $Code$showCompass false ;$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
+ (16 Aug, 2009)
+ In Arma 2, the Compass is now an inventory item. Class path is CfgWeapons- ItemCompass. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon "ItemCompass")
- Nothing - Nothing
+ Nothing
+
- lbSetCurSel
+ setFeatureType
- Selects the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
- To deselect all, use -1: _ctrl lbSetCurSel -1; For listbox of style LB_MULTI use lbSetSelected instead.
+ Enable/disable object as a feature/landmark. Possible feature types:
+ 0 - Feature disabled
+ 1 - Object is always visible within object view distance
+ 2 - Object is always visible within terrain view distance
+ The limit is 500 map/static objects and 200 dynamic objects including config features and auto features (flying helicopters, airplanes). When limit is reached, function returns false.
- https://community.bistudio.com/wiki/lbSetCurSel
+ https://community.bistudio.com/wiki/setFeatureType
- lbSetCurSel Array
-
- Control lbSetCurSel Number
+ Object setFeatureType Number
- lbSetCurSel [idc, index]
-
- control lbSetCurSel index
+ object setFeatureType type
- $Code$lbSetCurSel [101, 0];$/Code$
-
- $Code$_control lbSetCurSel 0;$/Code$
+ $Code$// Set a building to be always rendered:
+ building setFeatureType 2;$/Code$
- undefined / undefined
+ global / local
- More information on the LB command family can be found here
-
- (November 29, 2014)
- lbSetCurSel -1 has no effect while the listbox is populated. You should use lbClear first, then lbSetCurSel -1, then re-populate the listbox.
-
- (March 1, 2015)
- Keep in mind that running this command against control will fire attached 'onLBSelChanged' event handler.
+ (October 10, 2017)
+ For world objects, command effect persists after mission restart. Map must be reloaded to automatically revert setting.
- Nothing - Nothing
+ Boolean
+
- lbSetData
+ setFace
- Sets the additional text (invisible) in the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given data.
+ Set person's face. For a list of available faces, check Category:CfgIdentities.
- https://community.bistudio.com/wiki/lbSetData
+ https://community.bistudio.com/wiki/setFace
- lbSetData Array
-
- Control lbSetData Array
+ Object setFace String
- lbSetData [idc, index, data]
-
- control lbSetData [index, data]
+ person setFace face
- $Code$lbSetData [101, 1, "#1"];$/Code$
+ $Code$soldier1 setFace "WhiteHead_02"$/Code$
- $Code$_control lbSetData [1, "#1"];$/Code$
+ $Code$// Set persistent face for a unit in MP
+ if ( isServer ) then {[_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit]};$/Code$
- undefined / undefined
+ global / local
- More information on the LB command family can be found here
+ (September 19, 2013)
+ For ArmA 3 face can be any of the following:
+ AfricanHead_01
+ AfricanHead_02
+ AfricanHead_03
+ AsianHead_A3_01
+ AsianHead_A3_02
+ AsianHead_A3_03
+ GreekHead_A3_01
+ GreekHead_A3_02
+ GreekHead_A3_03
+ GreekHead_A3_04
+ GreekHead_A3_05
+ GreekHead_A3_06
+ GreekHead_A3_07
+ GreekHead_A3_08
+ GreekHead_A3_09
+ PersianHead_A3_01
+ PersianHead_A3_02
+ PersianHead_A3_03
+ NATOHead_01
+ WhiteHead_02
+ WhiteHead_03
+ WhiteHead_04
+ WhiteHead_05
+ WhiteHead_06
+ WhiteHead_07
+ WhiteHead_08
+ WhiteHead_09
+ WhiteHead_10
+ WhiteHead_11
+ WhiteHead_12
+ WhiteHead_13
+ WhiteHead_14
+ WhiteHead_15
+
+ (unknown)
+ For ArmA 2 the face value is a string from Face01 to Face107. Camo faces are available as well, 6 per face. For example the full set of class names for face value 77 would be:
+ Face77, Face77_camo1, Face77_camo2, Face77_camo3, Face77_camo4, Face77_camo5 and Face77_camo6
+ All Armed Assault 1.08 faces plus tutorial,
+ Online gallery of 1.08 Armed Assault faces
+ a full list of Arma 2 faces
- Nothing - Nothing
+ Nothing
+
- lbSetPictureColorDisabled
+ resources
- Sets the disabled color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Returns the resources of a team member. Results are local to the PC on which command was executed.
- https://community.bistudio.com/wiki/lbSetPictureColorDisabled
+ https://community.bistudio.com/wiki/resources
- lbSetPictureColorDisabled Array
-
- Control lbSetPictureColorDisabled Array
+ resources Team_Member
- lbSetPictureColorDisabled [idc, index, color]
-
- control lbSetPictureColorDisabled [index, color]
+ resources member
- $Code$lbSetPictureColorDisabled [101, 0, [1, 1, 1, 0.25]];$/Code$
-
- $Code$_ctrl lbSetPictureColorDisabled [0, [1, 1, 1, 0.25]];$/Code$
-
+
- undefined / undefined
+ global / local
- More information on the LB command family can be found here
- Nothing - Nothing
+ Array
+
- lbSetPictureColorSelected
+ windDir
- Sets the selected color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Returns the current wind azimuth.
- https://community.bistudio.com/wiki/lbSetPictureColorSelected
+ https://community.bistudio.com/wiki/windDir
- lbSetPictureColorSelected Array
-
- Control lbSetPictureColorSelected Array
+ windDir
- lbSetPictureColorSelected [idc, index, color]
-
- control lbSetPictureColorSelected [index, color]
+ windDir
- $Code$lbSetPictureColorSelected [101, 0, [0, 1, 0, 0.5]];$/Code$
-
- $Code$_ctrl lbSetPictureColorSelected [0, [1, 1, 1, 1]];$/Code$
+ $Code$if ( windDir 45 || windDir 315) then {
+ hint "I feel a northern wind";
+ };$/Code$
undefined / undefined
- More information on the LB command family can be found here
- Nothing - Nothing
+ Number
+
- lbSetPictureColor
+ locationPosition
- Sets the color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Returns the position of a location. If the location is attached to an object, that object's position is returned.
- https://community.bistudio.com/wiki/lbSetPictureColor
+ https://community.bistudio.com/wiki/locationPosition
- lbSetPictureColor Array
-
- Control lbSetPictureColor Array
+ locationPosition Location
- lbSetPictureColor [idc, index, color]
-
- control lbSetPictureColor [index, color]
+ locationPosition location
- $Code$lbSetPictureColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+ $Code$_locationPos = locationPosition myLocation;$/Code$
- $Code$_ctrl lbSetPictureColor [0, [1, 1, 1, 1]];$/Code$
-
+ $Code$_location = nearestLocation [ getPos player, "nameCity"];
+ _locationPos = locationPosition _location;$/Code$
+
undefined / undefined
- More information on the LB command family can be found here
-
- (August 18, 2015)
- (ArmA 3 1.48) To give an image on the right side of a listbox item:
- $Code$_ctrl lbSetPictureRightColor [_index, [1,1,1,0.7]];$/Code$
+ (October 24, 2015)
+ locationPosition returns a position that is altitude zero ASL.
- Nothing - Nothing
+ Array
+
- lbSetPictureRightColorDisabled
+ closeDialog
- Sets the disabled color of second (right aligned) picture of the item with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Close the currently active user dialog with exit code. Most common exit codes are:
+ $Code$#define IDC_OK 1 //emulate "Ok" button$/Code$
+ $Code$#define IDC_CANCEL 2 //emulate "Cancel" button$/Code$
- https://community.bistudio.com/wiki/lbSetPictureRightColorDisabled
+ https://community.bistudio.com/wiki/closeDialog
- lbSetPictureRightColorDisabled Array
-
- Control lbSetPictureRightColorDisabled Array
+ closeDialog Number
- lbSetPictureRightColorDisabled [idc, index, color]
-
- control lbSetPictureRightColorDisabled [index, color]
+ closeDialog exitcode
- $Code$lbSetPictureRightColorDisabled [101, 0, [1, 1, 1, 0.25]];$/Code$
+ $Code$closeDialog 2;$/Code$
- $Code$_ctrl lbSetPictureRightColorDisabled [0, [1, 1, 1, 0.25]];$/Code$
+ $Code$#define IDC_CANCEL 2
+ closeDialog IDC_CANCEL;$/Code$
- undefined / undefined
+ local / local
- More information on the LB command family can be found here
- Nothing - Nothing
+ Nothing
+
- lbSetPictureRightColorSelected
+ lockedCargo
- Sets the selected color of the second (right aligned) picture of the item with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Check whether cargo position of the vehicle is locked.
- https://community.bistudio.com/wiki/lbSetPictureRightColorSelected
+ https://community.bistudio.com/wiki/lockedCargo
- lbSetPictureRightColorSelected Array
-
- Control lbSetPictureRightColorSelected Array
+ Object lockedCargo Number
- lbSetPictureRightColorSelected [idc, index, color]
-
- control lbSetPictureRightColorSelected [index, color]
+ vehicle lockedCargo cargoIndex
- $Code$lbSetPictureRightColorSelected [101, 0, [0, 1, 0, 0.5]];$/Code$
-
- $Code$_ctrl lbSetPictureRightColorSelected [0, [1, 1, 1, 1]];$/Code$
+ $Code$_result = vehicleName lockedCargo 0;$/Code$
undefined / undefined
- More information on the LB command family can be found here
+ (May 4, 2016)
+ For some vehicles, the command returns nothing if the cargo index is invalid (i.e. -1)
- Nothing - Nothing
+ Boolean
+
- lbSetPictureRightColor
+ verifySignature
- Sets the color of the second (right aligned) picture of the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color. Color which consists from only zeros means disable this override.
+ Check if file is signed by any key present in game keys folders. Note: On client, it does not check against the keys accepted by server.
- https://community.bistudio.com/wiki/lbSetPictureRightColor
+ https://community.bistudio.com/wiki/verifySignature
- lbSetPictureRightColor Array
-
- Control lbSetPictureRightColor Array
+ verifySignature String
- lbSetPictureRightColor [idc, index, color]
-
- control lbSetPictureRightColor [index, color]
+ verifySignature filename
- $Code$lbSetPictureRightColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+ $Code$verifySignature "@MyAddon\Addons\SomeAddon.pbo";$/Code$
- $Code$_ctrl lbSetPictureRightColor [0, [1, 1, 1, 1]];$/Code$
+ $Code$verifySignature "@MyAddon\Somefnc.dll";$/Code$
undefined / undefined
- More information on the LB command family can be found here
- Nothing - Nothing
+ Boolean
+
- lbSetPictureRight
+ round
- Sets the second (right aligned) picture in the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Name is the picture name. The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).
- In Arma 3 it might be necessary to set the color of the picture as well with lbSetPictureRightColor as default [0,0,0,0] color makes picture invisible.
+ Rounds up or down to the closest integer.
- https://community.bistudio.com/wiki/lbSetPictureRight
+ https://community.bistudio.com/wiki/round
- lbSetPictureRight Array
-
- Control lbSetPictureRight Array
+ round Number
- lbSetPictureRight [idc, index, name]
-
- control lbSetPictureRight [index, name]
+ round x
- $Code$lbSetPictureRight [101, 0, "iskoda"];$/Code$
+ $Code$_val= round 5.25, result is 5$/Code$
- $Code$_control lbSetPictureRight [0, "iskoda"];$/Code$
+ $Code$_val= round 5.55, result is 6$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
+ (February 23, 2018)
+ If you want to round to a specific place past the decimal point, use toFixed and parseNumber together. For example:
+ $Code$ parseNumber (3.16666 toFixed 1); // 3.2$/Code$
+
+ (April 3, 2018)
+ Before toFixed ( round (( getDir player ) * 100)) / 100
- Nothing - Nothing
+ Number
+
- lbSetPicture
+ createSimpleObject
- Sets the picture in the item (left) with the given index of the listbox or combobox with id idc of the topmost user dialog. Name is the picture name. The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).
- In Arma 3 it might be necessary to set the color of the picture as well with lbSetPictureColor as default [0,0,0,0] color makes picture invisible.
+ Create object with given shape defined as path to.p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI pathfinding (causes walking through walls), and built in lights.
+ Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: createSimpleObject/objects
+ Guide: Arma 3 Simple Objects
+ One cannot attach actions to a simple object via addAction.
+ NOTES :
+ Objects created with Syntax 1 cannot be textured. Some objects may also have inverted default direction.
+ Objects created with Syntax 2 can be textured. The default direction should match the direction of the object if it was created with createVehicle.
+ Since Arma 3 v1.67 simple objects support setVariable and getVariable
- https://community.bistudio.com/wiki/lbSetPicture
+ https://community.bistudio.com/wiki/createSimpleObject
- lbSetPicture Array
-
- Control lbSetPicture Array
+ createSimpleObject Array
- lbSetPicture [idc, index, name]
+ createSimpleObject [shapeName, positionWorld]
- control lbSetPicture [index, name]
+ createSimpleObject [className, positionASL]
- $Code$lbSetPicture [101, 0, "iskoda"];$/Code$
+ $Code$_pos = player getRelPos [10, 0];
+ _tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
+ _tank setPos (_pos vectorAdd ( getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));
+ _tank hideSelection ["zasleh", true ];
+ _tank hideSelection ["zasleh2", true ];
+ _tank hideSelection ["clan", true ];
+ _tank animate ["Wheel_podkoloL3", 0.5, true ];
+ _tank animate ["Wheel_podkoloL6", 0.5, true ];$/Code$
- $Code$_control lbSetPicture [0, "iskoda"];$/Code$
+ $Code$_pos = player getRelPos [10, 0];
+ _tank = createSimpleObject ["B_APC_Tracked_01_CRV_F", AGLtoASL _pos];
+ _tank setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,0.01)"];
+ _tank hideSelection ["zasleh", true ];
+ _tank hideSelection ["zasleh2", true ];
+ _tank hideSelection ["clan", true ];
+ _tank animate ["Wheel_podkoloL3", 0.5, true ];
+ _tank animate ["Wheel_podkoloL6", 0.5, true ];$/Code$
- local / local
+ undefined / global
- More information on the LB command family can be found here
+ (April 18, 2016)
+ The easiest way to correctly place simple object is to create normal object of the same shape from class (if possible), then copy getPosWorld, vectorDir and vectorUp from it. Then create the simple object and apply copied values to it, this will position simple object exactly as normal object was positioned:
+ $Code$_heli = "B_Heli_Light_01_F" createVehicleLocal ( player getRelPos [10, 0]);
+ _position = getPosWorld _heli;
+ _vectorDirUp = [ vectorDir _heli, vectorUp _heli];
+ _model = getModelInfo _heli select 1;
+ deleteVehicle _heli;
+ _simpleHeli = createSimpleObject [_model, _position];
+ _simpleHeli setVectorDirAndUp _vectorDirUp;$/Code$
- (August 18, 2015)
- (ArmA 3) To place an image on the right end of the listItem: $Code$_ctrl lbSetPictureRight [_index, "A3\path\to\image.paa"];$/Code$
+ (April 28, 2016)
+ Models from within the mission file/folder can be created, but full system path is needed. Use:
+ $Code$( str missionConfigFile select [0, count str missionConfigFile - 15]) + "myModel.p3d"
+ //mission folder path code from: http://killzonekid.com/arma-scripting-tutorials-mission-root/ $/Code$
+
+ (May 11, 2016)
+ simulationEnabled returns false.
+
+ (September 5, 2016)
+ There is a section in function library dedicated to simple object creation and interaction. It's purpose is to simplify the operations:
+ BIS_fnc_createSimpleObject
+ creates simple object according to the supplied data
+ you can supply p3d path, class name or data you get from scanning a non-simple object
+ BIS_fnc_simpleObjectData
+ gathers and returns data about the non-simple object
+ data can be then used to create simple object
+ BIS_fnc_replaceWithSimpleObject
+ replaces non-simple object with simple object on the scene
+ do not use it in large scale in MP missions as it is not network efficient
+ BIS_fnc_adjustSimpleObject
+ adjusts simple object to looks as close to the non-simple object as possible
+ function is internally called from the 'bis_fnc_createSimpleObject', you won't probably need to call this function directly
+ Check the function headers for more info about the input parameters and possibilities.
- Nothing - Nothing
+ Object
+
- lbSetSelectColorRight
+ queryWeaponPool
- Sets the select color of the of the secondary text (right aligned) of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
- Colour is in format Color.
+ Return number of weapons of type name in weapon pool (used in campaign to transfer weapons into next mission).
- https://community.bistudio.com/wiki/lbSetSelectColorRight
+ https://community.bistudio.com/wiki/queryWeaponPool
- lbSetSelectColorRight Array
-
- Control lbSetSelectColorRight Array
+ queryWeaponPool String
- lbSetSelectColorRight [idc, index, color]
-
- control lbSetSelectColorRight [index, color]
+ queryWeaponPool name
- $Code$lbSetSelectColorRight [101, 0, [0, 1, 0, 0.5]];$/Code$
-
- $Code$_control lbSetSelectColorRight [0, [0, 1, 0, 0.5]];$/Code$
+ $Code$_num=queryWeaponPool "M16"$/Code$
undefined / undefined
- More information on the LB command family can be found here
- Nothing - Nothing
+ Number
+
- lbSetSelectColor
+ detach
- Sets the select color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
- Colour is in format Color.
+ Detaches previously attached with attachTo object.
- https://community.bistudio.com/wiki/lbSetSelectColor
+ https://community.bistudio.com/wiki/detach
- lbSetSelectColor Array
-
- Control lbSetSelectColor Array
+ detach Object
- lbSetSelectColor [idc, index, color]
-
- control lbSetSelectColor [index, color]
+ detach object
- $Code$lbSetSelectColor [101, 0, [0, 1, 0, 0.5]];$/Code$
-
- $Code$_control lbSetSelectColor [0, [0, 1, 0, 0.5]];$/Code$
+ $Code$obj1 attachTo [player];
+ detach obj1;$/Code$
- undefined / undefined
+ global / global
- More information on the LB command family can be found here
- Nothing - Nothing
+ Nothing
+
- lbSetSelected
+ fleeing
- Set the selection state of the given row of the given listbox of style LB_MULTI. For single selection listbox use lbSetCurSel instead.
+ Checks if a unit is fleeing.
- https://community.bistudio.com/wiki/lbSetSelected
+ https://community.bistudio.com/wiki/fleeing
- Control lbSetSelected Array
+ fleeing Object
- control lbSetSelected [index, selected]
+ fleeing unitName
- $Code$_control lbSetSelected [0, true ];$/Code$
+ $Code$? (fleeing _east_unit) : player sideChat "We have won!"$/Code$
- undefined / undefined
+ global / undefined
- (April 10, 2016)
- This command works fine with listboxs of style LB_MULTI and should not be marked as obsolete as lbSetCurSel does not provide the same functionality.
- Nothing
+ Boolean
+
- lbSetTooltip
+ tvSortByValue
- Sets tooltip for item with given index of the listbox or combobox with id idc of the topmost user dialog to the given data.
+ Sorts children of given item by tvValue from highest to lowest by default. IDC means id of parent Tree View.
- https://community.bistudio.com/wiki/lbSetTooltip
+ https://community.bistudio.com/wiki/tvSortByValue
- lbSetTooltip Array
+ Control tvSortByValue Array
- Control lbSetTooltip Array
+ tvSortByValue Array
- lbSetTooltip [idc, index, tooltip]
+ control tvSortByValue [path, reversed]
- control lbSetTooltip [index, tooltip]
+ tvSortByValue [idc, path, reversed]
- $Code$lbSetTooltip [101, 1, "tooltip"];$/Code$
+ $Code$control tvSortByValue [[0], false ];$/Code$
- $Code$_control lbSetTooltip [0, "another tooltip"];$/Code$
+ $Code$tvSortByValue [102, [0], false ];$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
-
- (August 9, 2017)
- [ ArmA 3 v1.75.142535 ] if you want to put linebreaks into a tooltip, use this method:
- $Code$format [ "%1,%2%3", "hi", parseText "\n", "my name is Will" ]$/Code$
- Nothing - Nothing
+ Nothing - Nothing
+
- lbSetValue
+ doStop
- Sets the additional integer value in the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given value.
+ Order the given unit(s) to stop (without radio messages). The units stopped in this way will leave the groups formation. It will prevent them from moving around with their group (or formation leader), while still being able to turn around and even move to a new position if they see fit. The units will still respond to orders from their group leader (like engage, rearm, board a vehicle), but all of their actions will be separate from the group formation. To resume group default behaviour, use doFollow command. For example: units _group doFollow leader _group;
- https://community.bistudio.com/wiki/lbSetValue
+ https://community.bistudio.com/wiki/doStop
- lbSetValue Array
-
- Control lbSetValue Array
+ doStop Object/Array
- lbSetValue [idc, index, value]
-
- control lbSetValue [index, value]
+ doStop unit
- $Code$lbSetValue [101, 0, 1];$/Code$
+ $Code$doStop _soldier1;$/Code$
- $Code$_control lbSetValue [0, 1];$/Code$
+ $Code$doStop [_soldier1, _soldier2];$/Code$
+
+ $Code$doStop ( units player );$/Code$
- undefined / undefined
+ global / global
- More information on the LB command family can be found here
+ (August 3, 2006)
+ Notes from before the conversion:
+ This command will make the unit stop where he is until the unit's group engages the enemy. At that time, the unit will move and fight the enemy. One good use for this is to place a bunch of units in the same group around a campfire or in some other place "for looks", and make them sit down or have their weapon on their back. When the enemy is spotted, they will get up and attack. Note that you cannot do something like place somebody behind sandbags and keep him there during a fight with this command. For that you will need disableAI "move".
- (September 21, 2014)
- lbSetValue only accepts integer, no decimal number.
- Example:
- CONTROL lbSetValue [index,10]; // value will be 10
- CONTROL lbSetValue [index,3.1]; // value will be 3
+ In ArmA 1.14, this command will not stop a unit that has been given a move order by selecting the unit, then clicking on the in game map (or ground).
+
+ doStop'ed units WILL return to formation if their leader's behaviour isn't set to "COMBAT". The squad leader will also order everyone to return to formation if there are no enemies nearby in a set period of time, overwriting the doStop command. doStop can be best used to simply stop the unit from doing whatever he is currently doing without radio messages.
+
+ (December 23, 2016)
+ When a unit reaches position given with doMove, unitReady becomes true. If doStop command is not executed, unit will start wondering on its own soon after, especially if unit is under fire. doStop will keep unit at the given position, but watch out for unitReady as it will become false since unit is holding position indefinitely.
+
+ (December 27, 2016)
+ Although it is possible to resume group default behaviour by joining units into own group like this units _group joinSilent _group there is a risk that the leader will change. Instead use doFollow command as explained in the description.
- Nothing - Nothing
+ Nothing
+
- lbSize
+ curatorCameraAreaCeiling
- Return number of items of listbox or combobox with id idc of topmost user dialog.
+ Returns ceiling height for curator camera.
- https://community.bistudio.com/wiki/lbSize
+ https://community.bistudio.com/wiki/curatorCameraAreaCeiling
- lbSize Number
-
- lbSize Control
+ curatorCameraAreaCeiling Object
- lbSize idc
-
- lbSize control
+ curatorCameraAreaCeiling curatorObj
- $Code$_size = lbSize 101;$/Code$
-
- $Code$_size = lbSize _control;$/Code$
+ $Code$curatorCameraAreCeiling BIS_curatorUnit;$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
- Number - Number
+ Number
+
- lbSortByValue
+ addHandgunItem
- Sorts the ListBox entries by lbValue. The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value.
+ Adds weapon item to the weapon cargo space. This is used for infantry weapons.
+ As of Arma 3 DEV 1.37, this command also supports weapon magazines.
- https://community.bistudio.com/wiki/lbSortByValue
+ https://community.bistudio.com/wiki/addHandgunItem
- lbSortByValue Control
-
- lbSortByValue Number
+ Object addHandgunItem String
- lbSortByValue control
-
- lbSortByValue idc
+ unit addHandgunItem item
- $Code$lbSortByValue _control;$/Code$
-
- $Code$lbSortByValue 101;$/Code$
+ $Code$player addHandgunItem "muzzle_snds_L";$/Code$
- undefined / undefined
+ local / global
- A good way to avoid that this Command will mix your Listbox up is, to assign your Value summed up with the Index ID returned by lbAdd to your Listbox Entries.
- Posted: Sep 10 2014
-
- More information on the LB command family can be found here
- Nothing - Nothing
+ Nothing
+
- lbSort
+ addGoggles
- Sorts listbox entries alphabetically ascending by their lbText
+ Create a new item and try to link it into goggles slot. This command doesn't add NVGoggles. Use addItem and assignItem or just linkItem for latter.
- https://community.bistudio.com/wiki/lbSort
+ https://community.bistudio.com/wiki/addGoggles
- lbSort Control
-
- lbSort Array
-
- lbSort Number
+ Object addGoggles String
- lbSort control
-
- lbSort [control, sortOrder]
-
- lbSort idc
-
- lbSort [idc, sortOrder]
+ unit addGoggles type
- $Code$lbSort _myControl;$/Code$
-
- $Code$lbSort [_myControl, "DESC"];$/Code$
-
- $Code$lbSort 101;$/Code$
+ $Code$player addGoggles "G_Tactical_Clear";$/Code$
- $Code$lbSort [101, "DESC"];$/Code$
+ $Code$diver addGoggles "G_Diving";$/Code$
undefined / undefined
- More information on the LB command family can be found here
- Nothing - Nothing - Nothing
+ Nothing
+
- lbText
+ menuSetCheck
- Returns the shown text in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ Sets item on given path to be checked or not.
- https://community.bistudio.com/wiki/lbText
+ https://community.bistudio.com/wiki/menuSetCheck
- lbText Array
-
- Control lbText Number
+ menuSetCheck Array
- lbText [idc, index]
-
- control lbText index
+ menuSetCheck [idc, path, checkedl]
- $Code$_text = lbText [101, 0];$/Code$
-
- $Code$_text = _control lbText 0;$/Code$
-
+
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
- String - String
+ Nothing
+
- lbValue
+ setPosASL2
- Returns the additional integer value in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+ Sets the object position. The pos array uses the PositionASL format. The version of the command does not offset based on object center.
+ Appears to be broken
- https://community.bistudio.com/wiki/lbValue
+ https://community.bistudio.com/wiki/setPosASL2
- lbValue Array
-
- Control lbValue Number
+ Object setPosASL2 Array
- lbValue [idc, index]
-
- control lbValue index
+ obj setPosASL2 pos
- $Code$_value = lbValue [101, 0];$/Code$
-
- $Code$_value = _control lbValue 0;$/Code$
+ $Code$player setPosASL2 [ getPosASL player select 0, ( getPosASL player select 1) + 10, getPosASL player select 2]$/Code$
- local / local
+ undefined / undefined
- More information on the LB command family can be found here
+ (21 Aug, 2013)
+ This command appears to do nothing in both Arma 2 and Arma 3. Tested on 21-08-2013.
- Number - Number
+ Nothing
+
- leaderboardDeInit
+ worldToScreen
- Deletes internal class for the leaderboard with given name. Returns true if the board has been found and deinitialized.
+ Converts position in world space into screen (UI) space. If a specified position is not within the current screen view, an empty array is returned.
- https://community.bistudio.com/wiki/leaderboardDeInit
+ https://community.bistudio.com/wiki/worldToScreen
- leaderboardDeInit String
+ worldToScreen Array
- leaderboardDeInit boardName
+ worldToScreen position
- $Code$leaderboardDeInit "TT01"$/Code$
+ $Code$_screenPos = worldToScreen getPos soldier1;$/Code$
+
+ $Code$_screenPos = worldToScreen ( player modelToWorld [0,10,0]);$/Code$
undefined / undefined
+ (august 19th, 2012)
+ please take safezones in consideration : the returned result can be out of the [0,0]..[1,1] range and can also be a filled array even if the position is not displayed on your monitor - this command thinks of triplescreens configurations as well. [] returned = not rendered
- Boolean
+ Array
+
- leaderboardGetRows
+ taskResult
- Returns an array with values for the given leaderboard, the array is in format: [[player1Name, score, rank], [player2Name, score, rank], [player3Name, score, rank]... ]; This can be called after the one of the row request function has been called and successfully finished!
+ Send a result of the task to the task sender.
- https://community.bistudio.com/wiki/leaderboardGetRows
+ https://community.bistudio.com/wiki/taskResult
- leaderboardGetRows String
+ taskResult Task
- leaderboardGetRows boardName
+ taskResult task
- $Code$leaderboardGetRows "TT01"$/Code$
-
+
undefined / undefined
- Array
+ Array
+
- leaderboardInit
+ getCursorObjectParams
- Initialize the leaderboard structure for board with given name. Returns true if board is already initialized.
+ Returns object and named selections under cursor and distance to object's surface (to the point cursor points at). If object surface is further away than 50 meters, selections are always an empty array and distance is 1e10 (10^10).
- https://community.bistudio.com/wiki/leaderboardInit
+ https://community.bistudio.com/wiki/getCursorObjectParams
- leaderboardInit String
+ getCursorObjectParams
- leaderboardInit boardName
+ getCursorObjectParams
- $Code$leaderboardInit "TT01"$/Code$
+ $Code$hint str getCursorObjectParams ;$/Code$
undefined / undefined
@@ -37495,27 +39368,28 @@
- Boolean
+ Array
+
- leaderboardState
+ score
- returns state of the board with given name. 0: Busy (async. operation in progress); 1: Async. operation ended with success; 2: Async. operation ended with error; 3: Invalid board (bad board name, not initialized etc.).
+ Returns the person's score in MP.
- https://community.bistudio.com/wiki/leaderboardState
+ https://community.bistudio.com/wiki/score
- leaderboardState String
+ score Object
- leaderboardState boardname
+ score unit
- $Code$leaderboardState ["TT01", 1234, [5,6,7,8]]$/Code$
+ $Code$_pScore = score player ;$/Code$
undefined / undefined
@@ -37523,27 +39397,29 @@
- Number
+ Number
+
- leaderboardsRequestUploadScoreKeepBest
+ rad
- Starts async. operation to upload score to board with given name, value is only stored to board if it's better than one already in the board. The details array is optional. The board has to be initialized before the call.
+ Convert x from Degrees to Radians. 360 degrees is equal to 2 multiplied with pi.
- https://community.bistudio.com/wiki/leaderboardsRequestUploadScoreKeepBest
+ https://community.bistudio.com/wiki/rad
- leaderboardsRequestUploadScoreKeepBest Array
+ rad Number
- leaderboardsRequestUploadScoreKeepBest [boardName, score, [details]]
+ rad x
- $Code$leaderboardsRequestUploadScoreKeepBest ["TT01", 1234, [5,6,7,8]]$/Code$
+ $Code$_radians = rad 180
+ // Result is 3.1415 (eg pi$/Code$
undefined / undefined
@@ -37551,27 +39427,28 @@
- Boolean
+ Number
+
- leaderboardsRequestUploadScore
+ enablePersonTurret
- Starts async. operation to upload score to board with given name, value always overwrite the current value in the board. The details array is optional. The board has to be initialized before the call.
+ Enables or disables firing from a vehicle cargo position. To get the turret path use assignedVehicleRole or getCargoIndex command.
- https://community.bistudio.com/wiki/leaderboardsRequestUploadScore
+ https://community.bistudio.com/wiki/enablePersonTurret
- leaderboardsRequestUploadScore Array
+ Object enablePersonTurret Array
- leaderboardsRequestUploadScore [boardName, score, [details]]
+ vehicle enablePersonTurret [turretPath, enable]
- $Code$leaderboardsRequestUploadScore ["TT01", 1234, [5,6,7,8]]$/Code$
+ $Code$heli enablePersonTurret [[1], true ];$/Code$
undefined / undefined
@@ -37579,362 +39456,312 @@
- Boolean
+ Nothing
+
- leader
+ removeAllCuratorEditingAreas
- Returns the group leader for the given unit or group. For dead units, objNull is returned.
+ Delete all curator edit areas.
- https://community.bistudio.com/wiki/leader
+ https://community.bistudio.com/wiki/removeAllCuratorEditingAreas
- leader Object/Group
+ removeAllCuratorEditingAreas Object
- leader unitName
+ removeAllCuratorEditingAreas curatorObj
- $Code$leader group player == leader player$/Code$
-
- $Code$_GroupLeader = leader ( group ( vehicle player ))$/Code$
-
- $Code$_UnitLeader = leader player$/Code$
+ $Code$removeAllCuratorEditingAreas myCurator;$/Code$
- global / undefined
+ undefined / undefined
- Object
+ Nothing
+
- leaveVehicle
+ assignedCargo
- Ceases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned from unit's group. After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.
- In short the command could be hypothetically presented as:
- leaveVehicle = un- addVehicle + unassignVehicle forEach crew
- However, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut command and force unassign the vehicle with unassignVehicle
+ Returns the list of soldiers assigned to the given vehicle as a cargo.
- https://community.bistudio.com/wiki/leaveVehicle
+ https://community.bistudio.com/wiki/assignedCargo
- Group/Object leaveVehicle Object
+ assignedCargo Object
- group leaveVehicle vehicle
+ assignedCargo vehicle
- $Code$_unit leaveVehicle _vehicle$/Code$
-
- $Code$_grp leaveVehicle _vehicle$/Code$
+ $Code$_list = assignedCargo _vehicleName$/Code$
- local / local
+ undefined / undefined
- (August 31, 2013)
- In ArmA 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.
- Nothing
+ Array
+
- libraryCredits
+ isDedicated
- Returns the credits for the libraries used by the game.
+ Return true if the machine (executing the command) is a dedicated multiplayer server. In single player returns false.
- https://community.bistudio.com/wiki/libraryCredits
+ https://community.bistudio.com/wiki/isDedicated
- libraryCredits
+ isDedicated
- libraryCredits
+ isDedicated
- $Code$hint str libraryCredits ; // as in Arma2 OA 1.62.95208
- /*
- [
- [
- "Botan",
- "1999-2012 Jack Lloyd, 2001 Peter J Jones, 2004-2007 Justin Karneges, 2004 Vaclav Ovsik, 2005 Matthew Gregan, 2005-2006 Matt Johnston, 2006 Luca Piccarreta, 2007 Yves Jerschow, 2007-2008 FlexSecure GmbH, 2007-2008 Technische Universitat Darmstadt, 2007-2008 Falko Strenzke, 2007-2008 Martin Doering, 2007 Manuel Hartl, 2007 Christoph Ludwig, 2007 Patrick Sona, 2010 Olivier de Gaalon"
- ],
- [
- "rapidjson",
- "2011 Milo Yip"
- ],
- [
- "libcurl",
- "Copyright (c) 1996 - 2012, Daniel Stenberg"
- ],
- [
- "GameSpy",
- "2009 GameSpy Industries, Inc."
- ],
- [
- "Theora",
- "2002-2009 by the Xiph.Org Foundation http://www.xiph.org/"
- ],
- [
- "OggVorbis",
- "1994-2002 by the Xiph.Org Foundation http://www.xiph.org/"
- ],
- [
- "Intel JPEG Library",
- "1998 Intel Corporation"
- ],
- [
- "Matrix Template Library",
- "2001-2005 The Trustees of Indiana University"
- ],
- [
- "Matrix Template Library",
- "1998-2001 University of Notre Dame"
- ],
- [
- "Speex",
- "2002-2006 Jean-Marc Valin"
- ],
- [
- "LZO Professional",
- "1996-2011 Markus Franz Xaver Johannes Oberhumer"
- ],
- [
- "NVIDIA FXAA by TIMOTHY LOTTES",
- "2010, 2011 NVIDIA CORPORATION"
- ],
- [
- "Jimenez's MLAA",
- "2012 2011 by Jorge Jimenez, Belen Masia, Jose I. Echevarria, Fernando Navarro and Diego Gutierrez"
- ]
- ]
- */$/Code$
+ $Code$if ( isDedicated ) then { diag_log "Dedicated Server on the run !";};$/Code$
undefined / undefined
+ (December 21, 2014)
+ $Code$ if ( isDedicated ) then {
+ //run on dedicated server only
+ };
+ if ( isServer ) then {
+ //run on dedicated server or player host
+ };
+ if ( hasInterface ) then {
+ //run on all player clients incl. player host
+ };
+ if (! isDedicated ) then {
+ //run on all player clients incl. player host and headless clients
+ };
+ if (! isServer ) then {
+ //run on all player clients incl. headless clients but not player host
+ };
+ if (! hasInterface ) then {
+ //run on headless clients and dedicated server
+ };
+ if (! hasInterface && ! isDedicated ) then {
+ //run on headless clients only
+ };$/Code$
- Array
+ Boolean
+
- libraryDisclaimers
+ deleteResources
- Returns the library disclaimers.
+ Delete (unregister) resources of the team member. Resources are deleted in the order they were added. Case insensitive.
- https://community.bistudio.com/wiki/libraryDisclaimers
+ https://community.bistudio.com/wiki/deleteResources
- libraryDisclaimers
+ Team_Member deleteResources Array
- libraryDisclaimers
+ teamMember deleteResources [resource1, resource2,]
- $Code$hint str libraryDisclaimers ; // as in Arma2 OA 1.62.95208
- // ["THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."]$/Code$
+ $Code$teamMember _agent deleteResources ["Legs"];$/Code$
- undefined / undefined
+ global / local
- Array
+ Nothing
+
- lifeState
+ nearestObject
- Returns the life state of the given unit. Can be one of:
- (Pre-Arma 3)
- "ALIVE"
- "DEAD"
- "DEAD-RESPAWN"
- "DEAD-SWITCHING"
- "ASLEEP"
- "UNCONSCIOUS"
- (Arma 3)
- "HEALTHY"
- "DEAD"
- "DEAD-RESPAWN"
- "DEAD-SWITCHING"
- "INCAPACITATED"
- "INJURED"
- In Arma 3 lifeState seems to change to "INJURED" when damage aliveUnit = 0.1 (0.1 seems to be the value defined in config under "InjuredTreshold").
+ Returns the nearest object of given type to given position within a sphere. Hardcoded radius is 50 meters. Unlike with nearestObjects, where distance is measured in 2D space, nearestObject will be closest object in 3D space.
+ If object class type is used, any object derived from the type is found as well (In OFP however, only objects with exactly the type given are found). If object ID passed as an argument (as in example 2) the search range is unlimited.
- https://community.bistudio.com/wiki/lifeState
+ https://community.bistudio.com/wiki/nearestObject
- lifeState Object
+ nearestObject Array
+
+ nearestObject Position3D/Position2D/Object
+
+ Position3D/Position2D nearestObject String
+
+ Position3D/Position2D nearestObject Number
- lifeState unit
+ nearestObject [position, type]
+
+ nearestObject position
+
+ position nearestObject type
+
+ position nearestObject id
- $Code$_ls = lifeState loon;$/Code$
+ $Code$_nObject = nearestObject [2345,6789];
+ _nObject = nearestObject [ player, "StreetLamp"];$/Code$
+
+ $Code$// Return the object with ID 123456:
+ _nObject = [0,0,0] nearestObject 123456;$/Code$
+
+ $Code$_nObject = getPos player nearestObject "StreetLamp";$/Code$
+
+ $Code$// Return the nearest object with ( typeOf _nObject == "#XXXX") - #mark, #slop, etc. Unlimited search range:
+ _nObject = _position nearestObject -1;
+ // Return the nearest object with ( typeOf _nObject != ""). Search range is 50m:_nObject = nearestObject _position;$/Code$
+
+ $Code$// (See also allMissionObjects ):
+ _blood = nearestObject [ player, "#slop"];
+ _step = nearestObject [ player, "#mark"];
+ _track = nearestObject [ player, "#track"];
+ _crater = nearestObject [ player, "#crater"];$/Code$
- global / undefined
+ undefined / undefined
- String
+ Object - Object - Object - Object
+
- lightAttachObject
+ moveObjectToEnd
- Attach light to given object at given position on object.
+ Shifts an editor object to the end of the objects array. This means,that the object will be drawn last (after all other objects).
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/lightAttachObject
+ https://community.bistudio.com/wiki/moveObjectToEnd
- Object lightAttachObject Array
+ Control moveObjectToEnd String
- light lightAttachObject [object, position]
+ map moveObjectToEnd object
- $Code$myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];$/Code$
-
+
- global / local
+ undefined / undefined
- (Dec 1, 2006)
- Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
- for example:
- $Code$_light = "#lightpoint" createVehicleLocal pos;
- _light setLightBrightness 1.0;
- _light setLightAmbient [0.0, 1.0, 0.0];
- _light setLightColor [0.0, 1.0, 0.0];
- _light lightAttachObject [_object, [0,0,0]];
- $/Code$
-
- (March 31, 2015)
- When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects.
- Nothing
+ Nothing
+
- lightDetachObject
+ missionDifficulty
- Detach light from object.
+ Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it's used one from player's options.
- https://community.bistudio.com/wiki/lightDetachObject
+ https://community.bistudio.com/wiki/missionDifficulty
- lightDetachObject Object
+ missionDifficulty
- lightDetachObject light
+ missionDifficulty
- $Code$LightDetachObject _light$/Code$
-
+
undefined / undefined
- Nothing
+ Number
+
- lightIsOn
+ isAutoHoverOn
- Check if lampost is on (shining). For working with CfgNonAIVehicles class "StreetLamp" only. Possible values are:
- "ON"
- "OFF"
- "AUTO" (auto is only on during the night).
- "ERROR"
+ Return true if vehicle has enabled auto hover. (always returns false if the vehicle can't set auto hover)
- https://community.bistudio.com/wiki/lightIsOn
+ https://community.bistudio.com/wiki/isAutoHoverOn
- lightIsOn Object
+ isAutoHoverOn Object
- lightIsOn lamppost
+ isAutoHoverOn vehicle
- $Code$? lightIsOn nearestObject [ player, "StreetLamp"] == "ON" :hint "nightime"$/Code$
-
- $Code$_it = lightIsOn object 159582$/Code$
-
- $Code$if ( count allMissionObjects "StreetLamp" == 0) then {
- hint "Objects compatible with 'lightIsOn' are not found.";
- } else {
- hint "'lightIsOn' compatible objects are found!";
- };$/Code$
+ $Code$status = isAutoHoverOn vehicle player;$/Code$
undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- Use switchLight to turn lamposts on and off.
- String
+ Boolean
+
- lightnings
+ ctrlSetAutoScrollRewind
- Return the current lightnings value.
+ Defines if scroll should rewind when auto-scroll reach end. Setter for ctrlAutoScrollRewind.
+ Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
- https://community.bistudio.com/wiki/lightnings
+ https://community.bistudio.com/wiki/ctrlSetAutoScrollRewind
- lightnings
+ Control ctrlSetAutoScrollRewind Boolean
- lightnings
+ control ctrlSetAutoScrollRewind set
- $Code$// Get the current lightnings value:
- _lightningsVal = lightnings ;$/Code$
+ $Code$_ctrlGroup ctrlSetAutoScrollRewind true ;$/Code$
undefined / undefined
@@ -37942,462 +39769,375 @@
- Number
+ Nothing
+
- limitSpeed
+ synchronizeWaypoint
- Limit speed of given vehicle or person to given value (in km/h).
+ Synchronizes the waypoint with other waypoints. Each waypoint is given as an array [group, index].
- https://community.bistudio.com/wiki/limitSpeed
+ https://community.bistudio.com/wiki/synchronizeWaypoint
- Object limitSpeed Number
+ Array synchronizeWaypoint Array
- objectName limitSpeed speed
+ waypoint synchronizeWaypoint [waypoint1, waypoint2,]
- $Code$// Adjust "speedLimit" variable to change limited speed. (A3 1.24 we don't need loop for a continus effect, limitSpeed alone is enough.)
- _this setVariable ["speedLimit", 200];
- _nul = _this spawn {
- while { canMove _this} do {
- _this limitSpeed (_this getVariable "speedLimit");
- sleep 0.1;
- };
- };$/Code$
-
- $Code$["SpeedObserver","onEachFrame",{ hintSilent format ["%1", speed vehicle MyVehicle]},[]] call BIS_fnc_addStackedEventHandler ;
- sleep 10;
- MyVehicle limitSpeed 5; //Watch the effect of this command.$/Code$
+ $Code$[_group1, 2] synchronizeWaypoint [ [_group2, 3] ];$/Code$
undefined / undefined
- (9 February 2008)
- (A1 1.08.5163)Has only an temporary effect on the vehicle specified (i.e. vehicle goes back to its previous speed right away). So, in order for this command to have a real, noticeable effect, it would have to be issued continuously (e.g. via a script loop, but in A3 1.24 it's unnecessary).
-
- (29 July 2014)
- (A3 1.24)To clarify, limitSpeed only do effect on non-player controlled AI units, it has continuous effect and AI won’t break through the speed limitation until one is contacted, engaged or regrouped.
+ (March 31, 2008)
+ To 'unsynchronize' a waypoint use: Waypoint synchronizeWaypoint []
- Nothing
+ Nothing
+
- lineBreak
+ setPosWorld
- Creates a structured text containing a line break.
+ Sets position of an object based on PositionWorld, which is PositionASL of the model centre [0,0,0].
- https://community.bistudio.com/wiki/lineBreak
+ https://community.bistudio.com/wiki/setPosWorld
- lineBreak
+ Object setPosWorld PositionWorld
- lineBreak
+ object setPosWorld position
- $Code$_txt = composeText ["First line", lineBreak, "Second line"];$/Code$
+ $Code$_obj setPosWorld getPosWorld _obj;$/Code$
- undefined / undefined
+ global / global
- Structured_Text
+ Nothing
+
- lineIntersects
+ waitUntil
- Checks for object intersection with a virtual line between two positions. Returns true if intersects with an object.
- NOTE: Doesn't work under water. Max harcoded distance is 1000m.
+ Suspends execution of function or SQF based script until given condition is satisfied. This command will loop and call the code inside {} mostly every frame (depends on complexity of condition and overall engine load) until the code returns true. The execution of the rest of the script therefore will be suspended until waitUntil completes.
+ If the very first execution of the code returns true the command will exit immediately, therefore it will not produce any "Suspending not allowed in this context" error when used inside non-scheduled script. For all other uses it must be executed in environment that allows suspension ( canSuspend ), such as spawned or execVMed code.
- https://community.bistudio.com/wiki/lineIntersects
+ https://community.bistudio.com/wiki/waitUntil
- lineIntersects Array
+ waitUntil Code
- lineIntersects [begPos, endPos, objIgnore1, objIgnore2]
+ waitUntil condition
- $Code$lineIntersects [ eyePos player, aimPos chopper, player, chopper]$/Code$
+ $Code$waitUntil { not alive player };$/Code$
+
+ $Code$_i = 0; waitUntil { _i = _i + 1; _i = 100 };$/Code$
+
+ $Code$waitUntil { sleep 0.1; not alive player };$/Code$
+
+ $Code$// An on-the-fly custom event handler :
+ _myEH = ["ZoomIn"] spawn {
+ while { true } do {
+ waitUntil {
+ inputAction ( _this select 0) == 1;
+ };
+ diag_log format ["%1 @ %2", _this select 0, diag_tickTime ];
+ };
+ };
+ // Although perhaps better to use onEachFrame, depending on the application.$/Code$
- global / undefined
+ undefined / undefined
- (may 31, 2012)
- Please note the difference :
- terrainIntersect
- terrainIntersectASL
- lineIntersects
- lineIntersectsWith
- lineIntersectsObjs
- intersect
+ (September 20, 2013)
+ In case you have more complex code inside waitUntil loop, to be on the safe side always return boolean at the end of the scope:
+ $Code$ player addEventHandler ["Fired", {
+ _null = (_this select 6) spawn {
+ _p = [0,0,0];
+ waitUntil {
+ if ( isNull _this) exitWith { true };
+ _p = getPos _this;
+ false // -- boolean at the end of the scope
+ };
+ hint str _p;
+ };
+ }];$/Code$
+
+ (December 20, 2006)
+ waitUntil suspends both SQF functions and SQF scripts. In functions, the calling script is still in suspension due to waiting for a return from the call command. The game engine will continue, however. See Function for more detail.
+
+ (April 2, 2010)
+ If WaitUntil uses an undefined call code, WaitUntil won't release, even when this code is separated from other conditions through or. Be warned that this won't cause an error message.
+
+ (Jan 07, 2011)
+ By default the cycle time for the condition check is per frame. Look at the example 3, how to set it at a lower rate yourself.
+ Often times one does not need per frame checking. Saves a lot CPU checks; especially when the condition is complex to compute.
+
+ (December 13, 2014)
+ If you want to use waitUntil together with exitWith, remember that the loop only exits if the code block returns true.
+ It should look like this:
+ $Code$
+ waitUntil {
+ // exit loop if the unit gets deleted
+ if (isNull _unit) exitWith {true}; // has to return true to continue
+ !alive _unit;
+ };
+ $/Code$
- Boolean
+ Nothing
+
- lineIntersectsObjs
+ campaignConfigFile
- Returns list of objects intersected by given line from begPos to endPos.
+ Return root of campaign description.ext entries hierarchy.
- https://community.bistudio.com/wiki/lineIntersectsObjs
+ https://community.bistudio.com/wiki/campaignConfigFile
- lineIntersectsObjs Array
+ campaignConfigFile
- lineIntersectsObjs [begPos, endPos, withObj, ignoreObj, sortByDistance, flags]
+ campaignConfigFile
- global / undefined
+ undefined / undefined
- (Mar 27, 2014)
- Example (in ArmA3 ver 1.14) display objects' array in the middle of the screen sorted by 6 flags:
- $Code$
- Sto = [];
- Fn = {
- {
- Sto set [_foreachindex, lineIntersectsObjs [( eyePos player ),( ATLtoASL screenToWorld [0.5,0.5]), objNull, objNull, false,_x]];
- } forEach [1,2,4,8,16,32];
- hintSilent format ["
- ONLY_WATER: %1,
- NEAREST_CONTACT: %2,
- ONLY_STATIC: %3,
- ONLY_DYNAMIC: %4,
- FIRST_CONTACT: %5,
- ALL_OBJECTS: %6",
- Sto select 0,Sto select 1,Sto select 2,Sto select 3,Sto select 4,Sto select 5];
- };
- ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler ;
- $/Code$
-
- (March 29, 2016)
- Distance sorting is relative to object model center, and not intersect position.
- Array
+ Config
+
- lineIntersectsSurfaces
+ waypointName
- Returns list of intersections with surfaces from begPosASL to endPosASL. If there is ground intersection, it is also included. Works on units. Works underwater. Doesn't return intersection with sea surface. Hardcoded max distance: 5000m. By default, for speed purposes, command will return only 1st intersection with unique objects. Since Arma 3 v1.69.140138, this could be tweaked with an optional param. NOTE: if begPosASL is under the ground and endPosASL is above it, the command will only return intersection with the ground, this is engine limitation and none of the intersectXXX commands will work when initiated from under the ground.
- Since Arma v1.51.131920 it is possible to indicate primary and secondary LOD to look for intersection. Available options are:
- "FIRE"
- "VIEW"
- "GEOM"
- "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
- "NONE"
- Default LODs are "VIEW" and "FIRE"
+ Gets the waypoint name.
- https://community.bistudio.com/wiki/lineIntersectsSurfaces
+ https://community.bistudio.com/wiki/waypointName
- lineIntersectsSurfaces Array
+ waypointName Waypoint
- lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]
+ waypointName waypoint
- $Code$_intersections = lineIntersectsSurfaces [ eyePos player, aimPos chopper, player, chopper, true, -1];$/Code$
-
- $Code$arrow = "Sign_Arrow_F" createVehicle [0,0,0];
- onEachFrame {
- _ins = lineIntersectsSurfaces [
- AGLToASL positionCameraToWorld [0,0,0],
- AGLToASL positionCameraToWorld [0,0,1000],
- player
- ];
- if ( count _ins == 0) exitWith {arrow setPosASL [0,0,0]};
- arrow setPosASL (_ins select 0 select 0);
- arrow setVectorUp (_ins select 0 select 1);
- hintSilent str _ins;
- };$/Code$
-
- $Code$// This should detect glass windows and wire fences (since Arma v1.51.131920):
- wirefence = "Land_New_WiredFence_5m_F" createVehicle position player ;
- arrow = "Sign_Arrow_F" createVehicle [0,0,0];
- onEachFrame {
- _ins = lineIntersectsSurfaces [
- AGLToASL positionCameraToWorld [0,0,0],
- AGLToASL positionCameraToWorld [0,0,1000],
- player,
- objNull,
- true,
- 1,
- "GEOM",
- "NONE"
- ];
- if ( count _ins == 0) exitWith {arrow setPosASL [0,0,0]};
- arrow setPosASL (_ins select 0 select 0);
- arrow setVectorUp (_ins select 0 select 1);
- hintSilent str _ins;
- };$/Code$
+ $Code$_wpName = waypointName [_grp,2];$/Code$
- global / undefined
+ undefined / undefined
- (August 27, 2015)
- Fast check if object is in a house: $Code$KK_fnc_inHouse = {
- lineIntersectsSurfaces [
- getPosWorld _this,
- getPosWorld _this vectorAdd [0, 0, 50],
- _this, objNull, true, 1, "GEOM", "NONE"
- ] select 0 params ["","","","_house"];
- if (_house isKindOf "House") exitWith { true };
- false
- };
- onEachFrame { hintSilent str ( player call KK_fnc_inHouse)};$/Code$
-
- (January 30, 2016)
- This command is useful to place weaponholder (and then spawned weapons) on floor of houses, correcting the spawn position (can_collide) to intersect with floor:
- $Code$
- MGI_fnc_setPosAGLS = {
- params ["_obj", "_pos"];
- _wh_pos = getPosASL _obj;
- _pos set [2, ( ATLtoASL _pos select 2)-10];
- _ins = lineIntersectsSurfaces [_wh_pos, _pos,_obj, objNull, true,1,"VIEW","FIRE"];
- _surface_distance = if ( count _ins 0) then [{(_ins select 0 select 0) distance _wh_pos},{0}];
- _wh_pos set [2, ( getPosASL _obj select 2) - (_surface_distance)];
- _weaponholder setPosASL _wh_pos;
- };
- $/Code$
- After the position (_pos) obtained in BIS_fnc_buidingPositions array:
- $Code$
- _weaponholder = createVehicle ["groundWeaponHolder", _pos, [], 0, "CAN_COLLIDE"];
- [_weaponholder,_pos] call MGI_fnc_setPosAGLS;
- Then fill your weapon holder.
- $/Code$
- Array
+ String
+
- lineIntersectsWith
+ enableSimulationGlobal
- Returns objects intersecting with the virtual line from begPos to endPos. By default resulting array of intersecting objects is unsorted. To sort by distance set sortByDistance param to true. NOTE: Doesn't work under water. Max hardcoded distance is 1000m.
+ MP command. Enable or disable simulation for given entity, globally. Call this only from the server. Has the same effect as enableSimulation when used in SP.
- https://community.bistudio.com/wiki/lineIntersectsWith
+ https://community.bistudio.com/wiki/enableSimulationGlobal
- lineIntersectsWith Array
+ Object enableSimulationGlobal Boolean
- lineIntersectsWith [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]
+ entity enableSimulationGlobal enable
- $Code$_objects = lineIntersectsWith [ eyePos player, ATLtoASL screenToWorld [0.5,0.5]];$/Code$
-
- $Code$// Sort by distance:
- _objects = lineIntersectsWith [ eyePos player, ATLtoASL screenToWorld [0.5,0.5], objNull, objNull, true ];$/Code$
-
- $Code$// Ignore objects:
- _objects = lineIntersectsWith [ eyePos player, aimPos chopper, player, chopper];$/Code$
+ $Code$_myObject enableSimulationGlobal false;$/Code$
- global / undefined
+ global / global
- (may 31, 2012)
- Please note the difference :
- terrainIntersect
- terrainIntersectASL
- lineIntersect s
- lineIntersect s With
- lineIntersect s Objs
- intersect
+ This scripting command must be executed on the server to work properly in multiplayer
+
+ (October 21, 2014)
+ Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: $Code${ player reveal _x} forEach allUnits ;$/Code$
- Array
+ Nothing
+
- linearConversion
+ objectCurators
- Converts given value from given "from" range to wanted "to" range. If clipping is set to true, the resulting value is guaranteed to be within "to" range no matter what. Say given range is 0 to 1 and wanted range is 0 to 100 (percent calculation). Given value 0.55 then will be linearConversion [0,1,0.55,0,100]; //55 but if given value is 1.1 linearConversion [0,1,1.1,0,100, false ]; //110 or if clipping is true linearConversion [0,1,1.1,0,100, true ]; //100
+ Returns array with all curators which can edit given object.
- https://community.bistudio.com/wiki/linearConversion
+ https://community.bistudio.com/wiki/objectCurators
- linearConversion Array
+ objectCurators Object
- linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip]
+ objectCurators obj
- $Code$linearConversion [4, 8, 5, 0, 1, false ];$/Code$
-
- $Code$// Calculate days from 1/1/1970:
- fnc_daysFromEpoc =
- {
- private _year = param [0];
- private _days = 0;
- for "_i" from 1970 to _year - 1 do
- {
- _days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false ];
- };
- _days + linearConversion [0, 1, dateToNumber _this, 0, 365, false ];
- };
- hint str ( date call fnc_daysFromEpoc);$/Code$
-
+
undefined / undefined
- (Mar 29, 2014)
- (A3 0.50) It is recommended to use linearConversion instead of BIS_fnc_linearConversion :
- $Code$ linearConversion [0,100,50,0,50, true ]; //same as [[0,100],50,[0,50]] call BIS_fnc_linearConversion $/Code$
- As for clamp, true will disable new value out of its range while false won't:
- $Code$ linearConversion [0,100,150,0,50, true ]; //return 50
- linearConversion [0,100,150,0,50, false ]; //return 75
- $/Code$
- Number
+ Array
+
- linkItem
+ stop
- Create and assign item to the correct slot. If there is an item in the targeted slot, it gets replaced.
+ Stop AI unit. Stopped unit will not be able to move, fire, or change its orientation to follow a watched object. It may still change the stance if deemed appropriate (e.g. under fire). Use disableAI to disable specific AI capabilities.
- https://community.bistudio.com/wiki/linkItem
+ https://community.bistudio.com/wiki/stop
- Object linkItem String
+ Object stop Boolean
- unit linkItem item
+ unitName stop toggle
- $Code$bluforUnit linkItem "NVGoggles";
- opforUnit linkItem "NVGoggles_OPFOR";
- independentUnit linkItem "NVGoggles_INDEP";$/Code$
+ $Code$loon1 stop true$/Code$
- global / global
+ local / global
+ (January 6, 2011)
+ This command appears to be local only.
- Nothing
+ Nothing
+
- listObjects
+ diag_activeMissionFSMs
- Return the list of all objects of given type.
- i
- Some Old Editor Command
+ Returns array with active Mission FSMs.
- https://community.bistudio.com/wiki/listObjects
+ https://community.bistudio.com/wiki/diag_activeMissionFSMs
- Control listObjects String
+ diag_activeMissionFSMs
- map listObjects type
+ diag_activeMissionFSMs
-
+ $Code${ systemChat str _x} forEach diag_activeMissionFSMs ;$/Code$
+
undefined / undefined
- Array
+ Array
+
- listRemoteTargets
+ commandGetOut
- Return list of datalink targets and time for which they will be/were known
+ Orders the unit to get out from the vehicle (via the radio).
- https://community.bistudio.com/wiki/listRemoteTargets
+ https://community.bistudio.com/wiki/commandGetOut
- listRemoteTargets Side
+ commandGetOut Object/Array
- listRemoteTargets side
+ commandGetOut unitName
- $Code$listRemoteTargets east;$/Code$
+ $Code$commandGetOut _unitOne$/Code$
- undefined / undefined
+ local / global
- Array
+ Nothing
+
- listVehicleSensors
+ addMissionEventHandler
- Returns an array of the sensors in the given vehicle's config (configfile CfgVehicles vehicle Components SensorsManagerComponent Components).
+ Adds event handler (EH) attached to the current mission and returns EH handle. If EH has some data to return upon event, it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution. For the list of available mission event handlers see: Arma_3:_Event_Handlers/addMissionEventHandler
- https://community.bistudio.com/wiki/listVehicleSensors
+ https://community.bistudio.com/wiki/addMissionEventHandler
- listVehicleSensors Object
+ addMissionEventHandler Array
- listVehicleSensors vehicle
+ addMissionEventHandler [type, command]
- $Code$_sensors listVehicleSensors ( vehicle player );
- hint str _sensors;$/Code$
+ $Code$// A script could be executed to stop custom scripts graciously, or save progress & stats, for example:
+ _id = addMissionEventHandler ["Ended",{ _this execVM "missionEnded.sqf" }];$/Code$
undefined / undefined
@@ -38405,1170 +40145,690 @@
- Array
+ Number
+
- list
+ waypointShow
- List of units that would activate given Trigger.
- It returns nothing before the simulation started, i.e. in (undelayed) init.sqf files. Returns a pointer to the trigger's list after the simulation started. Since this is just a reference this means that the value in your local variable will change as the content of the trigger area changes. To permanently copy the returned list to a different variable, use _mylist = +(list triggerOne).
- The second example can be used inside the trigger (in that case, no need to name your trigger).
- The list returned for trigger of type "Not present" is the same as that returned for type "present".
- NOTE: While the command can query any trigger, local or remote, the result will be only for the trigger condition set on the local client. See createTrigger for more info.
+ Gets the waypoint show/hide status.
+ Possible values are:
+ "NEVER" - never show it
+ "EASY" - show only in cadet mode
+ "ALWAYS" - always show it
+ "ERROR" - when set to any different string
- https://community.bistudio.com/wiki/list
+ https://community.bistudio.com/wiki/waypointShow
- list Object
+ waypointShow Array
- list trigger
+ waypointShow waypoint
- $Code$_tlist = list _triggerOne;$/Code$
-
- $Code$hint format ["%1", thislist ];$/Code$
+ $Code$_wpShow = waypointShow [groupOne,1];$/Code$
- global / local
+ undefined / undefined
- (March 6, 2013)
- Calling list immediately after creating a trigger via createTrigger (and setting up activation, area, statements, timeout, etc..), will return null instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array.
- Array/Nothing
+ String
+
- lnbAddArray
+ setPosASLW
- Adds list of rows of strings.
+ Sets the object position above sea surface. The pos array uses the PositionASLW format.
- https://community.bistudio.com/wiki/lnbAddArray
+ https://community.bistudio.com/wiki/setPosASLW
- lnbAddArray Array
+ Object setPosASLW Array
- lnbAddArray [idc, [[[text,text],[value,],[data,]],[[text,text],[value,],[data,]],]]
+ obj setPosASLW pos
- $Code$lnbAddArray [102,[[["#1"],[1],["#1"]]]];$/Code$
+ $Code$_diver setPosASLW [( position _diver) select 0, ( position _diver) select 1, -10];$/Code$
- local / local
+ global / global
- Number
+ Nothing
+
- lnbAddColumn
+ vehicleRadio
- Adds an column at given position. It returns the index of the newly added column.
+ Sends the audio message to the vehicle radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec ).
+ Note: When transmitting unit gets killed, transmission will be interrupted, however when receiving unit gets killed, the transmission continues to play.
- https://community.bistudio.com/wiki/lnbAddColumn
+ https://community.bistudio.com/wiki/vehicleRadio
- Control lnbAddColumn Number
-
- lnbAddColumn Array
+ Object vehicleRadio String
- _ctrl lnbAddColumn position
-
- lnbAddColumn [idc or Control,position]
+ unit vehicleRadio radioName
- $Code$_ctrl lnbAddColumn 0.8;$/Code$
+ $Code$_soldierOne vehicleRadio "messageOne";$/Code$
- $Code$lnbAddColumn [105,0.8];$/Code$
+ $Code$player vehicleRadio configName selectRandom ("true" configClasses ( configFile "CfgRadio"));$/Code$
- local / local
+ global / local
- (A3 1.28) Horizontal coordinates of columns were added relative to list width, in range from 0 to 1.
+ (December 3, 2016)
+ To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial ), prefix the full filename including file extension with #. For example if there is a custom user sound file called MySound.ogg, to play it on the radio use:
+ $Code$ player vehicleRadio "#MySound.ogg";$/Code$
- Number/Void - Number/Void
+ Nothing
+
- lnbAddRow
+ groupSelectUnit
- Adds a row of strings.
+ Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3... buttons to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader.
- https://community.bistudio.com/wiki/lnbAddRow
+ https://community.bistudio.com/wiki/groupSelectUnit
- lnbAddRow Array
-
- Control lnbAddRow Array
+ Object groupSelectUnit Array
- lnbAddRow [IDC,[ String, String ]]
-
- _ctrl lnbAddRow [ String, String ]
+ player groupSelectUnit [unit, select]
- $Code$lnbAddRow [1,["COL1","COL2"]];$/Code$
+ $Code$// After leaving menu, deselect all units (command menu is not opened - no selection)
+ {
+ player groupSelectUnit [_x, false ];
+ } forEach ( groupSelectedUnits player );$/Code$
- $Code$_ctrl lnbAddRow ["COL1","COL2"];$/Code$
+ $Code$// Select all units when player is the leader:
+ {
+ player groupSelectUnit [_x, true ];
+ } forEach units player ;$/Code$
+
+ $Code$// Open communication with group leader:
+ player groupSelectUnit [ leader player, true ];$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Number - Number
+ Nothing
+
- lnbClear
+ gearIDCAmmoCount
- Clears all items in the given listbox or combobox.
+ Returns ammo count of assigned magazine.
- https://community.bistudio.com/wiki/lnbClear
+ https://community.bistudio.com/wiki/gearIDCAmmoCount
- lnbClear Number
-
- lnbClear Control
+ gearIDCAmmoCount Number
- lnbClear idc
-
- lnbClear ctrl
+ gearIDCAmmoCount idc
- $Code$lnbClear _ctrl;$/Code$
+ $Code$ammo = gearIDCAmmoCount _control;$/Code$
undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Number
+
- lnbColor
+ setMarkerType
- Returns the text color of the item with the given position of the 2D listbox. The color is returned in format Color.
+ Set marker type. See cfgMarkers for a list of standard markers.
- https://community.bistudio.com/wiki/lnbColor
+ https://community.bistudio.com/wiki/setMarkerType
- lnbColor Array
-
- Control lnbColor Array
+ String setMarkerType String
- lnbColor [idc, [row, column]]
-
- control lnbColor [row, column]
+ markerName setMarkerType type
- $Code$_ctrl lnbColor [0,0];$/Code$
+ $Code$"MarkerOne" setMarkerType "Warning";$/Code$
- undefined / undefined
+ undefined / global
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Array - Array
+ Nothing
+
- lnbCurSelRow
+ addBackpackCargoGlobal
- Returns the index of the selected row id 2D listbox.
+ Add backpack(s) to the cargo space of vehicle. MP synchronized. Classname list of available backpacks is here
- https://community.bistudio.com/wiki/lnbCurSelRow
+ https://community.bistudio.com/wiki/addBackpackCargoGlobal
- lnbCurSelRow Number
-
- lnbCurSelRow Control
+ Object addBackpackCargoGlobal Array
- lnbCurSelRow idc
-
- lnbCurSelRow ctrl
+ vehicle addBackpackCargoGlobal [packClassName, count]
- $Code$lnbCurSelRow _ctrl;$/Code$
+ $Code$this addBackpackCargoGlobal ["TK_RPG_Backpack_EP1",2];$/Code$
+
+ $Code$_apc addBackpackCargoGlobal ["US_Patrol_Pack_EP1",4];$/Code$
- undefined / undefined
+ global / global
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Number - Number
+ Nothing
+
- lnbData
+ handgunItems
- Returns the additional text (invisible) in an item with the given position of the 2D listbox.
+ Returns array with all items assigned to the handgun. This command is used for infantry weapons only.
- https://community.bistudio.com/wiki/lnbData
+ https://community.bistudio.com/wiki/handgunItems
- lnbData Array
-
- Control lnbData Array
+ handgunItems Object
- lnbData [idc, [row, column]]
-
- ctrl lnbData [row, column]
+ handgunItems unit
- $Code$_ctrl lnbData [ lnbCurSelRow _ctrl,0]; //"#1"$/Code$
+ $Code$handgunItems player ;
+ /*
+ [
+ "muzzle_snds_L",//silencer
+ "",//laser
+ "",//optics
+ ""//bipod
+ ]
+ */$/Code$
- local / local
+ global / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- String - String
+ Array
+
- lnbDeleteColumn
+ ctrlShown
- Removes column with given index from ListNBox control.
+ Returns whether given control is shown.
- https://community.bistudio.com/wiki/lnbDeleteColumn
+ https://community.bistudio.com/wiki/ctrlShown
- lnbDeleteColumn Array
-
- Control lnbDeleteColumn Number
+ ctrlShown Control
- lnbDeleteColumn [idc,index]
-
- ctrl lnbDeleteColumn index
+ ctrlShown controlName
- $Code$_ctrl lnbDeleteColumn 1;$/Code$
+ $Code$_bool = ctrlShown _ctrl;$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Boolean
+
- lnbDeleteRow
+ sleep
- Removes row with the given index from the given listbox or combobox.
+ Suspends code execution for given time in seconds. The sleep precision is given by a framerate, the delay given is the minimal delay expected. Must be called inside of a context which is interruptible, i.e. a script executed by execVM or spawn.
- https://community.bistudio.com/wiki/lnbDeleteRow
+ https://community.bistudio.com/wiki/sleep
- Control lnbDeleteRow Number
+ sleep Number
- _ctrl lnbDeleteRow row
+ sleep delay
- $Code$_ctrl lnbDeleteRow 1;$/Code$
+ $Code$[] spawn { sleep 5; hint "after 5 sec..."};$/Code$
undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
+ this command will suspend the script indefinitely if game simulation is paused in SP. To avoid this, use uiSleep.
+
+ (December 20, 2006)
+ Sleep suspends both SQF functions and SQF scripts. In functions, the calling script is still in suspension due to waiting for a return from the call command. The game engine will continue, however. See Function for more detail.
+
+ (February 12, 2007)
+ Sleep durations between.0005 and.02 will cause the same delay (roughly.02 seconds). Delays of.0005 and less have no effect (ie, the sleep call will return immediately).
+
+ The comment above is a little misleading. The game engine appears to work by processing frames and then checking to see whether scripts are available to execute. Sleep causes the script/function to be suspended until at least the specified time has elapsed. To wait for the next frame, or give other scripts a chance to run, use Sleep 0.001.
+
+ (July 16, 2007)
+ For scripts called by the Init Event Handler the first sleep command will suspend the script at the briefing screen at the start of a mission. The script will continue after the briefing screen, when actually "in game".
+
+ (July 12, 2014)
+ Sleep will treat negative values as if they were 0. (Tested in Arma 3 v1.22)
+
+ (October 18, 2014)
+ For server scripts, if you are creating "while true" timers, it is best to use uiSleep instead, as the sleep from that command is not slowed down by simulation / server lag, so the timers will execute at intervals that are much closer to real time, even under heavy lag.
- Nothing
+ Nothing
+
- lnbGetColumnsPosition
+ ctrlSetFontHeight
- Returns relative screen X of ListNBox control columns position [0.1,0.3,0.6...]. Use lnbSetColumnsPos to set positions.
+ Sets the font size of given control.
- https://community.bistudio.com/wiki/lnbGetColumnsPosition
+ https://community.bistudio.com/wiki/ctrlSetFontHeight
- lnbGetColumnsPosition Control
+ Control ctrlSetFontHeight Number
- lnbGetColumnsPosition _ctrl
+ controlName ctrlSetFontHeight height
- $Code$lnbGetColumnsPosition _ctrl;$/Code$
+ $Code$_control ctrlSetFontHeight 0.05$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Array
+ Nothing
+
- lnbPicture
+ lbSetSelectColor
- Returns the picture name or path of the item with the given position of the 2D listbox.
+ Sets the select color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
+ Colour is in format Color.
- https://community.bistudio.com/wiki/lnbPicture
+ https://community.bistudio.com/wiki/lbSetSelectColor
- lnbPicture Array
+ lbSetSelectColor Array
- Control lnbPicture Array
+ Control lbSetSelectColor Array
- lnbPicture [IDC, [row, column]]
+ lbSetSelectColor [idc, index, color]
- control lnbPicture [row, column]
+ control lbSetSelectColor [index, color]
- $Code$lnbPicture [200, [1, 1]];$/Code$
+ $Code$lbSetSelectColor [101, 0, [0, 1, 0, 0.5]];$/Code$
- $Code$_control lnbPicture [1, 1]; //"a3\ui_f\data\gui\cfg\ranks\corporal_gs.paa"$/Code$
+ $Code$_control lbSetSelectColor [0, [0, 1, 0, 0.5]];$/Code$
- local / local
+ undefined / undefined
+ More information on the LB command family can be found here
- String - String
+ Nothing - Nothing
+
- lnbSetColor
+ deleteRange
- Sets the color of the item with the given position of the 2D listbox. Color is in format Color.
+ Removes a range of array elements from the given array (modifies the original array, just like resize or set ).
- https://community.bistudio.com/wiki/lnbSetColor
+ https://community.bistudio.com/wiki/deleteRange
- lnbSetColor Array
-
- Control lnbSetColor Array
+ Array deleteRange Array
- lnbSetColor [idc,[row,column],color]
-
- _ctrl lnbSetColor [ [row,column],color]
+ array deleteRange [from, count]
- $Code$_ctrl lnbSetColor [ [0,0], [1,0,0,1] ];$/Code$
+ $Code$_arr = [1,2,3,4,5,6];
+ _arr deleteRange [1,4];
+ hint str _arr; //[1,6]$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Nothing
+
- lnbSetColumnsPos
+ addForce
- Sets relative screen X for ListNBox control columns positions. Setter for lnbGetColumnsPosition
+ Applies force to given object at given position. Force is defined as vector [x, y, z] in world space, position is vector [x, y, z] in model space. If you need to define force in model space, use vectorModelToWorld or vectorModelToWorldVisual commands first. The force applied as impulse. For more information see NVIDIA docs
- https://community.bistudio.com/wiki/lnbSetColumnsPos
+ https://community.bistudio.com/wiki/addForce
- lnbSetColumnsPos Array
-
- Control lnbSetColumnsPos Array
+ Object addForce Array
- lnbSetColumnsPos [idc, positions]
-
- ctrl lnbSetColumnsPos positions
+ object addForce [force, position]
- $Code$lnbSetColumnsPos [101, [0.1,0.5,0.7]];$/Code$
+ $Code$// Apply force [0,1000,0] defined in world space (not factoring object actual positioning) to object position [1,0,0]:
+ _object addForce [[0,1000,0],[1,0,0]];$/Code$
- $Code$_ctrl lnbSetColumnsPos [0.1,0.5,0.7];$/Code$
+ $Code$// Apply force [0,1000,0] defined in model space (relative to object) to object position [1,0,0]:
+ _object addForce [_object vectorModelToWorld [0,1000,0],[1,0,0]];$/Code$
- undefined / undefined
+ global / global
- (Sep 9 2014)
- See: List Box#LISTNBOX
- Nothing - Nothing
+ Nothing
+
- lnbSetCurSelRow
+ diag_drawMode
- Selects the row with the given index of the 2D listbox.
+ Activates specific debug visualization.
+ Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
- https://community.bistudio.com/wiki/lnbSetCurSelRow
+ https://community.bistudio.com/wiki/diag_drawMode
- lnbSetCurSelRow Array
-
- Control lnbSetCurSelRow Number
+ diag_drawMode String
- lnbSetCurSelRow [idc, index]
-
- ctrl lnbSetCurSelRow index
+ diag_drawMode type
- $Code$disableSerialization ;
- _ctrl = ( findDisplay 300) displayCtrl 304;
- _ctrl lnbSetCurSelRow 1;$/Code$
+ $Code$diag_drawMode "normal"$/Code$
undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
+ (September 6, 2016)
+ Currently A3 dev branch, diag.exe, version 1.65.138249 has no drawModes available:
+ $Code$diag_list "drawMode" - []$/Code$
- Nothing - Nothing
+ Nothing
+
- lnbSetData
+ addOwnedMine
- Sets the additional text (invisible) in the item with the given position of the 2D listbox.
+ Sets ownership over a remotely detonatable mine to the unit.
- https://community.bistudio.com/wiki/lnbSetData
+ https://community.bistudio.com/wiki/addOwnedMine
- lnbSetData Array
-
- Control lnbSetData Array
+ Object addOwnedMine Object
- lnbSetData [idc, [row, column], data]
-
- ctrl lnbSetData [[row, column], data]
+ Unit addOwnedMine mine
- $Code$_ctrl lnbSetData [ [0,0],"#1"];$/Code$
+ $Code$player addOwnedMine SuperMine;$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Nothing
+
- lnbSetPicture
+ titleRsc
- Sets the picture in the item with the given position of the 2D listbox.
- Name is the picture name.
- The picture is searched in the mission, directory, the dtaExt subdirectory of the campaign directory, and the dtaExt directory and the data bank (or directory).
+ Display a resource defined in RscTitles. Also see cutRsc, with these two commands you can show two different resources at once.
- https://community.bistudio.com/wiki/lnbSetPicture
+ https://community.bistudio.com/wiki/titleRsc
- lnbSetPicture Array
-
- Control lnbSetPicture Array
+ titleRsc Array
- lnbSetPicture [IDC, [Row, Column], PicturePathOrPictureName]
-
- _ctrl lnbSetPicture [ [Row, Column], PicturePathOrPictureName]
+ titleRsc [text, type, speed, showInMap]
- $Code$lnbSetPicture [1, [0, 0], "Picture"];$/Code$
-
- $Code$_ctrl lnbSetPicture [ [0, 0], "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa"];$/Code$
+ $Code$titleRsc ["BIS", "PLAIN"]$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
+ (30 Jun, 2008)
+ Using titleRsc (unlike cutRsc ) for a HUD will mean:
+ the HUD will remain visible when you access the map and overlay it.
+ using the 'Direct communication' chat channel messages will interfere with the HUD by hiding it, since it appears to use the same 'resource layer'.
+
+ (September 25, 2014)
+ In OFP/CWA any x Rsc will hide all the elements of the HUD, including the map.
- Nothing - Nothing
+ Nothing
+
- lnbSetText
+ allowSprint
- Sets the additional text (invisible) in the item with the given position of the 2D listbox.
+ Force player to run/jog if set to false.
- https://community.bistudio.com/wiki/lnbSetText
+ https://community.bistudio.com/wiki/allowSprint
- lnbSetText Array
-
- Control lnbSetText Array
+ Object allowSprint Boolean
- lnbSetText [idc,[row,column],data]
-
- _ctrl lnbSetText [ [row,column],data]
+ unit allowSprint state
- $Code$lnbSetText [101, [0,1], "#1"];$/Code$
-
- $Code$_ctrl lnbSetText [ [0,1], "#1"];$/Code$
+ $Code$player allowSprint false$/Code$
- local / local
+ undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Nothing
+
- lnbSetValue
+ set3DENSelected
- Sets the additional integer value in the item with the position index of the 2D listbox.
+ Changes selection in 3den to what is inside entities array.
- https://community.bistudio.com/wiki/lnbSetValue
+ https://community.bistudio.com/wiki/set3DENSelected
- lnbSetValue Array
-
- Control lnbSetValue Array
+ set3DENSelected Array
- lnbSetValue [idc, [row, column], value]
-
- control lnbSetValue [[row, column], value]
+ set3DENSelected entities
- $Code$_ctrl lnbSetValue [[0,0],1];$/Code$
-
+
undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Nothing - Nothing
+ Nothing
+
- lnbSize
+ buttonAction
- Returns size of 2D listbox or combobox as [rows, columns].
+ Return the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Dialog Control for more information about user dialogs and controls.
- https://community.bistudio.com/wiki/lnbSize
+ https://community.bistudio.com/wiki/buttonAction
- lnbSize Control
+ buttonAction Number
+
+ buttonAction Control
- lnbSize control
-
+ buttonAction idc
+
+ buttonAction control
+
- $Code$lnbSize _ctrl;//[8,2]$/Code$
+ $Code$buttonSetAction [100, {player exec "reply.sqs"}]
+ _action = buttonAction 100
+ returns {player exec "reply.sqs"}$/Code$
- local / local
+ local / undefined
- Array
+ String - String
+
- lnbSortByValue
+ getContainerMaxLoad
- Sorts given multicolumn listbox by lnbValue in given column in ascending or descending order.
+ Returns max load value of given container. Currently works only with uniform, vest and backpack classes.
- https://community.bistudio.com/wiki/lnbSortByValue
+ https://community.bistudio.com/wiki/getContainerMaxLoad
- lnbSortByValue Array
-
- control lnbSortByValue Array
+ getContainerMaxLoad String
- lnbSortByValue [idc, column, reversed]
-
- control lnbSortByValue [column, reversed]
+ getContainerMaxLoad containerClass
- $Code$lnbSortByValue [1800, 1, false ];$/Code$
-
- $Code$_ctl lnbSortByValue [1, true ]$/Code$
+ $Code$_maxLoadUniform = getContainerMaxLoad uniform player ;
+ _maxLoadVest = getContainerMaxLoad vest player ;
+ _maxLoadBackpack = getContainerMaxLoad backpack player ;$/Code$
undefined / undefined
@@ -39576,318 +40836,317 @@
- Nothing - Nothing
+ Number
+
- lnbSort
+ getWPPos
- Sorts given multicolumn listbox by lnbText in given column in ascending or descending order.
+ Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.
- https://community.bistudio.com/wiki/lnbSort
+ https://community.bistudio.com/wiki/getWPPos
- lnbSort Array
-
- control lnbSort Array
+ getWPPos Array
- lnbSort [idc, column, reversed]
-
- control lnbSort [column, reversed]
+ getWPPos [group, index]
- $Code$lnbSort [1800, 1, false ];$/Code$
-
- $Code$_ctl lnbSort [1, true ]$/Code$
+ $Code$[_group1,1] setWPPos [200,600,0]; _pos = getWPPos [_group1,1];
+ // returns [200,600,0]$/Code$
- undefined / undefined
+ global / undefined
- Nothing - Nothing
+ Array
+
- lnbText
+ publicVariable
- Returns the shown text in the item with the given position of the given 2D listbox.
+ Broadcasts missionNamespace variable and its value to all computers. The data is sent consequently and reliably to all clients. Using publicVariable too frequently in a given period of time can cause other parts of the game to experience bandwidth problems.
+ Variables broadcast with publicVariable during a mission stay persistent for JIP (Join In Progress) clients. Such persistent variables are synced to the JIP client before the first batch of client side Event Scripts are ran.
+ The following Types of data are supported:
+ Number
+ Since OFP version 1.34 :
+ Boolean
+ Object
+ Group
+ Since ArmA version 1.00:
+ String
+ Text
+ Since ArmA version 1.09 :
+ Array
+ Code
+ Since Arma 3 version 1.26 :
+ Nothing ( nil )
+ Limitations : Cannot use reserved names, such as " player " or " west " or " side ", etc. It is also not possible to transfer references to entities which are local, like scripts, displays, or local objects. Team Member is also not supported.
- https://community.bistudio.com/wiki/lnbText
+ https://community.bistudio.com/wiki/publicVariable
- Control lnbText Array
+ publicVariable String
- control lnbText [row,column]
+ publicVariable varName
- $Code$_ctrl lnbText [0,0];$/Code$
+ $Code$publicVariable "CTFscoreOne";$/Code$
+
+ $Code$myPubVar = [123, "456", true ];
+ publicVariable "myPubVar";$/Code$
- local / local
+ local / global
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
+ (3 Aug, 2006 23:03)
+ This command broadcasts a variable to all clients, but as soon as you change the variable again, you have to use publicVariable again, as it does not automatically synchronise it.
+
+ (12 April, 2008)
+ Be sure to place your variable name in quotation marks. This may sound awfully simple, but many times I have forgotten to do this, and it has resulted in no end of headaches for me.
+
+ (2 Feb, 2008)
+ When initialising a public variable to handle JIP, you will usually first want to check if the public variable has already been (broadcast, received and) set locally. Otherwise you may inadvertantly overwrite the broadcast value with your default value.
+ To perform this check, use code similar to the following to first check that the variable is nil:
+ if ( isNil "PV_abc") then
{
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
+ // set the nil variable with a default value for server and both JIP & 'join at mission start'
+ PV_abc = [7, 8, 9];
};
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
+ // else public variable has already been set due to a public variable broadcast.
+
+ (14 July, 2011)
+ To make Dr_Eyeball's note even more clear:
+ For JIP players pV'ed variables are received and set BEFORE the init.sqf.
+ So to avoid the received variables getting overwritten by variable initialization normally done in the init.sqf, you HAVE TO to use the 'if ( isNil "PV_abc")' pattern.
+ It says literally: "Only initialize value it has not yet been set. And in a JIP this may already been the cause due to publicVariable use".
+
+ (21 September, 2013)
+ To make Dr_Eyeball's and kju's notes even more clear, public variable is persistent. Once it has been broadcast it will be delivered to all clients, present and future. Therefore it is wise to check if the variable already exists on a client due to it being persistent before initialising its value.
+
+ (23 February, 2014)
+ Just to clarify, when players JIP, they get the value of the variable from the last call to publicVariable, not the current value of the variable. Eg. with
+ $Code$SomeVar = 5; publicVariable "SomeVar"; SomeVar = 10;$/Code$
+ Connecting players will receive 5, not the current value of 10.
+
+ (October 19, 2014)
+ I'm pretty far down the notes list so I hope this doesn't get buried.
+ For clarity, after a variable has been publicVariable'd, scripts in all clients can use it as if it had been defined locally.
+ Variables that have been publicVariable'd do not need to be pre-defined on receiving clients. In fact, this could cause issues with JIP players overwriting a publicVariable value, as mentioned above. (tested in A3 1.32.127785)
+ Local variables cannot be publicVariable'd. (tested in A3 1.32.127785) (tested by having dedicated server publicVariable a local variable, then trying to hint it on client. Error was "Undefined variable in expression")
- String
+ Nothing
+
- lnbValue
+ ctrlActivate
- Returns the additional integer value in the item with the given position of the 2D listbox.
+ Launch actions attached to given (button based) control.
- https://community.bistudio.com/wiki/lnbValue
+ https://community.bistudio.com/wiki/ctrlActivate
- lnbValue Array
-
- Control lnbValue Array
+ ctrlActivate Control
- lnbValue [idc,[row, column]]
-
- ctrl lnbValue [row, column]
+ ctrlActivate controlName
- $Code$_ctrl lnbValue [0,0];//1, default is 0 if value is String set by lnbSetValue$/Code$
+ $Code$ctrlActivate _control$/Code$
undefined / undefined
- (Sep 9 2014)
- (A3 1.28)As for invisible data processing, lnbAddArray, lnbAddColumn, lnbData, lnbGetColumnsPosition, lnbSetColumnsPos, lnbSetData, lnbSetText, lnbSetValue, lnbText and lnbValue store data types into exact position of the listNbox with different spaces. Accessing data with coordinate command at nearly the same syntax:
- $Code$
- //Set same value to one position of a Control
- _ctrl lnbSetData [ [0,0],"#1"];
- lnbSetColumnsPos [102, [0,1], 1];
- _ctrl lnbSetText [ [0,1], "#1"];
- _ctrl lnbSetValue [ [0,0],1];
- //Accessing the value disregard affecting one another.
- _ctrl lnbData [0,0]; //"#1"
- lnbGetColumnsPosition _ctrl //[1];
- _ctrl lnbText [0,0];//"#1"
- _ctrl lnbValue [0,0];//1
- $/Code$
- For a direct visible control over CT_LISTNBOX:
- $Code$
- 0 = [_CT_LISTNBOX] spawn {
- private ["_CT_LISTNBOX","_color","_current","_pic"];
- disableSerialization ;
- _CT_LISTNBOX = _this select 0;
- {
- _CT_LISTNBOX lnbAddRow [ getText (_x "displayNameShort"), getText (_x "displayName")];
- _CT_LISTNBOX lnbSetPicture [ [_foreachIndex,0], getText (_x "texture")];
- } forEach (" isClass _x" configClasses ( configFile "CfgRanks"));
- _CT_LISTNBOX lnbSetCurSelRow 0;
- _current = lnbCurSelRow _CT_LISTNBOX;
- _color = _CT_LISTNBOX lnbColor [_current,0];
- _CT_LISTNBOX lnbSetColor [ [_current,1], [(_color select 0)/2,0,0,1] ];
- _CT_LISTNBOX lnbDeleteColumn 0;
- _CT_LISTNBOX lnbDeleteRow 1;
- sleep 1;
- lnbClear _CT_LISTNBOX;//Clear all items but control still remains just invisible.
- };
- $/Code$
- A combined use of both invisible and visible data processing commands alive the Control.
- Number - Number
+ Nothing
+
- ln
+ lnbAddColumn
- Natural logarithm of x.
+ Adds an column at given position. It returns the index of the newly added column.
- https://community.bistudio.com/wiki/ln
+ https://community.bistudio.com/wiki/lnbAddColumn
- ln Number
+ Control lnbAddColumn Number
+
+ lnbAddColumn Array
- ln x
+ _ctrl lnbAddColumn position
+
+ lnbAddColumn [idc or Control,position]
- $Code$_nlog = ln 10
- // Result is 2.302$/Code$
+ $Code$_ctrl lnbAddColumn 0.8;$/Code$
+
+ $Code$lnbAddColumn [105,0.8];$/Code$
- undefined / undefined
+ local / local
+ (A3 1.28) Horizontal coordinates of columns were added relative to list width, in range from 0 to 1.
- Number
+ Number/Void - Number/Void
+
- loadAbs
+ abs
- Returns current sum of mass from items stored in all unit's containers, linked items and weapons.
+ Absolute value of a real number
- https://community.bistudio.com/wiki/loadAbs
+ https://community.bistudio.com/wiki/abs
- loadAbs Object
+ abs Number
- loadAbs unit
+ abs n
- $Code$// Player weight:
- _weight = loadAbs player;$/Code$
+ $Code$_n = abs -3;
+ // Returns 3$/Code$
- undefined / undefined
+ local / undefined
- Number
+ Number
+
- loadBackpack
+ selectPlayer
- Returns current sum of mass from items stored in a backpack.
+ Moves player into given unit. In Arma 3 it is now not possible to selectPlayer into unit occupied by another player. Also avoid selecting player into editor placed units in multiplayer, as it may, on occasion, lead to some undefined behaviour. If you need to selectPlayer into another unit, consider creatingUnit dynamically.
- https://community.bistudio.com/wiki/loadBackpack
+ https://community.bistudio.com/wiki/selectPlayer
- loadBackpack Object
+ selectPlayer Object
- loadBackpack unit
+ selectPlayer unitName
- $Code$myVariable = loadBackpack myUnit;$/Code$
+ $Code$selectPlayer bob;$/Code$
- undefined / undefined
+ local / global
+ This command has significant effects on locality
+ Notes on locality issues with selectPlayer in multiplayer environments:
+ 1) If you switch to a unit that's not local, control over movement will not be given to you immediately. For example, if you switch to an AI unit whose leader is a player, you will not be able to control the movement of your new avatar, as its control remains with the leader unit. You will however be able to look around while the unit walks automatically.
+ 2) The identity of units are not transferred properly: If your old unit dies, this will count for your stats. Your old unit might remain identifiable as you (if you aim at the unit you see your own name). Your new unit will keep it's name, face and voice (face can be set dynamically, but name, voice and glasses have to be defined before mission start in the description.ext). When chatting, not the name of your original identity, but the identity of the transferred to person will show.
+ Those 2 Points were for ArmA I, I am currently analyzing the behaviour in ArmA II with version 1.08 + OA 1.57
+ So with ArmA II, you still have to keep an eye on locality (otherwise the AI will controll the unit you are), but there are cool possibilities now: if you do a "selectPlayer unitVarName",the unit takes your identity (with name, voice, face and glasses) - and your identity is also visible on other clients!
+ But you have to remember that your old unit will stay with your Identity. Dies the old unit, the stats count it. An other thing you have to pay attention is the Death for your new unit - you have to register an EventHandler, otherwise you will stay in your dead unit, and also the MenuOption Respawn won't help you out! 3.Jan. 2011
+ 3) If you do a selectPlayer call, join,joinSilent,joinAs,joinAsSilent wont work anymore correctly. Means: Your unit joins the other group AND your unit will be local to the other group. so at the moment you can use selectPlayer only as a single human player in a group. In the later day I will try what happens if both human players are units by selectPlayer, and both join the same group (till yet tried with one selectPlayer unit and one originUnit)
+ 14.May 2011
+ Tried to create ingame a group with a selectPlayer Unit (on both clients), and joint the new squad. The result was, the group was local to the client who created the group, so after that, all other units that join that Group are - as you may think already, local to that single client. 18.May 2011
+
+ 3) After switching to a unit that's not local, the unit will remain local to you after switching back. For example, if we have units A and B, and a client starts as unit A and unit B is AI under server control. If you switch to unit B, it will take some time, but eventually you can control the movement of unit B (see (1) above). Now if you switch back to unit A, unit B will remain local to you, the player. Any server-side scripts which try to execute local arguments -- such as doMove -- will fail.
+
+ A working implementation can be found at A&S ProMode dev-heaven repo, acc guest, pw guest or at pastebin.
+ Be careful to learn all the pitfalls and things you need to take into consideration to have this working in MP.
+
+ (09 March 2014)
+ Arma 3 (v1.13): In MP the Identity and the name carries over to the new Unit but not in SP. Use setName to set the name in SP.
+
+ (June 24, 2015)
+ Most of the notes above do not apply to Arma 3 anymore.
- Number
+ Nothing
+
- loadFile
+ getBackpackCargo
- Return content of given filename.
+ Returns all backpack types and count from the cargo space
- https://community.bistudio.com/wiki/loadFile
+ https://community.bistudio.com/wiki/getBackpackCargo
- loadFile String
+ getBackpackCargo Object
- loadFile filename
+ getBackpackCargo object
- $Code$_contents = loadFile "myFunction.sqf";$/Code$
+ $Code$_content = getBackpackCargo carName;$/Code$
+
+ $Code$_content = getBackpackCargo ammoBoxName;$/Code$
- undefined / local
+ undefined / undefined
- (28 November 2006)
- In Armed Assault, the 'loadfile' command must be preceded by the 'compile' command to work.
- Ex OFP 1.96: _falarmEvent = loadfile ("syswarn\falarmEvent.sqf")
- Ex ArmA 1.0: _falarmEvent = compile loadfile ("syswarn\falarmEvent.sqf")
-
- (11 July 2007)
- The note by Pennywise is not entirely accurate. loadFile only needs to be preceded with compile when loading code (for example, a function contained in an.sqf file ). Using loadFile without compile will return a string, which, in some cases, is exactly what you want.
-
- (02 December 2012)
- Please note that any comment you have within the file you load will be included, to get around that use preprocessFile instead.
-
- (25 January 2016)
- Notice that you will have to activate file patching via -filePatching [ [1] ]. Otherwise, execVM and loadFile will *not* load any files outside your mission folder (like the global scripts). For more info see CMA:DevelopmentSetup (since Arma 3 1.49+).
- String
+ Array
+
- loadIdentity
+ magazineCargo
- Loads person's identity from Objects.sav file in campaign directory (from entry name).
+ Get array with magazines from ammo box (or any general weapon holder container).
- https://community.bistudio.com/wiki/loadIdentity
+ https://community.bistudio.com/wiki/magazineCargo
- Object loadIdentity String
+ magazineCargo Object
- person loadIdentity name
+ magazineCargo box
- $Code$_ok = player loadIdentity "playerIdentity"$/Code$
+ $Code$hint str magazineCargo uniformContainer cursorTarget ;$/Code$
undefined / undefined
@@ -39895,82 +41154,107 @@
- Boolean
+ Array
+
- loadUniform
+ setTriggerStatements
- Returns current sum of mass from items stored in a uniform.
+ Defines trigger condition, activation and deactivation statements. Trigger condition has to return Boolean. true will activate the trigger, false will deactivate it (only if activation is set to repeat). thisList returns the same result as list command, which includes all entities in the trigger area that are capable of activating the trigger. Dead entities are excluded as well as crew in vehicles, vehicles themselves are included.
- https://community.bistudio.com/wiki/loadUniform
+ https://community.bistudio.com/wiki/setTriggerStatements
- loadUniform Object
+ Object setTriggerStatements Array
- loadUniform unit
+ trigger setTriggerStatements [condition, activation, deactivation]
-
+ $Code$_trg setTriggerStatements ["this", " hint 'trigger on'", " hint 'trigger off'"]$/Code$
+
- undefined / undefined
+ global / local
+ (Mar 14, 2011)
+ An array with three arguments is mandatory for this function.
+
+ (September 16, 2014)
+ Magic variable thisList does not contain dead units.
- Number
+ Nothing
+
- loadVest
+ synchronizeObjectsRemove
- Returns current sum of mass from items stored in a vest.
+ Remove given objects from the unit's list of synchronized objects.
- https://community.bistudio.com/wiki/loadVest
+ https://community.bistudio.com/wiki/synchronizeObjectsRemove
- loadVest Object
+ Object synchronizeObjectsRemove Array
- loadVest unit
+ unit synchronizeObjectsRemove [objects]
- undefined / undefined
+ global / global
- Number
+ Nothing
+
- load
+ setCamUseTI
- Returns current sum of mass from items stored in all unit's containers. Load is calculated by the following formula:
- $Code$_loadPlayer = loadAbs player / getNumber ( configFile "CfgInventoryGlobalVariable" "maxSoldierLoad");$/Code$
+ Activates thermal vision. Mode index defines what sort of thermal vision it is:
+ 0 - White Hot
+ 1 - Black Hot
+ 2 - Light Green Hot / Darker Green cold
+ 3 - Black Hot / Darker Green cold
+ 4 - Light Red Hot /Darker Red Cold
+ 5 - Black Hot / Darker Red Cold
+ 6 - White Hot. Darker Red Cold
+ 7 - Thermal (Shade of Red and Green, Bodies are white)
+ This command only works with camCreate created camera that is currently the main camera for the player (see example).
- https://community.bistudio.com/wiki/load
+ https://community.bistudio.com/wiki/setCamUseTI
- load Object
+ Boolean setCamUseTI Number
- load unit
+ Bool setCamUseTI modeIndex
- $Code$load player ;$/Code$
+ $Code$true setCamUseTI 1;$/Code$
+
+ $Code$// "Preditor" vision:
+ _cam = "camera" camCreate [0,0,0];
+ _cam camSetTarget player ;
+ _cam camSetRelPos [0,1,1.5];
+ _cam cameraEffect ["Internal","Back"];
+ _cam camCommit 0;
+ true setCamUseTI 7;$/Code$
undefined / undefined
@@ -39978,27 +41262,28 @@
- Number
+ Nothing
+
- loadGame
+ nearObjectsReady
- Load a game from the autosave. If failed, restart the mission.
+ Check whether all data are loaded to nearObjects will return in reasonable time.
- https://community.bistudio.com/wiki/loadGame
+ https://community.bistudio.com/wiki/nearObjectsReady
- loadGame
+ Object/Array nearObjectsReady Number
- loadGame
+ position nearObjectsReady radius
- $Code$loadGame ;$/Code$
+ $Code$_twnpos nearObjectsReady 500;//from ALICE$/Code$
undefined / undefined
@@ -40006,28 +41291,29 @@
- Nothing
+ Boolean
+
- loadMagazine
+ completedFSM
- Initiates the loading action on given weapon of the turret of a transport. So the new magazine is not available instantly, yet according to the reloadTime.
- The turret has to be manned. One can also change the magazine if its respective weapon is not selected.
+ Check whether the given FSM completes.
+ The FSM handle is the number returned by the execFSM command.
- https://community.bistudio.com/wiki/loadMagazine
+ https://community.bistudio.com/wiki/completedFSM
- Object loadMagazine Array
+ completedFSM Number
- transport loadMagazine [turretPath, weaponName, magazineName]
+ completedFSM fsmHandle
- $Code$vehicle player loadMagazine [[0],"m256","20Rnd_120mmHE_M1A2"];$/Code$
+ $Code$_completed = completedFSM _fsmHandle;$/Code$
undefined / undefined
@@ -40035,177 +41321,158 @@
- Nothing
+ Boolean
+
- loadOverlay
+ getSuppression
- Creates the load overlay dialog for the specified type of overlay.
- i
- Some Old Editor Command
+ Gets the suppression value of given unit. Returns SCALAR between 0 and 1. Suppression is not calculated for player entities.
- https://community.bistudio.com/wiki/loadOverlay
+ https://community.bistudio.com/wiki/getSuppression
- Control loadOverlay Config
+ getSuppression Object
- map loadOverlay config
+ getSuppression unit
-
+ $Code$getSuppression AI_unit_1;$/Code$
+
- undefined / undefined
+ local / undefined
- Nothing
+ Number
+
- loadStatus
+ assignAsDriver
- Loads object's properties from Objects.sav file in campaign directory (from entry name).
+ Assign a unit as driver of a vehicle. Used together with orderGetIn to order subordinate units to get in as driver of a specific vehicle. Before usage of this command a subordinate unit hasn't got the option to get into the driver place of the vehicle.
- https://community.bistudio.com/wiki/loadStatus
+ https://community.bistudio.com/wiki/assignAsDriver
- Object loadStatus String
+ Object assignAsDriver Object
- obj loadStatus entryName
+ unitName assignAsDriver vehicleName
- $Code$_ok = player loadStatus "playerState";$/Code$
+ $Code$_soldier1 assignAsDriver _tank
+ [_soldier1] orderGetIn true$/Code$
- undefined / undefined
+ global / global
- Boolean
+ Nothing
+
- localize
+ camConstuctionSetParams
- Used to internationalise text messages. A string is returned from Stringtable.csv (or Stringtable.xml ) which corresponds to the stringName.
+ Sets construction camera parameters. To work with "camconstruct" object.
- https://community.bistudio.com/wiki/localize
+ https://community.bistudio.com/wiki/camConstuctionSetParams
- localize String
+ Object camConstuctionSetParams Array
- localize stringName
+ camera camConstuctionSetParams [[x,y,z], radius, maxAboveLand]
- $Code$hint localize "STR_WEST"; // - "BLUFOR" (in Arma2)$/Code$
-
- $Code$hint format ["Go %1", localize "STR_Q_NORTH"]; // - "Go North"$/Code$
-
- $Code$hint format [ localize "STR_ACTION_DROP_WEAPON", localize "STR_SN_RIFLE"]; // - "Drop Rifle"
- // STR_ACTION_DROP_WEAPON contains "Drop %1", STR_SN_RIFLE contains "Rifle"$/Code$
+ $Code$_camera camConstuctionSetParams [ getPos player, 50, 20];$/Code$
- undefined / local
+ undefined / undefined
- (September 12, 2014)
- The command localize will strip all HTML tags from your stringtable.xml entries, however there is a way to trick it by substituting tags with HTML code instead:
- ?xml version = "1.0" encoding = "utf-8" ?
- Key ID = "STR_TEST_KK"
- Original ![CDATA[ t color='#ff0000' This doesn't work /t ]] /Original
- /Key
- Key ID = "STR_TEST_KK2"
- Original t color='#ff0000' This works /t /Original
- /Key
- $Code$ hint parseText localize "str_test_kk"; //no change of colour$/Code$
- $Code$ hint parseText localize "str_test_kk2"; //hint content is in red$/Code$
- String
+ Nothing
+
- local
+ ctrlClassName
- Check if given unit is local on the computer in Multiplayer games (see Locality in Multiplayer for general concepts).
- This can be used when some activation fields or scripts need to be performed only on one computer. In Single player all objects are local.
- Note1: Map created objects (those placed in Visitor ) are local everywhere.
- Note2: Since Arma 3 v1.53.132932 keyword local has been renamed to private for consistency and to avoid any confusion. However, this just makes the third example obsolete. It's core functionality still remains.
+ Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:
+ $Code$_className = findDisplay 12 getVariable ["BIS_fnc_initDisplay_configClass", ""]; // "RscDiary"$/Code$
- https://community.bistudio.com/wiki/local
+ https://community.bistudio.com/wiki/ctrlClassName
- local Object/Group
+ ctrlClassName Control
- local object
+ ctrlClassName control
- $Code$// SQS:
- ?! local _unitName : hint "remote"$/Code$
-
- $Code$// SQF:
- if (! local _unitName) then {
- hint "remote";
- };$/Code$
-
- $Code$_isLocalGroup = local group _unit;$/Code$
+ $Code$// List class names of all controls present on display 46:
+ _ctrls = "";
+ for "_i" from -1 to 10000 do {
+ with uiNamespace do {
+ _ctrl = findDisplay 46 displayCtrl _i;
+ if (! isNull _ctrl) then {
+ _ctrls = _ctrls + format ["IDC: %1, Class Name: %2\n", _i, ctrlClassName _ctrl];
+ };
+ };
+ };
+ hint _ctrls;$/Code$
- global / undefined
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- In multiplayer, a game logic will always be local to the host computer. This works on both dedicated and player-hosted servers.
- Boolean
+ String
+
- locationNull
+ ropeEndPosition
- A non-existing Location. To compare non-existent locations use isNull or isEqualTo :
- locationNull == locationNull ; // false
- isNull locationNull ; // true
- locationNull isEqualTo locationNull ; // true
+ Return rope end positions in Position3D format
- https://community.bistudio.com/wiki/locationNull
+ https://community.bistudio.com/wiki/ropeEndPosition
- locationNull
+ ropeEndPosition Object
- locationNull
+ ropeEndPosition rope
- $Code$! isNull locationNull ; // false$/Code$
-
- $Code$str locationNull ; // No location$/Code$
-
- $Code$position locationNull ; // [0,0,0]$/Code$
+ $Code$_ends = ropeEndPosition ( ropes heli1 select 0);
+ _end1 = _ends select 0;
+ _end2 = _ends select 1;$/Code$
undefined / undefined
@@ -40213,353 +41480,358 @@
- Location
+ Array
+
- locationPosition
+ removeMissionEventHandler
- Returns the position of a location. If the location is attached to an object, that object's position is returned.
+ Removes mission event handler added by addMissionEventHandler.
+ When any handler is removed, all handler indices higher that the deleted one should be decremented.
- https://community.bistudio.com/wiki/locationPosition
+ https://community.bistudio.com/wiki/removeMissionEventHandler
- locationPosition Location
+ removeMissionEventHandler Array
- locationPosition location
+ removeMissionEventHandler [type, index]
- $Code$_locationPos = locationPosition myLocation;$/Code$
-
- $Code$_location = nearestLocation [ getPos player, "nameCity"];
- _locationPos = locationPosition _location;$/Code$
+ $Code$for "_i" from 0 to 4 do {
+ missionNamespace setVariable [ format ["handler%1",_i], addMissionEventHandler ["Loaded","hint ""_i"";"]];
+ };
+ removeMissionEventHandler ["Loaded",handler2]; //Remove the third index under type "Loaded"$/Code$
undefined / undefined
- (October 24, 2015)
- locationPosition returns a position that is altitude zero ASL.
+ (August 6, 2015)
+ As of Arma 3 version 1.38 you can safely remove mission event handlers without worrying about decrementing higher indices.
- Array
+ Nothing
+
- lockCameraTo
+ getAssignedCuratorLogic
- Lock/Unlock stabilized camera (in vanilla used currently only for UAVs) to target.
+ Returns curator logic to which given player has access.
- https://community.bistudio.com/wiki/lockCameraTo
+ https://community.bistudio.com/wiki/getAssignedCuratorLogic
- Object lockCameraTo Array
+ getAssignedCuratorLogic Object
- vehicle lockCameraTo [target, turretPath]
+ getAssignedCuratorLogic player
- $Code$uav lockCameraTo [vehicle, [0,0]];$/Code$
+ $Code$( getAssignedCuratorLogic player ) removeCuratorEditableObjects [ allDead, true ];$/Code$
undefined / undefined
- (April 10, 2015)
- The command also accepts a position (ASL) instead of an object. The vehicle has to have a stabilized optic for this command to work.
+ (August 17, 2014)
+ This command will return objNull if used immediately after the curator logic is assigned to the unit in question (this includes at mission time 0). To avoid problems use the following beforehand: $Code$ waitUntil {! isNull ( getAssignedCuratorLogic unit)};$/Code$
- Nothing
+ Object
+
- lockCargo
+ taskDescription
- Lock all cargo positions of a vehicle or lock by index. This command must be executed where vehicle is local.
+ Returns the sub-parts of the task description. The returned Array is in format [Task description, Task title, Task waypoint description].
- https://community.bistudio.com/wiki/lockCargo
+ https://community.bistudio.com/wiki/taskDescription
- Object lockCargo Boolean
-
- Object lockCargo Array
+ taskDescription Task
- vehicle lockCargo lock
-
- vehicle lockCargo [index, lock]
+ taskDescription task
- $Code$vehicleName lockCargo true ;$/Code$
-
- $Code$vehicleName lockCargo [0, true ];$/Code$
+ $Code$_taskDescArray = taskDescription _task;$/Code$
- local / global
+ undefined / undefined
+ (November 14, 2014)
+ Be careful if you want to use this to retrieve the title of a task.
+ If the task has no description set, then "taskDescription" will only return an array of empty Strings.
+ Therefor always use setSimpleTaskDescription directly after creating a new task, even if you set the Description to "".
- Nothing - Nothing
+ Array
+
- lock
+ aimedAtTarget
- Lock vehicle (disable mounting / dismounting) for player. Similar to setVehicleLock when number is used as param.
+ Returns how good the weapon of the vehicle is aimed at the target.
- https://community.bistudio.com/wiki/lock
+ https://community.bistudio.com/wiki/aimedAtTarget
- Object lock Boolean
-
- Object lock Number
+ Object aimedAtTarget Array
- vehicleName lock locked
-
- vehicleName lock lockstate
+ vehicle aimedAtTarget [target, weapon]
- $Code$_jeepOne lock true ;$/Code$
+ $Code$_aimingQuality = heli aimedAtTarget [target];$/Code$
- $Code$heli lock true ;
- locked heli; //2
- heli lock false ;
- locked heli; //0
- heli lock 1;
- locked heli; //1$/Code$
+ $Code$_aimingQuality = heli aimedAtTarget [target,"M197"];$/Code$
- local / global
+ undefined / undefined
- (January 9, 2010)
- Lock prevents AI persons mounting or dismounting vehicles when ordered to do so and players are prevented from doing both too, but AI will dismount when a vehicle is damaged.
-
- (September 22, 2010)
- If an AI group (eg Mechanized Infantry) has its vehicule locked with its crew in it, it will mount or dismount it anyway. But a player in this group won't be able to enter the vehicle.
-
- (April 2, 2013)
- From Arma 3 version 0.50 can be used Number as lock parameter :
- 0 - Unlocked
- 1 - Default
- 2 - Locked
- 3 - Locked for player
-
- (March 4, 2015)
- 1 - is DEFAULT lock for vehicle placed in editor. Player that is not the leader in a group of AIs will not be able to enter this vehicle.
+ (November 19, 2013)
+ The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between. 1 doesn't mean you are going to hit the target, while 0 means you're definitely off.
- Nothing - Nothing
+ Number
+
- lockDriver
+ ctrlAutoScrollDelay
- Lock the driver position of the vehicle. This command must be executed where vehicle is local.
+ Returns number of seconds auto-scroll will wait before scroll and/or rewind. -2 if scrollbar not present.
+ Autorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.
- https://community.bistudio.com/wiki/lockDriver
+ https://community.bistudio.com/wiki/ctrlAutoScrollDelay
- Object lockDriver Boolean
+ ctrlAutoScrollDelay Control
- vehicle lockDriver lock
+ ctrlAutoScrollDelay control
- $Code$vehicleName lockDriver true ;$/Code$
+ $Code$_ctrlDelay = ctrlAutoScrollDelay _ctrlGroup;$/Code$
- local / global
+ undefined / undefined
- Nothing
+ Number
+
- lockIdentity
+ removeMagazine
- Locks the identity of a person. This will disable default identity.
+ Remove magazine from the unit.
+ Note: You may create invalid combinations with this function. When doing so, application behaviour is undefined.
- https://community.bistudio.com/wiki/lockIdentity
+ https://community.bistudio.com/wiki/removeMagazine
- lockIdentity Object
+ Object removeMagazine String
- lockIdentity unit
+ unitName removeMagazine magazineName
- $Code$_success = lockIdentity player;$/Code$
+ $Code$player removeMagazine "M16"$/Code$
- undefined / undefined
+ local / undefined
- Boolean
+ Nothing
+
- lockTurret
+ setGroupIdGlobal
- Lock the gunner position of the vehicle turret. This command must be executed where vehicle is local.
+ A global equivalent of setGroupId
- https://community.bistudio.com/wiki/lockTurret
+ https://community.bistudio.com/wiki/setGroupIdGlobal
- Object lockTurret Array
+ Object/Group setGroupIdGlobal Array
- vehicle lockTurret [turret path,lock]
+ group setGroupIdGlobal [nameFormat, nameParam1,, nameParamN]
- $Code$vehicleName lockTurret [[0,0], true ];$/Code$
-
- $Code$vehicle player lockTurret [[0], true ];$/Code$
-
+
- local / global
+ global / global
- Nothing
+ Nothing
+
- lockWP
+ moveInCargo
- Disable switching to next waypoint (current waypoint will never complete while lockwp is used). Sometimes used during cut-scenes.
+ Move soldier into vehicle cargo position (Immediate, no animation).
- https://community.bistudio.com/wiki/lockWP
+ https://community.bistudio.com/wiki/moveInCargo
- Object/Group lockWP Boolean
+ Object moveInCargo Object
+
+ Object moveInCargo Array
- groupName lockWP lock
+ unitName moveInCargo vehicle
+
+ unitName moveInCargo [vehicle, CargoIndex]
- $Code$_groupOne lockWP true ;$/Code$
-
- $Code$_Soldier lockWP true ;$/Code$
+ $Code$_soldierOne moveInCargo _jeepOne;$/Code$
- $Code$_MyTank lockWP false ;$/Code$
+ $Code$_soldierOne moveInCargo [_jeepOne, 1];$/Code$
- local / local
+ local / global
+ (August 4, 2006)
+ Notes from before the conversion
+ If you place a soldier in a vehicle with the moveInCargo command, he wont "know" he's in the vehicle, and thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint. Therefore you have to use the assignAsCargo command, in order for the AI to catch on. Something like this: moveInCargo helo1 this assignAsCargo helo1
+ MP Note Functions MoveInCargo can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
+
+ In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Cargo" action command.
+
+ In Arma 3 when using the alternative syntax of moveInCargo, it is necessary to call assignAsCargoIndex because it is not called automatically.
+ $Code$unit1 moveInCargo [heli, 3];
+ unit1 assignAsCargoIndex [heli, 3];$/Code$
+ Alternatively avoid this broken syntax all together and use:
+ $Code$unit1 assignAsCargoIndex [heli, 3];
+ unit1 moveInCargo heli;
+ $/Code$
- Nothing
+ Nothing - Nothing
+
- lockedCargo
+ setMarkerSizeLocal
- Check whether cargo position of the vehicle is locked.
+ Set marker size.
+ Size is in format [a-axis, b-axis].
- https://community.bistudio.com/wiki/lockedCargo
+ https://community.bistudio.com/wiki/setMarkerSizeLocal
- Object lockedCargo Number
+ String setMarkerSizeLocal Array
- vehicle lockedCargo cargoIndex
+ markerName setMarkerSizeLocal [a-axis, b-axis]
- $Code$_result = vehicleName lockedCargo 0;$/Code$
+ $Code$"MarkerOne" setMarkerSizeLocal [100, 200];$/Code$
- undefined / undefined
+ undefined / local
- (May 4, 2016)
- For some vehicles, the command returns nothing if the cargo index is invalid (i.e. -1)
- Boolean
+ Nothing
+
- lockedDriver
+ camPrepareDive
- Check whether driver position of the vehicle turret is locked.
+ Prepares the camera dive angle.
+ This command is non-functional !
- https://community.bistudio.com/wiki/lockedDriver
+ https://community.bistudio.com/wiki/camPrepareDive
- lockedDriver Object
+ Object camPrepareDive Number
- lockedDriver vehicle
+ camera camPrepareDive dive
-
+ $Code$_camera camPrepareDive -0.1$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- lockedTurret
+ libraryDisclaimers
- Check whether gunner position of the vehicle turret is locked.
+ Returns the library disclaimers.
- https://community.bistudio.com/wiki/lockedTurret
+ https://community.bistudio.com/wiki/libraryDisclaimers
- Object lockedTurret Array
+ libraryDisclaimers
- vehicle lockedTurret turretPath
+ libraryDisclaimers
- $Code$_locked = tank lockedTurret [0];$/Code$
+ $Code$hint str libraryDisclaimers ; // as in Arma2 OA 1.62.95208
+ // ["THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."]$/Code$
undefined / undefined
@@ -40567,280 +41839,240 @@
- Boolean
+ Array
+
- locked
+ edit3DENMissionAttributes
- Check if vehicle is locked for Persons. If it is locked, Persons cannot mount / dismount without order.
+ Open a window with scenario attribute in given section.
- https://community.bistudio.com/wiki/locked
+ https://community.bistudio.com/wiki/edit3DENMissionAttributes
- locked Object
+ edit3DENMissionAttributes String
- locked vehicle
+ edit3DENMissionAttributes section
- $Code$_locked = locked _jeepOne;$/Code$
+ $Code$edit3DENMissionAttributes "Multiplayer";$/Code$
- global / undefined
+ undefined / undefined
- (March 4, 2013)
- From Arma 3 version 0.50 is return value Number :
- -1 - Object is null
- 0 - Unlocked
- 1 - Default
- 2 - Locked
- 3 - Locked for player
- Number
+ Nothing
+
- logEntities
+ curatorAddons
- Creates a log file containing the list of all game entities in scene.
- File is created in the same directory as.rpt file.
- Special: BattlEye's RCON variant of this command is #logEntities (see also Multiplayer_Server_Commands )
+ Returns list of addons allowed to given curator.
- https://community.bistudio.com/wiki/logEntities
+ https://community.bistudio.com/wiki/curatorAddons
- logEntities
+ curatorAddons Object
- logEntities
+ curatorAddons curatorObj
- $Code$logEntities ;$/Code$
+ $Code$_addons = curatorAddons myCurator;$/Code$
undefined / undefined
- File name example:
- logEntities_4688_12-04-2014_12-19-39.log
- File content example:
- ====================== Vehicles =======================
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:1, Out: 0, NetID:2:3, Pos: [2476.243896][73.782043], N:B_Soldier_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2471.500977][62.477680], N:Snake_random_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2489.192383][73.935181], N:Snake_random_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2487.953857][73.828362], N:Snake_random_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2800.174805][96.234093], N:Rabbit_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2825.378418][2.068635], N:Rabbit_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2888.919434][6.837101], N:Rabbit_F
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2910.756104][16.089361], N:Rabbit_F
- Loc:0, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 1, AnyPl:0, Out: 0, NetID:2:0, Pos: [9.000000][9.000000], N:Logic
- Total objects: 9
- Statistics objects: 9
- IsLocal: 8
- IsMarkedToDelete: 0
- IsDestroyed: 0
- IsDamageDestroyed: 0
- IsDamageDead: 0
- IsNotSimulated: 9
- IsVisible: 1
- IsAnyPlayer: 1
- IsOutsideMap: 0
- =================== Slow vehicles =====================
- Total objects: 214
- Statistics objects: 0
- Static objects are accounted in total object count but not included in statistics
- IsLocal: 0
- IsMarkedToDelete: 0
- IsDestroyed: 0
- IsDamageDestroyed: 0
- IsDamageDead: 0
- IsNotSimulated: 0
- IsVisible: 0
- IsAnyPlayer: 0
- IsOutsideMap: 0
- =================== Out vehicles ====================
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:1, Pos: [2476.243896][73.782043], N:Supply40
- Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:2, Pos: [2476.243896][73.782043], N:Supply140
- Total objects: 2
- Statistics objects: 2
- IsLocal: 2
- IsMarkedToDelete: 0
- IsDestroyed: 0
- IsDamageDestroyed: 0
- IsDamageDead: 0
- IsNotSimulated: 2
- IsVisible: 0
- IsAnyPlayer: 0
- IsOutsideMap: 0
- Nothing
+ Array
+
- logNetwork
+ waypointCompletionRadius
- Registers new log file recording a network traffic and returns handle of the log.
+ Gets the radius around the waypoint where the waypoint is completed.
- https://community.bistudio.com/wiki/logNetwork
+ https://community.bistudio.com/wiki/waypointCompletionRadius
- logNetwork String
+ waypointCompletionRadius Array
- logNetwork logFile
+ waypointCompletionRadius waypoint
- $Code$_handle = logNetwork "myLog.txt";$/Code$
+ $Code$_radius = waypointCompletionRadius [groupOne, 1];$/Code$
undefined / undefined
- (March 15, 2016)
- With his syntax i get an error... - logNetwork "networkLog.txt";
- $Code$ 5:37:06 Error in expression logNetwork "networkLog.txt";
- 5:37:06 Error position: logNetwork "networkLog.txt";
- 5:37:06 Error lognetwork: Typ Zeichenfolge(STRING), erwartet(except) Array
- $/Code$
- Number
+ Number
+
- logNetworkTerminate
+ finite
- Terminates a network log file started with logNetwork with the given handle
+ True, if number is finite (not infinite and a valid number)
- https://community.bistudio.com/wiki/logNetworkTerminate
+ https://community.bistudio.com/wiki/finite
- logNetworkTerminate Number
+ finite Number
- logNetworkTerminate handle
+ finite x
-
+ $Code$?!finite 10/0 : hint "Infinite"$/Code$
+
undefined / undefined
+ (27 Sep, 2013)
+ Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:
+ $Code$//ArmA 2
+ hint str finite (10/0); //true... O_o Huh????
+ hint str (10/0); //0... Weird, but that explains it.
+ //ArmA 3
+ hint str finite (10/0); // Error Zero Divisor
+ hint str finite 10; //true
+ hint str finite 1000000000000000000000000000000000000000; //false$/Code$
- Nothing
+ Boolean
+
- log
+ soldierMagazines
- Base-10 logarithm of x.
+ Get array with all magazines of the given unit.
- https://community.bistudio.com/wiki/log
+ https://community.bistudio.com/wiki/soldierMagazines
- log Number
+ soldierMagazines Object
- log x
+ soldierMagazines unit
- $Code$_log = log 10; // 1$/Code$
+ $Code$soldierMagazines player ;[
+ "6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](5x)",
+ "9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)",
+ "RGO Frag Grenade(1/1)[id/cr:10/0](2x)",
+ "Smoke Grenade (White)(1/1)[id/cr:12/0](1x)",
+ "Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)",
+ "Chemlight (Green)(1/1)[id/cr:14/0](2x)",
+ "Titan AT Missile(1/1)[id/cr:16/0](2x)"
+ ]$/Code$
undefined / undefined
- (23:14, 16 Jun 2014)
- (A3 1.20) To clarify:
- $Code$y = 10 ^ x // x = log y$/Code$
- People use logarithm at the purpose of simplifying multiplication via exponents plus years before.
- $Code$23456*45634 = 1.07039e+009
- log 23456 = 4.37025; log 45634 = 4.65929; ( log 23456) + ( log 45634) = 9.02954
- 10^(( log 23456) + ( log 45634)) = 10 ^ 9.02954 // same as 23456*45634
- $/Code$
- As modern usage, for instance, to evaluate another exponent when multiple is known (Which magnitude is 4 times stronger than 8.3 earthquake?):
- $Code$//_Unknown = log x; 8.3 = log y
- // x = 10 ^_Unknown; y = 10 ^8.3
- //x/y = (10 ^_Unknown)/(10 ^8.3) = log 4
- // x/y = _Unknown – 8.3 = 0.6
- //_result = 8.9 magnitude
- _result = ( log 4) + 8.3
- $/Code$
- Number
+ Array
+
- lookAtPos
+ buildingPos
- Center the map on,and point the camera at,the position.
- i
- Some Old Editor Command
+ Returns PositionAGL of a given indexed position in a building. The index is 0-based (i.e. the first possible position would be 0. So if a building has 5 positions listed in the editor, 4 would be the highest position index usable with this command). Command will return [0,0,0] if buildingPos with given index is non-existent.
+ Since Arma 3 v.155.133934 if index -1 is supplied, the command will return array with all available positions.
- https://community.bistudio.com/wiki/lookAtPos
+ https://community.bistudio.com/wiki/buildingPos
- Control lookAtPos Array
+ Object buildingPos Number
- map lookAtPos position
+ building buildingPos index
- $Code$(findDisplay 12) lookAtPos [0,0,0];$/Code$
+ $Code$_soldier setPosATL (_house1 buildingPos 2);$/Code$
+
+ $Code$_allpositions = nearestBuilding player buildingPos -1;$/Code$
- undefined / undefined
+ global / undefined
+ (August 2, 2006)
+ Notes from before the conversion:
+ These examples will move a unit to the 1st position specified in a buildings model, in the second example - bunker1.
+ $Code$this move (building buildingPos 1);
+ this move (bunker1 buildingPos 1);$/Code$
+ In the default game buildings, the buildingPos is usually right behind a window. This can make it easy to place units in the windows of buildings, by putting the unit near a building and putting this in its init field:
+ $Code$this setPosATL (( nearestBuilding this) buildingPos 1);$/Code$
+ The location returned by buildingPos is not reliable after the player has exited and then resumed the mission. For code that is executed immediately after the mission starts there is no problem.
+ If buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts.
+
+ (January 26, 2007)
+ The highest index is not necessarily the highest position in a building! Check the z-value to find out the absolute height of a position.
+
+ (February 16, 2007)
+ (building buildingPos 1) will return [0,0,0] if buildingPos with this index does not exist.
+
+ (January 08, 2011)
+ Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model).
- Nothing
+ Array
+
- lookAt
+ commandFSM
- Control what the unit(s) is/are looking at (target or position).
+ Orders a unit to process command defined by FSM file (via the radio).
- https://community.bistudio.com/wiki/lookAt
+ https://community.bistudio.com/wiki/commandFSM
- Object/Array lookAt Object/Array
+ Object/Array commandFSM Array
- unit lookAt position
+ unitName commandFSM [fsm name, position, target]
- $Code$_someSoldier lookAt _otherSoldier$/Code$
-
- $Code$[_someSoldier, _otherSoldier] lookAt markerPos "markerOne"$/Code$
+ $Code$_soldierOne commandFSM ["move.fsm", position player, player]$/Code$
undefined / undefined
@@ -40848,272 +42080,266 @@
- Nothing
+ Nothing
+
- magazineCargo
+ getPosVisual
- Get array with magazines from ammo box (or any general weapon holder container).
+ Returns an object's rendered 3D position (z value above sea when over sea, or above ground when over land) in render time scope. Alias of visiblePosition.
- https://community.bistudio.com/wiki/magazineCargo
+ https://community.bistudio.com/wiki/getPosVisual
- magazineCargo Object
+ getPosVisual Object
- magazineCargo box
+ getPosVisual object
- $Code$hint str magazineCargo uniformContainer cursorTarget ;$/Code$
+ $Code$_playerRenderedPos = getPosVisual player ;$/Code$
- undefined / undefined
+ global / undefined
- Array
+ Array
+
- magazineTurretAmmo
+ canAdd
- Returns ammo count of given type from given turret
- Broken when vehicle has multiple magazines of the same type
+ Checks if given object can be stored in inventory of given object or any inventory container ( uniform, vest, backpack ) of given unit.
- https://community.bistudio.com/wiki/magazineTurretAmmo
+ https://community.bistudio.com/wiki/canAdd
- Object magazineTurretAmmo Array
+ Object canAdd String
+
+ Object canAdd Array
- vehicle magazineTurretAmmo [magazineClass, turretPath]
+ object canAdd item
+
+ object canAdd [item, count]
- $Code$vehicle player magazineTurretAmmo ["cls", [0]]$/Code$
+ $Code$if ( player canAdd "FirstAidKit") then {
+ player addItem "FirstAidKit";
+ } else {
+ hint "Not enough space";
+ };$/Code$
+
+ $Code$if (_box canAdd "FirstAidKit") then {
+ _box addWeaponCargo ["FirstAidKit", 1];
+ } else {
+ hint "Not enough space";
+ };$/Code$
+
+ $Code$car canAdd [ currentWeapon player, 50];$/Code$
undefined / undefined
+ (November 29, 2015)
+ Can also be used on any object that has inventory, not only player inventory containers.
+ Where _box is B_supplyCrate_F :
+ $Code$// Empty
+ _box canAdd "FirstAidKit";
+ - true
+ // Full
+ _box canAdd "FirstAidKit";
+ - false
+ $/Code$
+
+ (February 11, 2017)
+ This can also be used as alternative to canAddItemToBackpack, canAddItemToUniform, canAddItemToVest where container might not be strictly defined.In some cases it might be a good optimisation for your code, where you also don't need to perform checks on which type of player container this is. Example:
+ $Code$_i = [(uniformContainer player),(vestContainer player),(backpackContainer player)] call BIS_fnc_selectRandom;
+ if (_i canAdd "Rangefinder") then {
+ _i addItemCargoGlobal ["Rangefinder",1];
+ };
+ $/Code$
- Number
+ Boolean - Boolean
+
- magazinesAllTurrets
+ clearWeaponCargo
- Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts.
+ Remove all weapons from the given vehicle's weapon cargo space.
- https://community.bistudio.com/wiki/magazinesAllTurrets
+ https://community.bistudio.com/wiki/clearWeaponCargo
- magazinesAllTurrets Object
+ clearWeaponCargo Object
- magazinesAllTurrets vehicle
-
-
- $Code$_mags = magazinesAllTurrets vehicle player ;$/Code$
-
-
- global / undefined
-
-
-
-
- Array
-
-
-
-
- magazinesAmmoCargo
-
-
- Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines.
-
-
- https://community.bistudio.com/wiki/magazinesAmmoCargo
-
-
- magazinesAmmoCargo Object
-
-
- magazinesAmmoCargo vehicle
+ clearWeaponCargo vehicleName
- $Code$magazinesAmmoCargo vehicle player ;$/Code$
-
- $Code$magazinesAmmoCargo uniformContainer player ;[
- ["30Rnd_65x39_caseless_mag",30],
- ["30Rnd_65x39_caseless_mag",30],
- ["Chemlight_green",1]
- ]$/Code$
+ $Code$clearWeaponCargo _truck$/Code$
- undefined / undefined
+ global / local
+ (October 24, 2009)
+ Only works on clients.
- Array
+ Nothing
+
- magazinesAmmo
+ actionKeysImages
- Returns array of arrays of all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use magazinesAmmoFull to return all magazines.
- Output format :
- [[magazine1],[magazine2],[magazine3]...[magazineN]]
- Magazine format :
- 0: Magazine class name
- 1: Magazine current ammo count
+ Returns a list of button images or names assigned to the given user action. A maximum of maxKeys keys is listed. You can find the action names in config class ControllerSchemes or user action names.
- https://community.bistudio.com/wiki/magazinesAmmo
+ https://community.bistudio.com/wiki/actionKeysImages
- magazinesAmmo Object
+ actionKeysImages String
+
+ actionKeysImages Array
- magazinesAmmo vehicle
+ actionKeysImages userAction
+
+ actionKeysImages [userAction, maxKeys]
- $Code$_magazinesAmmo = magazinesAmmo player ;
- /*
- [
- ["30Rnd_65x39_caseless_mag",30],
- ["30Rnd_65x39_caseless_mag",30],
- ["16Rnd_9x21_Mag",16],
- ["SmokeShellGreen",1],
- ["Chemlight_green",1],
- ["HandGrenade",1]
- ]
- */$/Code$
+ $Code$_text = actionKeysImages "ReloadMagazine"$/Code$
- $Code$_magazinesAmmo = magazinesAmmo Mi_48;
- /*
- [
- ["250Rnd_30mm_APDS_shells",250],
- ["250Rnd_30mm_HE_shells",250],
- ["8Rnd_LG_scalpel",8],
- ["38Rnd_80mm_rockets",38]
- ]
- */$/Code$
+ $Code$_reload = actionKeysImages ["ReloadMagazine",1] will return "R" (incl. the quotation marks!)$/Code$
undefined / undefined
- (December 20, 2014)
- When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
- If you want to get all turrets' magazines, use allTurrets and magazinesTurret.
- -- Actium ( talk ) 15:41, 20 December 2014 (CET)
- Array
+ Structured_Text - Structured_Text
+
- magazinesAmmoFull
+ moveInTurret
- Returns array of arrays of all vehicle's magazines with extended information about them.
- Output format :
- [[magazine1],[magazine2],[magazine3]...[magazineN]]
- Magazine format :
- 0: Magazine class name
- 1: Magazine current ammo count
- 2: Magazine state (true - loaded, false - not loaded)
- 3: Magazine type (-1 - n/a, 0 - grenade, 1 - primary weapon mag, 2 - handgun mag, 4 - secondary weapon mag, 65536 - vehicle mag)
- 4: Magazine location ("Vest", "Uniform", "Backpack", "") or corresponding currentMuzzle
+ Moves the soldier into the vehicle's turret. (Immediately, without animation). turret path is an array of positions inside a turret, or positions inside a turret of a turret.
+ [0] means first turret.
+ [0,0] means first turret of first turret.
+ [0,1] means second turret of first turret.
+ [1] means second turret.
+ [1,0] means first turret of the second turret.
+ [2,0] means first turret of third turret.
+ And so on...
- https://community.bistudio.com/wiki/magazinesAmmoFull
+ https://community.bistudio.com/wiki/moveInTurret
- magazinesAmmoFull Object
+ Object moveInTurret Array
- magazinesAmmoFull vehicle
+ unitName moveInTurret [vehicle, turretPath]
- $Code$_magazinesAmmoFull = magazinesAmmoFull player ;
- /*
- [
- ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform"],
- ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest"],
- ["16Rnd_9x21_Mag",16,false,-1,"Vest"],
- ["SmokeShellGreen",1,true,0,"SmokeShellGreenMuzzle"],
- ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle"],
- ["HandGrenade",1,true,0,"HandGrenadeMuzzle"],
- ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F"],
- ["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F"]
- ]
- */$/Code$
-
- $Code$_magazinesAmmoFull = magazinesAmmoFull Mi_48;
- /*
- [
- ["250Rnd_30mm_APDS_shells",250,false,-1,""],
- ["250Rnd_30mm_HE_shells",250,true,65536,"gatling_30mm"],
- ["8Rnd_LG_scalpel",8,true,65536,"missiles_SCALPEL"],
- ["38Rnd_80mm_rockets",38,true,65536,"rockets_Skyfire"]
- ]
- */$/Code$
+ $Code$_soldierOne moveInTurret [_tank, [0, 0]]$/Code$
- undefined / undefined
+ local / global
- (December 20, 2014)
- When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
- If you want to get all turrets' magazines, use allTurrets and magazinesTurret.
- -- Actium ( talk ) 15:40, 20 December 2014 (CET)
+ (March 6, 2008)
+ To find out which turrets are available on a vehicle, and what the syntax is, you can use this little script.
- (February 10, 2015)
- As Actium said, this function seems to extract data from:
- configfile "CfgVehicles" _the_vehicle_you_want "Turrets" "MainTurret" "magazines".
- Some vehicles return an empty field {} because magazines are in straight in:
- configfile "CfgVehicles" _the_vehicle_you_want "magazines" (often dedicated to flares only).
- This is the case of WY-55 Hellcat. This function returns an empty array.
+ (February 13, 2014)
+ Examples for nested turrets:
+ MainTurret = $Code$_soldierOne moveInTurret [_tank, [0]] $/Code$
+ CommanderTurret = $Code$_soldierOne moveInTurret [_tank, [0, 0]] $/Code$
+ ... where:
+ MainTurret is the standard BIS MainTurret... e.g:
+ $Code$class Turrets
+ {
+ class MainTurret {};
+ };$/Code$
+ CommanderTurret is the standard BIS CommanderTurret located on the MainTurret... e.g:
+ $Code$class Turrets
+ {
+ class MainTurret
+ {
+ class Turrets
+ {
+ class CommanderTurret {};
+ };
+ };
+ };$/Code$
+
+ (March 18, 2014)
+ Here is a small function to find available turret paths for a given vehicle. It will only search 2 levels deep, hence called commonTurrets :
+ $Code$KK_fnc_commonTurrets = {
+ private ["_arr","_trts"];
+ _arr = [];
+ _trts = configFile / "CfgVehicles" / typeOf _this / "Turrets";
+ for "_i" from 0 to count _trts - 1 do {
+ _arr set [ count _arr, [_i]];
+ for "_j" from 0 to count (
+ _trts / configName (_trts select _i) / "Turrets"
+ ) - 1 do {
+ _arr set [ count _arr, [_i, _j]];
+ };
+ };
+ _arr
+ };$/Code$
+ Example call:
+ $Code$ hint str ( vehicle player call KK_fnc_commonTurrets); //[[0],[0,0]]$/Code$
+ See also allTurrets
- Array
+ Nothing
+
- magazinesDetailBackpack
+ shownChat
- Returns an array with the type names of all the unit's backpack magazines.
+ Returns true if chat window is enabled. Chat window can be disabled with showChat command.
- https://community.bistudio.com/wiki/magazinesDetailBackpack
+ https://community.bistudio.com/wiki/shownChat
- magazinesDetailBackpack Object
+ shownChat
- magazinesDetailBackpack unit
+ shownChat
- $Code$magazinesDetailBackpack player$/Code$
+ $Code$_bool = shownChat ;$/Code$
undefined / undefined
@@ -41121,27 +42347,30 @@
- Array
+ Boolean
+
- magazinesDetailUniform
+ groupIconsVisible
- Returns an array with the type names of all the unit's uniform magazines.
+ Return group icons are visible.
- https://community.bistudio.com/wiki/magazinesDetailUniform
+ https://community.bistudio.com/wiki/groupIconsVisible
- magazinesDetailUniform Object
+ groupIconsVisible
- magazinesDetailUniform unit
+ groupIconsVisible
- $Code$magazinesDetailUniform player$/Code$
+ $Code$// HC bar active
+ if (isNil "BIS_HC_visible") then {BIS_HC_visible = groupIconsVisible};
+ setGroupIconsVisible [true,true];$/Code$
undefined / undefined
@@ -41149,291 +42378,319 @@
- Array
+ Array
+
- magazinesDetailVest
+ setPos
- Returns an array with the type names of all the unit's vest magazines.
+ Sets object position.
- https://community.bistudio.com/wiki/magazinesDetailVest
+ https://community.bistudio.com/wiki/setPos
- magazinesDetailVest Object
+ Object setPos Array
- magazinesDetailVest unit
+ object setPos pos
- $Code$magazinesDetailVest player$/Code$
+ $Code$player setPos [ getPos player select 0, getPos player select 1, ( getPos player select 2) +10];
+ //the same as above using modelToWorld :
+ player setPos ( player modelToWorld [0,0,10]);
+ //the same as above using vectorAdd :
+ player setPos ( getPos player vectorAdd [0,0,10]);$/Code$
+
+ $Code$_obj setPos [ getPos _obj select 0, getPos _obj select 1, -5];$/Code$
+
+ $Code$player setPos ( getPos _obj);$/Code$
- undefined / undefined
+ global / global
+ (6 Feb, 2011)
+ Calling setPos on an object can cause the object's orientation to change. This depends on the terrain and/or objects below the object. This was tested by calling setPos on a test object with the position of a helicopter ( modelToWorld with some offset). When flying over land the orientation of the test object would rapidly change depending on the slope of the ground and objects beneath it.
+ Comment applicable to Ver 1.96 and earlier :
+ obj1 setPos [x,y,z]
+ Will place most objects z metres above ground level (negative numbers for underground). But if obj1 is a trigger then it will be placed z metres above sea level. This can be very useful if you want to check a unit's height above sea level but it can be a problem if you want to move a trigger to create an explosion or a sound. To move a trigger to a location at ground level:
+ $Code$triggername setPos [x,y,0];
+ triggername setPos [x,y, abs ( getPos triggername select 2)];$/Code$
+ Note for Armed Assault: Using setPos for a trigger will work in exactly the same way that setPos works for other objects - namely that setPos [x,y,z] will place the trigger z metres above ground level.
+ SetPos for static objects like a ammo crate do not work in MP.
+
+ (23 Nov, 2011)
+ You can use getPos and setPos on triggers.
- Array
+ Nothing
+
- magazinesDetail
+ get3DENMissionAttribute
- Returns an array of strings with description of all vehicle's magazines, their ammo count (current/default) and their ids.
- When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazineDetail to get this information for a currently loaded magazine.
+ Return value of scenario attribute.
+ !
+ Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
- https://community.bistudio.com/wiki/magazinesDetail
+ https://community.bistudio.com/wiki/get3DENMissionAttribute
- magazinesDetail Object
+ String get3DENMissionAttribute String
- magazinesDetail vehicle
+ section get3DENMissionAttribute class
- $Code$_magazinesDetail = magazinesDetail player ;
- /*
- [
- "6.5mm 30Rnd STANAG Mag(30/30)[id:3]",
- "6.5mm 30Rnd STANAG Mag(30/30)[id:9]",
- "9mm 16Rnd Mag(16/16)[id:12]",
- "Smoke Grenade (Green)(1/1)[id:14]",
- "Chemlight (Green)(1/1)[id:16]",
- "RGO Frag Grenade(1/1)[id:18]"
- ]
- */$/Code$
-
- $Code$_magazinesDetail = magazinesDetail Mi_48;
- /*
- [
- "30mm APDS shells(250/250)[id:20]",
- "30mm HE Shells(250/250)[id:21]",
- "Scalpel E2(8/8)[id:22]",
- "Skyfire(38/38)[id:23]"
- ]
- */$/Code$
+ $Code$systemChat str ("Multiplayer" get3DENMissionAttribute "respawn");$/Code$
undefined / undefined
+ (February 26, 2016)
+ The class names of the vanilla sections are:
+ General
+ Scenario
+ Environment
+ Intel
+ Multiplayer
+ Multiplayer
+ Garbage Collection
+ GarbageCollection
+ Preferences
+ Preferences
- Array
+ Anything
+
- magazinesTurret
+ UAVControl
- Returns all magazines of given turret. Use turret path [-1] for driver's turret. Alternatively, use magazinesAllTurrets
+ Returns array with current operator of UAV and his vehicle role in UAV.
- https://community.bistudio.com/wiki/magazinesTurret
+ https://community.bistudio.com/wiki/UAVControl
- Object magazinesTurret Array
+ UAVControl Object
- vehicle magazinesTurret turretPath
+ UAVControl uav
- $Code$_mags = vehicle player magazinesTurret [0, 0];$/Code$
-
- $Code$_mags = _tank magazinesTurret [0];$/Code$
+ $Code$UAVControl uav;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Array
+
- magazines
+ getAllSoundControllers
- Returns array of type names of all vehicle's magazines.
- When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazine to get this information for a currently loaded magazine.
+ Returns an array containing names and values of the sound controllers that can be used in simple expressions when configuring sounds.
- https://community.bistudio.com/wiki/magazines
+ https://community.bistudio.com/wiki/getAllSoundControllers
- magazines Object
+ getAllSoundControllers Object
- magazines vehicle
+ getAllSoundControllers vehicle
- $Code$_mags = magazines player$/Code$
+ $Code$getAllSoundControllers vehicle player ;
+ // Result: [["rpm",0],["randomizer",0.874332],["speed",0],["thrust",0],...]]$/Code$
undefined / undefined
- In OFP v1.96, if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The ammo command can be used to check if a unit has any ammunition into it's last magazine.
-
- (25 November 2011)
- This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy.
- Array
+ Array
+
- mapAnimAdd
+ setLightColor
- Add next frame to map animation.
+ Set diffuse color of light. Illuminates surfaces that are facing the light.
- https://community.bistudio.com/wiki/mapAnimAdd
+ https://community.bistudio.com/wiki/setLightColor
- mapAnimAdd Array
+ Object setLightColor Array
- mapAnimAdd [time, zoom, position]
+ light setLightColor [r, g, b]
- $Code$mapAnimAdd [1, 0.1, markerPos "anim1"];
- mapAnimCommit ;$/Code$
-
- $Code$mapAnimAdd [3, 0.01, player ];
- mapAnimCommit ;$/Code$
+ $Code$myLight setLightColor [0.5,0,0]; //produces red$/Code$
local / local
- (05:26, 2 February 2007)
- In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
+ (Dec 1, 2006)
+ Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
+ for example:
+ $Code$_light = "#lightpoint" createVehicleLocal pos;
+ _light setLightBrightness 1.0;
+ _light setLightAmbient [0.0, 1.0, 0.0];
+ _light setLightColor [0.0, 1.0, 0.0];
+ _light lightAttachObject [_object, [0,0,0]];
+ $/Code$
+
+ (Aug 17, 2007)
+ To clarify:
+ setLightAmbient - Terrain and surrounding objects are bathed in this colour.
+ setLightColor - Controls the "haze" seen around the lightsource (ex flares).
+
+ (Mar 24, 2014)
+ 1. In ArmA3 ver 1.14 setLightColor will also change the color of the flare when setLightUseFlare, setLightFlareSize and setLightFlareMaxDistance were used on the same light source. For example:
+ $Code$
+ _light setLightUseFlare true;
+ _light setLightFlareSize 2;
+ _light setLightFlareMaxDistance 60;
+ _light setLightColor [1, 1, 1];
+ $/Code$
+ 2. When both setLightAmbient and setLightColor were [0,0,0], there won’t be any visual presentation on the light source.
- Nothing
+ Nothing
+
- mapAnimClear
+ debugLog
- Clear map animation.
+ Dump argument type and value to debugging output.
+ This command is non-functional in the retail version
- https://community.bistudio.com/wiki/mapAnimClear
+ https://community.bistudio.com/wiki/debugLog
- mapAnimClear
+ debugLog Any_Value
- mapAnimClear
+ debugLog anything
-
+ $Code$debugLog player$/Code$
+
- local / local
+ undefined / undefined
- In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
- Nothing
+ Nothing
+
- mapAnimCommit
+ menuEnabled
- Play map animation.
+ Returns if menu entry on given path is enabled or not.
- https://community.bistudio.com/wiki/mapAnimCommit
+ https://community.bistudio.com/wiki/menuEnabled
- mapAnimCommit
+ menuEnabled Array
- mapAnimCommit
+ menuEnabled [idc, path]
- local / local
+ undefined / undefined
- In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
- Nothing
+ Boolean
+
- mapAnimDone
+ countUnknown
- Check if map animation is finished.
+ Count how many units in the array are unknown to the given unit.
- https://community.bistudio.com/wiki/mapAnimDone
+ https://community.bistudio.com/wiki/countUnknown
- mapAnimDone
+ Object countUnknown Array
- mapAnimDone
+ unitName countUnknown arrayName
-
+ $Code$_num = player countUnknown list _triggerOne;$/Code$
+
- local / local
+ global / undefined
- In OFP v1.96, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. (not checked, sourced from an old copy of the OFPEC comref)
- Boolean
+ Number
+
- mapCenterOnCamera
+ visibleWatch
- control mapCenterOnCamera boolean syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.
- mapCenterOnCamera control syntax centers mini map type control on camera. The command returns world position of the camera. Needs to be executed each frame (preferably inside onDraw EH).
+ Checks if the player has watch opened and visible
- https://community.bistudio.com/wiki/mapCenterOnCamera
+ https://community.bistudio.com/wiki/visibleWatch
- Control mapCenterOnCamera Boolean
-
- mapCenterOnCamera Control
+ visibleWatch
- mainmap mapCenterOnCamera enable
-
- mapCenterOnCamera minimap
+ visibleWatch
- $Code$//--- Minimap update
- (( uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true ;$/Code$
+ $Code$if ( visibleWatch ) then { hint "Watch is visible"};$/Code$
undefined / undefined
@@ -41441,29 +42698,30 @@
- Nothing - Array
+ Boolean
+
- mapGridPosition
+ exec
- Returns the map grid position of an object or position. The format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: "024577" or "De82" or similar.
+ Execute a script using (the deprecated but still available).sqs syntax. The argument is passed to the script in the "_this" variable, and magic variable "_time" within the script contains the time in seconds that the script has been running.
+ Alternatively use execVM command in combination with.sqf syntax.
+ Learn more about scripts under Scripts.
- https://community.bistudio.com/wiki/mapGridPosition
+ https://community.bistudio.com/wiki/exec
- mapGridPosition Object/Position
+ Any_Value exec String
- mapGridPosition param
+ argument exec script
- $Code$_gridPos = mapGridPosition player$/Code$
-
- $Code$_gridPos = mapGridPosition getPos player$/Code$
+ $Code$[player, _jeep] exec "getin.sqs"$/Code$
undefined / undefined
@@ -41471,28 +42729,28 @@
- String
+ Nothing
+
- markAsFinishedOnSteam
+ getWeaponSway
- Marks current mission as finished on Steam. Returns true if Steam query is successfully started or false otherwise.
+ Returns current size of weapon sway of a given unit, in radians
- https://community.bistudio.com/wiki/markAsFinishedOnSteam
+ https://community.bistudio.com/wiki/getWeaponSway
- markAsFinishedOnSteam
+ getWeaponSway Object
- markAsFinishedOnSteam
+ getWeaponSway unit
- $Code$markAsFinishedOnSteam ;
- endMission "END1";$/Code$
+ $Code$_sway = getWeaponSway player ;$/Code$
undefined / undefined
@@ -41500,55 +42758,166 @@
- Boolean
+ Number
+
- markerAlpha
+ private
- Gets the marker alpha. See setMarkerAlpha.
+ Sets a variable to the innermost scope as demonstrated in Example 3. One other command that is capable of creating private variables is params.
+ Since Arma 3 v1.53.132932 private can be used as keyword as shown in Example 4.
- https://community.bistudio.com/wiki/markerAlpha
+ https://community.bistudio.com/wiki/private
- markerAlpha String
+ private String
+
+ private Array
- markerAlpha markerName
+ private variableName
+
+ private variableNameList
- $Code$AlphaMarker = markerAlpha "myMarker;$/Code$
+ $Code$private "_varname";$/Code$
+
+ $Code$private ["_varname1", "_varname2"];$/Code$
+
+ $Code$_myvar = 123;
+ systemChat str [_myvar]; // -- [123]
+ call {
+ systemChat str [_myvar]; // -- [123]
+ private "_myvar";
+ systemChat str [_myvar]; // -- [any]
+ _myvar = 345;
+ systemChat str [_myvar]; // -- [345]
+ };
+ systemChat str [_myvar]; // -- [123]$/Code$
+
+ $Code$// Usage of private as keyword:
+ private _myvar = 123;
+ //is the same as
+ private "_myvar";
+ _myvar = 123;$/Code$
+
+ $Code$_lol = 123; call { hint str [_lol]}; // [123]
+ _lol = 123; call { private "_lol"; hint str [_lol]}; // [any]$/Code$
- global / undefined
+ undefined / undefined
-
-
- Number
-
-
-
-
- markerBrush
-
-
- Gets the marker brush. See setMarkerBrush.
-
-
- https://community.bistudio.com/wiki/markerBrush
+ (Sep 24, 2009 15:04)
+ The example provided is fairly worthless without a context.
+ Using the private command allows you to declare a variable in the current scope, without regards to variables in a higher scope with the same name. Note that if you try to declare a variable without an underscore (meaning it's global) with the private command, it will cause an error. Specifically: "Error Local variable in global space".
+ Here's a code example with output for your benefit.
+ $Code$
+ _foo = 10;
+ if (true) then
+ {
+ private ["_foo"];
+ _foo = 5;
+ player sideChat format ["%1", _foo];
+ };
+ player sideChat format ["%1", _foo];
+ $/Code$
+ In this example, the first sidechat (innermost) returns 5 while the second sidechat (outermost) returns 10.
+ $Code$
+ if (true) then
+ {
+ private ["_bar"];
+ _bar = 5;
+ player sideChat format ["%1", _bar];
+ };
+ $/Code$
+ In this example, the private command does nothing and is simply a waste of code, assuming there is no higher level code to interfere with the if statement.
+
+ (August 4, 2010)
+ The higher scope is also the script from which the function has been called.
+ If you've got in the script:
+ $Code$
+ _a = 1;
+ call compile loadFile "function.sqf";
+ hint format ["%1", _a];
+ $/Code$
+ And in the function.sqf :
+ $Code$
+ _a = 2;
+ $/Code$
+ Game will display 2.
+ Inserting private "_a" in the function prevents the change and so number 1 will be displayed on the screen.
+
+ (February 25, 2015)
+ Recursive loops require the use of private. Without it, your variables will be overwritten.
+
+ (January 31, 2018)
+ More examples!
+ $Code$ if ( true ) then { //new scope
+ _localVar = "some string";
+ systemChat _localVar; // = "some string"
+ };
+ systemChat _localVar; // = ERROR _localVar doesn't exist in the outer Scope
+ $/Code$
+ $Code$_localVar = "bla";
+ if ( true ) then { //new scope
+ _localVar = "some string";
+ systemChat _localVar; // = "some string"
+ };
+ systemChat _localVar; // = "some string"
+ $/Code$
+ $Code$_localVar = "bla";
+ if ( true ) then {
+ private _localVar = "some string";
+ systemChat _localVar; // = "some string"
+ };
+ systemChat _localVar; // = "bla"
+ $/Code$
+ $Code$_localVar = "bla";
+ if ( true ) then { //new scope
+ private _localVar = "some string";
+ if ( true ) then { //new scope
+ private _localVar = "some other string";
+ systemChat _localVar; // = "some other string"
+ };
+ systemChat _localVar; // = "some string"
+ };
+ systemChat _localVar; // = "bla"
+ $/Code$
+
+ (January 31, 2018)
+ This command has the same functionality as javascript's let keyword.
+ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let
+
+
+ Nothing - Nothing
+
+
+
+
+
+ savingEnabled
+
+
+ Check if saving the game is enabled.
+
+
+ https://community.bistudio.com/wiki/savingEnabled
- markerBrush String
+ savingEnabled
- markerBrush name
+ savingEnabled
- $Code$if ( markerBrush "Marker1" == "Solid") then { hint "Marker1 is solid!"}$/Code$
+ $Code$if ( savingEnabled ) then {
+ hint "Saving is enabled!";
+ };$/Code$
undefined / undefined
@@ -41556,232 +42925,276 @@
- String
+ Boolean
+
- markerColor
+ lnbSetColumnsPos
- Returns marker color for given marker. See setMarkerColor. Note: This function is identical to getMarkerColor.
+ Sets relative screen X for ListNBox control columns positions. Setter for lnbGetColumnsPosition
- https://community.bistudio.com/wiki/markerColor
+ https://community.bistudio.com/wiki/lnbSetColumnsPos
- markerColor String
+ lnbSetColumnsPos Array
+
+ Control lnbSetColumnsPos Array
- markerColor markerName
+ lnbSetColumnsPos [idc, positions]
+
+ ctrl lnbSetColumnsPos positions
- $Code$if ( markerColor "Marker1" == "ColorRed") then { hint "Marker1 is red!"}$/Code$
+ $Code$lnbSetColumnsPos [101, [0.1,0.5,0.7]];$/Code$
+
+ $Code$_ctrl lnbSetColumnsPos [0.1,0.5,0.7];$/Code$
undefined / undefined
+ (Sep 9 2014)
+ See: List Box#LISTNBOX
- String
+ Nothing - Nothing
+
- markerDir
+ isEqualTo
- Get marker direction.
+ Performs strict comparison between var1 and var2 and returns true if equal, otherwise false. Strict means that it would check that both arguments are of the same data type and then compare the values.
+ Some differences between isEqualTo and == :
+ It performs case sensitive comparison on Strings
+ It doesn't throw error when comparing different types, i.e. ("eleven" isEqualTo 11)
+ It can compare Arrays, Scripts and Booleans ( alive player isEqualTo true )
+ It can compare non-existent game objects ( grpNull isEqualTo grpNull )
+ It can compare Namespaces ( As of Arma 3 v1.47 )
+ It is slightly faster than ==, especially when comparing Strings
- https://community.bistudio.com/wiki/markerDir
+ https://community.bistudio.com/wiki/isEqualTo
- markerDir String
+ Anything isEqualTo Anything
- markerDir markerName
+ val1 isEqualTo val2
- $Code$_mPos = markerDir "markerOne"$/Code$
+ $Code$_arr1 = [1,[2,[3]]];
+ _arr2 = [1,[2,[3]]];
+ if (_arr1 isEqualTo _arr2) then { hint "Arrays match!"}$/Code$
+
+ $Code$if (a isEqualTo b) then { hint "a is equal to b"};
+ if !(a isEqualTo b) then { hint "a is not equal to b"};$/Code$
- global / undefined
+ undefined / undefined
- (April 18, 2010)
- The direction of the marker is the same as displayed in the editor, so it can both be negative, and be 360 degrees or greater.
+ (July 19, 2014)
+ The behavior of "var1 isEqualTo var2" is pretty much equivalent to "var1 in [var2]", plus the ability to compare arrays, and slightly better performance.
+
+ (December 3, 2014)
+ Simply put, "isEqualTo" is a binary comparison. Therefor it is very fast but only accepts 100% identical matches. In some other languages this is known as "===" instead of "==".
+
+ (November 3, 2016)
+ When comparing with nil result is Nothing.
+ "nil isEqualTo player" returns "Nothing" instead of expected "false"
+ $Code$diag_log [nil isEqualTo player];$/Code$
+ Will print "[bool]"
+ $Code$diag_log (str (nil isEqualTo player)) + "test";$/Code$
+ Will throw Generic error in expression
+ "+: Type Nothing, expected Number,Array,String,Not a Number"
- Number
+ Boolean
+
- markerPos
+ setWaypointDescription
- Get marker Position. Note: This function is identical to getMarkerPos.
+ Sets the description shown in the HUD while the waypoint is active.
- https://community.bistudio.com/wiki/markerPos
+ https://community.bistudio.com/wiki/setWaypointDescription
- markerPos String
+ Array setWaypointDescription String
- markerPos markerName
+ waypoint setWaypointDescription text
- $Code$_mPos = markerPos "markerOne";$/Code$
+ $Code$[_grp, 2] setWaypointDescription "Move here.";$/Code$
- global / undefined
+ undefined / undefined
- (March 17, 2014)
- Position's Z coordinate will always be 0."
- Array
+ Nothing
+
- markerShape
+ secondaryWeaponItems
- Gets the marker shape. See setMarkerShape for a list of strings that can be returned.
+ Returns array with all items assigned to the secondary weapon. This command is used for infantry weapons only.
- https://community.bistudio.com/wiki/markerShape
+ https://community.bistudio.com/wiki/secondaryWeaponItems
- markerShape String
+ secondaryWeaponItems Object
- markerShape name
+ secondaryWeaponItems unit
- $Code$if ( markerShape "Marker1" == "RECTANGLE") then { hint "Marker1 is a rectangle!"}$/Code$
+ $Code$secondaryWeaponItems player ; //["","","",""]$/Code$
- global / undefined
+ undefined / undefined
- (May 30, 2016)
- Free hand drawn markers return "POLYLINE"
- String
+ Array
+
- markerSize
+ timeMultiplier
- Returns marker size. This command is identical to getMarkerSize.
+ Returns the value set with setTimeMultiplier.
- https://community.bistudio.com/wiki/markerSize
+ https://community.bistudio.com/wiki/timeMultiplier
- markerSize String
+ timeMultiplier
- markerSize markerName
+ timeMultiplier
- $Code$_mSize = markerSize "Marker1";$/Code$
+ $Code$_multiplier = timeMultiplier ;$/Code$
- global / undefined
+ undefined / undefined
- Array
+ Number
+
- markerText
+ vectorAdd
- Get marker text.
+ Adds two 3D vectors.
- https://community.bistudio.com/wiki/markerText
+ https://community.bistudio.com/wiki/vectorAdd
- markerText String
+ Array vectorAdd Array
- markerText markerName
+ vector1 vectorAdd vector2
- $Code$hint format ["Marker Text: %1", markerText "Marker1"];$/Code$
+ $Code$hint str ( velocity unit1 vectorAdd velocity unit2);$/Code$
+
+ $Code$[5,10,5] vectorAdd [5,5,10]; //returns [10,15,15]$/Code$
- global / undefined
+ undefined / undefined
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+ Result = [x1 + x2,y1 + y2,z1 + z2;]
+ $/Code$
+ It is recommended to use vectorAdd instead of BIS_fnc_vectorAdd.
- String
+ Array
+
- markerType
+ ASLToAGL
- Get type of marker. Note: This function is identical to getMarkerType. See cfgMarkers for a list of standard markers.
+ Converts position from PositionASL to PositionAGL
- https://community.bistudio.com/wiki/markerType
+ https://community.bistudio.com/wiki/ASLToAGL
- markerType String
+ ASLToAGL PositionASL
- markerType markerName
+ ASLToAGL posASL
- $Code$if ( markerType "Marker1" == "Empty") then { hint "Marker1 is not an icon!"}$/Code$
+ $Code$_playerPosAGL = ASLToAGL getPosASL player ;$/Code$
- global / undefined
+ undefined / undefined
- (March 17, 2014)
- Using markerType is a good method to determine if a string is a valid marker name, unless the marker type isn't set. $Code$if (markerType "mark1" != "") then {hint "valid marker"}$/Code$
- String
+ PositionAGL
+
- max
+ kbAddDatabaseTargets
- The greater of a,b
+ Register target list knowledge base database to given person. See Conversations for more details.
+ This function is no longer available in ArmA 2.
+ This function is no longer available in Arma 3.
- https://community.bistudio.com/wiki/max
+ https://community.bistudio.com/wiki/kbAddDatabaseTargets
- Number max Number
+ Object kbAddDatabaseTargets String
- a max b
+ person kbAddDatabaseTargets fileName
- $Code$3 max 2
- // Result is 3$/Code$
+ $Code$_hasBeenAdded = _unit kbAddDatabaseTargets "chat.txt"$/Code$
undefined / undefined
@@ -41789,322 +43202,390 @@
- Number
+ Boolean
+
- members
+ setWaves
- Return a list of members in given team.
+ Changes the waves value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+ NOTE : This command will have no effect (even though the value of waves changes) unless Manual Override option is selected in the editor in the Intel, which is normally off.
- https://community.bistudio.com/wiki/members
+ https://community.bistudio.com/wiki/setWaves
- members Team_Member
+ Number setWaves Number
- members team
+ time setWaves value
- $Code$_members = members _team$/Code$
+ $Code$180 setWaves.5;$/Code$
+
+ $Code$0 setWaves 1;$/Code$
- undefined / undefined
+ undefined / local
- Array
+ Nothing
+
- menuAction
+ preloadSound
- Returns action stored in item on given path.
+ Makes sure that a sound can start playing without any delay once it is needed. Command works in Arma 3, but might not be implemented in earlier Arma installments.
- https://community.bistudio.com/wiki/menuAction
+ https://community.bistudio.com/wiki/preloadSound
- menuAction Array
+ preloadSound String
- menuAction [idc, path]
+ preloadSound soundName
-
+ $Code${
+ waitUntil { preloadSound _x};
+ } forEach getArray ( missionConfigFile "CfgSounds" "sounds");$/Code$
+
undefined / undefined
- String
+ Boolean
+
- menuAdd
+ setRadioMsg
- Adds new submenu entry into item on given path.
+ Sets radio trigger menu title text (0 - 0 - map radio). Use "NULL" to disable radio slot. Use "" to restore default title
- https://community.bistudio.com/wiki/menuAdd
+ https://community.bistudio.com/wiki/setRadioMsg
- menuAdd Array
+ Number setRadioMsg String
- menuAdd [idc, path, text]
+ index setRadioMsg text
-
+ $Code$1 setRadioMsg "Click meeeeeeeeee"; //changes title of radio Alpha$/Code$
+
- undefined / undefined
+ undefined / local
- Number
+ Nothing
+
- menuChecked
+ saveOverlay
- Returns if item on given path is checked or not.
+ Save the current overlay.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/menuChecked
+ https://community.bistudio.com/wiki/saveOverlay
- menuChecked Array
+ saveOverlay Control
- menuChecked [idc, path]
+ saveOverlay map
-
+ $Code$saveOverlay _map$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- menuClear
+ systemOfUnits
- Removes all entries from given menu strip.
+ Returns the currently selected system of units.
+ 0: Metric
+ 1: Mixed (ground vehicles use Metric / air vehicles use Imperial)
+ 2: Imperial
- https://community.bistudio.com/wiki/menuClear
+ https://community.bistudio.com/wiki/systemOfUnits
- menuClear Number
+ systemOfUnits
- menuClear idc
+ systemOfUnits
-
+ $Code$_system = systemOfUnits;$/Code$
+
undefined / undefined
- Nothing
+ Number
+
- menuCollapse
+ weaponDirection
- Collapses item on given path and all its childs.
+ Returns the direction that the vehicle weapon is aiming in.
+ For addons the weapon name must be an entry in CfgWeapons.
+ Returns an array in format [x, y, z]
- https://community.bistudio.com/wiki/menuCollapse
+ https://community.bistudio.com/wiki/weaponDirection
- menuCollapse Array
+ Object weaponDirection String
- menuCollapse [idc, path]
+ vehicleName weaponDirection weaponName
-
+ $Code$_weaponVectorDir = player weaponDirection currentWeapon player ;$/Code$
+
+ $Code$// Draw AI eye direction (green) and weapon direction (red) in 3D:
+ bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"];
+ bob setVehiclePosition [ player modelToWorld [0,100,0], [], 0, "NONE"];
+ onEachFrame
+ {
+ _beg = ASLToAGL eyePos bob;
+ _endE = (_beg vectorAdd ( eyeDirection bob vectorMultiply 100));
+ drawLine3D [ _beg, _endE, [0,1,0,1]];
+ _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100));
+ drawLine3D [_beg, _endW, [1,0,0,1]];
+ };$/Code$
+
- undefined / undefined
+ global / undefined
+ (August 18, 2007)
+ Works great in multiplayer.
+ The numbers are representing offset as follows : [X axis,Y axis,Z axis]
+ The return array can be processed-converted into degrees as follows:
+ $Code$_array = _this weaponDirection "weapon class" ;
+ _dir_degrees = (_array select 0) atan2 (_array select 1);$/Code$
+
+ (November 11, 2007)
+ WeaponClass can only be the primary turret of the vehicle. For example it is not possible to get direction of commander's M2 on M1Abrams.
+
+ (November 13, 2007)
+ For an alternative to the weaponDirection command, see the following post on the offical forums. On how to obtain the direction of multiple turrets on vehicles.
+ Turret Animations - new forum
+
+ (December 9, 2014)
+ The suggestion above using atan2 and weaponDirection get the direction the barrel of a weapon is pointing, but this is not the same as the direction a shell will be fired (verify this by getting in an M4 Scorcher, parking it on a slope, elevating the barrel "across" the slope and watching the shell come out in third person).
- Nothing
+ Array
+
- menuData
+ markAsFinishedOnSteam
- Returns data stored in menu entry on given path.
+ Marks current mission as finished on Steam. Returns true if Steam query is successfully started or false otherwise.
- https://community.bistudio.com/wiki/menuData
+ https://community.bistudio.com/wiki/markAsFinishedOnSteam
- menuData Array
+ markAsFinishedOnSteam
- menuData [idc, path]
+ markAsFinishedOnSteam
-
+ $Code$markAsFinishedOnSteam ;
+ endMission "END1";$/Code$
+
undefined / undefined
- String
+ Boolean
+
- menuDelete
+ getFuelCargo
- Deletes menu entry on given path.
+ Returns the fuel amount (between 0 and 1) in the cargo space of a refuelling vehicle.
- https://community.bistudio.com/wiki/menuDelete
+ https://community.bistudio.com/wiki/getFuelCargo
- menuDelete Array
+ getFuelCargo Object
- menuDelete [idc, path, text]
+ getFuelCargo vehicle
-
+ $Code$value = getFuelCargo myVehicleName;$/Code$
+
- undefined / undefined
+ global / undefined
+ (December 22, 2014)
+ If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.
+ If the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite.
- Number
+ Number
+
- menuEnabled
+ morale
- Returns if menu entry on given path is enabled or not.
+ Checks a current morale level of the unit (-1..+1).
- https://community.bistudio.com/wiki/menuEnabled
+ https://community.bistudio.com/wiki/morale
- menuEnabled Array
+ morale Object
- menuEnabled [idc, path]
+ morale unit
-
+ $Code$morale ( leader player );//result is 0.5$/Code$
+
undefined / undefined
- Boolean
+ Number
+
- menuEnable
+ ctClear
- Enables disabled menu entry on given path.
+ Removes all the lines from the RscControlsTable. Returns Nothing.
- https://community.bistudio.com/wiki/menuEnable
+ https://community.bistudio.com/wiki/ctClear
- menuEnable Array
+ ctClear Control
- menuEnable [idc, path]
+ ctClear ctrl
-
+ $Code$ctClear _control;$/Code$
+
- undefined / undefined
+ local / local
- Nothing
+ Nothing
+
- menuExpand
+ formationTask
- Expands given menu entry on given path and all its parents so entry is visible.
+ Return the current task of the unit in the formation.
+ You can't use it in ArmA 2, it will always returns "NOTHING"
- https://community.bistudio.com/wiki/menuExpand
+ https://community.bistudio.com/wiki/formationTask
- menuExpand Array
+ formationTask Object
- menuExpand [idc, path]
+ formationTask person
-
+ $Code$_CurrentTask = FormationTask _person$/Code$
+
undefined / undefined
- Nothing
+ String
+
- menuHover
+ textLogFormat
- Returns path to menu entry mouse is currently hovering over.
+ Debugging output.
+ This command is non-functional in the retail version
- https://community.bistudio.com/wiki/menuHover
+ https://community.bistudio.com/wiki/textLogFormat
- menuHover Number
+ textLogFormat Array
- menuHover idc
+ textLogFormat [format, arg1, arg2,]
@@ -42114,439 +43595,595 @@
- Array
+ Nothing
+
- menuPicture
+ magazinesDetail
- Returns picture set into item on given path
+ Returns an array of strings with description of all vehicle's magazines, their ammo count (current/default) and their ids.
+ When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazineDetail to get this information for a currently loaded magazine.
- https://community.bistudio.com/wiki/menuPicture
+ https://community.bistudio.com/wiki/magazinesDetail
- menuPicture Array
+ magazinesDetail Object
- menuPicture [idc, path]
+ magazinesDetail vehicle
-
+ $Code$_magazinesDetail = magazinesDetail player ;
+ /*
+ [
+ "6.5mm 30Rnd STANAG Mag(30/30)[id:3]",
+ "6.5mm 30Rnd STANAG Mag(30/30)[id:9]",
+ "9mm 16Rnd Mag(16/16)[id:12]",
+ "Smoke Grenade (Green)(1/1)[id:14]",
+ "Chemlight (Green)(1/1)[id:16]",
+ "RGO Frag Grenade(1/1)[id:18]"
+ ]
+ */$/Code$
+
+ $Code$_magazinesDetail = magazinesDetail Mi_48;
+ /*
+ [
+ "30mm APDS shells(250/250)[id:20]",
+ "30mm HE Shells(250/250)[id:21]",
+ "Scalpel E2(8/8)[id:22]",
+ "Skyfire(38/38)[id:23]"
+ ]
+ */$/Code$
+
undefined / undefined
- String
+ Array
+
- menuSetAction
+ ctrlSetTooltipColorShade
- Sets new action into menu entry on given path.
+ Sets tooltip background color of given control. Color is in format Color.
- https://community.bistudio.com/wiki/menuSetAction
+ https://community.bistudio.com/wiki/ctrlSetTooltipColorShade
- menuSetAction Array
+ Control ctrlSetTooltipColorShade Array
- menuSetAction [idc, path, action]
+ control ctrlSetTooltipColorShade color
-
+ $Code$_control ctrlSetTooltipColorShade [1, 0, 0, 1];$/Code$
+
undefined / undefined
- Number
+ Nothing
+
- menuSetCheck
+ lbSetSelectColorRight
- Sets item on given path to be checked or not.
+ Sets the select color of the of the secondary text (right aligned) of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.
+ Colour is in format Color.
- https://community.bistudio.com/wiki/menuSetCheck
+ https://community.bistudio.com/wiki/lbSetSelectColorRight
- menuSetCheck Array
+ lbSetSelectColorRight Array
+
+ Control lbSetSelectColorRight Array
- menuSetCheck [idc, path, checkedl]
+ lbSetSelectColorRight [idc, index, color]
+
+ control lbSetSelectColorRight [index, color]
-
+ $Code$lbSetSelectColorRight [101, 0, [0, 1, 0, 0.5]];$/Code$
+
+ $Code$_control lbSetSelectColorRight [0, [0, 1, 0, 0.5]];$/Code$
+
undefined / undefined
+ More information on the LB command family can be found here
- Nothing
+ Nothing - Nothing
+
- menuSetData
+ setTriggerArea
- Sets new data into item on given path.
+ Defines the area monitored by the given trigger. The area could be either rectangular or elliptical. Since Arma 3 v1.59.135137 it is possible to define 3 dimensional area to monitor by specifying extra param for the area height (see pic).
+ Just like with a and b dimensions, c dimension will alter area in opposite directions from the trigger position along z axis. Therefore if the trigger position is on the surface, half of the trigger area will be above the surface and half below. To place the whole area above the surface, adjust trigger position (move it up c meters). If c is not specified or = 0, the trigger area considered infinitely tall, like in old triggers.
- https://community.bistudio.com/wiki/menuSetData
+ https://community.bistudio.com/wiki/setTriggerArea
- menuSetData Array
+ Object setTriggerArea Array
- menuSetData [idc, path, data]
+ trigger setTriggerArea [a, b, angle, isRectangle, c]
-
+ $Code$_trigger setTriggerArea [100, 50, 45, false ];$/Code$
+
+ $Code$// Possible since Arma 3 v1.59.135137:
+ _trigger setTriggerArea [100, 50, 45, false, 100];$/Code$
+
- undefined / undefined
+ global / local
- Nothing
+ Nothing
+
- menuSetPicture
+ intersect
- Sets new picture into menu entry on given path.
+ Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. lodName could be one of the following:
+ "FIRE"
+ "VIEW"
+ "GEOM"
+ "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
- https://community.bistudio.com/wiki/menuSetPicture
+ https://community.bistudio.com/wiki/intersect
- menuSetPicture Array
-
- Control menuSetPicture Array
+ Array intersect Array
- menuSetPicture [idc, path, picture]
-
- control menuSetPicture [path, picture]
+ [object, lodName] intersect [begPos, endPos]
-
+ $Code$[_tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]];$/Code$
+
+ $Code$sphere = "Sign_Sphere10cm_F" createVehicle [0,0,0];
+ onEachFrame {
+ _begPos = positionCameraToWorld [0,0,0];
+ _begPosASL = AGLToASL _begPos;
+ _endPos = positionCameraToWorld [0,0,1000];
+ _endPosASL = AGLToASL _endPos;
+ _ins = lineIntersectsSurfaces [_begPosASL, _endPosASL, player, objNull, true, 1, "FIRE", "NONE"];
+ if (_ins isEqualTo []) exitWith {sphere setPosASL [0,0,0]};
+ _ins select 0 params ["_pos", "_norm", "_obj", "_parent"];
+ if !( getModelInfo _parent select 2) exitWith {sphere setPosASL [0,0,0]};
+ _ins2 = [_parent, "FIRE"] intersect [_begPos, _endPos];
+ if (_ins2 isEqualTo []) exitWith {sphere setPosASL [0,0,0]};
+ _ins2 select 0 params ["_name", "_dist"];
+ _posASL = _begPosASL vectorAdd ((_begPosASL vectorFromTo _endPosASL) vectorMultiply _dist);
+ drawIcon3D ["", [1,1,1,1], ASLToAGL _posASL, 0, 0, 0, _name, 1, 0.03, "PuristaMedium"];
+ sphere setPosASL _posASL;
+ };$/Code$
+
- undefined / undefined
+ global / undefined
+ (Jul 25, 2007)
+ The most common LOD is " FIRE ", which identifies the most detailled hitbox used for ammunition.
+
+ (Mar 27, 2014)
+ Example (In ArmA3 ver 1.14) display returned arrays on cursor entities:
+ $Code$
+ Sto = [];
+ Fn = {
+ {
+ Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoagl (eyepos player)),(screentoworld [0.5,0.5])]];
+ } foreach ["FIRE","VIEW","GEOM","IFIRE"];
+ hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3];
+ };
+ ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler;
+ $/Code$
+ Return FIRE: [something], VIEW: [something], GEOM: [something], IFIRE: [something].
+
+ (August 20, 2015)
+ intersect will spam.rpt if passed to it object has no skeleton. Use getModelInfo to filter out those objects.
- Nothing - Nothing
+ Array
+
- menuSetValue
+ deleteCenter
- Sets new value into menu entry on given path.
+ In a nutshell, this command removes gaming Side (see createCenter ). If a side has 0 Groups it cannot be deleted. Center can only be created for: east, west, resistance, civilian and sideLogic, therefore only centers from the mentioned sides can be deleted.
+ Old description: Destroys the AI center of the given side.
- https://community.bistudio.com/wiki/menuSetValue
+ https://community.bistudio.com/wiki/deleteCenter
- menuSetValue Array
+ deleteCenter Side
- menuSetValue [idc, path, value]
+ deleteCenter side
-
+ $Code$deleteCenter east$/Code$
+
- undefined / undefined
+ undefined / global
- Nothing
+ Nothing
+
- menuShortcut
+ channelEnabled
- Returns shortcut related to menu entry on given path.
+ Returns true or false depending on whether the given channel is enabled or disabled. For more information about enabling/disabling of chat channels see enableChannel. Channel / Number correspondence:
+ 0 = Global
+ 1 = Side
+ 2 = Command
+ 3 = Group
+ 4 = Vehicle
+ 5 = Direct
+ 6-15 = Custom Radio (Is not supported by channelEnabled )
+ Please note that since Arma 3 v1.59.135661 the output of this command was changed from Boolean to Array in format [ Boolean, Boolean ]
- https://community.bistudio.com/wiki/menuShortcut
+ https://community.bistudio.com/wiki/channelEnabled
- menuShortcut Array
+ channelEnabled Number
- menuShortcut [idc, path]
+ channelEnabled channel
-
+ $Code$_isGlobalChatEnabled = ( channelEnabled 0) select 0; // Check if user can use text on global channel$/Code$
+
+ $Code$_isGlobalVoiceEnabled = ( channelEnabled 0) select 1; // Check if user can use the VoN on global channel$/Code$
+
undefined / undefined
- Number
+ Array
+
- menuShortcutText
+ setCamShakeDefParams
- Returns a string containing shortcut text for menu item on the given path.
+ Sets camera shake default params, the default camshake when, for example, you freelook at your character shooting a 12.7mm sniper rifle or firing tank cannon. Would also work in 1st person.
- https://community.bistudio.com/wiki/menuShortcutText
+ https://community.bistudio.com/wiki/setCamShakeDefParams
- menuShortcutText Array
+ setCamShakeDefParams Array
- menuShortcutText [idc, path]
+ setCamShakeDefParams [power, duration, frequency, minSpeed, minMass, caliberCoefHit, vehicleCoef]
-
+ $Code$setCamShakeDefParams [1, 2, 3, 4, 5,.5,.5];$/Code$
+
+ $Code$setCamShakeDefParams [100, 10, 10, 4, 5, 1, 1];$/Code$
+
undefined / undefined
+ (December 1, 2014)
+ Doesn't appear to have any effect in ArmA 3.
- String
+ Nothing
+
- menuSize
+ camPrepareFov
- Returns how many sub entries is in item on given path.
+ Prepares the camera field of view (zoom). The default zoom level is 0.75, 0.01 is the nearest and 2 the furthest zoom value. The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio. Needs the call of camCommitPrepared to be conducted.
- https://community.bistudio.com/wiki/menuSize
+ https://community.bistudio.com/wiki/camPrepareFov
- menuSize Array
+ Object camPrepareFov Number
- menuSize [idc, path]
+ camera camPrepareFov fieldOfView
-
+ $Code$_camera camPrepareFov 0.1$/Code$
+
undefined / undefined
- Number
+ Nothing
+
- menuSort
+ onPreloadFinished
- Sorts subentries of item on given path by their text.
+ Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.
+ i
+ Since Arma 3 v1.57 a stackable version of this EH is available: PreloadFinished
+ In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
- https://community.bistudio.com/wiki/menuSort
+ https://community.bistudio.com/wiki/onPreloadFinished
- menuSort Array
+ onPreloadFinished String/Code
- menuSort [idc, path, reversed]
+ onPreloadFinished command
-
+ $Code$onPreloadFinished {TAG_ReceivingScreenDone = true };$/Code$
+
+ $Code$//removes the event immediately after the first run again
+ onPreloadFinished {TAG_ReceivingScreenDone = true ; onPreloadFinished ""};$/Code$
+
undefined / undefined
+ (July 24, 2009)
+ There is a bug in Arma2 that will make this command execute every time the screen with "Receiving..." has been displayed.
+ If this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared
+ onPreloadFinished '[fire1] execVM "scripts\startcam.sqf"';
+ It will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.
+ You will have to script around it with if statements to get it to run only in the beginning of the mission.
- Nothing
+ Nothing
+
- menuText
+ roadsConnectedTo
- Returns current text set in menu entry on given path.
+ Find the road segments connected to the given road segment.
- https://community.bistudio.com/wiki/menuText
+ https://community.bistudio.com/wiki/roadsConnectedTo
- menuText Array
+ roadsConnectedTo Object
- menuText [idc, path]
+ roadsConnectedTo roadSegment
-
+ $Code$_road = ( player nearRoads 50) select 0;
+ _connectedRoads = roadsConnectedTo _road;$/Code$
+
undefined / undefined
- String
+ Array
+
- menuURL
+ isWeaponRested
- Returns current URL set in entry on given path.
+ Returns true if weapon is currently rested.
- https://community.bistudio.com/wiki/menuURL
+ https://community.bistudio.com/wiki/isWeaponRested
- menuURL Array
+ isWeaponRested Object
- menuURL [idc, path]
+ isWeaponRested unit
-
+ $Code$_rest = isWeaponRested player ;$/Code$
+
- undefined / undefined
+ local / undefined
+ (July 1, 2015)
+ You can force a unit out of bipod or resting with:
+ $Code$_unit playMove "";$/Code$
+
+ (July 12, 2015)
+ As of 1.49 $Code$ isWeaponRested player $/Code$ is the only current use of this command. You cannot detect remote player and you cannot detect local unit that is not a player. Might as well be a nullar command without argument.
- String
+ Boolean
+
- menuValue
+ radioChannelSetCallSign
- Returns current value set in menu entry on given path.
+ Set the custom radio channel's call sign.
+ Available special parameters:
+ $KEY (reference to a localized text)
+ %CHANNEL_LABEL
+ %UNIT_SIDE
+ %UNIT_NAME
+ %UNIT_RANK
+ %UNIT_ID
+ %UNIT_REF
+ %UNIT_GRP_NAME
+ %UNIT_GRP_LEADER
+ %UNIT_VEH_NAME
+ %UNIT_VEH_POSITION
- https://community.bistudio.com/wiki/menuValue
+ https://community.bistudio.com/wiki/radioChannelSetCallSign
- menuValue Array
+ Number radioChannelSetCallSign String
- menuValue [idc, path]
+ index radioChannelSetCallSign callSign
-
+ $Code$4 radioChannelSetCallSign "%UNIT_NAME";$/Code$
+
undefined / undefined
- Number
+ Nothing
+
- mineActive
+ getDir
- Checks if the given mine is active.
+ Returns the object heading in the range from 0 to 360.
+ Since Arma 3 v1.55.133361, an alternative syntax is added that allows to get heading from one object or position to another object or position, the equivalent of BIS_fnc_dirTo
- https://community.bistudio.com/wiki/mineActive
+ https://community.bistudio.com/wiki/getDir
- mineActive Object
+ getDir Object
+
+ Object/Position2D/Position3D getDir Object/Position2D/Position3D
- mineActive obj
+ getDir object
+
+ pos1 getDir pos2
- $Code$if ( mineActive _mine) then { hint "BOOM!"};$/Code$
+ $Code$_azimuth = getDir player ;$/Code$
+
+ $Code$_azimuth = player getDir tank;$/Code$
global / undefined
+ (October 23, 2013)
+ Be careful when using this command in conjunction with BIS_fnc_rotateVector2D ; the latter rotates vectors counterclockwise (mathematically correct), while getDir returns a clockwise angle.
+ To counter this, simply negate the output of getDir:
+ $Code$[[0,1,0], -( getDir _object ) ] call BIS_fnc_rotateVector2D ;$/Code$
- Boolean
+ Number - Number
+
- mineDetectedBy
+ setMarkerSize
- Returns true if mine has been detected by a given side
+ Set marker size.
+ Size is in format [a-axis, b-axis].
- https://community.bistudio.com/wiki/mineDetectedBy
+ https://community.bistudio.com/wiki/setMarkerSize
- Object mineDetectedBy Side
+ String setMarkerSize Array
- mine mineDetectedBy faction
+ markerName setMarkerSize [a-axis, b-axis]
- $Code$( allMines select 0) mineDetectedBy west ;$/Code$
+ $Code$"MarkerOne" setMarkerSize [100, 200];$/Code$
- undefined / undefined
+ undefined / global
- Boolean
+ Nothing
+
- min
+ radioChannelRemove
- The smaller of a,b
+ Remove the units from the custom radio channel.
- https://community.bistudio.com/wiki/min
+ https://community.bistudio.com/wiki/radioChannelRemove
- Number min Number
+ Number radioChannelRemove Array
- a min b
+ index radioChannelRemove units
- $Code$3 min 2
- // Result is 2$/Code$
+ $Code$3 radioChannelRemove [blufor_unit_1, blufor_unit_2];$/Code$
undefined / undefined
@@ -42554,477 +44191,448 @@
- Number
+ Nothing
+
- missionConfigFile
+ mineActive
- Return root of mission Description.ext entries hierarchy.
- !
- Since introduction of the Eden Editor, scenario attributes can be configured in the editor itself, not only in the external Description.ext file. To access desired value independently on where it's stored, use the following commands instead:
- getMissionConfigValue
- getMissionConfig
+ Checks if the given mine is active.
- https://community.bistudio.com/wiki/missionConfigFile
+ https://community.bistudio.com/wiki/mineActive
- missionConfigFile
+ mineActive Object
- missionConfigFile
+ mineActive obj
- $Code$for "_i" from (0) to (( count paramsArray ) - 1) do {
- missionNamespace setVariable [ configName (( missionConfigFile /"Params") select _i), paramsArray select _i];
- };$/Code$
-
- $Code$// To define custom values in description.ext :
- class myMissionConfig
- {
- class mySetup
- {
- myNumber = 3;
- myArray[] = { 1, 2, 3 };
- myText = "LOL";
- };
- };
- // To read defined custom values from a script:_myNumber = getNumber ( missionConfigFile "myMissionConfig" "mySetup" "myNumber");
- _myArray = getArray ( missionConfigFile "myMissionConfig" "mySetup" "myArray");
- _myText = getText ( missionConfigFile "myMissionConfig" "mySetup" "myText");$/Code$
-
- $Code$// To get file path with description.ext to play sound via playSound3D :
- _filePath = [( str missionConfigFile ), 0, -15] call BIS_fnc_trimString ;$/Code$
-
- $Code$// Obtaining mission root using A3 substring functionality
- MISSION_ROOT = str missionConfigFile select [0, count str missionConfigFile - 15];$/Code$
+ $Code$if ( mineActive _mine) then { hint "BOOM!"};$/Code$
- undefined / undefined
+ global / undefined
- (February 17, 2015)
- missionConfigFile can be used to parse mission.sqm file data as well if it is included into description.ext :
- class MissionSQM
- {
- #include "mission.sqm"
- };
- Then mission.sqm data can be accessed like this:
- $Code$ getNumber ( missionConfigFile "MissionSQM" "version"); //12 - version param in mission.sqm $/Code$
- (courtesy of Master85 )
- Config
+ Boolean
+
- missionDifficulty
+ saveProfileNamespace
- Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it's used one from player's options.
+ Saves the variables stored in profileNamespace to the persistent active user profile.
+ Warning : this is a file operation, which makes it expensive! It is not recommended to do this at a high frequency in a loop for example. It is however also recommended not to change a large amount of variables and wait long before saving, because certain game crashes may cause a loss of data.
+ Warning : saving a lot of data can quickly increase the size of the profile variables file, so keep an eye on this.
+ Warning : TKOH's Heliport status (used in the Career mode for example) is stored in this file, so be mindful of working with this technology to avoid losing data and progress.
- https://community.bistudio.com/wiki/missionDifficulty
+ https://community.bistudio.com/wiki/saveProfileNamespace
- missionDifficulty
+ saveProfileNamespace
- missionDifficulty
+ saveProfileNamespace
-
+ $Code$saveProfileNamespace;$/Code$
+
undefined / undefined
+ Variables are also saved when the game is quit.
- Number
+ Nothing
+
- missionNamespace
+ setLightBrightness
- Returns the global namespace attached to mission.
+ Set brightness of light.
- https://community.bistudio.com/wiki/missionNamespace
+ https://community.bistudio.com/wiki/setLightBrightness
- missionNamespace
+ Object setLightBrightness Number
- missionNamespace
+ light setLightBrightness brightness
- $Code$missionNamespace setVariable ["YourString",3];//Same as: YourString = 3;
- _yourString = missionNamespace getVariable "YourString";$/Code$
+ $Code$myLight setLightBrightness 2;$/Code$
- undefined / undefined
+ local / local
+ (Dec 1, 2006)
+ Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
+ for example:
+ $Code$_light = "#lightpoint" createVehicleLocal pos;
+ _light setLightBrightness 1.0;
+ _light setLightAmbient [0.0, 1.0, 0.0];
+ _light setLightColor [0.0, 1.0, 0.0];
+ _light lightAttachObject [_object, [0,0,0]];
+ $/Code$
+
+ (Mar 24, 2014)
+ In ArmA3 ver1.14 setLightBrightness will overwrite the previous effect processed by setLightIntensity on the same light source, vice versa. And both of them currently play the same role on brightness, for example: $Code$_light setLightBrightness 1;// same as _light setLightIntensity 3000;$/Code$
- Namespace
+ Nothing
+
- missionName
+ addMagazineCargoGlobal
- Return currently loaded mission file (path to mission.pbo, relative to game exe).
+ Add magazines to the cargo space of vehicles, which can be taken out by infantry units.
+ MP Synchronized
- https://community.bistudio.com/wiki/missionName
+ https://community.bistudio.com/wiki/addMagazineCargoGlobal
- missionName
+ Object addMagazineCargoGlobal Array
- missionName
+ vehicleName addMagazineCargoGlobal [magazineName, count]
-
+ $Code$_truck addMagazineCargoGlobal ["M16", 5];$/Code$
+
- undefined / undefined
+ global / global
- (2nd August, 2010)
- Only works in SP and on the MP Host/DS. It returns the mission pboprefix if available, otherwise the pboname. For clients it returns '__cur_mp'.
-
- (September 25, 2014)
- In OFP (up to v1.96) it returns the mission filename. In CWA (since v1.99), it returns the briefing name instead when in multiplayer. The string displayed is that set in the Intel section of the mission editor.
+ (November 7, 2011)
+ Synchronized to JIP as well.
- String
+ Nothing
+
- missionStart
+ currentTasks
- Returns date and time when mission started in format [year, month, day, hour, minute, second].
- Works only in multiplayer, in singleplayer all values are equal to zero → [0,0,0,0,0,0]
- NOTE : Because missionStart contains the time of the actual start of the mission, it might not be available in pre-init or init, but is guaranteed to be available in post-init when time 0.
+ List all uncompleted tasks.
- https://community.bistudio.com/wiki/missionStart
+ https://community.bistudio.com/wiki/currentTasks
- missionStart
+ currentTasks Team_Member
- missionStart
+ currentTasks member
- $Code$setDate ( missionStart select [0,5]);$/Code$
-
- $Code$// Set real date:
- //postInit = 1;
- if ( isServer ) then {
- waitUntil { time 0};
- setDate ( missionStart select [0,5]);
- };$/Code$
+ $Code$_playerTasks = currentTasks teamMember player$/Code$
undefined / undefined
- (September 25, 2014)
- Returns array with date indicating when the mission has started (after briefing screen). In OFP this command is bugged – it works only in multiplayer on a player‐hosted machine and on a client. In single player it would return [0,0,0,0,0,0] and on a dedicated server – [1970,1,1,0,0,0]. In CWA this command is fixed.
-
- (December 30, 2014)
- In arma 3 this command returns [0,0,0,0,0,0] in SP, [1970,1,1,0,0,0] on dedicated server and [1970,1,1,0,0,0] initially and then server real time on local headless client. On player clients it shows client's local date and time. Since Arma 3 v1.49 the dedicated server also returns correct mission start date.
-
- (August 27, 2015)
- ArmA 3 1.50: This command now returns the correct values on dedicated server. http://feedback.arma3.com/view.php?id=23373
- Array
+ Array
+
- missionVersion
+ ctHeaderControls
- Returns the version of the current mission.
- Mission from the 2D Editor : 12
- Mission from the Eden Editor : 15 and higher (for example current version for Eden Editor mission in Arma 3 v1.57 is 51)
+ Returns array of controls on the header with the given index.
- https://community.bistudio.com/wiki/missionVersion
+ https://community.bistudio.com/wiki/ctHeaderControls
- missionVersion
+ Control ctHeaderControls Number
- missionVersion
+ ctrl ctHeaderControls index
- $Code$_version = missionVersion ;$/Code$
+ $Code$_array = _control ctHeaderControls 0;$/Code$
- undefined / undefined
+ local / local
- Number
+ Array
+
- modParams
+ forceSpeed
- Returns list of mod parameters according to given options, values are in same order as the given options. Available options:
- "name" : String - name to be shown (Arma 3 instead of A3, etc.)
- "picture" : String - picture shown in Mod Launcher
- "logo" : String - logo to be shown in Main Menu
- "logoOver" : String - logo to be shown in Main Menu when mouse is over
- "logoSmall" : String - small version of logo, prepared for drawing small icons
- "tooltip" : String - tooltip to be shown on mouse over
- "tooltipOwned" : String - tooltip to be shown on mouse over the icon when DLC is owned by player
- "action" : String - url to be triggered when mod button is clicked
- "actionName" : String - what to put on Action Button
- "overview" : String - overview text visible in expansion menu
- "hidePicture" : Boolean - do not show mod picture icon in the main menu mod list
- "hideName" : Boolean - do not show mod name in the main menu mod list
- "defaultMod" : Boolean - default mods cannot be moved or disabled by Mod Launcher
- "serverOnly" : Boolean - mod doesn't have to be installed on client in order to play on server with this mod running
- "active" : Boolean - active mod (activated through command line or stored in profile by mod launcher)
- NOTE that "active" does not actually tell you if a mod ( is running / pretends to be running )
+ Force the speed limit on given object (object will never attempt to move faster than given by forceSpeed). Use negative value to return to default behaviour. Used unit is m/s.
- https://community.bistudio.com/wiki/modParams
+ https://community.bistudio.com/wiki/forceSpeed
- modParams Array
+ Object forceSpeed Number
- modParams [modClass, options]
+ object forceSpeed speed
- $Code$_data = modParams ["Kart", ["name", "logo", "picture"]];$/Code$
+ $Code$_helicopter forceSpeed 150;$/Code$
undefined / undefined
- (April 24, 2017)
- This command used to spam. rpt when queried mod didn't exist, making it little awkward to use for testing if mod is active. For example:
- $Code$_superDuperModEnabled = modParams ["super_duper", ["active"]] param [0, false];$/Code$
- Since v1.69 the command would fail silently if mod doesn't exist.
+ (17:02, 2 March 2007 (CET))
+ Setting forceSpeed to -1 will make the unit move according to the group speed mode (often specified by the waypoint) again. Setting forceSpeed to 0 will halt the unit ignoring waypoints or orders.
+
+ (9 February 2008)
+ Does not seem to do anything at the current time (V1.08.5163)
+
+ (14 December 2011)
+ If a unit (man) has forceSpeed set to anything under jogging (walking only) the unit will refuse to get into vehicles. He will automatically be unassigned from a vehicle everytime he is ordered to get in (via scripts or direct action)
- Array
+ Nothing
+
- modelToWorldVisualWorld
+ removeAllPrimaryWeaponItems
- Converts position from object model space to world space in render time.
+ Removes all items from weapon except magazine.
- https://community.bistudio.com/wiki/modelToWorldVisualWorld
+ https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems
- Object modelToWorldVisualWorld Array
+ removeAllPrimaryWeaponItems Object
- obj modelToWorldVisualWorld modelPos
+ removeAllPrimaryWeaponItems unit
- $Code$player modelToWorldVisualWorld [0,1,0]$/Code$
-
+
- undefined / undefined
+ local / global
- (May 28, 2017)
- This command produces identical result to modelToWorldVisual command used in conjunction with AGLToASL
- $Code$obj modelToWorldVisualWorld [1,2,3] isEqualTo AGLToASL (obj modelToWorldVisual [1,2,3]); // true$/Code$
- Array
+ Nothing
+
- modelToWorldVisual
+ secondaryWeapon
- Converts position from object model space to world space in render time scope. For ASL version see modelToWorldVisualWorld.
+ Returns name of a unit's secondary weapon (empty string if none).
- https://community.bistudio.com/wiki/modelToWorldVisual
+ https://community.bistudio.com/wiki/secondaryWeapon
- Object modelToWorldVisual Array
+ secondaryWeapon Object
- object modelToWorldVisual modelPos
+ secondaryWeapon unit
- $Code$_aboveAndBehindPlayer = player modelToWorldVisual [0,-1,3];$/Code$
+ $Code$_sWeap = secondaryWeapon player ;$/Code$
+
+ $Code$hint secondaryWeapon player ; //"launch_NLAW_F"$/Code$
undefined / undefined
-
-
- Array
+ (August 4, 2006)
+ Notes from before the conversion:
+ secondaryWeapon tells you what weapon the unit has irrespective of the status of the weapon. For example a unit that has a LAWLauncher on his back will still report a LAWLauncher as its secondary weapon. Use currentWeapon to detect the active weapon.
+
+
+ String
+
- modelToWorldWorld
+ get3DENEntity
- Converts position from object model space to world space (usable by setPosWorld for example).
+ Returns Eden Entity based on its unique ID. If the ID points to a layer, the ID will be returned instead.
- https://community.bistudio.com/wiki/modelToWorldWorld
+ https://community.bistudio.com/wiki/get3DENEntity
- Object modelToWorldWorld Array
+ get3DENEntity Number
- obj modelToWorldWorld modelPos
+ get3DENEntity id
- $Code$( getPos player ) modelToWorldWorld [0,1,0]$/Code$
+ $Code$myEntity = get3DENEntity 1$/Code$
undefined / undefined
- (May 28, 2017)
- This command produces identical result to modelToWorld command used in conjunction with AGLToASL
- $Code$obj modelToWorldWorld [1,2,3] isEqualTo AGLToASL (obj modelToWorld [1,2,3]); // true$/Code$
- Array
+ EdenEntity
+
- modelToWorld
+ atan2
- Translates relative position from object model space into world position. This command will take into account vectorUp of the object when calculating relative coordinates. For ASL version see modelToWorldWorld
+ ArcTangent of x/y. Used to determine the angle of a vector [x,y]. Result in Degrees between -180 and 180.
+ Note that this command can handle y being 0, unlike when using atan, and will return 90
- https://community.bistudio.com/wiki/modelToWorld
+ https://community.bistudio.com/wiki/atan2
- Object modelToWorld Array
+ Number atan2 Number
- model modelToWorld position
+ x atan2 y
- $Code$_aboveAndBehindPlayer = player modelToWorld [0,-1,3];$/Code$
+ $Code$_xy = [5,3];
+ _degrees = (_xy select 0) atan2 (_xy select 1); //59.0362$/Code$
+
+ $Code$// Get direction from _obj1 to _obj2:
+ _vd = getPosASL _obj2 vectorDiff getPosASL _obj1;
+ _dir = (_vd select 0) atan2 (_vd select 1); //_dir range from -180 to +180
+ if (_dir 0) then {_dir = 360 + _dir}; //_dir range from 0 to 360$/Code$
+
+ $Code$// Get relative direction from _obj1 to _obj2:
+ _xy = _obj1 worldToModel getPosASL _obj2;
+ _dir = (_xy select 0) atan2 (_xy select 1); //_dir range from -180 to +180
+ if (_dir 0) then {_dir = 360 + _dir}; //_dir range from 0 to 360$/Code$
undefined / undefined
- (16 Feb, 2007)
- The worldPos parameter appears to be a relative offset to the position of object, so it can often simply be [0,0,0].
- Example: to position an object _obj relative to the position of another object _RelObj with on offset of _Offset, try:
- _Offset = [_x,_y,_z];
- _worldPos = _RelObj modelToWorld _Offset;
- _obj setPos _worldPos;
-
- (16 Feb, 2007)
- The object model space has got its Z-Axis along the object's vectorUp, its Y-Axis along the object's vectorDir, while its X-Axis goes along vectorDir x VectorUp (meaning as the X-Axis in a right-handed cartesian coordiante system ).
-
- (8 May, 2008)
- If your object requires a new direction, ensure you call setDir prior to setPos when using modelToWorld. Calling setDir afterwards will skew its position otherwise.
- _ladder setDir _angle;
- _ladder setPos (_building modelToWorld [_x, _y, _z]);
-
- (6 Feb, 2011)
- The z height returned changes dynamically with the height of waves beneath the object, if the object is located over sea. The z height returned by getPosATL and getPosASL does not change like this. This was tested by continuously retrieving the position of a static object, like the cross in the empty/corpses category, placed over sea or land.
- modelToWorld behaves similar to
- getPos _obj
- but it does not give the same result, therefore
- (_obj modelToWorld [0.0, 0.0, 0.0]) is not the same as (getPos _obj).
+ (08:00, 18 November 2009)
+ To get the direction of an object from the player:
+ $Code$
+ _dir = (( getPos _obj select 0) - ( getPos player select 0)) atan2 (( getPos _obj select 1) - ( getPos player select 1));
+ //_dir will be from -180 to 180.
+ $/Code$
+ If positive values are needed then use:
+ $Code$
+ if (_dir 0) then {_dir = _dir + 360};
+ $/Code$
+ Or just use BIS_fnc_dirTo directly.
- Array
+ Number
+
- mod
+ deleteWaypoint
- Remainder of a divided by b.
+ Removes the specified waypoint.
- https://community.bistudio.com/wiki/mod
+ https://community.bistudio.com/wiki/deleteWaypoint
- Number mod Number
+ deleteWaypoint Array
- a mod b
+ deleteWaypoint [group, index]
- $Code$_rem = 3 mod 2;
- // Result is 1$/Code$
+ $Code$deleteWaypoint [_grp, 2]$/Code$
- undefined / undefined
+ global / global
- (01:34, 16 April 2006)
- Remainder is calculated in real domain.
- mod is identical to a % b
- You can use mod to round a decimal number down to the nearest whole number. For example: If you wanted to use the command random to generate a whole number between 0 and 5, you could put this in a script:
- $Code$_rand = random 6;
- _num = _rand - (_rand mod 1);
- $/Code$
- In A1, the new commands round, floor or ceil would be the easier way to round.
+ (1 Feb, 2008)
+ In order to change the behavior of a unit currently following a string of waypoints, it is not enough to use deleteWaypoint. The path of the unit is calculated by the waypoints present at start, and the unit will continue according to the original waypoints even if you delete them by using this command.
+ To achieve the wanted effect, you should rather use setWPPos to the units current position (thereby stopping the unit), and (after a small delay) use deleteWaypoint to remove the waypoints.
+
+ (15 Nov, 2008)
+ Another (more foolproof) method to avoid the problem of non-deleteable waypoints is to introduce another group (createGroup) and join all units of the present group. A new group will start without any preset waypoints so you can start setting new WPs all over again.
+ Old group is "_combatGroup", new group is "_combatGroup2"
+ $Code$_combatGroup2 = createGroup EAST;
+ {[_x] joinSilent _combatGroup2} forEach ( units _combatGroup);
+ _combatGroup2 addWaypoint [ getPos player, 25];$/Code$
+
+ (January 04, 2011)
+ When you want to remove all waypoints, do NOT iterate over waypoints _group while trying to delete them (an array is by reference!). Instead use an approach like this:
+ $Code$
+ while {( count ( waypoints _group)) 0} do
+ {
+ deleteWaypoint (( waypoints _group) select 0);
+ };$/Code$
- Number
+ Nothing
+
- moonIntensity
+ radioChannelAdd
- Returns the intensity of the moon's brightness in range 0...1.
+ Add the units to the custom radio channel.
- https://community.bistudio.com/wiki/moonIntensity
+ https://community.bistudio.com/wiki/radioChannelAdd
- moonIntensity
+ Number radioChannelAdd Array
- moonIntensity
+ index radioChannelAdd units
- $Code$_intensity = moonIntensity ;$/Code$
+ $Code$2 radioChannelAdd [player, unit1];$/Code$
undefined / undefined
@@ -43032,116 +44640,85 @@
- Number
+ Nothing
+
- moonPhase
+ setCollisionLight
- Returns the phase of the in-game Moon on the given date in range 0...1, where 0 - new Moon, 1 - full Moon. According to this command the fullest Moon in Arma 3 at midnight is on setDate [4804,7,13,0,0]; Use Moon Phase Utility to find out date for a mission with desired moon.
+ Switches collision lights of a vehicle on/off. Note that the vehicle has to be local.
- https://community.bistudio.com/wiki/moonPhase
+ https://community.bistudio.com/wiki/setCollisionLight
- moonPhase Array
+ Object setCollisionLight Boolean
- moonPhase date
+ vehicle setCollisionLight set
- $Code$_currentMoonPhase = moonPhase date ;$/Code$
-
- $Code$// Returns array of dates for given year when moon is at its fullest
- fnc_fullMoonDates =
- {
- private _year = param [0, 2035];
- private ["_date", "_phase", "_fullMoonDate"];
- private _fullMoonPhase = 1;
- private _waxing = false ;
- private _fullMoonDates = [];
- for "_i" from dateToNumber [_year, 1, 1, 0, 0] to dateToNumber [_year, 12, 31, 23, 59] step 1 / 365 do
- {
- _date = numberToDate [_year, _i];
- _phase = moonPhase _date;
- call
- {
- if (_phase _fullMoonPhase) exitWith
- {
- _waxing = true ;
- _fullMoonDate = _date;
- };
- if (_waxing) exitWith
- {
- _waxing = false ;
- _fullMoonDates pushBack _fullMoonDate;
- };
- };
- _fullMoonPhase = _phase;
- };
- _fullMoonDates
- };
- //set random full moon date in year 1970
- setDate selectRandom (1970 call fnc_fullMoonDates);$/Code$
+ $Code$heli setCollisionLight true ;$/Code$
- undefined / undefined
+ local / global
- Number
+ Nothing
+
- morale
+ ctrlIDC
- Checks a current morale level of the unit (-1..+1).
+ Returns control IDC.
- https://community.bistudio.com/wiki/morale
+ https://community.bistudio.com/wiki/ctrlIDC
- morale Object
+ ctrlIDC Control
- morale unit
+ ctrlIDC control
- $Code$morale ( leader player );//result is 0.5$/Code$
-
+
undefined / undefined
- Number
+ Number
+
- move3DENCamera
+ ctrlIDD
- Moves Eden Editor camera to given position, with or without offset.
- Default camera offset: [0,-25,25]
+ Returns display IDD.
- https://community.bistudio.com/wiki/move3DENCamera
+ https://community.bistudio.com/wiki/ctrlIDD
- move3DENCamera Array
+ ctrlIDD Display
- move3DENCamera [position,useOffset]
+ ctrlIDD display
- $Code$move3DENCamera [ getPos player,true];$/Code$
+ $Code$ctrlIDD findDisplay 46; //46$/Code$
undefined / undefined
@@ -43149,357 +44726,299 @@
- Nothing
+ Number
+
- moveInAny
+ ceil
- Moves unit to the first available seat in a vehicle. The order of priorities is the same order used in squad command when you order subordinates to get in vehicle to any position and is the same order used in Zeus when you drag units to a vehicle. Seat assignment seems to use the following priority logic:
- driver ( moveInDriver ) - commander turret ( moveInCommander ) - gunner turret ( moveInGunner ) - remaining turrets ( moveInTurret ) - cargo ( moveInCargo ).
- NOTE : This command will move player into the locked vehicle or seat just as well.
+ The ceil value of x.
- https://community.bistudio.com/wiki/moveInAny
+ https://community.bistudio.com/wiki/ceil
- Object moveInAny Object
+ ceil Number
- unit moveInAny vehicle
+ ceil x
- $Code$player moveInAny tank;$/Code$
+ $Code$ceil 5.25
+ Result is 6$/Code$
+
+ $Code$ceil -5.25
+ Result is -5$/Code$
- local / global
+ undefined / undefined
- Boolean
+ Number
+
- moveInCargo
+ createTask
- Move soldier into vehicle cargo position (Immediate, no animation).
+ Create a new AI task (subtask of parentTask). Type is name of registered task type.
- https://community.bistudio.com/wiki/moveInCargo
+ https://community.bistudio.com/wiki/createTask
- Object moveInCargo Object
-
- Object moveInCargo Array
+ Team_Member createTask Array
- unitName moveInCargo vehicle
-
- unitName moveInCargo [vehicle, CargoIndex]
+ teamMember createTask [[type, parentTask], priority, name1, value1nameN, valueN]
- $Code$_soldierOne moveInCargo _jeepOne;$/Code$
-
- $Code$_soldierOne moveInCargo [_jeepOne, 1];$/Code$
-
+
- local / global
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion
- If you place a soldier in a vehicle with the moveInCargo command, he wont "know" he's in the vehicle, and thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint. Therefore you have to use the assignAsCargo command, in order for the AI to catch on. Something like this: moveInCargo helo1 this assignAsCargo helo1
- MP Note Functions MoveInCargo can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
-
- In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Cargo" action command.
-
- In Arma 3 when using the alternative syntax of moveInCargo, it is necessary to call assignAsCargoIndex because it is not called automatically.
- $Code$unit1 moveInCargo [heli, 3];
- unit1 assignAsCargoIndex [heli, 3];$/Code$
- Alternatively avoid this broken syntax all together and use:
- $Code$unit1 assignAsCargoIndex [heli, 3];
- unit1 moveInCargo heli;
- $/Code$
- Nothing - Nothing
+ Task
+
- moveInCommander
+ exit
- Move soldier into vehicle commander position (Immediate, no animation).
+ Stops the execution of a SQS script.
+ It's ignored in SQF Scripts.
- https://community.bistudio.com/wiki/moveInCommander
+ https://community.bistudio.com/wiki/exit
- Object moveInCommander Object
+ exit
- unitName moveInCommander vehicle
+ exit
- $Code$_soldierOne moveInCommander _tankOne$/Code$
+ $Code$exit$/Code$
- local / global
+ undefined / local
- (August 4, 2006)
- Notes from before the conversion:
- MP Note Functions MoveInCommander can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
-
- In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Commander" action command.
- Nothing
+ Nothing
+
- moveInDriver
+ setBleedingRemaining
- Move soldier into vehicle driver position (Immediate, no animation).
+ Sets for how many seconds injured unit leaves blood trail. The unit damage must be = 0.1 for this command to have an effect, otherwise, the getBleedingRemaining will return 0 and no blood trail is left behind.
- https://community.bistudio.com/wiki/moveInDriver
+ https://community.bistudio.com/wiki/setBleedingRemaining
- Object moveInDriver Object
+ Object setBleedingRemaining Number
- unitName moveInDriver vehicle
+ unit setBleedingRemaining time
- $Code$_soldierOne moveInDriver _tankOne$/Code$
+ $Code$_unit setBleedingRemaining 60;$/Code$
+
+ $Code$player setDamage 0.25;
+ player setBleedingRemaining 120;$/Code$
- local / global
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- MP Note Functions MoveInDriver can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
-
- In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Driver" action command.
- Nothing
+ Nothing
+
- moveInGunner
+ isRealTime
- Move soldier into vehicle gunner position (Immediate, no animation).
+ Returns true if the mission editor is operating in real time mode.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/moveInGunner
+ https://community.bistudio.com/wiki/isRealTime
- Object moveInGunner Object
+ isRealTime Control
- unitName moveInGunner vehicle
+ isRealTime map
- $Code$soldierOne moveInGunner tankOne$/Code$
+ $Code$_isRealTime = isRealTime _map$/Code$
- local / global
+ undefined / undefined
- (August 4, 2006)
- Notes from before the conversion:
- MP Note Functions MoveInGunner can only be called for local soldiers. They will be ignored for remote soldiers. (see Locality in Multiplayer )
-
- In OFP v1.96, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the "getIn Gunner" action command.
- Nothing
+ Boolean
+
- moveInTurret
+ driver
- Moves the soldier into the vehicle's turret. (Immediately, without animation). turret path is an array of positions inside a turret, or positions inside a turret of a turret.
- [0] means first turret.
- [0,0] means first turret of first turret.
- [0,1] means second turret of first turret.
- [1] means second turret.
- [1,0] means first turret of the second turret.
- [2,0] means first turret of third turret.
- And so on...
+ Returns the driver of a vehicle.
- https://community.bistudio.com/wiki/moveInTurret
+ https://community.bistudio.com/wiki/driver
- Object moveInTurret Array
+ driver Object
- unitName moveInTurret [vehicle, turretPath]
+ driver vehicle
- $Code$_soldierOne moveInTurret [_tank, [0, 0]]$/Code$
+ $Code$( driver _tank) action ["getout", _tank];$/Code$
+
+ $Code$( driver ( vehicle player )) isEqualTo player //check if player is driver of current vehicle$/Code$
- local / global
+ global / undefined
- (March 6, 2008)
- To find out which turrets are available on a vehicle, and what the syntax is, you can use this little script.
-
- (February 13, 2014)
- Examples for nested turrets:
- MainTurret = $Code$_soldierOne moveInTurret [_tank, [0]] $/Code$
- CommanderTurret = $Code$_soldierOne moveInTurret [_tank, [0, 0]] $/Code$
- ... where:
- MainTurret is the standard BIS MainTurret... e.g:
- $Code$class Turrets
- {
- class MainTurret {};
- };$/Code$
- CommanderTurret is the standard BIS CommanderTurret located on the MainTurret... e.g:
- $Code$class Turrets
- {
- class MainTurret
- {
- class Turrets
- {
- class CommanderTurret {};
- };
- };
- };$/Code$
-
- (March 18, 2014)
- Here is a small function to find available turret paths for a given vehicle. It will only search 2 levels deep, hence called commonTurrets :
- $Code$KK_fnc_commonTurrets = {
- private ["_arr","_trts"];
- _arr = [];
- _trts = configFile / "CfgVehicles" / typeOf _this / "Turrets";
- for "_i" from 0 to count _trts - 1 do {
- _arr set [ count _arr, [_i]];
- for "_j" from 0 to count (
- _trts / configName (_trts select _i) / "Turrets"
- ) - 1 do {
- _arr set [ count _arr, [_i, _j]];
- };
- };
- _arr
- };$/Code$
- Example call:
- $Code$ hint str ( vehicle player call KK_fnc_commonTurrets); //[[0],[0,0]]$/Code$
- See also allTurrets
+ (August 3, 2006)
+ Notes from before the conversion:
+ It is also possible to find the driver of a vehicle by placing a D after the name of the vehicle so Tank1D and driver Tank1 both refer to the same unit, providing the original driver has not got out of the tank.
+ The difference between the two is Tank1D is always the unit that was driver of the tank when the mission started, whilst driver Tank1 is the driver which is now there.
- Nothing
+ Object
+
- moveObjectToEnd
+ doWatch
- Shifts an editor object to the end of the objects array. This means,that the object will be drawn last (after all other objects).
- i
- Some Old Editor Command
+ Order the given unit(s) to watch the given position or target (without radio messages). Use objNull as the target to order a unit to stop watching a position/target.
- https://community.bistudio.com/wiki/moveObjectToEnd
+ https://community.bistudio.com/wiki/doWatch
- Control moveObjectToEnd String
+ Object/Array doWatch Array
+
+ Object/Array doWatch Object
- map moveObjectToEnd object
+ unit doWatch position
+
+ unit doWatch target
-
+ $Code$_soldierOne doWatch markerPos "MarkerMoveOne"
+ // The unit named "soldierOne" will watch the position where the marker "MarkerMoveOne" is placed.$/Code$
+
+ $Code$_soldierOne doWatch _eastSoldier
+ // The unit named "soldierOne" will watch the unit named "eastSoldier".$/Code$
+
- undefined / undefined
+ local / global
+ (April 18, 2015)
+ Also controls where a vehicle gunner aims.
- Nothing
+ Nothing - Nothing
+
- moveOut
+ ctrlMapWorldToScreen
- Moves the soldier out of vehicle, immediately, without animation.
+ Transfers a map control world position to screen coordinates.
- https://community.bistudio.com/wiki/moveOut
+ https://community.bistudio.com/wiki/ctrlMapWorldToScreen
- moveOut Object
+ Control ctrlMapWorldToScreen Position
- moveOut soldier
+ control ctrlMapWorldToScreen position
- $Code${ if ( lifeState _x == "UNCONSCIOUS") then { moveOut _x}} forEach crew cursorTarget ;$/Code$
+ $Code$_screenCoord = _control ctrlMapWorldToScreen _worldCoord;$/Code$
- $Code$// Move out player just before he dies:
- player addEventHandler [
- "HandleDamage",
- format [
- ' if ( switch (_this select 1) do {
- case "": {_this select 2 = 1};
- case "head": {_this select 2 = %1};
- case "body": {_this select 2 = %2};
- default { false };
- }) then { moveOut player }',
- getNumber ( configFile "CfgFirstAid" "CriticalHeadHit"),
- getNumber ( configFile "CfgFirstAid" "CriticalBodyHit")
- ]
- ];$/Code$
+ $Code$_screenCoord = _control ctrlMapWorldToScreen position player ;$/Code$
- global / global
+ undefined / undefined
- (September 12, 2010)
- Seems to work only for unconscious - NOT for dead bodies. setPos /ATL/ASL seems to the only working for dead bodies.
+ (June 16, 2010)
+ Notes:
+ It returns a 2d array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.
+ In other words you can make the actual world position (of an object for example), relative to your active map display.
- Nothing
+ Array
+
- moveTime
+ ppEffectCommitted
- Returns the current time of the most important RTM animation currently being played on the soldier.
+ Check whether given post process effect is committed
- https://community.bistudio.com/wiki/moveTime
+ https://community.bistudio.com/wiki/ppEffectCommitted
- moveTime Object
+ ppEffectCommitted String
+
+ ppEffectCommitted Number
- moveTime soldier
+ ppEffectCommitted effect
+
+ ppEffectCommitted effect
- $Code$moveTime player ;$/Code$
+ $Code$ppEffectCommitted "colorCorrection";$/Code$
+
+ $Code$ppEffectCommitted _hndl;$/Code$
+
+ $Code$if ( ppEffectCommitted "colorCorrection") then { hint "alteration done !"};$/Code$
undefined / undefined
@@ -43507,135 +45026,144 @@
- Number
+ Boolean - Boolean
+
- moveToCompleted
+ setLightnings
- Check if latest low level moveTo command is finished.
+ Changes the lightnings value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+ NOTE : This command will have no effect (even though the value of lightnings changes) unless Manual Override option is selected in the editor in the Intel, which is normally off.
- https://community.bistudio.com/wiki/moveToCompleted
+ https://community.bistudio.com/wiki/setLightnings
- moveToCompleted Object
+ Number setLightnings Number
- moveToCompleted person
+ time setLightnings value
-
+ $Code$1800 setLightnings 0.7;$/Code$
+
undefined / undefined
- Boolean
+ Nothing
+
- moveToFailed
+ linkItem
- Check if latest low level moveTo command failed.
+ Create and assign item to the correct slot. If there is an item in the targeted slot, it gets replaced.
- https://community.bistudio.com/wiki/moveToFailed
+ https://community.bistudio.com/wiki/linkItem
- moveToFailed Object
+ Object linkItem String
- moveToFailed person
+ unit linkItem item
-
+ $Code$bluforUnit linkItem "NVGoggles";
+ opforUnit linkItem "NVGoggles_OPFOR";
+ independentUnit linkItem "NVGoggles_INDEP";$/Code$
+
- undefined / undefined
+ global / global
- Boolean
+ Nothing
+
- moveTo
+ fadeMusic
- Low level command to person to move to given position.
+ Changes the music volume smoothly within the given time.
- https://community.bistudio.com/wiki/moveTo
+ https://community.bistudio.com/wiki/fadeMusic
- Object moveTo PositionATL
+ Number fadeMusic Number
- person moveTo position
+ time fadeMusic volume
-
+ $Code$5 fadeMusic 0$/Code$
+
- local / global
+ undefined / local
- (August 14, 2010)
- moveTo is a low-level command used in FSM called with doFSM or commandFSM. See doFSM for more information about this. Use doMove everywhere else - even in FSM executed with execFSM.
- Nothing
+ Nothing
+
- move
+ ctrlType
- Let group move to given position (format Position or Position2D ) without waypoint. Active waypoints will be ignored when command is used.
+ Returns number representing the type of control, which is also defined by type property in config. For more information see Dialog Control
- https://community.bistudio.com/wiki/move
+ https://community.bistudio.com/wiki/ctrlType
- Object/Group move Array
+ ctrlType Control
- group move position
+ ctrlType control
- $Code$_groupOne move position player ;$/Code$
+ $Code$_type = ctrlType _rscEdit; // 2$/Code$
- local / global
+ undefined / undefined
- Nothing
+ Number
+
- musicVolume
+ forEachMember
- Checks the current music volume (set by fadeMusic )
+ Executes the given command recursively for both teams and agents that are members of the given team. For teams only use forEachMemberTeam. For agents only use forEachMemberAgent.
- https://community.bistudio.com/wiki/musicVolume
+ https://community.bistudio.com/wiki/forEachMember
- musicVolume
+ Code forEachMember Team_Member
- musicVolume
+ command forEachMember team
@@ -43645,292 +45173,277 @@
- Number
+ Nothing
+
- nMenuItems
+ weapons
- Returns the total number of user-added menu items belonging to the given menu.
- i
- Some Old Editor Command
+ Returns array of names of all Unit 's weapons.
- https://community.bistudio.com/wiki/nMenuItems
+ https://community.bistudio.com/wiki/weapons
- Control nMenuItems String
-
- Control nMenuItems Number
+ weapons Object
- map nMenuItems menuName
-
- map nMenuItems index
+ weapons vehicleName
-
+ $Code$_wArray = weapons player ;$/Code$
+
undefined / undefined
+ (12:07, 20 January 2007)
+ (A1 1.02) this command returns only weapons defined for the primary turret of the vehicle.
+ for ex. only ["D81", "PKT"] for t72, not ["D81", "PKT","DSHKM"]
+
+ (06:01, 3 March 2007 (CET))
+ weapons never returns the weapon "Throw" which all soldier units have have to throw handgrenades. You'd have to use hasWeapon to verfy it. Also handgrenades are not listed since they are magazines. Use magazines for that.
+
+ (11 March 2011)
+ Use weaponsTurret to determine the weapons of a non gunner/turret position.
+
+ (25 November 2011)
+ This command does not include non-turret weapons, such as smoke, flare or chaff launchers which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy. (Unsure whether it excludes it because it is not in the turret or because these are not considered true weapons via some property.)
+
+ (18 June 2013)
+ Lists also weapons in inventory from Arma 3 ver. 0.70.
- Number - Number
+ Array
+
- nameSound
+ setApertureNew
- Returns the nameSound of a person.
+ Sets custom camera aperture ([-1] to do it automatically).
- https://community.bistudio.com/wiki/nameSound
+ https://community.bistudio.com/wiki/setApertureNew
- nameSound Object
+ setApertureNew Array
- nameSound person
+ setApertureNew [min, std, max, stdLum]
- $Code$nameSound player$/Code$
+ $Code$setApertureNew [0.3, 0.2, 0.1, 1];$/Code$
+
+ $Code$// Simulate eye adjustment at night:
+ setDate [2016, 8, 10, 4, 0];
+ setApertureNew [2, 8, 14,.9];$/Code$
+
+ $Code$// Narrower range for a subtler effect:
+ setDate [2016, 8, 10, 4, 0];
+ setApertureNew [2, 5, 9,.8];$/Code$
- undefined / undefined
+ undefined / local
+ (October 30, 2016)
+ Some notes on example 2 - try it outdoors on a piece of ground with high contrasting areas. I suggest the end of a runway, standing among the white painted triangles.
+ Look up about 60 degrees above the horizon and toggle between setApertureNew [2, 8, 14,.9]; and the default setting of setAperture -1;. There should be little change -- at least on the date in the example.
+ Reset again to setApertureNew [2, 8, 14,.9]; and then pan slowly down until you're basically looking at your feet. The less sky (the main outdoor light source) you see, the 'wider' (toward the 'min' number) the aperture will become. Looking at the ground on a runway, for example, you should be able to easily distinguish the painted white triangles from the unpainted pavement. Again, toggle back to the default aperture. The view should get much darker.
+ This setting allows for some natural adjustment based on the amount of visible light in the scene, and is highly encouraged over the default fixed aperature for night missions. When you're standing in the beam of a lighthouse, for example (try near the 'Spartan' on Stratis), you will be basically unable to see anything not illuminated by the beam. Once the beam passes and your vision returns to normal, your immediate surroundings will be dimmer, of course, but you'll be able to see further out.
- String
+ Nothing
+
- name
+ setDamage
- When argument is Object, the command returns the name given to a unit using the setIdentity instruction or selected randomly by the game engine if setIdentity has not been used on the unit. If used on vehicle, name of first crew member (in order commander, driver, gunner). If used on an object, "Error: No unit" is being returned.
- When argument is Location, the location's name is returned. To return the textual value of a location use text command instead.
- NOTE: In Arma 3 setName can be used on a person to set name. However in multiplayer name always returns profileName.
+ Damage / repair object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. (This function is an alias of setDammage and was introduced to fix the obvious spelling error in the original function name)
+ Since Arma 3 v1.67 there is an alternative syntax to this command allowing to switch off destruction effects.
- https://community.bistudio.com/wiki/name
+ https://community.bistudio.com/wiki/setDamage
- name Object
+ Object setDamage Number
- name Location
+ Object setDamage Array
- name object
+ object setDamage damage
- name location
+ object setDamage [damage, useEffects]
- $Code$_name = name player ;$/Code$
-
- $Code$_locationName = name myLocation;$/Code$
+ $Code$_soldier1 setDamage 1;$/Code$
- $Code$name nearestLocation [ position player, "Hill"]; //""
- text nearestLocation [ position player, "Hill"]; //"Lesnoy Khrebet"$/Code$
+ $Code$_house1 setDamage [1, false ];$/Code$
- undefined / undefined
+ global / global
- Location variant appears to be only for the 3d editor.
-
- (August 4, 2006)
- Notes from before the conversion:
- Name will return an error for units that have been dead for more than a few seconds.
-
- (December 15, 2006)
- To return the name of the unit that was given in the editor's "name" field, call up the unit's object in a format statement:
- hint format["Unit's name: %1",_unitobject]
+ In OFP, setting a unit's damage to a negative value will set it's health to full, but impair their aim.
- (April 14, 2009)
- Will return
- Error: No vehicle
- for JIP players in init.sqf, if no sleep were performed
+ (May 29, 2015)
+ Using this possible overrides individual hit damages such as setHitPointDamage ["HitHead", _value]; if you're having issues try setting hitdamage after setdamage
- String - String
+ Nothing - Nothing
+
- nearEntities
+ showNewEditorObject
- Find entities in the sphere with given radius. If typeName(s) is (are) given, only entities of given type (or its subtype) are listed.
- This command returns only alive entities. If you need to return dead entities as well use entities command.
+ Show the add editor object dialog,type is editor object type,class is,class definition to automatically select,side filters by a certain,side,pos is position to create the object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/nearEntities
+ https://community.bistudio.com/wiki/showNewEditorObject
- Object/Array nearEntities Number
-
- Object/Array nearEntities Array
+ Control showNewEditorObject Array
- position nearEntities radius
-
- position nearEntities [typeName, radius]
+ map showNewEditorObject [type,class,side,position]
- $Code$_list = player nearEntities 20;
- _list = ( position player ) nearEntities 50;
- _list = player nearEntities ["Man", 1000];
- _list = ( position player ) nearEntities ["LaserTarget", 3000];
- _list = player nearEntities [["Car", "Motorcycle", "Tank"], 50];
- _list = ( position player ) nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], 200];$/Code$
-
+
- global / undefined
+ undefined / undefined
- (27 Mar, 2014)
- According to Code Optimisation, this function is the fastest and should be used instead of nearestObjects when suitable.
- Array - Array
+ Any_Value
+
- nearObjectsReady
+ updateDrawIcon
- Check whether all data are loaded to nearObjects will return in reasonable time.
+ Updates the icon to be shown in 2D editor for the specified editor,object. If maintain size is false,icon will not scale depending on the,scale of the map. If maintain size is a number,the icon will maintain,size if map scale is below that number.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/nearObjectsReady
+ https://community.bistudio.com/wiki/updateDrawIcon
- Object/Array nearObjectsReady Number
+ Control updateDrawIcon Array
- position nearObjectsReady radius
+ map updateDrawIcon [object,string identifier,color,offset,width,height,maintain size,angle,shadow]
- $Code$_twnpos nearObjectsReady 500;//from ALICE$/Code$
-
+
undefined / undefined
- Boolean
+ Nothing
+
- nearObjects
+ setMarkerAlpha
- Find objects in a sphere with given radius. The first object in the returned array is not necessarily the closest one. If you need returned objects to be sorted by distance, use nearestObjects. If typeName is given, only objects of given type (or its subtype) are listed.
+ Sets the marker alpha. The marker is modified on all computers in a network session.
+ When alpha equals 1, the marker is visible, but if alpha equals 0, then the marker is invisible.
+ Alpha can be numbers and fractions.
- https://community.bistudio.com/wiki/nearObjects
+ https://community.bistudio.com/wiki/setMarkerAlpha
- Position/Position2D/Object nearObjects Number
-
- PositionAGL/Position2D/Object nearObjects Array
+ String setMarkerAlpha Number
- position nearObjects radius
-
- position nearObjects [typeName, radius]
+ marker setMarkerAlpha alpha
- $Code$_list = position player nearObjects 50;$/Code$
-
- $Code$_list = [_xpos,_ypos] nearObjects ["House", 20];$/Code$
+ $Code$"my_marker" setMarkerAlpha 0.5;$/Code$
- $Code$_list = player nearObjects 20;$/Code$
+ $Code$"enemy_convoy_marker" setMarkerAlpha 0;$/Code$
- undefined / undefined
+ undefined / global
- (June 30, 2007)
- Units in vehicles are not detected via this command.
-
- (December 15, 2011)
- In the second example, you can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use "All" as an alternative to leaving it out. (CO 1.59)
-
- (January 3, 2013)
- If you use the first example, it will return objects many more objects such as pollen, honeybees and crucially, triggers. Triggers will show in the returned array as "no shape" but you can use typeOf to get the classname, which will give "EmptyDetector". This will not return objects that don't have classnames such as plants, stones and some map objects like vehicle wrecks. nearestObjects will find objects without classnames.
-
- (August 8, 2017)
- The example 2 means that the command will include all types which inherit from the given type. As an example, when using "Helipad_Base_F", the command will detect all types of helipads (Land_HelipadSquare_F, Land_HelipadCircle_F, Land_HelipadEmpty_F, etc) in the given radius.
- Array - Array
+ Nothing
+
- nearRoads
+ menuValue
- Find the road segments within the circle of given radius.
+ Returns current value set in menu entry on given path.
- https://community.bistudio.com/wiki/nearRoads
+ https://community.bistudio.com/wiki/menuValue
- Object/Array nearRoads Number
+ menuValue Array
- pos nearRoads radius
+ menuValue [idc, path]
- $Code$_list = player nearRoads 50;$/Code$
-
- $Code$_list = ( position _unit) nearRoads 50;$/Code$
-
- $Code$_list = [1800,5700] nearRoads 50;$/Code$
-
+
undefined / undefined
- (26 Mar, 2011)
- NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east.
- Click below for picture.
- [1]
- Array
+ Number
+
- nearSupplies
+ diag_mergeConfigFile
- Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.
+ Adjust configs on-the-fly without the need of restarting the game (by merging the given config file into the main config in memory). Location is relative to the Userdir (default) or mission directory depending on the the value of UserDir [FileName,UserDir].
+ Doesn't work with cfgAmmo & few other classes. (Since 1.69, cfgAmmo should be mergeable!) Merging config file means also that you can't delete parameters through diag_mergeConfigFile. Changes applied by diag_mergeConfigFile are applied to all new entities so restart of mission is not necessarily required - spawning vehicle again or changing back forth weapon should usually do the trick.
+ Command is only available when using Arma 3 Diagnostics Exe on Dev-Branch.
- https://community.bistudio.com/wiki/nearSupplies
+ https://community.bistudio.com/wiki/diag_mergeConfigFile
- Object/Array nearSupplies Number
+ diag_mergeConfigFile Array
- origin nearSupplies radius
+ diag_mergeConfigFile path
- $Code$_list = player nearSupplies 50;$/Code$
+ $Code$diag_mergeConfigFile ["O:\Arma3\A3\Stuff_F\config.cpp"]$/Code$
undefined / undefined
@@ -43938,157 +45451,135 @@
- Array
+ Nothing
+
- nearTargets
+ enableEnvironment
- Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
+ Enable/disable environmental effects: ambient life and/or ambient sound.
- https://community.bistudio.com/wiki/nearTargets
+ https://community.bistudio.com/wiki/enableEnvironment
- Object nearTargets Number
+ enableEnvironment Boolean
+
+ enableEnvironment Array
- unit nearTargets range
+ enableEnvironment enabled
+
+ enableEnvironment [ambientLife, ambientSound]
- $Code$player nearTargets 100;
- // could return something like this:
- //[[[2555.33,2535.33,1.32708],"SoldierEB",EAST,214222,EAST 1-1-A:1],[[2550.39,2482.5,1.32696],"SoldierWB",WEST,0,WEST 1-1-A:2]]$/Code$
+ $Code$enableEnvironment false ;$/Code$
+
+ $Code$enableEnvironment [ false, true ];$/Code$
undefined / undefined
- (Febuary 17, 2011)
- A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. Any unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1.
-
- (January 15, 2012)
- The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit:
- For infantry:
- ] 0, 1.5 [ - side unknown, some position offset, identified as SoldierWB
- [ 1.5, 1.6 [ - side identified, subjective cost set
- [ 1.6, 2 [ - type identified better (USMC_Soldier_Base)
- [ 2, 3.6 [ - type identified precisely (USMC_Soldier)
- [ 3.6, 4 ] - position identified precisely
- The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
- 0class CAManBase: Man
- 1.6class SoldierWB: CAManBase
- 2class USMC_Soldier_Base: SoldierWB
- 3.9class USMC_Soldier: USMC_Soldier_Base
- For tanks:
- ] 0, 0.03 [ - side unknown, some position offset, identified as LandVehicle
- [ 0.03, 0.13 [ - type identified better (Tank)
- [ 0.13, 0.3 [ - type identified better (M1A1)
- [ 0.3, 1.5 [ - side identified, subjective cost set
- [ 1.5, 3.6 [ - side identified precisely (CIV), subjective cost adjusted
- [ 3.6, 4 ] - position identified precisely
- The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
- 0class All
- class AllVehicles: All
- 0.0005class Land: AllVehicles
- 0.02class LandVehicle: Land
- 0.12class Tank: LandVehicle
- 0.25class M1A1: Tank
-
- (January 17, 2012)
- When an unit dies, it's nearTargets array gets emptied after some seconds.
- When an unit dies, its reference will get removed from other units nearTargets' arrays immediately.
- A target will be removed from the array after about 360 seconds without contact.
+ (28 October, 2013)
+ This command has to be executed after mission start to have an effect. So if you add this command in init.sqf make sure you wait until mission is running:
+ $Code$//init.sqf
+ waitUntil { time 0};
+ enableEnvironment false ;$/Code$
- (January 21, 2012)
- Position accuracy seems to be a radius in meters from the perceived position.
+ (October 23, 2017)
+ NOTE: Disabling ambient life will remove generation of anything that is coming from AmbientA3 map class (see Ambient System ). That means removing not only bees and cicadas around a player, but rabbits, snakes, seagulls and all the fish in the sea.
- Array
+ Nothing - Nothing
+
- nearestBuilding
+ allSimpleObjects
- Finds the nearest building to a given object or position. A "building" is defined as an object that is of class "House" and contains a path LOD.
+ Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name. NOTE : There is no inheritance in simple objects, so only exact class match is allowed. className is not case sensitive.
- https://community.bistudio.com/wiki/nearestBuilding
+ https://community.bistudio.com/wiki/allSimpleObjects
- nearestBuilding Object/Array
+ allSimpleObjects Array
- nearestBuilding position
+ allSimpleObjects [className1, className2,classNameN]
- $Code$_nBuilding = nearestBuilding player ;$/Code$
+ $Code$allSimpleObjects ["Box_NATO_Equip_F", "Land_CampingChair_V2_F"];$/Code$
- $Code$_nBuilding = nearestBuilding position player ;$/Code$
+ $Code$_allSimpleObjects = allSimpleObjects [];$/Code$
undefined / undefined
- (February 18, 2016)
- This command doesn't return any house or building placed in editor (with createVehicle ). Use nearestObjects instead:
- $Code$ nearestObjects [ player, ["House", "Building"], 50] select 0$/Code$
- Object
+ Array
+
- nearestLocationWithDubbing
+ mapGridPosition
- Find the nearest location (to the given position) having it speech non-empty.
+ Returns the map grid position of an object or position. The format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: "024577" or "De82" or similar.
- https://community.bistudio.com/wiki/nearestLocationWithDubbing
+ https://community.bistudio.com/wiki/mapGridPosition
- nearestLocationWithDubbing Object/Array
+ mapGridPosition Object/Position
- nearestLocationWithDubbing position
+ mapGridPosition param
-
+ $Code$_gridPos = mapGridPosition player$/Code$
+
+ $Code$_gridPos = mapGridPosition getPos player$/Code$
+
undefined / undefined
- Location
+ String
+
- nearestLocation
+ setObjectProxy
- Return the closest location of specified class to a given position. Checked range is unlimited (i.e. covers the whole map).
+ Set the proxy object associated with the given editor object.
+ i
+ Some Old Editor Command
- https://community.bistudio.com/wiki/nearestLocation
+ https://community.bistudio.com/wiki/setObjectProxy
- nearestLocation Array
+ Control setObjectProxy Array
- nearestLocation [position, locationClass]
+ map setObjectProxy [object,proxy object]
- $Code$_nearestCity = nearestLocation [ getPos player, "nameCity"];$/Code$
-
- $Code$_anyNearestLocation = nearestLocation [ player, ""];$/Code$
+ $Code$_map setObjectProxy ["_group_0", vehicle (leader _group)];$/Code$
undefined / undefined
@@ -44096,318 +45587,200 @@
- Location
+ Nothing
+
- nearestLocations
+ local
- Returns an array of locations of chosen type(s) within the given radius of the given position, sorted from nearest to farthest.
+ Check if given unit is local on the computer in Multiplayer games (see Locality in Multiplayer for general concepts).
+ This can be used when some activation fields or scripts need to be performed only on one computer. In Single player all objects are local.
+ Note1: Map created objects (those placed in Visitor ) are local everywhere.
+ Note2: Since Arma 3 v1.53.132932 keyword local has been renamed to private for consistency and to avoid any confusion. However, this just makes the third example obsolete. It's core functionality still remains.
- https://community.bistudio.com/wiki/nearestLocations
+ https://community.bistudio.com/wiki/local
- nearestLocations Array
+ local Object/Group
- nearestLocations [position, [locationType,], radius, sortPosition]
+ local object
- $Code$_nearbyLocations = nearestLocations [ position player, ["RockArea","VegetationFir"], 100];$/Code$
+ $Code$// SQS:
+ ?! local _unitName : hint "remote"$/Code$
- $Code$// Find any of nearest locations:
- allLocationTypes = [];
- "allLocationTypes pushBack configName _x" configClasses (
- configFile "CfgLocationTypes"
- );
- {
- systemChat format [
- "%1 (%2) - %3m",
- _x,
- text _x,
- position player distance _x
- ];
- } forEach nearestLocations [ player, allLocationTypes, 500];$/Code$
+ $Code$// SQF:
+ if (! local _unitName) then {
+ hint "remote";
+ };$/Code$
+
+ $Code$_isLocalGroup = local group _unit;$/Code$
- undefined / undefined
+ global / undefined
+ (August 4, 2006)
+ Notes from before the conversion:
+ In multiplayer, a game logic will always be local to the host computer. This works on both dedicated and player-hosted servers.
- Array
+ Boolean
+
- nearestObjects
+ crew
- Returns a list of nearest objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered by proximity, the closest one will be first in the array. Alternatively, you use nearObjects command, which doesn't sort results.
- position can use the format:
- [[x,y,z], ["ClassName",...], radius]
- or
- [object, ["ClassName",...], radius]
- To use it without any ClassName filter:
- [object or position, [], radius].
- A list of ClassName types (Tanks eg) can be found in CfgVehicles
- Since Arma 3 v1.65.138818 it is possible to switch search and sorting mode between 2D and 3D
+ Returns the crew (both dead and alive) of the given vehicle.
- https://community.bistudio.com/wiki/nearestObjects
+ https://community.bistudio.com/wiki/crew
- nearestObjects Array
+ crew Object
- nearestObjects [position, types, radius, 2Dmode]
+ crew vehicleName
- $Code$nearestObjects [ player, ["Car","Tank"], 200];$/Code$
-
- $Code$nearestObjects [ player, ["house"], 200];$/Code$
-
- $Code$nearestObjects [[2716,2949,0], ["Car","Truck"], 100];$/Code$
-
- $Code$// Return every object in 50 metres radius around player:
- nearestObjects [ player, [], 50]$/Code$
+ $Code$player in ( crew _tank);$/Code$
- undefined / undefined
+ global / undefined
- (unknown)
- To get a list with alive targets for various situations use this construct:
- $Code$_nearestTargets = nearestObjects [_submunScanPos, ["VBS2_TANK","TANK"], _scanArea];
- _validNearestTargets = [];
- { if ( alive _x) then {_validNearestTargets set [( count _validNearestTargets),_x];};} forEach _nearestTargets;
- $/Code$
- results in _validNearestTargets being filled with targets == alive.. (you could use other conditions there, of course!)
- -- Vigilante
-
- (10. Aug. 2010)
- Passing an empty array to define the types will also return objects with no class at all (such as trees, bushes, stones,...).
- Example:
- $Code$_objects = nearestObjects [_position, [], _radius];$/Code$
- Passing the array ["All"] is not the same and will only return objects that have some sort of class.
-
- (11.09.2013)
- If you want to detect nearby grenades for the position of a unit, for example, using 'nearestObjects' won't work. You have to use
- 'nearObjects' instead.
- $Code$ count ( nearestObjects [_unit, ["GrenadeHand"], 30]) // WON'T WORK$/Code$
- Won't ever return anything but 0.
- $Code$ count (_unit nearObjects ["GrenadeHand", 30]) // WORKS!$/Code$
- Will work.
-
- (March 22, 2014)
- The distance from which an object is determined to be inside the radius is calculated from its model center (object modelToWorld [0,0,0]), and not the position returned by getPos/ATL/ASL. If an object is used as the origin from which to scan, distance is calculated from its model center as well.
-
- (October 26, 2014)
- Return all trees in 100m radius around player:
- $Code$trees = [];
- {
- if ( str _x find ": t_" -1) then {
- trees pushBack _x;
- };
- } forEach nearestObjects [ player, [], 100];$/Code$
-
- (August 27, 2015)
- If you use "Man" as the class to look for, it will only find dismounted men. IE, men in vehicles will NOT be found.
-
- (January 8, 2016)
- The first call to this command can take significantly longer then consecutive calls. But even after the objects in given radius were cached, the sorting this command performs could be quite expensive. For example to sort ~7000 object it might take up to 100ms. For performance reasons you can use nearObjects instead, which is basically the same command but without added sorting.
-
- (March 2, 2016)
- In Arma 3, nearestObjects is partially broken and is unable to return nearby placed explosive charges or mines when searching by classnames. Use nearObjects, nearestObject or allMines instead.
- Example of non-functional code:
- $Code$//always returns nothing, even if there are objects that should be returned
- nearestObjects [position player, ["APERSMine_Range_Ammo", "SatchelCharge_Remote_Ammo"], 10]$/Code$
+ (3 February, 2010)
+ The crew command will return crew in order [driver,gunner,commander,turrets,cargo]
- (October 31, 2016)
- Since Arma 3 v1.65.138818 the default sorting is done according to 3D distance not distance2D as before. This is an attempt to correct some very old bug in implementation.
+ (1 June, 2014)
+ The crew command will return an empty array if the object has no crew - this includes objects that can't hold crew. If used on a unit (man, module, etc.) it will return an array containing that unit.
- Array
+ Array
+
- nearestObject
+ ctRemoveRows
- Returns the nearest object of given type to given position within a sphere. Hardcoded radius is 50 meters. Unlike with nearestObjects, where distance is measured in 2D space, nearestObject will be closest object in 3D space.
- If object class type is used, any object derived from the type is found as well (In OFP however, only objects with exactly the type given are found). If object ID passed as an argument (as in example 2) the search range is unlimited.
+ Takes array of row indices as a parameter and removes rows with those indices. Indices of remaining rows will be recomputed.
- https://community.bistudio.com/wiki/nearestObject
+ https://community.bistudio.com/wiki/ctRemoveRows
- nearestObject Array
-
- nearestObject Position3D/Position2D/Object
-
- Position3D/Position2D nearestObject String
-
- Position3D/Position2D nearestObject Number
+ Control ctRemoveRows Number
- nearestObject [position, type]
-
- nearestObject position
-
- position nearestObject type
-
- position nearestObject id
+ ctrl ctRemoveRows indices
- $Code$_nObject = nearestObject [2345,6789];
- _nObject = nearestObject [ player, "StreetLamp"];$/Code$
-
- $Code$// Return the object with ID 123456:
- _nObject = [0,0,0] nearestObject 123456;$/Code$
-
- $Code$_nObject = getPos player nearestObject "StreetLamp";$/Code$
-
- $Code$// Return the nearest object with ( typeOf _nObject == "#XXXX") - #mark, #slop, etc. Unlimited search range:
- _nObject = _position nearestObject -1;
- // Return the nearest object with ( typeOf _nObject != ""). Search range is 50m:_nObject = nearestObject _position;$/Code$
-
- $Code$// (See also allMissionObjects ):
- _blood = nearestObject [ player, "#slop"];
- _step = nearestObject [ player, "#mark"];
- _track = nearestObject [ player, "#track"];
- _crater = nearestObject [ player, "#crater"];$/Code$
+ $Code$_control ctRemoveRows [0, 1, 2];$/Code$
- undefined / undefined
+ local / local
- Object - Object - Object - Object
+ Nothing
+
- nearestTerrainObjects
+ getWeaponCargo
- Returns a list of nearest terrain objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered according to 3D distance to the object (i.e. the closest one will be first in the array).
- In contrast to nearestObjects this command returns terrain placed objects like trees, rocks and buildings which don't necessarily need an associated config class.
- position can use the format:
- [[x,y,z], ["Type",...], radius]
- or
- [object, ["Type",...], radius]
- To use it without any type filter:
- [object or position, [], radius]
- Possible type names: "TREE", "SMALL TREE", "BUSH", "BUILDING", "HOUSE", "FOREST BORDER", "FOREST TRIANGLE", "FOREST SQUARE", "CHURCH", "CHAPEL", "CROSS", "BUNKER", "FORTRESS", "FOUNTAIN", "VIEW-TOWER", "LIGHTHOUSE", "QUAY", "FUELSTATION", "HOSPITAL", "FENCE", "WALL", "HIDE", "BUSSTOP", "ROAD", "FOREST", "TRANSMITTER", "STACK", "RUIN", "TOURISM", "WATERTOWER", "TRACK", "MAIN ROAD", "ROCK", "ROCKS", "POWER LINES", "RAILWAY", "POWERSOLAR", "POWERWAVE", "POWERWIND", "SHIPWRECK", "TRAIL"
- Since Arma 3 v1.61.136035 it is possible to switch the sorting algorithm off by providing optional param, which significantly increases the performance of this command, especially if the search is performed with large radius.
- Since Arma 3 v1.65.138818 it is possible to switch search and sorting mode between 2D and 3D
+ Returns all weapons types and count from the cargo space
- https://community.bistudio.com/wiki/nearestTerrainObjects
+ https://community.bistudio.com/wiki/getWeaponCargo
- nearestTerrainObjects Array
+ getWeaponCargo Object
- nearestTerrainObjects [position, types, radius, sort, 2Dmode]
+ getWeaponCargo object
- $Code$nearestTerrainObjects [ player, ["Tree","Bush"], 200];$/Code$
-
- $Code$nearestTerrainObjects [ player, ["House"], 200];$/Code$
-
- $Code$nearestTerrainObjects [[2716,2949,0], ["Chapel","Fuelstation"], 100];$/Code$
-
- $Code$// Return every terrain object in 50 metres radius around player sorted, closest first:
- nearestTerrainObjects [ player, [], 50]$/Code$
-
- $Code$// Return every terrain object in 50 metres radius around player unsorted:
- nearestTerrainObjects [ player, [], 50, false ]$/Code$
+ $Code$_content = getWeaponCargo carName;$/Code$
- $Code$// Hide all terrain objects command could find:
- if ( isServer ) then
- {
- {
- _x hideObjectGlobal true ;
- }
- forEach nearestTerrainObjects
- [
- [ worldSize /2, worldSize /2],
- [],
- worldSize,
- false
- ];
- };$/Code$
+ $Code$_content = getWeaponCargo ammoBoxName;
+ // Sample result returns:
+ [["arifle_Katiba_F","launch_B_Titan_short_F"],[2,1]]$/Code$
- undefined / undefined
+ global / undefined
- (October 31, 2016)
- Since Arma 3 v1.65.138818 the default sorting is done according to 3D distance not distance2D as before. This is an attempt to correct some very old bug in implementation.
-
- (December 28, 2016)
- Be aware that some terrain objects types might be tricky to be found, such as terrain rocks and boulders which are not considered to be "ROCKS" or "ROCK", but "HIDE". Example:
- $Code$nearestTerrainObjects [player, ["HIDE"], 20]; // [939688: bluntstone_01.p3d,939691: garbagebags_f.p3d,939671: wreck_car_f.p3d,939692: junkpile_f.p3d]
- $/Code$
- Array
+ Array
+
- needReload
+ isOnRoad
- Return how much vehicle wants to reload its weapons.
+ Checks if given position is on road. Same as roadAt, only return is boolean instead of road object.
- https://community.bistudio.com/wiki/needReload
+ https://community.bistudio.com/wiki/isOnRoad
- needReload Object
+ isOnRoad Object/Array
- needReload vehicle
+ isOnRoad position
- $Code$_seriousness = needReload _vehicle;$/Code$
+ $Code$_objOnRoad = isOnRoad player ;$/Code$
- $Code$if ( needReload player == 1) then { reload player };$/Code$
+ $Code$_posOnRoad = isOnRoad ASLToAGL getPosASL player ;$/Code$
- undefined / undefined
+ global / undefined
+ (November 24, 2017)
+ Some roadobjects will return false when using this command. invisibleroadway_square_f.p3d is found by the nearRoads command, yet will return false for isOnRoad.
- Number
+ Boolean
+
- netId
+ camPreload
- Unique ID of object or group. As this command is MP only, you can use BIS_fnc_netId, which extends the use to SP as well. See also: BIS_fnc_objectVar
+ Preload the scene for the prepared camera. Time gives timeout, zero means no (infinite) timeout.
- https://community.bistudio.com/wiki/netId
+ https://community.bistudio.com/wiki/camPreload
- netId Object/Group
+ Object camPreload Number
- netId var
+ camera camPreload time
- $Code$_playerNetId = netId player ;$/Code$
+ $Code$_camera camPreload 5$/Code$
undefined / undefined
@@ -44415,29 +45788,28 @@
- String
+ Nothing
+
- netObjNull
+ attachedObject
- A non existing network object. Not used in scripting anywhere in game.
+ Returns the object a location is attached to. If the location is unattached, then objNull is returned.
- https://community.bistudio.com/wiki/netObjNull
+ https://community.bistudio.com/wiki/attachedObject
- netObjNull
+ attachedObject Location
- netObjNull
+ attachedObject location
- $Code$netObjNull == netObjNull // Returns false$/Code$
-
- $Code$netObjNull isEqualTo netObjNull // Returns true$/Code$
+ $Code$_locAttachedObj = attachedObject myLocation;$/Code$
undefined / undefined
@@ -44445,86 +45817,106 @@
- NetObject
+ Object
+
- newOverlay
+ joinSilent
- Creates the new overlay dialog for the specified type of overlay.
- i
- Some Old Editor Command
+ Join all units in the array to given group silently (without radio message). To have a group member leave a group, join him with the grpNull group (e.g. [guy1] joinSilent grpNull ), but beware, as brand new group is created for the leaving unit and this could result in the number of groups in a mission growing out of control.
- https://community.bistudio.com/wiki/newOverlay
+ https://community.bistudio.com/wiki/joinSilent
- Control newOverlay Config
+ Array joinSilent Object/Group
- map newOverlay config
+ unitArray joinSilent group
-
+ $Code$[_unitOne, _unitTwo] joinSilent ( group player );$/Code$
+
+ $Code$[_unitOne, _unitTwo] joinSilent player ;$/Code$
+
- undefined / undefined
+ global / global
+ (August 4, 2014)
+ If all units of a group are joined to another group then the first group will be NULL-group afterward.
- Nothing
+ Nothing
+
- nextMenuItemIndex
+ loadFile
- Returns the next available menu item index.
- i
- Some Old Editor Command
+ Return content of given filename as string. If you plan to compile said string, be aware that the file shouldn't contain comments or compile will throw an error. If there are comments, use preprocessFile / preprocessFileLineNumbers instead.
- https://community.bistudio.com/wiki/nextMenuItemIndex
+ https://community.bistudio.com/wiki/loadFile
- nextMenuItemIndex Control
+ loadFile String
- nextMenuItemIndex map
+ loadFile fileName
-
+ $Code$_contents = loadFile "wantedString.txt";$/Code$
+
+ $Code$_contents = compile loadFile "myFunction.sqf"; // will compile string into code$/Code$
+
undefined / undefined
+ (25 January 2016)
+ Notice that you will have to activate file patching via -filePatching. Otherwise, execVM and loadFile will *not* load any files outside your mission folder (like the global scripts).
- Number
+ String
+
- nextWeatherChange
+ failMission
- Return the remaining time (in seconds) over which the current weather change will occur.
- When a weather change finishes, the game engine will automatically generate a new random weather change over a realistic time period (minimum of 90 minutes).
+ Finish the mission. If the server is set to run persistent mission, failMission will not end the mission when last player gets kicked to the lobby. Use endMission to end the mission.
+ The end type can be:
+ "CONTINUE"
+ "KILLED"
+ "LOSER"
+ "END1"
+ "END2"
+ "END3"
+ "END4"
+ "END5"
+ "END6"
+ Mission saves won't be deleted.
+ To maintain Arma 3 visual style, it's recommended to use BIS_fnc_endMission instead.
- https://community.bistudio.com/wiki/nextWeatherChange
+ https://community.bistudio.com/wiki/failMission
- nextWeatherChange
+ failMission String
- nextWeatherChange
+ failMission endtype
- $Code$_seconds = nextWeatherChange ;$/Code$
+ $Code$failMission "LOSER";$/Code$
undefined / undefined
@@ -44532,99 +45924,101 @@
- Number
+ Nothing
+
- nil
+ enginesIsOnRTD
- Nil value. This value can be used to undefine existing variables.
+ Returns which engines are producing some work.
- https://community.bistudio.com/wiki/nil
+ https://community.bistudio.com/wiki/enginesIsOnRTD
- nil
+ enginesIsOnRTD Object
- nil
+ enginesIsOnRTD RTD_helicopter
- $Code$variableToDestroy = nil ;$/Code$
+ $Code$_enginesTaru = enginesIsOnRTD _taru// Returns [true,true]$/Code$
undefined / undefined
- Note that ArrayName = nil destroys the arrayNAME not the array content.
- Array content is 'destroyed' when no more ArrayName s refer to the content.
-
- Never ever assign a value to nil !
- Doing so creates a global variable with the same name that overrides the "command" nil :
- foo = "foo";
- nil = "bar";
- foo = nil;
- hint foo; // displays "bar"
-
- (September 25, 2014)
- While isNil isn't available in OFP/CWA you can easily emulate it with something like this:
- _nil = format["%1",_nilstring];
- ?(format["%1",foo]==_nil): foo = "Hello World!"
- Void
+ Array
+
- not
+ ppEffectCreate
- not a.
- Exactly the same as ! a
+ Creates Post process effects specified by effect name and priority. Supported effects are:
+ "RadialBlur"
+ "ChromAberration"
+ "WetDistortion"
+ "ColorCorrections"
+ "DynamicBlur"
+ "FilmGrain"
+ "ColorInversion"
- https://community.bistudio.com/wiki/not
+ https://community.bistudio.com/wiki/ppEffectCreate
- not Number
+ ppEffectCreate Array
- not a
+ ppEffectCreate [name, priority]
+
+ ppEffectCreate [[name1, priority1],]
- $Code$not false
- // Result is true.$/Code$
+ $Code$_ppGrain = ppEffectCreate ["filmGrain", 2005];$/Code$
undefined / undefined
+ (July 24, 2015)
+ "wetDistortion" only works if handle is used. Arma 3 (1.48.131561)
- Boolean
+ Number
+
- numberToDate
+ sliderRange
- Convert float number to a date.
+ Return limits, as an Array [min, max] of slider idc of topmost user dialog.
- https://community.bistudio.com/wiki/numberToDate
+ https://community.bistudio.com/wiki/sliderRange
- numberToDate Array
+ sliderRange Number
+
+ sliderRange Control
- numberToDate [year,time]
+ sliderRange idc
+
+ sliderRange control
- $Code$_date = numberToDate [2008,0.5324]; //[2008,7,13,7,49]$/Code$
+ $Code$_slidelimits1 = sliderRange 105;$/Code$
undefined / undefined
@@ -44632,71 +46026,89 @@
- Array
+ Array - Array
+
- objNull
+ vectorDistanceSqr
- A non-existent Object. To compare non-existent objects use isNull or isEqualTo :
- objNull == objNull ; // false
- isNull objNull ; // true
- objNull isEqualTo objNull ; // true
+ Squared distance between two 3D vectors.
- https://community.bistudio.com/wiki/objNull
+ https://community.bistudio.com/wiki/vectorDistanceSqr
- objNull
+ Array vectorDistanceSqr Array
- objNull
+ vector1 vectorDistanceSqr vector2
- $Code$player == player ; // false if player is null$/Code$
-
- $Code$isNull player ; // true if player is null$/Code$
-
- $Code$str objNull // NULL-object$/Code$
-
- $Code$position objNull // [0,0,0]$/Code$
+ $Code$_distSqr = getPos player vectorDistanceSqr [0,0,2];$/Code$
undefined / undefined
+ (28 Jun, 2014)
+ (ArmA3 1.22)Algorithm:
+ $Code$
+ Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+ Result = (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2;
+ $/Code$
- Object
+ Number
+
- objStatus
+ gearSlotData
- Sets the status of an objective that was defined in briefing.html.
- Status may be one of:
- "ACTIVE"
- "FAILED"
- "DONE"
- "HIDDEN"
- To refer to an objective that is named "OBJ_1", for example, use only the index number in this command (i.e. "1" objStatus "HIDDEN").
+ Returns gear slot item name.
- https://community.bistudio.com/wiki/objStatus
+ https://community.bistudio.com/wiki/gearSlotData
- String objStatus String
+ gearSlotData Control
- objectivenumber objStatus status
+ gearSlotData control
- $Code$"1" objStatus "DONE"
- Marks the objective named "OBJ_1" as completed.$/Code$
+ $Code$Open any ammobox and click by any gear slots
+ private "_dspl";
+ disableSerialization;
+ waitUntil {
+ _dspl = findDisplay 106;
+ ! isNull _dspl;
+ };
+ uiNamespace setVariable ["/VDMJ/RscDisplayGear/SlotDataEH", {
+ _self = _this select 0;
+ _weaponName = gearSlotData _self;
+ _conf = configFile _confSection _weaponName;
+ _name = getText(_conf "displayName");
+ _desc = getText(_conf "Library" "libTextDesc");
+ _image = getText(_conf "picture");
+ hint parseText format[
+ ' t size="1.3" align="center" shadow="true" shadowColor="#000000" %1 /t br / img image="%2" size="6" align="center" / br / %3 br / %4',
+ _name, _image, _desc
+ ];
+ }];
+ for "_i" from 107 to 145 do {
+ _dspl displayCtrl _i ctrlAddEventHandler ["ButtonClick",
+ format [
+ '_confSection = "%1"; _this call (uiNamespace getVariable "/VDMJ/RscDisplayGear/SlotDataEH");',
+ if( _i = 109 && _i = 129 ) then { "CfgMagazines" } else { "CfgWeapons" }
+ ]
+ ];
+ };$/Code$
undefined / undefined
@@ -44704,54 +46116,74 @@
- Nothing
+ String
+
- objectCurators
+ lbAdd
- Returns array with all curators which can edit given object.
+ Adds an item with the given text to the listbox or combobox with id idc of the topmost user dialog.
+ It returns the index of the newly added item.
- https://community.bistudio.com/wiki/objectCurators
+ https://community.bistudio.com/wiki/lbAdd
- objectCurators Object
+ lbAdd Array
+
+ Control lbAdd String
- objectCurators obj
+ lbAdd [idc, text]
+
+ control lbAdd text
-
+ $Code$_index = lbAdd [101, "First item"];$/Code$
+
+ $Code$_index = _control lbAdd "First item";$/Code$
+
- undefined / undefined
+ local / local
+ More information on the LB command family can be found here
+
+ (April 12, 2015)
+ This command can be very very frustrating to use because it does not output any errors if unable to function.
+ Often, the 2nd provided syntax needs to be used like this:
+ $Code$_giveYourControlAname = (findDisplay 7) displayCtrl 9;
+ _addThisToListBox = "Option";
+ _giveYourControlAname lbAdd _addThisToListBox;$/Code$
+ Where "7" is the "idd" of the dialog you made in your ".hpp" file and where "9" is the "idc" of the RscListBox or RscComboBox.
+ The code above will add an option named "Option" to the ListBox or ComboBox.
- Array
+ Number - Number
+
- objectFromNetId
+ waypointCombatMode
- Get object with given unique ID. If object is a group use groupFromNetId. As this command is MP only, you can use BIS_fnc_objectFromNetId, which extends the use to SP as well.
+ Gets the waypoint combat mode.
- https://community.bistudio.com/wiki/objectFromNetId
+ https://community.bistudio.com/wiki/waypointCombatMode
- objectFromNetId String
+ waypointCombatMode Array
- objectFromNetId id
+ waypointCombatMode waypoint
- $Code$objectFromNetId "2:3"$/Code$
+ $Code$waypointCombatMode [groupOne,1]$/Code$
undefined / undefined
@@ -44759,39 +46191,28 @@