CompletionProposal
based on the given
+ * Keyword
+ *
+ * @param keyword
+ * The respective Keyword
this proposal should be
+ * craeted for
+ * @param replacementOffset
+ * The offset of the text to be replaced
+ * @param replacementLength
+ * The length of the text to be replaced
+ */
+ public BasicCompletionProposal(Keyword keyword, int replacementOffset, int replacementLength) {
+ // create instance according to the keyword
+ this(keyword.getKeyword(), replacementOffset, replacementLength,
+ keyword.getKeyword().length(), SQFCOMMAND_IMAGE, keyword.getKeyword(), null,
+ new AdditionalKeywordProposalInformation(keyword));
+ }
+
+ /**
+ * Creates a new completion proposal based on the provided information. The
+ * replacement string is considered being the display string too. All
+ * remaining fields are set to null
.
+ *
+ * @param replacementString
+ * the actual string to be inserted into the document
+ * @param replacementOffset
+ * the offset of the text to be replaced
+ * @param replacementLength
+ * the length of the text to be replaced
+ * @param cursorPosition
+ * the position of the cursor following the insert relative to
+ * replacementOffset
+ */
+ public BasicCompletionProposal(String replacementString, int replacementOffset,
+ int replacementLength, int cursorPosition) {
+ this(replacementString, replacementOffset, replacementLength, cursorPosition, null, null,
+ null, null);
+ }
+
+ /**
+ * Creates a new completion proposal. All fields are initialized based on
+ * the provided information.
+ *
+ * @param replacementString
+ * the actual string to be inserted into the document
+ * @param replacementOffset
+ * the offset of the text to be replaced
+ * @param replacementLength
+ * the length of the text to be replaced
+ * @param cursorPosition
+ * the position of the cursor following the insert relative to
+ * replacementOffset
+ * @param image
+ * the image to display for this proposal
+ * @param displayString
+ * the string to be displayed for the proposal
+ * @param contextInformation
+ * the context information associated with this proposal
+ * @param additionalProposalInfo
+ * the additional information associated with this proposal
+ */
+ public BasicCompletionProposal(String replacementString, int replacementOffset,
+ int replacementLength, int cursorPosition, Image image, String displayString,
+ IContextInformation contextInformation, Object additionalProposalInfo) {
+ Assert.isNotNull(replacementString);
+ Assert.isTrue(replacementOffset >= 0);
+ Assert.isTrue(replacementLength >= 0);
+ Assert.isTrue(cursorPosition >= 0);
+
+ this.replacementString = replacementString;
+ this.replacementOffset = replacementOffset;
+ this.replacementLength = replacementLength;
+ this.cursorPosition = cursorPosition;
+ this.image = image;
+ this.displayString = displayString;
+ this.contextInformation = contextInformation;
+ this.additionalProposalInfo = additionalProposalInfo;
+ }
+
+ /*
+ * @see ICompletionProposal#apply(IDocument)
+ */
+ public void apply(IDocument document) {
+ try {
+ document.replace(replacementOffset, replacementLength, replacementString);
+ } catch (BadLocationException x) {
+ // ignore
+ }
+ }
+
+ /*
+ * @see ICompletionProposal#getSelection(IDocument)
+ */
+ public Point getSelection(IDocument document) {
+ return new Point(replacementOffset + cursorPosition, 0);
+ }
+
+ /*
+ * @see ICompletionProposal#getContextInformation()
+ */
+ public IContextInformation getContextInformation() {
+ return contextInformation;
+ }
+
+ /*
+ * @see ICompletionProposal#getImage()
+ */
+ public Image getImage() {
+ return image;
+ }
+
+ /*
+ * @see ICompletionProposal#getDisplayString()
+ */
+ public String getDisplayString() {
+ if (displayString != null)
+ return displayString;
+ return replacementString;
+ }
+
+ @Override
+ public IInformationControlCreator getInformationControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new BasicInformationControl(parent);
+ }
+ };
+ }
+
+ @Override
+ public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int getPrefixCompletionStart(IDocument document, int completionOffset) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public String getAdditionalProposalInfo() {
+ // does not get called
+ return additionalProposalInfo.toString();
+ }
+
+ @Override
+ public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
+ return additionalProposalInfo;
+ }
+
+ @Override
+ public StyledString getStyledDisplayString() {
+ StyledString str = new StyledString(displayString);
+
+ str.setStyle(0, replacementLength, new StyledString.Styler() {
+
+ @Override
+ public void applyStyles(TextStyle textStyle) {
+ textStyle.foreground = PlatformUI.getWorkbench().getDisplay()
+ .getSystemColor(SWT.COLOR_BLUE);
+ }
+ });
+
+ return str;
+ }
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java
new file mode 100644
index 00000000..02df7042
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicContentAssistProcessor.java
@@ -0,0 +1,92 @@
+package raven.sqdev.editors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+import raven.sqdev.infoCollection.base.Keyword;
+import raven.sqdev.util.EditorUtil;
+
+/**
+ * A basic implementation of an IContentAssistProcessor
using the
+ * keywords provided by the {@linkplain BasicKeywordProvider} to generate
+ * content assist for them
+ *
+ * @author Raven
+ *
+ */
+public class BasicContentAssistProcessor implements IContentAssistProcessor {
+ /**
+ * The editor this processor is working on
+ */
+ protected BasicCodeEditor editor;
+
+ public BasicContentAssistProcessor(BasicCodeEditor editor) {
+ this.editor = editor;
+ }
+
+ @Override
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ String prefix = EditorUtil.getWordPartBeforeOffset(viewer.getDocument(), offset);
+
+ List+ * Subclasses must either override + * {@link IInformationControl#setInformation(String)} or implement + * {@link IInformationControlExtension2}. They should also extend + * {@link #computeTrim()} if they create a content area with additional trim + * (e.g. scrollbars) and override + * {@link #getInformationPresenterControlCreator()}. + *
+ * + * @since 3.4 + */ +public class BasicInformationControl extends AbstractInformationControl + implements IInformationControlExtension2 { + + /** + * TheTabFolder
used to display information
+ */
+ private TabFolder folder;
+ /**
+ * The additional info that should be displayed
+ */
+ private IAdditionalProposalInformation info;
+ /**
+ * The listener that watchs for hover events over the info popup
+ */
+ private static Listener mouseHoverListener;
+
+ /**
+ * The compsoite uniquely used for this info popup
+ *
+ */
+ public class InfoComposite extends SQDevComposite {
+ public InfoComposite(Composite parent, int style) {
+ super(parent, style);
+ }
+ }
+
+
+ /**
+ * Creates a basic information control with the given shell as parent.
+ *
+ * @param parentShell
+ * the parent of this control's shell
+ * @param isResizable
+ * true
if the control should be resizable
+ */
+ public BasicInformationControl(Shell parentShell) {
+ super(parentShell, new ToolBarManager());
+
+ create();
+ }
+
+ @Override
+ public boolean hasContents() {
+ return (info == null || folder != null);
+ }
+
+ @Override
+ protected void createContent(Composite parent) {
+ InfoComposite comp = new InfoComposite(parent, SWT.NONE);
+ comp.setBackground(parent.getBackground());
+ comp.setForeground(parent.getForeground());
+
+ parent.setLayout(new FillLayout());
+ comp.setLayout(new FillLayout());
+
+ folder = new TabFolder(comp, SWT.TOP);
+
+ // inherit color scheme
+ folder.setForeground(comp.getForeground());
+ folder.setBackground(comp.getBackground());
+ }
+
+ /**
+ * Adds an TabItem
to the TabFolder
used to
+ * display information
+ *
+ * @param name
+ * The displayed name of the TabItem
+ * @param control
+ * The control behind the
+ * @return The created TabItem
+ */
+ protected TabItem addTabItem(String name, Control control) {
+ if (name == null || control == null) {
+ // don't add null elements
+ return null;
+ }
+
+ TabItem item = new TabItem(folder, SWT.NULL);
+ item.setText(name);
+ item.setControl(control);
+
+ return item;
+ }
+
+ /**
+ * Sets the info for this control
+ *
+ * @param info
+ * The additional info that will be displayed
+ */
+ protected void setInfo(IAdditionalProposalInformation info) {
+ this.info = info;
+
+ updateTabFolder();
+ }
+
+ private void updateTabFolder() {
+ String[] categoryNames = info.getCategoryNames();
+ Control[] categoryControls = info.getCategoryControls(folder);
+
+ for (int i = 0; i < info.getCategoryCount(); i++) {
+ addTabItem(categoryNames[i], categoryControls[i]);
+ }
+ }
+
+ @Override
+ public IInformationControlCreator getInformationPresenterControlCreator() {
+ return new IInformationControlCreator() {
+
+ @Override
+ public IInformationControl createInformationControl(Shell parent) {
+ return new BasicInformationControl(parent);
+ }
+ };
+ }
+
+ @Override
+ public void setInput(Object input) {
+ if (input instanceof IAdditionalProposalInformation) {
+ setInfo((IAdditionalProposalInformation) input);
+
+ if (input instanceof AdditionalKeywordProposalInformation) {
+ // add the respective toolbar action this info does provide
+ getToolBarManager()
+ .add(((AdditionalKeywordProposalInformation) input).getToolbarAction());
+
+ getToolBarManager().update(false);
+ }
+ } else {
+ setInfo(new AbstractAdditionalProposalInformation(true) {
+
+ @Override
+ protected ArrayListScrolledComposite
in the children of the given parenr
+ * Composite
+ *
+ * @param parent
+ * The parent Composite
that eventually holds a
+ * ScrolledComposite
that should be configured
+ */
+ private void configureScrolledComposite(Composite parent) {
+ for (Control currentControl : parent.getChildren()) {
+ if (currentControl instanceof ScrolledComposite) {
+ ScrolledComposite scroller = (ScrolledComposite) currentControl;
+
+ if (scroller.getContent() != null) {
+ Control content = scroller.getContent();
+
+ // adjust the scroller to the proper size
+ int border = scroller.getBorderWidth();
+ int width = scroller.getSize().x - 2 * border;
+ int height = content.computeSize(scroller.getSize().x, SWT.DEFAULT, true).y
+ + getToolBarManager().createControl(getShell()).getSize().y;
+
+ scroller.setMinSize(width, height);
+
+ ScrollBar scrollBar = scroller.getVerticalBar();
+
+ if (scrollBar != null) {
+ // if there is a vertical scrollBar adjust the
+ // scroller's minWidth to make sure the horizontal
+ // Scrollbar does not have to appear when the vertical
+ // on does
+ scroller.setMinWidth(scroller.getMinWidth() - scrollBar.getSize().x);
+ }
+ }
+ } else {
+ if (currentControl instanceof Composite) {
+ // pass it through
+ configureScrolledComposite((Composite) currentControl);
+ }
+ }
+ }
+ }
+
+ /**
+ * Configures a MouseListener that processesHoverEvents of the mouse in
+ * order to activate the respective info popup.Shell
an exception is thrown
+ *
+ * @return The respective Shell
+ */
+ public Shell getParentShell() {
+ Composite comp = getShell();
+
+ if (comp.getParent() != null) {
+ while (comp.getParent().getParent() != null) {
+ comp = comp.getParent();
+ }
+ }
+
+ if (!(comp instanceof Shell)) {
+ throw new SQDevCoreException("Expected shell!");
+ }
+
+ return (Shell) comp;
+ }
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java
index 97ccf476..172a14e8 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicKeywordProvider.java
@@ -1,5 +1,8 @@
package raven.sqdev.editors;
+import raven.sqdev.infoCollection.base.KeywordList;
+import raven.sqdev.interfaces.IKeywordProvider;
+
/**
* A basic implementation of the keywordProvider providing the keywords for
* syntax highlighting
@@ -12,15 +15,31 @@ public class BasicKeywordProvider implements IKeywordProvider {
/**
* The keywords this provider will return
*/
- protected String[] keywords;
+ protected KeywordList keywords;
+
+ /**
+ * A flag indicating whether or not the keywords in keywordsSorted are
+ * currently sorted properly
+ */
+ protected boolean keywordsAreSorted;
+
+ /**
+ * A flag indicating whether the keywords are currently getting sorted
+ */
+ protected boolean isSorting;
+
+ public BasicKeywordProvider() {
+ keywordsAreSorted = false;
+ isSorting = false;
+ }
@Override
- public String[] getKeywords() {
- return (keywords == null)? new String[0] : keywords;
+ public KeywordList getKeywordList() {
+ return (keywords == null) ? new KeywordList() : keywords;
}
@Override
- public void setKeywords(String[] keywords) {
+ public void setKeywordList(KeywordList keywords) {
this.keywords = keywords;
}
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 96942edf..54fde244 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicSourceViewerConfiguration.java
@@ -1,15 +1,22 @@
package raven.sqdev.editors;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.presentation.IPresentationReconciler;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import raven.sqdev.constants.ISQDevColorConstants;
import raven.sqdev.constants.SQDevPreferenceConstants;
+import raven.sqdev.util.SQDevPreferenceUtil;
/**
* Basic implementation of a SourceViewerConfiguration
@@ -19,8 +26,9 @@
* @see {@linkplain SourceViewerConfiguration}
*
*/
-public class BasicSourceViewerConfiguration extends SourceViewerConfiguration {
-
+public class BasicSourceViewerConfiguration extends SourceViewerConfiguration
+ implements IPropertyChangeListener {
+
/**
* The color manager
*/
@@ -36,9 +44,17 @@ public class BasicSourceViewerConfiguration extends SourceViewerConfiguration {
*/
protected BasicCodeEditor editor;
+ /**
+ * The contentAssistant for this editor
+ */
+ protected ContentAssistant assistant;
+
public BasicSourceViewerConfiguration(ColorManager manager, BasicCodeEditor editor) {
this.setColorManager(manager);
this.editor = editor;
+
+ // register to get notified about preference changes
+ SQDevPreferenceUtil.getPreferenceStore().addPropertyChangeListener(this);
}
@Override
@@ -98,4 +114,49 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie
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 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;
+
+ case SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY:
+ getKeywordScanner().syncToPropertyChange(event);
+ break;
+
+ default:
+ // don't update the editor
+ return;
+ }
+
+ editor.update();
+ }
}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java
new file mode 100644
index 00000000..d812d36c
--- /dev/null
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/BasicTextHover.java
@@ -0,0 +1,78 @@
+package raven.sqdev.editors;
+
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.jface.text.ITextHoverExtension2;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.swt.widgets.Shell;
+
+import raven.sqdev.infoCollection.base.Keyword;
+import raven.sqdev.miscellaneous.AdditionalKeywordProposalInformation;
+import raven.sqdev.util.EditorUtil;
+
+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
+ *
+ * @param editor
+ * The editor this assist works on
+ */
+ 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);
+ }
+ };
+ }
+
+ @Override
+ public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) {
+ // get the respective word
+ String word = EditorUtil.getWordAroundOffset(textViewer.getDocument(),
+ hoverRegion.getOffset());
+
+ AdditionalKeywordProposalInformation info = null;
+
+ if (!word.isEmpty()) {
+ // check if there is a corresponding keyword
+ Keyword keyword = editor.getBasicConfiguration().getKeywordScanner()
+ .getKeywordProvider().getKeywordList().getKeyword(word);
+
+ if (keyword != null) {
+ // create the info for this keyword
+ info = new AdditionalKeywordProposalInformation(keyword);
+ }
+ }
+ return info;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java
index 0b2e3b9b..1b3d42c0 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/CharacterPairHandler.java
@@ -5,7 +5,9 @@
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.VerifyEvent;
-import raven.sqdev.util.StringUtils;
+import raven.sqdev.interfaces.IEditorKeyHandler;
+import raven.sqdev.misc.CharacterPair;
+import raven.sqdev.util.TextUtils;
/**
* This class will handle character inputs that have a predefined partner to
@@ -82,9 +84,9 @@ public void handleAddition(VerifyEvent event) {
String previousText = text.getText(0, caretPosition - 1);
String followingText = text.getText(caretPosition, text.getText().length() - 1);
- int occuranceBefore = StringUtils.countMatches(previousText,
+ int occuranceBefore = TextUtils.countMatches(previousText,
String.valueOf(event.character));
- int occuranceAfter = StringUtils.countMatches(followingText,
+ int occuranceAfter = TextUtils.countMatches(followingText,
String.valueOf(event.character));
// TODO: handle escaped character or only consider characters
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/EditorKeyEventManager.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/EditorKeyEventManager.java
index 33c03111..aa179b32 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/EditorKeyEventManager.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/EditorKeyEventManager.java
@@ -5,6 +5,8 @@
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.VerifyEvent;
+import raven.sqdev.interfaces.IEditorKeyHandler;
+
/**
* This class provides management for KeyEvents. IEditorKeyHandler
for later assignment to
diff --git a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IKeywordProvider.java b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IKeywordProvider.java
index d0ecab9f..0fae1c8b 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IKeywordProvider.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/IKeywordProvider.java
@@ -21,4 +21,12 @@ public interface IKeywordProvider {
* The array of keywords
*/
public void setKeywords(String[] keywords);
+
+ /**
+ * Gets the keywords sorted alphabetically. Normally the keywords starting
+ * with an A are listed at index 0
+ *
+ * @return The twodimensional array of sorted keywords
+ */
+ public String[][] getSortedKeywords();
}
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 68cc131f..a3163af3 100644
--- a/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java
+++ b/plugin/Raven.SQDev.Editors/src/raven/sqdev/editors/KeywordScanner.java
@@ -1,5 +1,7 @@
package raven.sqdev.editors;
+import java.util.ArrayList;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.IRule;
@@ -7,12 +9,14 @@
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
+import raven.sqdev.infoCollection.base.Keyword;
+import raven.sqdev.infoCollection.base.KeywordList;
+import raven.sqdev.interfaces.IKeywordProvider;
import raven.sqdev.util.ColorUtils;
import raven.sqdev.util.SQDevPreferenceUtil;
@@ -23,7 +27,7 @@
* @author Raven
*
*/
-public class KeywordScanner extends RuleBasedScanner implements IPropertyChangeListener {
+public class KeywordScanner extends RuleBasedScanner {
/**
* A token that indicates an unrecognized word meaning any word, that is not
@@ -86,8 +90,6 @@ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey,
"Invalid preference key \"" + colorPreferenceKey + "\"");
}
- SQDevPreferenceUtil.getPreferenceStore().addPropertyChangeListener(this);
-
// assign variables
preferenceKey = colorPreferenceKey;
this.provider = provider;
@@ -119,8 +121,15 @@ public KeywordScanner(IKeywordProvider provider, String colorPreferenceKey,
this(provider, colorPreferenceKey, editor, true);
}
- @Override
- public void propertyChange(PropertyChangeEvent event) {
+ /**
+ * 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
+ */
+ public void syncToPropertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(preferenceKey)) {
// if the changed property is the one for the color this scanner
// depends on
@@ -144,15 +153,17 @@ public void propertyChange(PropertyChangeEvent event) {
* The token the rule should use
*/
protected void updateRules(IToken token) {
- String[] keywords = provider.getKeywords();
+ ArrayListESQDevPlugin
that is represented by this String
+ *
+ * @param str
+ * The String whose corresponding ESQDevPlugin
+ * should be obtained. Leading and trailing whitespace will be
+ * ignored
+ * @return The corresponding ESQDevPlugin
or null
+ * if none could be found
+ */
+ public static ESQDevPlugin resolve(String str) {
+ str = str.trim();
+
+ if (str.isEmpty()) {
+ return null;
+ }
+
+ for (ESQDevPlugin current : ESQDevPlugin.values()) {
+ if (current.toString().equals(str)) {
+ return current;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java
index 54b32c96..940754f4 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/SQDevPreferenceConstants.java
@@ -52,6 +52,12 @@ public class SQDevPreferenceConstants {
*/
public static final String SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY = "raven.sqdev.matchingBracketsColor";
+ /**
+ * The name of the preference indicating whether autoCompletion should be
+ * enabled
+ */
+ public static final String SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY = "raven.sqdev.enableAutoComplete";
+
/**
* The name of the preference indicating whether the current line should get
* highlighted
@@ -74,4 +80,16 @@ public class SQDevPreferenceConstants {
*/
public static final String SQDEV_EXPORT_AUTOCLEAN = "raven.sqdev.autoClean";
+ /**
+ * The preference holding the command that will be the first one to be
+ * processed during keyword update
+ */
+ public static final String SQDEV_COLLECTION_STARTCOMMAND = "raven.sqdev.collection.startCommand";
+
+ /**
+ * The preference holding the command that will be the last one to be
+ * processed during keyword update
+ */
+ public static final String SQDEV_COLLECTION_ENDCOMMAND = "raven.sqdev.collection.endCommand";
+
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/TextConstants.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/TextConstants.java
new file mode 100644
index 00000000..70d20ff7
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/constants/TextConstants.java
@@ -0,0 +1,26 @@
+package raven.sqdev.constants;
+
+/**
+ * A class holding constants for the usage with text
+ *
+ * @author Raven
+ *
+ */
+public class TextConstants {
+ /**
+ * An array containing whitespace characters
+ */
+ public static final char[] WHITESPACE = { ' ', '\n', '\r', '\t' };
+
+ /**
+ * An array containg all bracket characters (uneven index = opening bracket;
+ * even index = closing bracket)
+ */
+ public static final char[] BRACKETS = { '(', ')', '[', ']', '{', '}' };
+
+ /**
+ * An array containing all special characters a valid word can constist of
+ * apart from letters and digits
+ */
+ public static final char[] SPECIAL_WORD_CHARACTERS = { '_', '@' };
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java
new file mode 100644
index 00000000..5b837a96
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevCollectionException.java
@@ -0,0 +1,30 @@
+package raven.sqdev.exceptions;
+
+/**
+ * An exception indicating that something went wrong during a collection process
+ *
+ * @author Raven
+ *
+ */
+public class SQDevCollectionException extends SQDevException {
+
+ private static final long serialVersionUID = 5076943149344521751L;
+
+ public SQDevCollectionException(String message) {
+ super(message);
+ }
+
+ public SQDevCollectionException(Throwable cause) {
+ super(cause);
+ }
+
+ public SQDevCollectionException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public SQDevCollectionException(String message, Throwable cause, boolean enableSuppression,
+ boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevSyntaxException.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevSyntaxException.java
new file mode 100644
index 00000000..21024bd0
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/SQDevSyntaxException.java
@@ -0,0 +1,33 @@
+package raven.sqdev.exceptions;
+
+/**
+ * An exception thrown whenever a given format is not respected so that the
+ * processing can't continue
+ *
+ * @author Raven
+ *
+ */
+public class SQDevSyntaxException extends SQDevCoreException {
+
+ private static final long serialVersionUID = -6664220779760880244L;
+
+ public SQDevSyntaxException() {
+ }
+
+ public SQDevSyntaxException(String msg) {
+ super(msg);
+ }
+
+ public SQDevSyntaxException(Throwable arg0) {
+ super(arg0);
+ }
+
+ public SQDevSyntaxException(String msg, Throwable arg1) {
+ super(msg, arg1);
+ }
+
+ public SQDevSyntaxException(String arg0, Throwable arg1, boolean arg2, boolean arg3) {
+ super(arg0, arg1, arg2, arg3);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/activator/Activator.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/activator/Activator.java
index 0a0d643f..cab5e60f 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/activator/Activator.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/exceptions/activator/Activator.java
@@ -3,7 +3,7 @@
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
-import raven.sqdev.pluginManager.SQDevPluginManager;
+import raven.sqdev.pluginManagement.SQDevPluginManager;
public class Activator extends AbstractUIPlugin {
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java
new file mode 100644
index 00000000..52406eba
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/SQFCommandCollector.java
@@ -0,0 +1,988 @@
+package raven.sqdev.infoCollection;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import raven.sqdev.exceptions.SQDevCollectionException;
+import raven.sqdev.infoCollection.base.ELocality;
+import raven.sqdev.infoCollection.base.KeywordList;
+import raven.sqdev.infoCollection.base.SQFCommand;
+import raven.sqdev.infoCollection.base.SQFControlStructure;
+import raven.sqdev.misc.SQDev;
+
+/**
+ * A class for collecting all SQF commands from the BIKI.
+ *
+ * @author Raven
+ *
+ */
+public class SQFCommandCollector {
+ /**
+ * The category containing general info about the command such as name,
+ * locality, etc.
+ */
+ public static final int CATEGORY_COMMAND_INFO = 0;
+ /**
+ * The categroy containing th command's description
+ */
+ public static final int CATEGORY_DESCRIPTION = 1;
+ /**
+ * The category containing the command's syntax(es)
+ */
+ public static final int CATEGORY_SYNTAX = 2;
+ /**
+ * The category containg examples for the usage of the command
+ */
+ public static final int CATEGORY_EXAMPLES = 3;
+ /**
+ * The category containing notes attached to this command
+ */
+ public static final int CATEGORY_NOTES = 4;
+ /**
+ * The syntaxPart containing the syntax
+ */
+ public static final int SYNTAXPART_SYNTAX = 0;
+ /**
+ * The syntaxpart conating the parameters
+ */
+ public static final int SYNTAXPART_PARAMETERS = 1;
+ /**
+ * The syntaxPart containing the return value
+ */
+ public static final int SYNTAXPART_RETURN_VALUE = 2;
+ /**
+ * An array containing the names o the commands this collector should not
+ * collect
+ */
+ public static final String[] CONTROL_STRUCTURE_KEYWORDS_ARRAY = { "if", "then", "else", "for",
+ "from", "to", "do", "step", "switch", "while", "with", "case", "default" };
+ /**
+ * A list containing the values of COMMANDS_TO_IGNORE_ARRAY
+ */
+ public static final ListIProgressMonitor
used to watch this
+ * collection
+ * @return The KeywordList
conatining the gathered keywords
+ * @throws SQDevCollectionException
+ */
+ public KeywordList collect(IProgressMonitor monitor) throws SQDevCollectionException {
+ String siteContent = getSite(baseSite);
+
+ // get relevant content only
+ siteContent = trimToRelevantListOnly(siteContent);
+
+ // compose the line where the collecting should start at
+ String relevanStarttLine = "SQFControlStructure
+ *
+ * @param control
+ * The SQFControlStructure
the gathered information
+ * should be associated with
+ * @param commandPage
+ * The URL
to the commandPage wiki page
+ * @return The SQFControlStructure
filled with information
+ * @throws SQDevCollectionException
+ */
+ private SQFControlStructure processControlStructure(SQFControlStructure control,
+ URL commandPage) throws SQDevCollectionException {
+ // set wiki URL
+ control.setWikiPage(commandPage);
+
+ String content = formatCommandPageContent(getSite(commandPage));
+
+ String[] categories = categorizeContent(content);
+
+ // set description
+ String description = categories[CATEGORY_DESCRIPTION].trim();
+ if (description.toLowerCase().startsWith("description:")) {
+ description = description.substring(12).trim();
+ }
+ control.setDescription(description);
+
+ return control;
+ }
+
+ /**
+ * Gets the trimmed content of the specified site
+ *
+ * @param url
+ * The URL to the site
+ * @return
+ * @throws SQDevCollectionException
+ */
+ private String getSite(URL url) throws SQDevCollectionException {
+ try {
+ BufferedReader siteReader = new BufferedReader(new InputStreamReader(url.openStream()));
+
+ String content = "";
+
+ String inputLine = "";
+
+ while ((inputLine = siteReader.readLine()) != null) {
+ content += inputLine + "\n";
+ }
+
+ siteReader.close();
+
+ return content.trim();
+
+ } catch (IOException e) {
+ e.printStackTrace();
+
+ // rethrow
+ throw new SQDevCollectionException(e);
+ }
+ }
+
+ /**
+ * Trims the given html content so that it only contains the lines relevant
+ * for the list containing the SQF commands
+ *
+ * @param htmlContent
+ * The content to trim
+ * @throws SQDevCollectionException
+ */
+ private String trimToRelevantListOnly(String htmlContent) throws SQDevCollectionException {
+ BufferedReader reader = new BufferedReader(new StringReader(htmlContent));
+
+ String content = "";
+
+ String currentLine = "";
+
+ try {
+ while ((currentLine = reader.readLine()) != null) {
+ // only consider lines containing a link to the wiki
+ if (currentLine.contains("URL
to the command's wiki page
+ * @return The command filled with information
+ * @throws SQDevCollectionException
+ */
+ private SQFCommand processCommand(SQFCommand command, URL commandPage)
+ throws SQDevCollectionException {
+ // get site content
+ String siteContent = formatCommandPageContent(getSite(commandPage));
+
+ String[] categories = categorizeContent(siteContent);
+
+ if (!commandPage.toString().endsWith(command.getKeyword())
+ || command.getKeyword().endsWith("_array")) {
+ // The current command should be integrated in the previous command
+ // with this name TODO
+ return null;
+ }
+
+
+ // store information
+
+ // commandInfo
+ String commandInfo = categories[CATEGORY_COMMAND_INFO];
+ applyCommandInfo(command, commandInfo);
+
+ // wikiPage
+ command.setWikiPage(commandPage);
+
+ // description
+ String description = categories[CATEGORY_DESCRIPTION];
+ if (description.startsWith("Description:\n")) {
+ // remove that unnecessary line
+ description = description.substring(description.indexOf("\n") + 1);
+ }
+
+ if (!description.isEmpty()) {
+ command.setDescription(description);
+ }
+
+ for (String currentLine : categories) {
+ System.out.println(currentLine);
+ System.out.println();
+ }
+
+ // syntax
+ String syntax = categories[CATEGORY_SYNTAX];
+
+ if (!syntax.isEmpty()) {
+ applySyntax(command, syntax);
+ } else {
+ throw new SQDevCollectionException(
+ "The command \"" + command.getKeyword() + "\" does not specify a syntax!");
+ }
+
+ // examples
+ String examples = categories[CATEGORY_EXAMPLES];
+
+ if (!examples.isEmpty()) {
+ applyExamples(command, examples);
+ }
+
+ // Notes
+ String notes = categories[CATEGORY_NOTES];
+
+ if (!notes.isEmpty()) {
+ try {
+ applyNotes(command, notes);
+ } catch (SQDevCollectionException e) {
+ e.printStackTrace();
+ }
+ }
+
+ return command;
+ }
+
+ /**
+ * Extracts the relevant parts and formats the content of a commandPage
+ *
+ * @param content
+ * The content of the commandPage
+ * @return The formatted content
+ */
+ private String formatCommandPageContent(String content) {
+ String[] tagsToRemove = { "script", "style", "header", "head" };
+
+ for (String currentTag : tagsToRemove) {
+ // remove tags
+ boolean proceed = content.contains("<" + currentTag)
+ && content.contains("" + currentTag + ">");
+
+ while (proceed) {
+ String fragment1 = content.substring(0, content.indexOf("<" + currentTag));
+ String fragment2 = content.substring(content.indexOf("<" + currentTag));
+ String fragment3 = fragment2.substring(
+ fragment2.indexOf("" + currentTag + ">") + 3 + currentTag.length());
+
+ content = fragment1 + fragment3;
+
+ proceed = content.contains("<" + currentTag)
+ && content.contains("" + currentTag + ">");
+ }
+ }
+
+ if (content.contains("", " " + SQDev.CODE.getOpener());
+ content = content.replace("
", SQDev.CODE.getCloser() + " ");
+
+ String commandInfoLine = content.substring(content.indexOf("SQFCommand
+ *
+ * @param command
+ * The command theexamples should get added to
+ * @param examples
+ * The String containing the examples indexed by "Example 1:" and
+ * so on
+ */
+ private void applyExamples(SQFCommand command, String examples) {
+ boolean proceed = true;
+ int counter = 1;
+
+ if (examples.contains("Example needed")) {
+ return;
+ }
+
+ examples = examples.trim();
+
+ while (proceed) {
+ String exampleNum = "Example " + counter + ":";
+
+ if (examples.startsWith(exampleNum)) {
+ // if there is an example with this number
+ examples = examples.substring(examples.indexOf(exampleNum) + exampleNum.length())
+ .trim();
+
+ counter++;
+
+ String nextExampleNum = "Example " + counter + ":";
+
+ if (examples.contains(nextExampleNum)) {
+ // only take the content until next example starts
+ String currentExample = examples.substring(0, examples.indexOf(nextExampleNum))
+ .trim();
+
+ command.addExample(currentExample);
+
+ // remove processed examples from the examples String
+ examples = examples.substring(currentExample.length()).trim();
+
+ proceed = !examples.isEmpty();
+ } else {
+ // the complete content belongs to the current example
+ if (!examples.isEmpty()) {
+ command.addExample(examples);
+ }
+
+ proceed = false;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+
+ /**
+ * Applies the given notes to the given command
+ *
+ * @param command
+ * The command the notes should be applied to
+ * @param notes
+ * The notes to apply
+ * @throws SQDevCollectionException
+ */
+ private void applyNotes(SQFCommand command, String notes) throws SQDevCollectionException {
+ String currentNote = "";
+ boolean skippedName = false;
+
+ if (!notes.contains("Posted on")) {
+ throw new SQDevCollectionException(
+ "The notes of " + command.getKeyword() + "arenot in the proper format!");
+ }
+
+ for (String currentLine : notes.split("\n")) {
+ if (currentLine.startsWith("Posted on")) {
+ if (!currentNote.isEmpty()) {
+ // add the previous note to the command
+ command.addNote(currentNote.trim());
+
+ // reset currentNote
+ currentNote = "";
+ }
+
+ // a new note is beginning -> start with post date
+ String date = currentLine.substring(9).trim();
+
+ if (date.contains("-")) {
+ // don't store time
+ date = date.substring(0, date.indexOf("-")).trim();
+ }
+
+ if (!date.isEmpty()) {
+ currentNote += "(" + date + ")\n";
+ }
+
+ // indicate that the name has not yet been skipped
+ skippedName = false;
+ } else {
+ if (skippedName) {
+ // the following lines are the note
+ currentNote += currentLine + "\n";
+ } else {
+ // indicate that the name has been skipped
+ skippedName = true;
+ }
+ }
+ }
+
+ if (!currentNote.isEmpty()) {
+ command.addNote(currentNote);
+ }
+ }
+
+ /**
+ * Applies the given syntax to the given command after having brought it
+ * into the propre format
+ *
+ * @param command
+ * The command the notes should be applied to
+ * @param syntaxContent
+ * The syntax with it's parameters that should be applied to the
+ * command
+ */
+ private void applySyntax(SQFCommand command, String syntaxContent) {
+ String[][] syntaxes = splitSyntaxes(syntaxContent);
+
+ for (String[] currentSyntax : syntaxes) {
+ // add the raw syntax to the command
+ command.addRawSyntax(currentSyntax[SYNTAXPART_SYNTAX]);
+ }
+
+ if (syntaxes.length > 0) {
+ // add return type
+ String returnType = syntaxes[0][SYNTAXPART_RETURN_VALUE];
+
+ if (returnType != null && !returnType.isEmpty()) {
+ command.setReturnType(returnType);
+ }
+ }
+ }
+
+ /**
+ * Brings the given syntaxContent into the proper format
+ *
+ * @param syntaxContent
+ * The syntaxContent to format
+ * @return The formatted content
+ */
+ private String formatSyntaxContent(String syntaxContent) {
+ syntaxContent = syntaxContent.trim();
+
+ while (Character.isDigit(syntaxContent.charAt(0))) {
+ syntaxContent = syntaxContent.substring(1).trim();
+ }
+
+ // check for return value
+ if (!syntaxContent.contains("Return Value:")) {
+ // add a Nothing-return value
+ syntaxContent += " Return Value: Nothing";
+ } else {
+ // make sure that a return value is specified
+ if (syntaxContent.substring(syntaxContent.indexOf("Return Value:")).trim().isEmpty()) {
+ syntaxContent += " Nothing";
+ }
+ }
+
+ if (syntaxContent.startsWith("Syntax:")) {
+ // make the syntax start directly without prefix "Syntax:"
+ syntaxContent = syntaxContent.substring(7).trim();
+ }
+
+ if (syntaxContent.contains("Parameters:")) {
+ // remove unnecessary statement
+ syntaxContent = syntaxContent.substring(0, syntaxContent.indexOf("Parameters:")) + "\n"
+ + syntaxContent.substring(syntaxContent.indexOf("Parameters:") + 11);
+ }
+
+ // make each syntax part stand in it's own line
+
+ syntaxContent = syntaxContent.substring(0, syntaxContent.indexOf("Return Value:")) + "\n"
+ + syntaxContent.substring(syntaxContent.indexOf("Return Value:"));
+
+ syntaxContent = syntaxContent.substring(0, syntaxContent.indexOf("Return Value:") + 13)
+ .trim() + " "
+ + syntaxContent.substring(syntaxContent.indexOf("Return Value:") + 13).trim();
+
+
+ if (syntaxContent.substring(0, syntaxContent.indexOf("\n")).contains("=")) {
+ syntaxContent = syntaxContent.substring(syntaxContent.indexOf("=") + 1).trim();
+ }
+
+
+ /*
+ * TODO: alternative syntaxes; optional parameters; repeating
+ * parameters: TKOH only parameters; parameter description; multiple
+ * options parameters;
+ */
+ return syntaxContent;
+ }
+
+ /**
+ * Splits the given syntax(es) and return them in an array (everything
+ * properly formatted)
+ *
+ * @param syntaxContent
+ * The syntaxes with the respective information
+ * @return A two-dimensional array where the first dimension stands for
+ * different syntaxes (alternatives syntaxes) and the second
+ * dimension is as following:
+ * null
if none could be
+ * found
+ */
+ public static ELocality resolve(String locality) {
+ for (ELocality current : ELocality.values()) {
+ if (current.toString().toLowerCase().equals(locality.toLowerCase())) {
+ return current;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/Keyword.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/Keyword.java
new file mode 100644
index 00000000..81924cd5
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/Keyword.java
@@ -0,0 +1,265 @@
+package raven.sqdev.infoCollection.base;
+
+import org.eclipse.core.runtime.Assert;
+
+import raven.sqdev.interfaces.ISaveable;
+
+/**
+ * A class representing a keyword and providing additional information about the
+ * represented keyword
+ *
+ * @author Raven
+ *
+ */
+public class Keyword implements Comparablenull
to
+ * indicate that no description is provided
+ */
+ public void setDescription(String description) {
+ if (description != null) {
+ description = description.trim();
+
+ if (description.isEmpty()) {
+ description = null;
+ }
+ }
+
+ this.description = description;
+ }
+
+ /**
+ * Checks whether this keyword does provide a description
+ */
+ public boolean hasDescription() {
+ return !getDescription().isEmpty();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!this.getClass().equals(obj.getClass())) {
+ return false;
+ }
+
+ Keyword compare = (Keyword) obj;
+
+ if (!this.getKeyword().equals(compare.getKeyword())) {
+ return false;
+ }
+
+ if (!this.getDescription().equals(compare.getDescription())) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int compareTo(Keyword keyword) {
+ // check if they are equal
+ if (this.equals(keyword)) {
+ return 0;
+ }
+
+ // declare Strings which will be compared
+ String own;
+ String compare;
+
+ if (this.getKeyword().equals(keyword.getKeyword())) {
+ own = getDescription();
+ compare = keyword.getDescription();
+ } else {
+ own = getKeyword();
+ compare = getKeyword();
+ }
+
+ int minLength = own.length();
+
+ if (compare.length() < minLength) {
+ minLength = compare.length();
+ }
+
+ // compare according to alphabetical order
+ for (int i = 0; i < minLength; i++) {
+ if (own.charAt(i) < compare.charAt(i)) {
+ return -1;
+ } else {
+ if (own.charAt(i) > compare.charAt(i)) {
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+ }
+
+ @Override
+ public String getSaveableFormat() {
+ // store attributes
+ String saveFormat = KEYWORD_START_SAVESEQUENCE + "\n" + getKeyword() + "\n"
+ + KEYWORD_END_SAVESEQUENCE + "\n";
+ saveFormat += DESCRIPTION_START_SAVESEQUENCE + "\n" + getDescription() + "\n"
+ + DESCRIPTION_END_SAVESEQUENCE;
+
+ return saveFormat;
+ }
+
+ @Override
+ public boolean recreateFrom(String savedFormat) {
+ if (!isSaveFormat(savedFormat)) {
+ return false;
+ }
+
+ // get the keyword
+ String keyword = savedFormat.substring(
+ savedFormat.indexOf(KEYWORD_START_SAVESEQUENCE)
+ + KEYWORD_START_SAVESEQUENCE.length(),
+ savedFormat.indexOf(KEYWORD_END_SAVESEQUENCE)).trim();
+ // get the description
+ String description = savedFormat.substring(
+ savedFormat.indexOf(DESCRIPTION_START_SAVESEQUENCE)
+ + DESCRIPTION_START_SAVESEQUENCE.length(),
+ savedFormat.indexOf(DESCRIPTION_END_SAVESEQUENCE)).trim();
+
+ // apply the values
+ setKeyword(keyword);
+ setDescription(description);
+
+ return true;
+ }
+
+ @Override
+ public boolean isSaveFormat(String format) {
+ if (!format.contains(KEYWORD_START_SAVESEQUENCE)
+ || !format.contains(KEYWORD_END_SAVESEQUENCE)
+ || !format.contains(DESCRIPTION_START_SAVESEQUENCE)
+ || !format.contains(DESCRIPTION_END_SAVESEQUENCE)) {
+ // all these keywords have to be present
+ return false;
+ }
+
+ // check for positions of these keywords
+ int keywordStart = format.indexOf(KEYWORD_START_SAVESEQUENCE);
+ int keywordEnd = format.indexOf(KEYWORD_END_SAVESEQUENCE);
+ int descriptionStart = format.indexOf(DESCRIPTION_START_SAVESEQUENCE);
+ int descriptionEnd = format.indexOf(DESCRIPTION_END_SAVESEQUENCE);
+
+ if (keywordEnd < keywordStart || descriptionEnd < descriptionStart
+ || keywordStart > descriptionStart || descriptionStart < keywordEnd) {
+ // the order of the keywords is messed up
+ return false;
+ }
+
+ // check that there is actually content in it
+ String keyword = format.substring(
+ format.indexOf(KEYWORD_START_SAVESEQUENCE) + KEYWORD_START_SAVESEQUENCE.length(),
+ format.indexOf(KEYWORD_END_SAVESEQUENCE)).trim();
+ String description = format.substring(
+ format.indexOf(DESCRIPTION_START_SAVESEQUENCE)
+ + DESCRIPTION_START_SAVESEQUENCE.length(),
+ format.indexOf(DESCRIPTION_END_SAVESEQUENCE)).trim();
+
+ if (keyword.isEmpty() || description.isEmpty()) {
+ return false;
+ }
+
+ // everything is ok
+ return true;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java
new file mode 100644
index 00000000..add8960f
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/KeywordList.java
@@ -0,0 +1,269 @@
+package raven.sqdev.infoCollection.base;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+
+import raven.sqdev.interfaces.ISaveable;
+
+/**
+ * A list containing multiple Keyword
s
+ *
+ * @author Raven
+ *
+ */
+public class KeywordList implements ISaveable {
+
+ /**
+ * The sequence indicating the start of the keywordList in the saveable
+ * String format of this class
+ */
+ public static final String LIST_START_SAVESEQUENCE = "KeywordList:";
+ /**
+ * The sequence indicating the end of the keywordList in the saveable String
+ * format of this class
+ */
+ public static final String LIST_END_SAVESEQUENCE = "//KeywordListEnd//";
+ /**
+ * The sequence seperating the single keywords in the saveable String format
+ * of this class
+ */
+ public static final String LIST_SEPERATOR_SAVESEQUENCE = "%NextListItem%";
+
+ /**
+ * The list of keywords where every starting letter has it's own list.
+ * Therefor get('b'-('a'+1))
will get the list for the starting
+ * letter b
+ */
+ private ListKeywordList
+ */
+ public KeywordList() {
+ keywords = new ArrayListKeywordList
from the given
+ * saveFormat. If saveFormat is not considered a valid saveFormat the list
+ * will be initialized as if no parameter was given
+ *
+ * @param saveFormat
+ * The saveFormat which should be used to initialize this list
+ * from
+ */
+ public KeywordList(String saveFormat) {
+ this();
+
+ if (isSaveFormat(saveFormat)) {
+ recreateFrom(saveFormat);
+ }
+ }
+
+ /**
+ * Adds a keyword to this list
+ *
+ * @param keyword
+ * Th keyword to add
+ */
+ public void addKeyword(Keyword keyword) {
+ Assert.isNotNull(keyword);
+
+ int listIndex;
+
+ if (Character.isLetter(keyword.getKeyword().charAt(0))) {
+ listIndex = Character.toLowerCase(keyword.getKeyword().charAt(0)) - ('a' - 1);
+ } else {
+ listIndex = 0;
+ }
+
+ keywords.get(listIndex).add(keyword);
+
+ // sort the list the keywords has been added to
+ Collections.sort(keywords.get(listIndex));
+ }
+
+ /**
+ * removes a keyword from this list
+ *
+ * @param keyword
+ * The keyword to remove
+ */
+ public void removeKeyword(Keyword keyword) {
+ Assert.isNotNull(keyword);
+
+ if (this.contains(keyword)) {
+ // only add a keyword once
+ return;
+ }
+
+ keywords.get(Character.toLowerCase(keyword.getKeyword().charAt(0)) - ('a' - 1))
+ .remove(keyword);
+ }
+
+ /**
+ * Checks if the given Keyword is contained in this list
+ *
+ * @param keyword
+ * The keyword to search for
+ */
+ public boolean contains(Keyword keyword) {
+ return keywords.get(Character.toLowerCase(keyword.getKeyword().charAt(0)) - ('a' - 1))
+ .contains(keyword);
+ }
+
+ /**
+ * Gets all of the keywords stored in this list as one single list
+ *
+ * @return The list of keywords contained in this List in alphabetical order
+ */
+ public ArrayListKeyword
or null
if none
+ * could be found
+ */
+ public Keyword getKeyword(String keyword) {
+ ListSQFElement
representing a SQF command and all necessary
+ * information about it
+ *
+ * @author Raven
+ *
+ */
+public class SQFCommand extends SQFElement {
+
+ /**
+ * The sequence indicating the start of the syntax attribute in the saveable
+ * String format of this class
+ */
+ public static final String SYNTAX_START_SAVESEQUENCE = "SyntaxStart:";
+ /**
+ * The sequence indicating the end of the syntax attribute in the saveable
+ * String format of this class
+ */
+ public static final String SYNTAX_END_SAVESEQUENCE = "//SyntaxEnd//";
+ /**
+ * The sequence seperating multiple syntaxes in the saveable String format
+ * of this class
+ */
+ public static final String SYNTAX_SEPERATOR_SAVESEQUENCE = "%NextSyntax%";
+ /**
+ * The sequence indicating the start of the rawSyntax attribute in the
+ * saveable String format of this class
+ */
+ public static final String RAWSYNTAX_START_SAVESEQUENCE = "RawSyntaxStart:";
+ /**
+ * The sequence indicating the end of the rawSyntax attribute in the
+ * saveable String format of this class
+ */
+ public static final String RAWSYNTAX_END_SAVESEQUENCE = "//RawSyntaxEnd//";
+ /**
+ * The sequence seperating multiple rawSyntaxes in the saveable String
+ * format of this class
+ */
+ public static final String RAWSYNTAX_SEPERATOR_SAVESEQUENCE = "%NextRawSyntax%";
+ /**
+ * The sequence indicating the start of the example attribute in the
+ * saveable String format of this class
+ */
+ public static final String EXAMPLE_START_SAVESEQUENCE = "ExampleStart:";
+ /**
+ * The sequence indicating the end of the example attribute in the saveable
+ * String format of this class
+ */
+ public static final String EXAMPLE_END_SAVESEQUENCE = "//ExampleEnd//";
+ /**
+ * The sequence seperating multiple examples in the saveable String format
+ * of this class
+ */
+ public static final String EXAMPLE_SEPERATOR_SAVESEQUENCE = "%NextExample%";
+ /**
+ * The sequence indicating the start of the locality attribute in the
+ * saveable String format of this class
+ */
+ public static final String LOCALITY_START_SAVESEQUENCE = "LocalityStart:";
+ /**
+ * The sequence indicating the end of the locality attribute in the saveable
+ * String format of this class
+ */
+ public static final String LOCALITY_END_SAVESEQUENCE = "//LocalityEnd//";
+ /**
+ * The seperator used to seperate the effect's locality from the argument's
+ * locality
+ */
+ public static final String LOCALITY_SEPERATOR_SAVESEQUENCE = "/";
+ /**
+ * The sequence indicating the start of the note attribute in the saveable
+ * String format of this class
+ */
+ public static final String NOTE_START_SAVESEQUENCE = "NoteStart:";
+ /**
+ * The sequence indicating the end of the locality attribute in the saveable
+ * String format of this class
+ */
+ public static final String NOTE_END_SAVESEQUENCE = "//NoteEnd//";
+ /**
+ * The sequence seperating multiple notes in the saveable String format of
+ * this class
+ */
+ public static final String NOTE_SEPERATOR_SAVESEQUENCE = "%NextNote%";
+ /**
+ * The sequence indicating the start of the returnValue attribute in the
+ * saveable String format of this class
+ */
+ public static final String RETURNVALUE_START_SAVESEQUENCE = "ReturnValueStart:";
+ /**
+ * The sequence indicating the end of the returnValue attribute in the
+ * saveable String format of this class
+ */
+ public static final String RETURNVALUE_END_SAVESEQUENCE = "//ReturnValueEnd//";
+
+ /**
+ * The syntaxes of this command
+ */
+ private ArrayListTrue
if an argument locality is defined
+ */
+ public boolean isArgumentLocalityDefined() {
+ return !getArgumentLocality().equals(ELocality.UNDEFINED);
+ }
+
+ /**
+ * Sets the locality of the command's effect
+ *
+ * @param locality
+ * The locality of the effect
+ */
+ public void setEffectLocality(ELocality locality) {
+ ELocality[] loc = getLocality();
+ loc[1] = locality;
+
+ setLocality(loc);
+ }
+
+ /**
+ * Gets this command's effect's locality
+ */
+ public ELocality getEffectLocality() {
+ return getLocality()[1];
+ }
+
+ /**
+ * Checks whether this command has a defined effect locality
+ *
+ * @return True
if an effect locality is defined
+ */
+ public boolean isEffectLocalityDefined() {
+ return !getEffectLocality().equals(ELocality.UNDEFINED);
+ }
+
+ /**
+ * Gets the notes of this command
+ */
+ public ArrayListSQFElement
representing a control structure
+ *
+ * @author Raven
+ *
+ */
+public class SQFControlStructure extends SQFElement {
+
+ /**
+ * Creates an instance of this SQFControlStructure
+ *
+ * @param keyword
+ * The keyword for this control structure
+ */
+ public SQFControlStructure(String keyword) {
+ super(keyword);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFElement.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFElement.java
new file mode 100644
index 00000000..d93fb48b
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/infoCollection/base/SQFElement.java
@@ -0,0 +1,148 @@
+package raven.sqdev.infoCollection.base;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.Assert;
+
+import raven.sqdev.exceptions.SQDevException;
+
+/**
+ * A Keyword
representing an SQF Element.
+ *
+ * @author Raven
+ *
+ */
+public class SQFElement extends Keyword {
+
+ /**
+ * The sequence indicating the start of the wikiPage attribute in the
+ * saveable String format of this class
+ */
+ public static final String WIKI_START_SAVESEQUENCE = "WikiPageStart:";
+ /**
+ * The sequence indicating the end of the wikiPage attribute in the saveable
+ * String format of this class
+ */
+ public static final String WIKI_END_SAVESEQUENCE = "//WikiPageEnd//";
+
+ /**
+ * The url to the wiki page of this command
+ */
+ private URL wikiPage;
+
+ /**
+ * Creates an instance of this SQFElement
+ */
+ public SQFElement() {
+ this("", null);
+ }
+
+ /**
+ * Creates an instance of this SQFElement
+ *
+ * @param name
+ * The name of this element
+ */
+ public SQFElement(String name) {
+ this(name, "");
+ }
+
+ /**
+ * Creates an instance of this SQFElement
+ *
+ * @param name
+ * The name of this element
+ * @param description
+ * The description of this element
+ */
+ public SQFElement(String name, String description) {
+ super(name, description);
+ }
+
+ /**
+ * Gets the URL of this command's wiki page
+ */
+ public URL getWikiPage() {
+ return wikiPage;
+ }
+
+ /**
+ * Sets the URL to this command's wiki page
+ *
+ * @param wikiPage
+ * The wiki page URL
+ */
+ public void setWikiPage(URL wikiPage) {
+ Assert.isNotNull(wikiPage);
+
+ this.wikiPage = wikiPage;
+ }
+
+ /**
+ * Checks whether the wiki page of this command has been set
+ */
+ public boolean isWikiPageGiven() {
+ return getWikiPage() != null;
+ }
+
+ @Override
+ public String getSaveableFormat() {
+ String format = super.getSaveableFormat();
+
+ // append own attributes
+ format += "\n" + WIKI_START_SAVESEQUENCE + "\n" + getWikiPage().toString() + "\n"
+ + WIKI_END_SAVESEQUENCE;
+
+ return format;
+ }
+
+ @Override
+ public boolean recreateFrom(String savedFormat) {
+ if (!super.recreateFrom(savedFormat) || !isSaveFormat(savedFormat)) {
+ return false;
+ }
+
+ // get wikiPage
+ String wiki = savedFormat.substring(
+ savedFormat.indexOf(WIKI_START_SAVESEQUENCE) + WIKI_START_SAVESEQUENCE.length(),
+ savedFormat.indexOf(WIKI_END_SAVESEQUENCE)).trim();
+
+ try {
+ // store wikiPage
+ setWikiPage(new URL(wiki));
+ } catch (MalformedURLException e) {
+ try {
+ throw new SQDevException("The URL for the wiki page for the command " + getKeyword()
+ + " is not in the proper format!", e);
+ } catch (SQDevException e1) {
+ e1.printStackTrace();
+
+ // state that something went wrong
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean isSaveFormat(String format) {
+ if (!super.isSaveFormat(format)) {
+ return false;
+ }
+
+ if (!format.contains(WIKI_START_SAVESEQUENCE) || !format.contains(WIKI_END_SAVESEQUENCE)) {
+ return false;
+ }
+
+ int wikiStart = format.indexOf(WIKI_START_SAVESEQUENCE);
+ int wikiEnd = format.indexOf(WIKI_END_SAVESEQUENCE);
+
+ if (wikiStart > wikiEnd) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IAdditionalProposalInformation.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IAdditionalProposalInformation.java
new file mode 100644
index 00000000..a093bab6
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IAdditionalProposalInformation.java
@@ -0,0 +1,38 @@
+package raven.sqdev.interfaces;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * An interface for an addtional information of an ICompletionProposalExtension5
+ *
+ * @author Raven
+ *
+ */
+public interface IAdditionalProposalInformation {
+
+ /**
+ * Gets the amount of categories this information consists of
+ */
+ public int getCategoryCount();
+
+ /**
+ * Gets the category's names for this information.
+ */
+ public String[] getCategoryNames();
+
+ /**
+ * Gets the category controls of this information. Each Control is meant to
+ * contain all the wished display information for the respective category.
+ * Control
s has to correspond to
+ * getCategoryNames()
.BasicCodeEditor
-framework
+ *
+ * @author Raven
+ *
+ */
+public interface IProposalInformationCategory {
+
+ /**
+ * Gets the name of this category
+ */
+ public String getName();
+
+ /**
+ * Gets the Control
representing this category.Control
will usally overtake the foreground and
+ * background color from the parent
+ *
+ * @param parent
+ * The parent of the created control. This Control
+ * is meant to directly group widgets on it
+ */
+ public Control getControl(Composite parent);
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/ISaveable.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/ISaveable.java
new file mode 100644
index 00000000..d429b356
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/ISaveable.java
@@ -0,0 +1,43 @@
+package raven.sqdev.interfaces;
+
+/**
+ * An interface for classes that are saveable in a (human) readable textFile
+ *
+ * @author Raven
+ *
+ */
+public interface ISaveable {
+
+ /**
+ * Gets the class's String representation that should be used in order to
+ * save this object's values in a file that can later on be used to reload
+ * the object
+ *
+ * @return The saveable String representation of this object
+ */
+ public String getSaveableFormat();
+
+ /**
+ * Will recreate this object according to the savedFormat given.
+ *
+ * @param savedFormat
+ * The String representation this object should adapt to. Has to
+ * be return true
with
+ * isSaveFormat(String format)
+ * @return True
if the recreation was successful.
+ * False
otherwise
+ */
+ public boolean recreateFrom(String savedFormat);
+
+ /**
+ * Checks if the given String is in the proper format to use
+ * recreateFrom(String savedFormat)
with
+ *
+ * @param format
+ * The String to test
+ * @return True
if the given String is in the proper format,
+ * False
otherwise.
+ */
+ public boolean isSaveFormat(String format);
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IVersionListener.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IVersionListener.java
new file mode 100644
index 00000000..b9706157
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/interfaces/IVersionListener.java
@@ -0,0 +1,22 @@
+package raven.sqdev.interfaces;
+
+import raven.sqdev.misc.VersionChangeEvent;
+
+/**
+ * An interface describing a VersionListener that will be notified when
+ * something with the versions within the SQDev feature happens
+ *
+ * @author Raven
+ *
+ */
+public interface IVersionListener {
+
+ /**
+ * This method gets called whenever a change in the version number occured
+ *
+ * @param event
+ * The VersionChangeEvent
describing this change in
+ * more detail
+ */
+ public void versionChanged(VersionChangeEvent event);
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/AbstractAdditionalProposalInformation.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/AbstractAdditionalProposalInformation.java
new file mode 100644
index 00000000..aa92d2de
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/AbstractAdditionalProposalInformation.java
@@ -0,0 +1,154 @@
+package raven.sqdev.misc;
+
+import java.util.ArrayList;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+import raven.sqdev.interfaces.IAdditionalProposalInformation;
+import raven.sqdev.interfaces.IProposalInformationCategory;
+
+/**
+ * An abstract implementation of an IAdditionalProposalInformation
+ * that provides a framework for subClasses
+ *
+ * @author Raven
+ *
+ */
+public abstract class AbstractAdditionalProposalInformation
+ implements IAdditionalProposalInformation {
+
+ /**
+ * A list of categories this info consists of
+ */
+ private ArrayListAbstractAdditionalProposalInformation
+ */
+ public AbstractAdditionalProposalInformation() {
+ this(false);
+ }
+
+ /**
+ * Creates an instance of this
+ * AbstractAdditionalProposalInformation
+ *
+ * @param compute
+ * Whether or not this constructor should directly invoke the
+ * computation of categories
+ */
+ public AbstractAdditionalProposalInformation(boolean compute) {
+ if (compute) {
+ doComputeCategories();
+ }
+ }
+
+ @Override
+ public final int getCategoryCount() {
+ checkComputation();
+
+ return (categoryList != null) ? categoryList.size() : 0;
+ }
+
+ @Override
+ public final String[] getCategoryNames() {
+ checkComputation();
+
+ String[] names = new String[categoryList.size()];
+
+ for (int i = 0; i < names.length; i++) {
+ names[i] = categoryList.get(i).getName();
+ }
+
+ return names;
+ }
+
+ /**
+ * {@inheritDoc} ScrollableComposite
whose minSize has to be set properly
+ */
+ @Override
+ public final Control[] getCategoryControls(Composite parent) {
+ checkComputation();
+
+ Control[] controls = new Control[categoryList.size()];
+
+ for (int i = 0; i < controls.length; i++) {
+ // create the parent Control for the categories
+ ScrolledComposite scroller = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+
+ Composite comp = new Composite(scroller, SWT.NULL);
+
+ // set GridLayout as the default Layout
+ comp.setLayout(new GridLayout());
+ comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ if (parent.getLayout() instanceof GridLayout) {
+ scroller.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ }
+
+ // inherit color scheme
+ comp.setForeground(parent.getForeground());
+ comp.setBackground(parent.getBackground());
+
+ scroller.setContent(comp);
+ scroller.setExpandHorizontal(true);
+ scroller.setExpandVertical(true);
+
+ categoryList.get(i).getControl(comp);
+
+ comp.computeSize(parent.getSize().x, SWT.DEFAULT);
+
+ scroller.setMinSize(comp.getSize());
+
+ controls[i] = scroller;
+ }
+
+ return controls;
+ }
+
+ /**
+ * Forces the computation of the categories representing this info
+ */
+ public final void doComputeCategories() {
+ categoryList = computeCategories(new ArrayList'('
and
+ * ')'
+ *
+ * @author Raven
+ *
+ */
+public class CharacterPair {
+
+ public static final CharacterPair SINGLE_QUOTATION_MARKS = new CharacterPair('\'', '\'');
+ public static final CharacterPair DOUBLE_QUOTATION_MARKS = new CharacterPair('"', '"');
+ public static final CharacterPair ROUND_BRACKETS = new CharacterPair('(', ')');
+ public static final CharacterPair SQUARE_BRACKETS = new CharacterPair('[', ']');
+ public static final CharacterPair CURLY_BRACKETS = new CharacterPair('{', '}');
+
+ private char[] pair;
+
+ /**
+ * Creates a new character pair
+ * @param a Opening character of the pair
+ * @param b Closing character of the pair
+ */
+ public CharacterPair(char a, char b) {
+ char[] pair = { a, b };
+
+ this.setPair(pair);
+ }
+
+ public char[] getPair() {
+ return this.pair;
+ }
+
+ public void setPair(char[] pair) {
+ this.pair = pair;
+ }
+
+ /**
+ * Gets the opening character of this pair
+ * @return
+ */
+ public char getOpener() {
+ return this.getPair()[0];
+ }
+
+ /**
+ * Gets the closing character of this pair
+ * @return
+ */
+ public char getCloser() {
+ return this.getPair()[1];
+ }
+
+ /**
+ * Check if this pair includes the given character
+ * @param c The character to search for
+ * @return
+ */
+ public boolean includes(char c) {
+ return (this.getOpener() == c || this.getCloser() == c);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/Pair.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/Pair.java
new file mode 100644
index 00000000..8290139b
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/Pair.java
@@ -0,0 +1,36 @@
+package raven.sqdev.misc;
+
+public class PairComposite
that will hold the content
+ * @param content
+ * The (styled) content to put on the given parent
+ * @throws IOException
+ */
+ public static final void createStyledComposite(Composite parent, String content)
+ throws IOException {
+ // make a layout with 1 column
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+
+ parent.setLayout(layout);
+
+ if (isStyled(content)) {
+ // get the different regions
+ ArrayListSQDevStyle
the given content starts with (=
+ * The content starts with the opening tag of the respective style and the
+ * content contains the respective closing tag)
+ *
+ * @param content
+ * The content to process
+ * @return The starting SQDevStyle
or null
if none
+ * could be found
+ */
+ public static final SQDevStyle getStartingStyle(String content) {
+ for (SQDevStyle currentStyle : getUsedStyles(content)) {
+ if (content.startsWith(currentStyle.getOpener())) {
+ return currentStyle;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the last unstyled part of a String
+ *
+ * @param content
+ * The content to to process
+ * @return The last unstyled part of the given content
+ */
+ public static final String getLastUnstyledPart(String content) {
+ int index = content.lastIndexOf(String.valueOf(SQDevStyle.STYLE_MARK));
+
+ while (index > 0) {
+ String fragment1 = content.substring(0, index + 1);
+ String fragment2 = content.substring(index + 1);
+
+ for (SQDevStyle currentStyle : SQDevStyle.getStyles()) {
+ if (fragment1.endsWith(currentStyle.getCloser())) {
+ return fragment2;
+ }
+ }
+
+ // fragment1 doesn't end with a style tag closer
+ index = fragment1.substring(0, fragment1.length() - 1)
+ .lastIndexOf(String.valueOf(SQDevStyle.STYLE_MARK));
+ }
+
+ // no styled region in the content -> the complete content is the last
+ // unstyled part
+ return content;
+ }
+
+ /**
+ * Gets the first part of the goven content taht is styled with the given
+ * style
+ *
+ * @param content
+ * The content to process
+ * @param style
+ * The style to searh for
+ * @return The styled part or null
if the style is not used in
+ * the given content
+ */
+ public static final String getStyledPart(String content, SQDevStyle style) {
+ if (!style.isUsedIn(content)) {
+ return null;
+ }
+
+ String styledPart = content.substring(content.indexOf(style.getOpener()),
+ content.indexOf(style.getCloser()));
+
+ // remove opener tag
+ styledPart = styledPart.substring(style.getOpener().length());
+
+ return styledPart;
+ }
+
+ /**
+ * Seperates the given content in different styles regions
+ *
+ * @param content
+ * The content to process
+ * @return A list conatining Pair
s of a SQDevStyle
+ * (null
if unstyled) and the content of this styled
+ * region
+ */
+ public static ArrayListSWT
+ */
+ public SQDevComposite(Composite parent, int style) {
+ super(parent, style);
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StringProposalInformationCategory.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StringProposalInformationCategory.java
new file mode 100644
index 00000000..142cf9e1
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StringProposalInformationCategory.java
@@ -0,0 +1,65 @@
+package raven.sqdev.misc;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+
+import raven.sqdev.interfaces.IProposalInformationCategory;
+
+/**
+ * An information category for displaying a plain String as an
+ * InformationCategory
+ *
+ * @author Raven
+ *
+ */
+public class StringProposalInformationCategory implements IProposalInformationCategory {
+
+ /**
+ * The category's name
+ */
+ private String name;
+ /**
+ * The category's content
+ */
+ private String content;
+
+ public StringProposalInformationCategory(String name, String content) {
+ if (name == null || content == null) {
+ // don't allow null values
+ throw new NullPointerException(
+ (name == null) ? "Name may not be null!" : "Content may not be null!");
+ }
+
+ this.name = name;
+ this.content = content;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public Control getControl(Composite parent) {
+ if (!(parent.getLayout() instanceof GridLayout)) {
+ // make sure parent uses a grid Layout
+ parent.setLayout(new GridLayout());
+ }
+
+ // create a Text showing the content of this category
+ Text text = new Text(parent, SWT.READ_ONLY | SWT.MULTI | SWT.WRAP);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ text.setText(content);
+
+ // inherit color scheme
+ text.setForeground(parent.getForeground());
+ text.setBackground(parent.getBackground());
+
+ return parent;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledProposalInformationCategory.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledProposalInformationCategory.java
new file mode 100644
index 00000000..1d1f8aea
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/StyledProposalInformationCategory.java
@@ -0,0 +1,134 @@
+package raven.sqdev.misc;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+import raven.sqdev.exceptions.SQDevCoreException;
+import raven.sqdev.interfaces.IProposalInformationCategory;
+
+/**
+ * An information category being able to display a styled text that may contain
+ * code that is encapsulated in between the respective tags
+ *
+ * @author Raven
+ *
+ */
+public class StyledProposalInformationCategory implements IProposalInformationCategory {
+ /**
+ * The name of this category
+ */
+ private String name;
+ /**
+ * The (styled) content of this category
+ */
+ private String content;
+ /**
+ * A list of (styled) contents of this category
+ */
+ private ListStyledRegion
+ *
+ * @param style
+ * The style of this region (null
if unstyled)
+ * @param content
+ * The content of this styled region
+ */
+ public StyledRegion(SQDevStyle obj1, String obj2) {
+ super(obj1, obj2);
+ }
+
+ /**
+ * Gets the SQDevStyle
of this StyledRegion
(
+ * null
if unstyled)
+ */
+ public SQDevStyle getStyle() {
+ return getFirst();
+ }
+
+ /**
+ * Gets the content of this StyledRegion
+ */
+ public String getContent() {
+ return getSecond();
+ }
+
+ /**
+ * Indicates whether this styledRegion has to be displayed in it's own
+ * composite or if it can be displayed in a StyledText
+ *
+ * @return True
if it needs an own composite
+ */
+ public boolean needsOwnComposite() {
+ return (getStyle() == null) ? false : getStyle().needsOwnComposite();
+ }
+
+ /**
+ * Adds this StyledRegion
to the given StyledText
+ * if possible
+ *
+ * @param styledText
+ * The StyledText
this region should be added to
+ * @return True
if the content of this
+ * StyledRegion
could be added to the given
+ * StyledText
. False
otherwise (when this
+ * StyledRegion
needs it's own Composite
)
+ */
+ public boolean addToStyledText(StyledText styledText) {
+ if (needsOwnComposite()) {
+ // this is not the proper way to display this region
+ return false;
+ }
+
+ // add the previous content of the styledText
+ String prevText = styledText.getText();
+
+ // apply the new text
+ styledText.append(getContent());
+
+ if (getStyle() != null) {
+ // apply the styleRange if there actually is a style
+ StyleRange range = getStyle().getStyleRange();
+ // set the actual range
+ range.start = prevText.length();
+ range.length = getContent().length();
+
+ // add styleRange
+ styledText.setStyleRange(range);
+ }
+
+ return true;
+ }
+
+ public String toString() {
+ return "Style: \n\t" + getStyle() + "\nContent: \n\t" + getContent().replace("\n", "\n\t");
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/VersionChangeEvent.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/VersionChangeEvent.java
new file mode 100644
index 00000000..d8231c21
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/misc/VersionChangeEvent.java
@@ -0,0 +1,67 @@
+package raven.sqdev.misc;
+
+import org.eclipse.core.runtime.Assert;
+import org.osgi.framework.Version;
+
+import raven.sqdev.constants.ESQDevPlugin;
+
+/**
+ * A VersionChangeEvent
that contains information about the change
+ *
+ * @author Raven
+ *
+ */
+public class VersionChangeEvent {
+
+ /**
+ * The old version
+ */
+ private Version oldVersion;
+ /**
+ * The new version
+ */
+ private Version newVersion;
+ /**
+ * The ID of the plugin whose version has changed
+ */
+ private ESQDevPlugin plugin;
+
+
+ public VersionChangeEvent(ESQDevPlugin plugin, Version oldVersion, Version newVersion) {
+ Assert.isTrue(plugin != null && oldVersion != null && newVersion != null,
+ "Null arguments in VersionChangeEvent");
+
+ this.plugin = plugin;
+ this.oldVersion = oldVersion;
+ this.newVersion = newVersion;
+ }
+
+ /**
+ * Gets the plugin this change occured on
+ */
+ public ESQDevPlugin getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * Gets the old version of the plugin (The version before this change)
+ */
+ public Version getOldVersion() {
+ return oldVersion;
+ }
+
+ /**
+ * Gets the new version of the plugin (The version after this change)
+ */
+ public Version getNewVersion() {
+ return newVersion;
+ }
+
+ /**
+ * Checks whether this version change is an update (The old version is less
+ * tha the new version)
+ */
+ public boolean isUpdate() {
+ return oldVersion.compareTo(newVersion) < 0;
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java
new file mode 100644
index 00000000..72c824f7
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java
@@ -0,0 +1,136 @@
+package raven.sqdev.pluginManagement;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * A manager for general eclipse events where certain behaviour patterns can be
+ * registered for a certain event
+ *
+ * @author Raven
+ *
+ */
+public class SQDevEclipseEventManager {
+ /**
+ * The manager instance
+ */
+ private static SQDevEclipseEventManager manager;
+
+ private ListSQDevPluginManager
instance. It's not meant to be
+ * done manually
+ */
+ private SQDevPluginManager() {
+ pluginList = new ArrayListSQDevPLuginManager
+ */
+ public static SQDevPluginManager getManager() {
+ if (manager == null) {
+ manager = new SQDevPluginManager();
+ }
+
+ return manager;
+ }
+
+ /**
+ * Checks if the given plugin is currently registered in this manager
+ *
+ * @param plugin
+ * The plugin to lok for
+ * @return
+ */
+ public boolean contains(AbstractUIPlugin plugin) {
+ return pluginList.contains(plugin);
+ }
+
+ /**
+ * Checks if the given plugin is currently registered in this manager
+ *
+ * @param pluginName
+ * The name (ID) of the plugin to searchs
+ * @return
+ */
+ public boolean contains(String pluginName) {
+ for (AbstractUIPlugin currentPlugin : pluginList) {
+ if (currentPlugin.getBundle().getSymbolicName().toLowerCase()
+ .equals(pluginName.toLowerCase())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets the plugin with the given name (ID). If no plugin is registered and
+ * the name starts with "raven.sqdev" it will try to find and strat this
+ * plugin
+ *
+ * @param pluginName
+ * The name (ID) of the plugin to searchs
+ * @return The desired plugin or null
if none is found
+ */
+ public AbstractUIPlugin get(String pluginName) {
+ // search by name
+ for (AbstractUIPlugin currentPlugin : pluginList) {
+ if (currentPlugin.getBundle().getSymbolicName().toLowerCase()
+ .equals(pluginName.toLowerCase())) {
+ return currentPlugin;
+ }
+ }
+
+ if (pluginName.toLowerCase().startsWith("raven.sqdev")) {
+ Bundle bundle = Platform.getBundle(pluginName);
+
+ if (bundle != null) {
+ try {
+ int prevCount = pluginList.size();
+
+ // try to start the bundle
+ bundle.start();
+
+ if (pluginList.size() > prevCount) {
+ // if the count of registered plugins changed try to
+ // fins it again
+ return get(pluginName);
+ } else {
+ throw new SQDevException("The started plugin \"" + pluginName
+ + "\" has not registered to the SQDevPluginManage!");
+ }
+ } catch (BundleException | SQDevException e) {
+ e.printStackTrace();
+
+ throw new SQDevCoreException(e);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Registers the given plugin if it's not already registered
+ *
+ * @param plugin
+ */
+ public void register(AbstractUIPlugin plugin) {
+ Assert.isNotNull(plugin);
+
+ if (!pluginList.contains(plugin)) {
+ pluginList.add(plugin);
+ }
+ }
+
+ /**
+ * Unregisters the given plugin from this manager
+ *
+ * @param plugin
+ * The plugin to unregister
+ */
+ public void unregister(AbstractUIPlugin plugin) {
+ pluginList.remove(plugin);
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManager/SQDevPluginManager.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManager/SQDevPluginManager.java
index 2febcbfc..69b04348 100644
--- a/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManager/SQDevPluginManager.java
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/pluginManager/SQDevPluginManager.java
@@ -1,6 +1,7 @@
package raven.sqdev.pluginManager;
import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
@@ -8,8 +9,10 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
+import raven.sqdev.constants.ESQDevPlugin;
import raven.sqdev.exceptions.SQDevCoreException;
import raven.sqdev.exceptions.SQDevException;
+import raven.sqdev.interfaces.IPluginListener;
/**
* An manager for all running SQDev plugins
@@ -24,6 +27,11 @@ public class SQDevPluginManager {
*/
protected static SQDevPluginManager manager;
+ /**
+ * All plugin listeners
+ */
+ private List pluginListeners;
+
/**
* The list of all registered plugins
*/
@@ -33,12 +41,13 @@ public class SQDevPluginManager {
* Creates an SQDevPluginManager
instance. It's not meant to be
* done manually
*/
- public SQDevPluginManager() {
+ private SQDevPluginManager() {
pluginList = new ArrayList();
+ pluginListeners = new ArrayList(0);
}
/**
- * Gets the PLuginManager holding all the references to running SQDevPlugins
+ * Gets the PluginManager holding all the references to running SQDevPlugins
*
* @return The SQDevPLuginManager
*/
@@ -137,6 +146,11 @@ public void register(AbstractUIPlugin plugin) {
if (!pluginList.contains(plugin)) {
pluginList.add(plugin);
}
+
+ // notify listeners
+ for (IPluginListener current : pluginListeners) {
+ current.started(ESQDevPlugin.resolve(plugin.getBundle().getSymbolicName()));
+ }
}
/**
@@ -147,5 +161,32 @@ public void register(AbstractUIPlugin plugin) {
*/
public void unregister(AbstractUIPlugin plugin) {
pluginList.remove(plugin);
+
+ // notify listeners
+ for (IPluginListener current : pluginListeners) {
+ current.stopped(ESQDevPlugin.resolve(plugin.getBundle().getSymbolicName()));
+ }
+ }
+
+ /**
+ * Adds a plugin listener if it has not been added before
+ *
+ * @param listener
+ * The listener to add
+ */
+ public void addPluginListener(IPluginListener listener) {
+ if (!pluginListeners.contains(listener)) {
+ pluginListeners.add(listener);
+ }
+ }
+
+ /**
+ * Removes the given plugin listener
+ *
+ * @param listener
+ * The listener to remove
+ */
+ public void removePluginListener(IPluginListener listener) {
+ pluginListeners.remove(listener);
}
}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/BoldStyle.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/BoldStyle.java
new file mode 100644
index 00000000..f133ff08
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/BoldStyle.java
@@ -0,0 +1,23 @@
+package raven.sqdev.styles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+
+public class BoldStyle extends SQDevStyle {
+
+ /**
+ * Creates an instance of this BoldStyle
+ */
+ public BoldStyle() {
+ super("bold", "Bold", "/Bold", false);
+ }
+
+ @Override
+ public StyleRange getStyleRange() {
+ StyleRange range = new StyleRange();
+ range.fontStyle = SWT.BOLD;
+
+ return range;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/CodeStyle.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/CodeStyle.java
new file mode 100644
index 00000000..0f13f853
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/CodeStyle.java
@@ -0,0 +1,48 @@
+package raven.sqdev.styles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The style used for Code
+ *
+ * @author Raven
+ *
+ */
+public class CodeStyle extends SQDevStyle {
+
+ /**
+ * Creates an instance of this CodeStyle
+ */
+ public CodeStyle() {
+ super("Code", "Code", "/Code", true);
+ }
+
+ @Override
+ public Composite createComposite(Composite parent, String content) {
+ if (!needsOwnComposite()) {
+ return null;
+ }
+
+ Composite base = new Composite(parent, SWT.BORDER);
+
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 1;
+ layout.marginWidth = 1;
+ base.setLayout(layout);
+
+ Text code = new Text(base, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ code.setText(content);
+
+ code.setBackground(PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_WHITE));
+
+ code.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ return base;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/SQDevStyle.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/SQDevStyle.java
new file mode 100644
index 00000000..7fe55489
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/styles/SQDevStyle.java
@@ -0,0 +1,228 @@
+package raven.sqdev.styles;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.widgets.Composite;
+
+import raven.sqdev.exceptions.SQDevCoreException;
+
+/**
+ * This class represents a String pair with an opener and a closer.
+ * Subclasses must either override createComposite()
or
+ * getStyleRange()
+ *
+ * @author Raven
+ *
+ */
+public class SQDevStyle {
+
+ /**
+ * A character that that is placed before and after the style tag
+ */
+ public static final char STYLE_MARK = '$';
+
+ /**
+ * A list with all different instantiated SQDevStyles
+ */
+ private static List styles = new ArrayList();
+
+ /**
+ * The name of this style
+ */
+ private String name;
+ /**
+ * The opening sequence
+ */
+ private String opener;
+ /**
+ * The closing sequence
+ */
+ private String closer;
+ /**
+ * Indicating whether this style needs to be displayed in it's own composite
+ * (otherwise it has to be displayable in a StyledText
widget)
+ */
+ private boolean ownComposite;
+
+
+ /**
+ * Creates a new Pair
+ *
+ * @param name
+ * The name of this style
+ *
+ * @param opener
+ * The opening part of this pair. Must not be used by another
+ * SQDevStyle
+ * @param closer
+ * The closing part of this pair. Must not be used by another
+ * SQDevStyle
+ * @param ownComposite
+ * Indicating whether this style needs to be displayed in it's
+ * own composite (otherwise it has to be displayable in a
+ * StyledText
widget)
+ */
+ public SQDevStyle(String name, String opener, String closer, boolean ownComposite) {
+ Assert.isTrue(name != null && opener != null && closer != null,
+ "Null argument in SQDevStyle");
+
+ opener = format(opener);
+ closer = format(closer);
+
+ this.name = name;
+ this.opener = opener;
+ this.closer = closer;
+ this.ownComposite = ownComposite;
+
+ if (styles.contains(this)) {
+ // don't allow duplicate of tags
+ throw new SQDevCoreException("The speified tags are already in use!");
+ } else {
+ // register this style
+ styles.add(this);
+ }
+ }
+
+ @SuppressWarnings("unused")
+ private SQDevStyle() {
+ // don't allow to use this constructor
+ throw new IllegalArgumentException("The empty constructor of SQDevSytle must not be used!");
+ }
+
+ /**
+ * Gets the name of this style
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Gets the opening sequence for this Pair
+ */
+ public String getOpener() {
+ return opener;
+ }
+
+ /**
+ * Gets the closing sequence for this pair
+ */
+ public String getCloser() {
+ return closer;
+ }
+
+ /**
+ * Indicates whether this style has to be displayed in it's own composite or
+ * if it can be displayed in a StyledText
+ *
+ * @return True
if it needs an own composite
+ */
+ public boolean needsOwnComposite() {
+ return ownComposite;
+ }
+
+ /**
+ * Checks whether the given content uses this pair (opener and closer)
+ *
+ * @param content
+ * The content to check
+ * @return True
if the opener and closer appear in this
+ * content at least once
+ */
+ public boolean isUsedIn(String content) {
+ return content.contains(getOpener()) && content.contains(getCloser());
+ }
+
+ /**
+ * Make sure the given tag is not empty and sourrounded by the proper
+ * STYLE_MARK
+ *
+ * @param tag
+ * The tag to process
+ */
+ private final String format(String tag) {
+ tag = tag.trim();
+
+ Assert.isTrue(!tag.isEmpty());
+
+ if (!tag.startsWith(String.valueOf(STYLE_MARK))) {
+ tag = STYLE_MARK + tag;
+ }
+
+ if (!tag.endsWith(String.valueOf(STYLE_MARK))) {
+ tag += STYLE_MARK;
+ }
+
+ return tag;
+ }
+
+ @Override
+ public String toString() {
+ return "SQDevStyle - " + getName();
+ }
+
+ /**
+ * Creates a Composite
representing the given content in this
+ * style.
+ * The layoutData for the created Composite
will not be set!
+ *
+ * @param parent
+ * The parent to the created Composite
+ * @param content
+ * The content that should be displayed in this style
+ * @return The created Composite
or usally null
if
+ * this style does not need to be displayed in it's own
+ * Composite
+ */
+ public Composite createComposite(Composite parent, String content) {
+ if (needsOwnComposite()) {
+ throw new SQDevCoreException("The composite creation has not yet been implemented!");
+ }
+
+ // does not need it's own composite
+ return null;
+ }
+
+ /**
+ * Gets the StyleRange
for this style.
+ * The start and length of this range are not set!
+ *
+ * @return The respective StyleRange
or null
if
+ * this style needs it's own composite
+ */
+ public StyleRange getStyleRange() {
+ if (needsOwnComposite()) {
+ // needs own composite
+ return null;
+ }
+
+ throw new SQDevCoreException("The StyleRange has not yet been implemented!");
+ }
+
+ /**
+ * Get all the SQDevStyle
s that have yet been instantiated
+ */
+ public static List getStyles() {
+ return styles;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof SQDevStyle)) {
+ return false;
+ }
+
+ SQDevStyle comp = (SQDevStyle) obj;
+
+ if (this.getOpener().equals(comp.getOpener())
+ && this.getCloser().equals(comp.getCloser())) {
+ // the opening and closing tags are import
+ return true;
+ }
+
+ return false;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java
new file mode 100644
index 00000000..b2496bcd
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/Syntax.java
@@ -0,0 +1,143 @@
+package raven.sqdev.syntax;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * A class representing a syntax that consist SyntaxElements
+ *
+ * @see SyntaxElement
+ *
+ * @author Raven
+ *
+ */
+public class Syntax {
+
+ /**
+ * The name of the command this syntax is associated with
+ */
+ private String commandName;
+
+ /**
+ * A list of all SyntaxElements this syntax conatains
+ */
+ private ArrayList elements;
+
+ public Syntax(String commandName) {
+ this.commandName = commandName;
+
+ elements = new ArrayList();
+ }
+
+ /**
+ * Gets the command name this syntax is associated with
+ */
+ public String getCommandName() {
+ return commandName;
+ }
+
+ /**
+ * Checks whether this syntax is empty
+ */
+ public boolean isEmpty() {
+ return getElements().size() == 0;
+ }
+
+ @Override
+ public String toString() {
+ String str = "";
+
+ for (SyntaxElement currentElement : getElements()) {
+ str += currentElement.toString() + " ";
+ }
+
+ return str.trim();
+ }
+
+ /**
+ * Gets the SyntaxElements this Syntax
consists of
+ */
+ public ArrayList getElements() {
+ return elements;
+ }
+
+ /**
+ * Sets the elements for this syntax
+ *
+ * @param elements
+ * The new elements (Must at least contain one element!)
+ */
+ public void setElements(ArrayList elements) {
+ Assert.isTrue(elements != null && elements.size() >= 1);
+
+ this.elements = elements;
+ }
+
+ /**
+ * Adds an SyntaxElement
to this syntax
+ *
+ * @param element
+ * The element to add
+ */
+ public void addElement(SyntaxElement element) {
+ if (!getElements().contains(element)) {
+ getElements().add(element);
+ }
+ }
+
+ /**
+ * Gets the SyntaxElement
at the given index in this
+ * Syntax
+ *
+ * @param index
+ * The index of th desired SyntaxElement
+ */
+ public SyntaxElement getElement(int index) {
+ return getElements().get(index);
+ }
+
+ /**
+ * Gets the the amount of argument for this Syntax
+ */
+ public int getArgumentCount() {
+ return getElements().size() - 1;
+ }
+
+ /**
+ * Gets the amount of single component this syntax consists of (not counting
+ * arrays as an element -> only leafs are considered)
+ *
+ * @return The component count
+ */
+ public int getComponentCount() {
+ int count = 0;
+
+ for (SyntaxElement currentElement : getElements()) {
+ count += currentElement.getLeafCount();
+ }
+
+ return count;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!this.getClass().equals(obj.getClass())) {
+ return false;
+ }
+
+ Syntax comp = (Syntax) obj;
+
+ if (this.getComponentCount() != comp.getComponentCount()) {
+ return false;
+ }
+
+ for (int i = 0; i < this.getComponentCount(); i++) {
+ if (!this.getElement(i).equals(comp.getElement(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java
new file mode 100644
index 00000000..a322b3fa
--- /dev/null
+++ b/plugin/Raven.SQDev.Misc/src/raven/sqdev/syntax/SyntaxElement.java
@@ -0,0 +1,121 @@
+package raven.sqdev.syntax;
+
+import org.eclipse.core.runtime.Assert;
+
+import raven.sqdev.misc.CharacterPair;
+
+/**
+ * A class representing a syntax element.
+ * A syntax element can either be a leaf-element meaning that is simply
+ * represented by a String or it can be a node-element meaning that it consists
+ * of another sub-syntax and the respective encapsulating characters.
+ *
+ * @author Raven
+ *
+ */
+public class SyntaxElement {
+
+ /**
+ * The value of this SyntaxElement
if it's a leaf-element
+ */
+ private String leafElement;
+
+ /**
+ * The value of this SyntaxElement
if it's a node-element
+ */
+ private Syntax subSyntax;
+
+ /**
+ * The encapsulating characters if this is a node element
+ */
+ private CharacterPair encapsulator;
+
+
+ /**
+ * Creates a SyntaxElement
as a leaf element representing the
+ * given String
+ *
+ * @param leafElement
+ * The String that is represented by this
+ * SyntaxElement
. It may only be one word
+ */
+ public SyntaxElement(String leafElement) {
+ Assert.isTrue(leafElement != null && !leafElement.isEmpty() && !leafElement.contains(" "));
+
+ this.leafElement = leafElement;
+ }
+
+ /**
+ * Creates a SyntaxElement
as a node element representing the
+ * given Syntax
as a subSyntax
+ *
+ * @param subSyntax
+ * The Syntax
represented by this
+ * SyntaxElement
.
+ * @param encapsulator
+ * The CharacterPair
encapsulating this node element
+ */
+ public SyntaxElement(Syntax subSyntax, CharacterPair encapsulator) {
+ Assert.isTrue(subSyntax != null && !subSyntax.isEmpty());
+
+ this.subSyntax = subSyntax;
+ }
+
+ /**
+ * Checks whether this SyntaxElement
is a leaf element
+ *
+ * @return True
if this SyntaxElement
is a leaf
+ * element. False
if it's a node element
+ */
+ public boolean isLeafElement() {
+ return leafElement != null;
+ }
+
+ @Override
+ public String toString() {
+ if (isLeafElement()) {
+ return leafElement;
+ } else {
+ return getEncapsulator().getOpener() + subSyntax.toString()
+ + getEncapsulator().getCloser();
+ }
+ }
+
+ /**
+ * Gets the encapsulating CharacterPair
+ */
+ public CharacterPair getEncapsulator() {
+ return encapsulator;
+ }
+
+ /**
+ * Gets the amount of leafs represented by this SyntaxElement
+ */
+ public int getLeafCount() {
+ if (isLeafElement()) {
+ return 1;
+ } else {
+ return subSyntax.getComponentCount();
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!this.getClass().equals(obj.getClass())) {
+ return false;
+ }
+
+ SyntaxElement comp = (SyntaxElement) obj;
+
+ if (this.isLeafElement() != comp.isLeafElement()) {
+ return false;
+ }
+
+ if (this.getLeafCount() != comp.getLeafCount()) {
+ return false;
+ }
+
+ return this.toString().equals(comp.toString());
+ }
+
+}
diff --git a/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
index 650b04a5..f3bdcab9 100644
--- a/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.SQFEditor/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SQFEditor
Bundle-SymbolicName: raven.sqdev.editors.sqfeditor;singleton:=true
-Bundle-Version: 0.2.0
+Bundle-Version: 0.3.0
Bundle-Activator: raven.sqdev.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.ui,
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class
index d8d1e68a..084488ed 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/activator/Activator.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.class
index 8e13ad32..55a71391 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class
index a284953b..c958d209 100644
Binary files a/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class and b/plugin/Raven.SQDev.SQFEditor/bin/raven/sqdev/editors/sqfeditor/SQF_Editor.class differ
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java
index 63690bd5..68bf5a98 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/activator/Activator.java
@@ -18,12 +18,6 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
- /**
- * The constructor
- */
- public Activator() {
- }
-
/*
* (non-Javadoc)
*
diff --git a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.java b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.java
index c1fa8248..405cefa7 100644
--- a/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.java
+++ b/plugin/Raven.SQDev.SQFEditor/src/raven/sqdev/editors/sqfeditor/SQFKeywordProvider.java
@@ -1,88 +1,39 @@
package raven.sqdev.editors.sqfeditor;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-
-import raven.sqdev.editors.IKeywordProvider;
-import raven.sqdev.editors.sqfeditor.exceptions.IllegalBlankException;
-import raven.sqdev.exceptions.SQDevEditorException;
-import raven.sqdev.util.ResourceManager;
+import raven.sqdev.editors.BasicKeywordProvider;
+import raven.sqdev.infoCollection.base.KeywordList;
+import raven.sqdev.pluginManagement.ResourceManager;
import raven.sqdev.util.SQDevInfobox;
-public class SQFKeywordProvider implements IKeywordProvider {
+/**
+ * The KeywordProvider for the SQF keywords
+ *
+ * @author Raven
+ *
+ */
+public class SQFKeywordProvider extends BasicKeywordProvider {
+ /**
+ * Creates an instance of this SQFKeywordProvider that will set it's
+ * keywords automatically
+ */
public SQFKeywordProvider() {
- ArrayList keywordList = new ArrayList();
-
- ResourceManager manager = new ResourceManager();
-
- InputStream in = manager.findResource("/resources/sqf/Keywords.txt");
+ ResourceManager manager = ResourceManager.getManager();
+ String savedKeywords = manager.getResourceContent("SQFKeywords.txt");
- if (in == null) {
- // something went wrong in the process of finding the respective
- // resource
- setKeywords(new String[0]);
-
- try {
- throw new SQDevEditorException("Couldn't find SQF keywords!");
- } catch (SQDevEditorException e) {
- SQDevInfobox info = new SQDevInfobox("Failed at instantiating SQF editor properly!",
- e);
- info.open();
-
- e.printStackTrace();
- }
- }
-
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- String line = reader.readLine();
-
- while (line != null) {
- line = line.trim();
-
- if (line.contains(" ")) {
- throw new IllegalBlankException("A keyword mustn't contain a blank!");
- } else {
- keywordList.add(line);
- }
-
- line = reader.readLine();
- }
+ if (savedKeywords == null) {
+ setKeywordList(new KeywordList());
- reader.close();
+ SQDevInfobox info = new SQDevInfobox(
+ "Failed at instantiating SQF editor properly!\n\nReason:"
+ + "\nProblems with reading respective resource");
+ info.open();
- } catch (IOException | IllegalBlankException e) {
- e.printStackTrace();
+ return;
}
- String[] keywords = new String[keywordList.size()];
+ KeywordList list = new KeywordList(savedKeywords);
- // pack in array
- for (int i = 0; i < keywordList.size(); i++) {
- keywords[i] = keywordList.get(i);
- }
-
- setKeywords(keywords);
- }
-
- /**
- * The keyword this provider provides
- */
- protected String[] keywords;
-
- @Override
- public String[] getKeywords() {
- return keywords;
+ setKeywordList(list);
}
-
- @Override
- public void setKeywords(String[] keywords) {
- this.keywords = keywords;
- }
-
}
diff --git a/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF b/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
index dc1b608a..2d4f37b5 100644
--- a/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
+++ b/plugin/Raven.SQDev.Util/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Util
-Bundle-SymbolicName: raven.sqdev.util
-Bundle-Version: 0.3.0
+Bundle-SymbolicName: raven.sqdev.util;singleton:=true
+Bundle-Version: 0.4.0
Bundle-Activator: raven.sqdev.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.core.runtime,
@@ -12,8 +12,13 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.editors,
org.eclipse.ui.workbench,
org.eclipse.swt,
- raven.sqdev.misc;bundle-version="0.1.0"
+ raven.sqdev.misc;bundle-version="0.1.0",
+ org.eclipse.jface.text,
+ org.eclipse.ui
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
-Export-Package: raven.sqdev.sqdevFile,
+Export-Package: raven.sqdev.actions,
+ raven.sqdev.miscellaneous,
+ raven.sqdev.pluginManagement,
+ raven.sqdev.sqdevFile,
raven.sqdev.util
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction$1.class
new file mode 100644
index 00000000..7a6402e4
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction.class
new file mode 100644
index 00000000..448039c2
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/actions/WikiAction.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class
index eea82765..58dbdf2a 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/activator/Activator.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class
new file mode 100644
index 00000000..674a07f5
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class
new file mode 100644
index 00000000..2028e4ef
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/ResourceManager.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class
new file mode 100644
index 00000000..e10f76f7
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class
new file mode 100644
index 00000000..b87bc77e
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class
new file mode 100644
index 00000000..f754c484
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/SQDevEclipseEventManager.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/VersionManager.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/VersionManager.class
new file mode 100644
index 00000000..d3fbb3ce
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/pluginManagement/VersionManager.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$1.class
index 10894a7c..38d13305 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$1.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$2.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$2.class
index 3681294a..91a7f606 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$2.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation$2.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation.class
index 71ce18db..f17458ec 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAnnotation.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$1.class
index 158146a8..f53d9eca 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$1.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$2.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$2.class
index 8e575957..71ccd245 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$2.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$2.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$3.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$3.class
index 71c6d1ce..538d3fde 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$3.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$3.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$4.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$4.class
index d04f652e..fa12e83d 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$4.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute$4.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute.class
index d4d02a19..06e6d37a 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/ESQDevFileAttribute.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class
index c959cdb6..b83afd23 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/sqdevFile/SQDevFile.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class
new file mode 100644
index 00000000..57a2c24c
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/startup/SQDevStarter.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class
index 1d763707..f775fff3 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ColorUtils.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class
new file mode 100644
index 00000000..5370e7ae
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/EditorUtil.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/FileUtil.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/FileUtil.class
index c0b48fc9..c2c9cd4c 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/FileUtil.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/FileUtil.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ResourceManager.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ResourceManager.class
index 9df60943..eed0f6cb 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ResourceManager.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/ResourceManager.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class
index 43c1e7e1..d4b89e44 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox$1.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class
index 5e4f82e8..a14dab87 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevInfobox.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class
index 48b6f731..5f18d79a 100644
Binary files a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/SQDevPreferenceUtil.class differ
diff --git a/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/TextUtils.class b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/TextUtils.class
new file mode 100644
index 00000000..9c32c56a
Binary files /dev/null and b/plugin/Raven.SQDev.Util/bin/raven/sqdev/util/TextUtils.class differ
diff --git a/plugin/Raven.SQDev.Util/build.properties b/plugin/Raven.SQDev.Util/build.properties
index 3ca12925..cc05bf7a 100644
--- a/plugin/Raven.SQDev.Util/build.properties
+++ b/plugin/Raven.SQDev.Util/build.properties
@@ -2,5 +2,6 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- resources/
+ resources/,\
+ plugin.xml
src.includes = resources/
diff --git a/plugin/Raven.SQDev.Util/plugin.xml b/plugin/Raven.SQDev.Util/plugin.xml
new file mode 100644
index 00000000..a22a6ead
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/plugin.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/plugin/Raven.SQDev.Util/resources/icons/SQFCommandIcon.png b/plugin/Raven.SQDev.Util/resources/icons/SQFCommandIcon.png
new file mode 100644
index 00000000..c0d179ae
Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/SQFCommandIcon.png differ
diff --git a/plugin/Raven.SQDev.Util/resources/icons/sqdevExportIcon.png b/plugin/Raven.SQDev.Util/resources/icons/sqdevExportIcon.png
new file mode 100644
index 00000000..7b6662b2
Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/sqdevExportIcon.png differ
diff --git a/plugin/Raven.SQDev.Util/resources/icons/sqdevFileIcon.png b/plugin/Raven.SQDev.Util/resources/icons/sqdevFileIcon.png
new file mode 100644
index 00000000..8dbd1c58
Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/sqdevFileIcon.png differ
diff --git a/plugin/Raven.SQDev.Util/resources/icons/sqdevImportIcon.png b/plugin/Raven.SQDev.Util/resources/icons/sqdevImportIcon.png
new file mode 100644
index 00000000..ff45ad6f
Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/sqdevImportIcon.png differ
diff --git a/plugin/Raven.SQDev.Util/resources/icons/sqdevWikiIcon.png b/plugin/Raven.SQDev.Util/resources/icons/sqdevWikiIcon.png
new file mode 100644
index 00000000..45c198bb
Binary files /dev/null and b/plugin/Raven.SQDev.Util/resources/icons/sqdevWikiIcon.png differ
diff --git a/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt
new file mode 100644
index 00000000..a4ac0bf3
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/resources/sqf/SQFKeywords.txt
@@ -0,0 +1,66539 @@
+KeywordList:
+
+
+KeywordStart:
+abs
+//KeywordEnd//
+DescriptionStart:
+Absolute value of a real number
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/abs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+abs n
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_n = abs -3;
+// Returns 3$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+accTime
+//KeywordEnd//
+DescriptionStart:
+Returns the current time acceleration factor
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/accTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+accTime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_acc = accTime$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 2, 2006)
+Use setAccTime to change the time acceleration factor. Not to be confused with skipTime.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+acos
+//KeywordEnd//
+DescriptionStart:
+ArcCosine of a number, result in Degrees
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/acos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+acos x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_degrees = acos 0.5
+// returns 60$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+action
+//KeywordEnd//
+DescriptionStart:
+Make a unit to perform an action. Use the List of Actions for reference about the available actions and their syntax.
+NOTE: 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/action
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit action actionArray
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player action ["SitDown", player ];$/Code$
+%NextExample%
+$Code$_soldier action ["Eject", vehicle _soldier];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(March 27, 2015)
+This command has no effect when a dead unit is used as input.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+actionKeys
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/actionKeys
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+actionKeys userAction
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_array = actionKeys "ReloadMagazine"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Numbers
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+actionKeysImages
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/actionKeysImages
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+actionKeysImages userAction
+%NextRawSyntax%
+actionKeysImages [userAction, maxKeys]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = actionKeysImages ReloadMagazine$/Code$
+%NextExample%
+$Code$_reload = actionKeysImages [ ReloadMagazine,1] will return "R" (incl. the quotation marks!)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+actionKeysNames
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/actionKeysNames
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+actionKeysNames userAction
+%NextRawSyntax%
+actionKeysNames [userAction, maxKeys]
+%NextRawSyntax%
+actionKeysNames [userAction, maxKeys, inputDevicePriority]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = actionKeysNames "ReloadMagazine"; //"R"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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...
+%NextNote%
+(October 26, 2014)
+inputDevicePriority 'Controler' is not a spelling mistake in description.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+actionKeysNamesArray
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/actionKeysNamesArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+actionKeysNamesArray userAction
+%NextRawSyntax%
+actionKeysNamesArray [userAction, maxKeys]
+%NextRawSyntax%
+actionKeysNamesArray [userAction, maxKeys, inputDevicePriority]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$list = actionKeysNamesArray "ReloadMagazine";$/Code$
+%NextExample%
+$Code$list = actionKeysNamesArray ["ReloadMagazine", 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 26, 2014)
+inputDevicePriority 'Controler' is not a spelling mistake in description.
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+actionName
+//KeywordEnd//
+DescriptionStart:
+Returns localized name of action.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/actionName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+actionName action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$actionName ReloadMagazine$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+activateAddons
+//KeywordEnd//
+DescriptionStart:
+Activates the listed addons. The list of active addons is initialized during this function.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/activateAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+activateAddons [addon1,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$activateAddons ["BISOFP"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Jan 21, 2009)
+Be aware that "Addon1" is the cfgPatches class of the desired addon to preload.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+activatedAddons
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all activated addons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/activatedAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+activatedAddons
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_addons = activatedAddons ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+activateKey
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/activateKey
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+activateKey keyname
+//RawSyntaxEnd//
+ExampleStart:
+$Code$activateKey "Mission04Key";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+add3DENConnection
+//KeywordEnd//
+DescriptionStart:
+Connect entities together.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/add3DENConnection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+add3DENConnection [type, from, to]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$add3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
+// Set random start on marker "marker_0" for all selected objects.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the connection was made
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+add3DENEventHandler
+//KeywordEnd//
+DescriptionStart:
+Add code to be run when a Eden Editor event is triggered.
+See the list of all Eden Editor Event Handlers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/add3DENEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+add3DENEventHandler [type,code]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+add3DENLayer
+//KeywordEnd//
+DescriptionStart:
+Add an editing layer in Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/add3DENLayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+parentLayerID add3DENLayer name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myLayer = -1 add3DENLayer "Enemy Base";
+_myLayerFort = _myLayer add3DENLayer "Fortifications";
+_myLayerPatrol = _myLayer add3DENLayer "Patrols";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - layer ID
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addAction
+//KeywordEnd//
+DescriptionStart:
+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.
+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.
+Note: addAction will be ignored on dedicated server, probably because no UI.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, positionInModel, radius, radiusView, showIn3D, available, textDefault, textToolTip]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Short and sweet:
+player addAction ["A Useless Action", ""];
+player addAction [" t color='#FF0000' This Useless Action Is RED /t ", ""];
+player addAction ["Hint Hello!", { hint format ["Hello %1!", _this select 3] }, name player ];
+player addAction ["string exec", "hint 'this is also compiled'"];$/Code$
+%NextExample%
+$Code$// Actionception:
+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$
+%NextExample%
+$Code$// SQS 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$
+%NextExample%
+$Code$// TKOH example:
+_heli addAction [
+"Test",
+"myTest.sqf",
+"",
+1,
+true,
+true,
+"",
+"true",
+"display1",
+2,
+0.25,
+9,
+0,
+" img image='\HSim\UI_H\data\ui_action_autohover_ca.paa' size='1.8' shadow=0 / ",
+" br / My test tooltip"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(17:35, 24 August 2013 (CEST))
+In Arma 3 addAction does not work on animals. This is intended behavior.
+%NextNote%
+(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$
+%NextNote%
+(August 15, 2014)
+Be aware that function names are essentially just global variables for code, so you can use function names as the script parameter.
+%NextNote%
+(March 10, 2015)
+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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addBackpack
+//KeywordEnd//
+DescriptionStart:
+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 "
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addBackpack packClassName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$this addBackpack "TK_RPG_Backpack_EP1";$/Code$
+%NextExample%
+$Code$_mySoldierDude addBackpack "US_Patrol_Pack_EP1";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addBackpackCargo
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addBackpackCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle addBackpackCargo [packClassName,count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$this addBackpackCargo ["TK_RPG_Backpack_EP1",2];$/Code$
+%NextExample%
+$Code$_apc addBackpackCargo ["US_Patrol_Pack_EP1",4];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addBackpackCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Add backpack(s) to the cargo space of vehicle. MP synchronized. Classname list of available backpacks is here
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addBackpackCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle addBackpackCargoGlobal [packClassName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$this addBackpackCargoGlobal ["TK_RPG_Backpack_EP1",2];$/Code$
+%NextExample%
+$Code$_apc addBackpackCargoGlobal ["US_Patrol_Pack_EP1",4];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addBackpackGlobal
+//KeywordEnd//
+DescriptionStart:
+Adds a backpack to a unit
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addBackpackGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addBackpackGlobal backpack
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addBackpackGlobal "B_AssaultPack_khk";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCamShake
+//KeywordEnd//
+DescriptionStart:
+Creates the camera shaking effect, like when you are near an explosion
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCamShake
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addCamShake [power, duration, frequency]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addCamShake [10, 1, 25];$/Code$
+%NextExample%
+$Code$enableCamShake true ;
+addCamShake [5, 5, 25];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCuratorAddons
+//KeywordEnd//
+DescriptionStart:
+Allow curator use of given addon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCuratorAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj addCuratorAddons addons
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorObj addCuratorAddons ["A3_Armor_F_AMV","A3_Armor_F_Panther"];$/Code$
+%NextExample%
+$Code$curatorObj addCuratorAddons ["A3_Modules_F_Curator_Lightning"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCuratorCameraArea
+//KeywordEnd//
+DescriptionStart:
+Adds or changes curator camera area (depends on if ID is already used).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCuratorCameraArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj addCuratorCameraArea [cameraAreaID,position,radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCurator addCuratorCameraArea [3, position mySoldier,300];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCuratorEditableObjects
+//KeywordEnd//
+DescriptionStart:
+Register objects which can be edited by a curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCuratorEditableObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj addCuratorEditableObjects [objects,addCrew]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule addCuratorEditableObjects [[car], true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCuratorEditingArea
+//KeywordEnd//
+DescriptionStart:
+Adds or changes curator edit area (depends on if ID is already used).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCuratorEditingArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj addCuratorEditingArea [editAreaID,position,radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCurator addCuratorEditingArea [4, position player,1000];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addCuratorPoints
+//KeywordEnd//
+DescriptionStart:
+Adds or removes curator points. Points can be only in range from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addCuratorPoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj addCuratorPoints points
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule addCuratorPoints 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addEditorObject
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map addEditorObject [type,[name1,value1,...],subtype class]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addEventHandler
+//KeywordEnd//
+DescriptionStart:
+Adds an event handler to a given unit. 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.
+Every event will create an array named _this, which contains specific information about the particular event. (e.g. the "killed" EH will return an array with 2 elements: the killed unit, and the killer.)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object addEventHandler [type, command]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_EHkilledIdx = player addEventHandler ["killed", {_this exec "playerKilled.sqs"}]$/Code$
+%NextExample%
+$Code$this addEventHandler ["killed", " hint format ['Killed by %1',_this select 1]"]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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!
+//NoteEnd//
+ReturnValueStart:
+Number - The index of the currently added event handler is returned. Indices start at 0 for each unit and increment with each added event handler.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addGoggles
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addGoggles
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addGoggles type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addGoggles "G_Tactical_Clear";$/Code$
+%NextExample%
+$Code$diver addGoggles "G_Diving";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addGroupIcon
+//KeywordEnd//
+DescriptionStart:
+Add icon to a group. Returns icon ID
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addGroupIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group addGroupIcon properties
+//RawSyntaxEnd//
+ExampleStart:
+$Code$groupName addGroupIcon ["b_inf",[offsetX,ofsetY]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addHandgunItem
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addHandgunItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addHandgunItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addHandgunItem "muzzle_snds_L";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addHeadgear
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addHeadgear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addHeadgear item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addHeadgear "H_HelmetB";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItem
+//KeywordEnd//
+DescriptionStart:
+Creates new item and tries to add it into inventory. Inventory must have enough space to accomodate new item or command will fail.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit addItem "NVGoggles";
+bluforUnit assignItem "NVGoggles";
+opforUnit addItem "NVGoggles_OPFOR";
+opforUnit assignItem "NVGoggles_OPFOR";
+independentUnit addItem "NVGoggles_INDEP";
+independentUnit assignItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemCargo
+//KeywordEnd//
+DescriptionStart:
+Create new items and put them in the local weapon holder. For global variant see addItemCargoGlobal
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItemCargo [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$rearmTruckOne addItemCargo ["optic_ARCO", 10]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Create new items and store them to the weapon holder.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItemCargoGlobal [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$rearmTruckOne addItemCargoGlobal [ optic_ARCO, 10]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemPool
+//KeywordEnd//
+DescriptionStart:
+Adds count items of type name into the weapon pool (used in the campaign to transfer items to the next mission)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addItemPool ["itemName", count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addItemPool ["ItemGPS", 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemToBackpack
+//KeywordEnd//
+DescriptionStart:
+Create new item and store it to soldier's backpack. The item can also be a a weapon or a magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemToBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItemToBackpack item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addItemToBackpack "arifle_MXM_Hamr_pointer_F";$/Code$
+%NextExample%
+$Code$player addItemToBackpack "itemGPS";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemToUniform
+//KeywordEnd//
+DescriptionStart:
+Create new item and store it to soldier's uniform. The item can also be a a weapon or a magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemToUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItemToUniform item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addItemToUniform "itemGPS";$/Code$
+%NextExample%
+$Code$player addItemToUniform "hgun_Rook40_F";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addItemToVest
+//KeywordEnd//
+DescriptionStart:
+Create new item and store it to soldier's vest. The item can also be a weapon or a magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addItemToVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addItemToVest item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addItemToVest "itemGPS";$/Code$
+%NextExample%
+$Code$player addItemToVest "hgun_Rook40_F";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addLiveStats
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addLiveStats
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addLiveStats score
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addLiveStats 10$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName addMagazine magazineName
+%NextRawSyntax%
+unitName addMagazine [magazineName, ammoCount]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addMagazine "30Rnd_556x45_STANAG";$/Code$
+%NextExample%
+$Code$player addMagazine ["30Rnd_556x45_STANAG", 15];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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; ).
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazineAmmoCargo
+//KeywordEnd//
+DescriptionStart:
+Adds magazines with specified ammo count to the cargo space of a vehicle or a container.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazineAmmoCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cargospace addMagazineAmmoCargo [magazine, quantity, ammocount]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ammobox addMagazineAmmoCargo ["30Rnd_65x39_caseless_mag", 2, 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazineCargo
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazineCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName addMagazineCargo [magazineName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_truck addMagazineCargo ["M16", 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(October 24, 2009)
+Only works on clients.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazineCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Add magazines to the cargo space of vehicles, which can be taken out by infantry units.
+MP Synchronized
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazineCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName addMagazineCargoGlobal [magazineName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_truck addMagazineCargoGlobal ["M16", 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(November 7, 2011)
+Synchronized to JIP as well.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazineGlobal
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazineGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addMagazineGlobal magazineName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addMagazineGlobal "30Rnd_65x39_caseless_mag";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazinePool
+//KeywordEnd//
+DescriptionStart:
+Add magazines to the magazine pool, of which the player may choose in the following mission. Available in campaigns only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazinePool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addMagazinePool [magazineName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addMagazinePool ["M16", 20];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazines
+//KeywordEnd//
+DescriptionStart:
+Adds multiple magazines to the unit. For cargo containers use addMagazineCargoGlobal command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addMagazines [magazineName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addMagazines ["30Rnd_65x39_caseless_mag", 3];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMagazineTurret
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMagazineTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle addMagazineTurret [magazineName, turretPath, ammoCount]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tank addMagazineTurret ["SmokeLauncherMag",[0,0]];$/Code$
+%NextExample%
+$Code$_tank addMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMenu
+//KeywordEnd//
+DescriptionStart:
+Adds a new menu button. Priority is optional.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMenu
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map addMenu [text,priority]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$example$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMenuItem
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMenuItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map addMenuItem [menu or index,text,command,priority]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMissionEventHandler
+//KeywordEnd//
+DescriptionStart:
+Adds mission event handler. Every event will create an array named _this, which contains specific information about the particular event. Available mission event handlers:
+"Loaded"
+"EntityRespawned"
+"EntityKilled"
+"Ended" - Triggered when the mission is successfully ended. The variable _this, stores the type of the ending ("END1","END2", "LOSER", etc.).
+"Draw3D" - It seems "Draw3D" mission EH is connected to your primary display. It will stop firing as soon as you Alt+Tab from the game and resume when you come back (unless Arma 3 client is launched with -window -nopause params). "Draw3D" does not fire at all on a dedicated server.
+"HandleDisconnect" - Triggered when player disconnects from the game. Similar to onPlayerDisconnected event but can be stacked and contains the unit occupied by player before disconnect. Must be added on the server and triggers only on the server. For more info: HandleDisconnect
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMissionEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addMissionEventHandler [type, command]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - The index of the currently added mission event handler is returned.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMPEventHandler
+//KeywordEnd//
+DescriptionStart:
+The format of handler is [type,command]. Check scripting topic Event handlers for more information. The index of the current handler is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMPEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName addMPEventHandler [type, command]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = player addMPEventHandler ["mpkilled", {Null = _this execVM "playerkilled.sqf";}];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addMusicEventHandler
+//KeywordEnd//
+DescriptionStart:
+Add music track event handler. Returns id of the handler or -1 when failed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addMusicEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addMusicEventHandler [type, function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ehID = addMusicEventHandler ["MusicStart", { hint str _this}];$/Code$
+%NextExample%
+$Code$_ehID = addMusicEventHandler ["MusicStop", { hint str _this}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number - event handler id
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addPrimaryWeaponItem
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addPrimaryWeaponItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addPrimaryWeaponItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addPrimaryWeaponItem "muzzle_snds_H";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addPublicVariableEventHandler
+//KeywordEnd//
+DescriptionStart:
+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
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addPublicVariableEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+varName addPublicVariableEventHandler code
+%NextRawSyntax%
+varName addPublicVariableEventHandler [target, code]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"publicThis" addPublicVariableEventHandler {
+hint format [
+"%1 has been updated to: %2",
+_this select 0,
+_this select 1
+]
+};$/Code$
+%NextExample%
+$Code$// Client:
+"'^:)123BURP,+=lol" addPublicVariableEventHandler { hint ("NUTS are " + (_this select 1))};
+// Server: missionNamespace setVariable ["'^:)123BURP,+=lol", "craZZZZy"];
+publicVariable "'^:)123BURP,+=lol";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addRating
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addRating
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName addRating rating
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addRating 2000;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addResources
+//KeywordEnd//
+DescriptionStart:
+Adds resources to a team member.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addResources
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember addResources [resource1, resource2,...]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addScore
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addScore
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addScore score
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit addScore 10;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addScoreSide
+//KeywordEnd//
+DescriptionStart:
+Adds side score. This is shown in the MP score tab as the total score. MP Only. Server execution only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addScoreSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side addScoreSide value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$west addScoreSide 10;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addSecondaryWeaponItem
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addSecondaryWeaponItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addSecondaryWeaponItem item
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addSwitchableUnit
+//KeywordEnd//
+DescriptionStart:
+Add a unit into the list of units available for Team Switch.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addSwitchableUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addSwitchableUnit unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addSwitchableUnit player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Using this command and then attempting to use Team Switch in a multiplayer game will crash the instance of ArmA that is trying to team switch. (5143 beta)
+%NextNote%
+This command does not work as well as setPlayable : http://dev-heaven.net/issues/show/4461 (ArmA 2 OA v1.59)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addTeamMember
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addTeamMember
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+team addTeamMember member
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_team addTeamMember _teamMember;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addToRemainsCollector
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addToRemainsCollector
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addToRemainsCollector remains
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addToRemainsCollector [unit1, unit2, vehicle1];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addUniform
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addUniform type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit addUniform "U_B_CombatUniform_mcam";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addVehicle
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName addVehicle vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_grp addVehicle _vehicle$/Code$
+%NextExample%
+$Code$// Using on crewed vehicle:
+group tank addVehicle tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addVest
+//KeywordEnd//
+DescriptionStart:
+Create a new vest and try to link it into vest slot.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addVest type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addVest "V_TacVest_blk_POLICE";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWaypoint
+//KeywordEnd//
+DescriptionStart:
+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].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName addWaypoint [center, radius, index, name]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wp =_grp addWaypoint [ position player, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - format Waypoint - [ Group, index ]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeapon
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addWeapon weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addMagazine "30Rnd_556x45_Stanag";
+player addWeapon "BAF_L85A2_RIS_SUSAT";$/Code$
+%NextExample%
+$Code$An_2 addMagazine "100Rnd_762x51_M240";
+An_2 addWeapon "M240_veh";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponCargo
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName addWeaponCargo [weaponName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_truck addWeaponCargo [ M16,5]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(October 24, 2009)
+Only works on clients.
+%NextNote%
+(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 ).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Add weapons to the cargo space of vehicles, which can be taken out by infantry units.
+MP Synchronized
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName addWeaponCargoGlobal [weaponName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_truck addWeaponCargoGlobal[ M16,5];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(November 7, 2011)
+Synchronized to JIP as well.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponGlobal
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addWeaponGlobal weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code${
+_x addMagazineGlobal "Laserbatteries";
+_x addWeaponGlobal "Laserdesignator";
+} forEach allUnits ;$/Code$
+%NextExample%
+$Code${
+if ( typeOf _x == "O_Heli_Attack_02_black_F") then {
+_x addMagazineGlobal "38Rnd_80mm_rockets";
+_x addWeaponGlobal "rockets_Skyfire";
+};
+} forEach vehicles ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(July 7, 2015)
+If you do not remove weapon first, using this command from dedicated server will duplicate weapon.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponItem
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit addWeaponItem [weaponName, itemName]
+%NextRawSyntax%
+unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];$/Code$
+%NextExample%
+$Code$player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponPool
+//KeywordEnd//
+DescriptionStart:
+Add weapons to the weapon pool, of which the player may choose in the following mission. Available in campaigns only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+addWeaponPool [weaponName, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$addWeaponPool ["M16",5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+addWeaponTurret
+//KeywordEnd//
+DescriptionStart:
+Adds a weapon to the turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/addWeaponTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle addWeaponTurret [weaponName, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tank addWeaponTurret ["LMG_M200",[0,0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+agent
+//KeywordEnd//
+DescriptionStart:
+Return a person for a given agent.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/agent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+agent teamMember
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+agents
+//KeywordEnd//
+DescriptionStart:
+Return a list of agents in the current mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/agents
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+agents
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ agent _x moveTo position player } forEach agents ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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];
+%NextNote%
+(August 1, 2013)
+Alternatively, to get object from agent reference use agent command.
+//NoteEnd//
+ReturnValueStart:
+Array of Team Members
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+AGLToASL
+//KeywordEnd//
+DescriptionStart:
+Converts position from PositionAGL to PositionASL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/AGLToASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+AGLToASL posAGL
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerPosASL = AGLToASL ( player modelToWorld [0,0,0]);$/Code$
+%NextExample%
+$Code$_camPosASL = AGLToASL positionCameraToWorld [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+aimedAtTarget
+//KeywordEnd//
+DescriptionStart:
+Returns how good the weapon of the vehicle is aimed at the target.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/aimedAtTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle aimedAtTarget [target, weapon]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_aimingQuality = heli aimedAtTarget [target];$/Code$
+%NextExample%
+$Code$_aimingQuality = heli aimedAtTarget [target,"M197"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number - 0...1
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+aimPos
+//KeywordEnd//
+DescriptionStart:
+Returns the position of the object other units can aim to.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/aimPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+aimPos object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$aimPos player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(July 7, 2015)
+Generally returns the center position of the object (middle of the geometry, not the model's [0,0,0]).
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+airDensityRTD
+//KeywordEnd//
+DescriptionStart:
+Returns air density in given altitude
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/airDensityRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+airDensityRTD altitude
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_density = airDensityRTD 0;//Returns 1.22406$/Code$
+%NextExample%
+$Code$_density = airDensityRTD 1000;//Returns 1.11096$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+airportSide
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/airportSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+airportSide id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$airportSide 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+AISFinishHeal
+//KeywordEnd//
+DescriptionStart:
+Alternative Injury Simulation (AIS) end state. Used to tell engine that script side healing is done when using "HandleHeal" event handler.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/AISFinishHeal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+AISFinishHeal [unit, healer, healercanheal]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$AISFinishHeal [_wounded, _medic, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+alive
+//KeywordEnd//
+DescriptionStart:
+Check if given vehicle/person/building is alive (i.e. not dead or destroyed). alive objNull returns false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/alive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+alive object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?!( alive player ) : exit$/Code$
+%NextExample%
+$Code$// SQF:
+if (! alive player ) exitWith {};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean : true when alive, false when dead
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+all3DENEntities
+//KeywordEnd//
+DescriptionStart:
+Returns an array of all currently placed Eden Editor entities, including groups, waypoints, and markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/all3DENEntities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+all3DENEntities
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat str all3DENEntities ;
+/* outputs: [
+[B Alpha 2-1:1],//objects
+[B Alpha 2-1],//groups
+[164494: no shape ],//triggers
+[ No center Charlie 1-2:4],//systems
+[ [B Alpha 2-1,0] ],//waypoints
+["Hotel_Whiskey"]//markers
+]*/$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Eden Entities
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allControls
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all controls for desired existing display. Returned controls also include controls from control groups
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allControls
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allControls display
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allCtrls = allControls findDisplay 46;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Controls
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allCurators
+//KeywordEnd//
+DescriptionStart:
+Returns list of all curators.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allCurators
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allCurators
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myVariable = allCurators;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 20, 2015)
+This returns all curator logic units, not the units assigned to the logic.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allCutLayers
+//KeywordEnd//
+DescriptionStart:
+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 "".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allCutLayers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allCutLayers
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allLayers = allCutLayers ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allDead
+//KeywordEnd//
+DescriptionStart:
+Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allDead
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allDead
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ deleteVehicle _x } forEach allDead ;$/Code$
+%NextExample%
+$Code$// allAlive:
+_all = allUnits + vehicles ;
+{
+_all pushBack agent _x;
+} forEach ( agents - [ teamMemberNull ]);
+allAlive = _all - allDead ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allDeadMen
+//KeywordEnd//
+DescriptionStart:
+Return a list of dead units including agents. Dead unit might be inside vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allDeadMen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allDeadMen
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ deleteVehicle _x } forEach allDeadMen;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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]};};
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allDisplays
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all opened displays (excluding InGameUI displays for now)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allDisplays
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allDisplays
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allDisps = allDisplays ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Displays
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allGroups
+//KeywordEnd//
+DescriptionStart:
+Return a list of all groups created on the following sides east, west, resistance / independent and civilian only. Does not contain groups of sideLogic.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allGroups
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allGroups
+//RawSyntaxEnd//
+ExampleStart:
+$Code${( leader _x) sideChat "Go ! Go ! Go !"} forEach allGroups ;$/Code$
+%NextExample%
+$Code$// All groups with players:
+private _allGroupsWithPlayers = [];
+{_allGroupsWithPlayers pushBackUnique group _x} forEach allPlayers ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allMapMarkers
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allMapMarkers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allMapMarkers
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_markers = allMapMarkers ;
+// returns: ["marker1","_USER_DEFINED #2/0"]$/Code$
+%NextExample%
+$Code${
+private "_a";
+_a = toArray _x;
+_a resize 15;
+if ( toString _a == "_USER_DEFINED #") then {
+deleteMarker _x;
+}
+} forEach allMapMarkers ;$/Code$
+%NextExample%
+$Code$if (_someString in allMapMarkers ) then {
+hint (_someString + " is a valid marker name");
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 #."
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allMines
+//KeywordEnd//
+DescriptionStart:
+Returns an array of all mines in the mission
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allMines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allMines
+//RawSyntaxEnd//
+ExampleStart:
+$Code$allMines$/Code$
+%NextExample%
+$Code$( allMines select 0) mineDetectedBy west ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allMissionObjects
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allMissionObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allMissionObjects type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_airObjects = allMissionObjects "Air";$/Code$
+%NextExample%
+$Code${ deleteVehicle _x } forEach ( allMissionObjects "");$/Code$
+%NextExample%
+$Code$_allMObjects = allMissionObjects "All";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allow3DMode
+//KeywordEnd//
+DescriptionStart:
+Allow/dissallow 3D mode.,
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allow3DMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map allow3DMode bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowCrewInImmobile
+//KeywordEnd//
+DescriptionStart:
+If true, units can be in a vehicle with broken tracks/wheels.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowCrewInImmobile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle allowCrewInImmobile bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicle allowCrewInImmobile true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowCuratorLogicIgnoreAreas
+//KeywordEnd//
+DescriptionStart:
+Allows curator placing and working with modules outside of edit areas.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowCuratorLogicIgnoreAreas
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj allowCuratorLogicIgnoreAreas allow
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule allowCuratorLogicIgnoreAreas true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowDamage
+//KeywordEnd//
+DescriptionStart:
+Allow or prevent an object being damaged (or injured, or killed).
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowDamage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object allowDamage allow
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player allowDamage false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowDammage
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowDammage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object allowDammage allow
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player allowDammage false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 24, 2014)
+This command is still working in A3 1.32.127785, at least in single player. I didn't test multiplayer.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowFileOperations
+//KeywordEnd//
+DescriptionStart:
+Allow/dissallow file ops (load/save etc).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowFileOperations
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map allowFileOperations bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowFleeing
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowFleeing
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+name allowFleeing cowardice
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group1 allowFleeing 1$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowGetIn
+//KeywordEnd//
+DescriptionStart:
+Set if the units given in the list are allowed to enter vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowGetIn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitArray allowGetIn allow
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_soldier1, _soldier2] allowGetIn true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allowSprint
+//KeywordEnd//
+DescriptionStart:
+Force player to run/jog if set to false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allowSprint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit allowSprint state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player allowSprint false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allPlayers
+//KeywordEnd//
+DescriptionStart:
+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$
+NOTE: In player hosted game, the complete array of allPlayers may get delayed at the start. Use BIS_fnc_listPlayers if you need it earlier
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allPlayers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allPlayers
+//RawSyntaxEnd//
+ExampleStart:
+$Code${
+systemChat format [
+"Player %1 is %2",
+name _x,
+["dead", "alive"] select alive _x
+];
+} forEach allPlayers ;$/Code$
+%NextExample%
+$Code$_bluNums = west countSide allPlayers ;$/Code$
+%NextExample%
+$Code$// Find all human players if headless clients are used:
+_allHCs = entities "HeadlessClient_F";
+_allHPs = allPlayers - _allHCs;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allSites
+//KeywordEnd//
+DescriptionStart:
+Return all sites in map.
+This command is considered deprecated and is no longer supported
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allSites
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allSites
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allSites = allSites ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allTurrets
+//KeywordEnd//
+DescriptionStart:
+Returns array of available turret paths.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allTurrets
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allTurrets vehicle
+%NextRawSyntax%
+allTurrets [vehicle, personTurrets]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$// Return FFV turrets only:
+_FFVTurrets = allTurrets [tank, true ] - allTurrets [tank, false ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allUnits
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allUnits
+//RawSyntaxEnd//
+ExampleStart:
+$Code${_x setDamage 0.5; _x groupChat "Braaains"} forEach allUnits ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 15, 2011)
+It returns infantry outside and inside vehicles.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allUnitsUAV
+//KeywordEnd//
+DescriptionStart:
+Return a list of all UAV vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allUnitsUAV
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allUnitsUAV
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint format ["No. of UAV(s) on the map: %1", count allUnitsUAV ];$/Code$
+%NextExample%
+$Code${_x setDamage 1} forEach allUnitsUAV ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array of Objects - Array of UAV vehicles
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+allVariables
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all variables from desired namespace. Namespaces supported:
+CONTROL
+TEAM_MEMBER
+NAMESPACE
+OBJECT
+GROUP
+TASK
+LOCATION
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/allVariables
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+allVariables namespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allVars = allVariables uiNamespace ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings - array of variable names
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ammo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ammo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit ammo muzzle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_count = player ammo "M16"; //returns 30 in case of a full magazine$/Code$
+%NextExample%
+$Code$_count = player ammo "M203Muzzle";$/Code$
+%NextExample%
+$Code$_count = player ammo primaryWeapon player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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".
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+and
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/and
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+a and b
+%NextRawSyntax%
+a and b
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (( alive player ) and (_enemycount == 0)) then { hint "you win !"}$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animate
+//KeywordEnd//
+DescriptionStart:
+Activates given object animation. Animation is defined in CfgModels Animations class of model.cfg or another model config. 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName animate [animationName, phase, instant]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_building animate ["maindoor", 1];$/Code$
+%NextExample%
+$Code$_building animate ["Door_1_rot", 1, true ];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+%NextNote%
+(March 14, 2016)
+To animate bargate use animateSource :
+$Code$bargate animateSource ["Door_1_source", 1];$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animateDoor
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animateDoor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object animateDoor [doorname, phase, instant]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$Taru animateDoor ["Door_1_source", 1];$/Code$
+%NextExample%
+$Code$// Open left front door on Ifrit instantly:
+Ifrit animateDoor ["Door_LF", 1, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animateSource
+//KeywordEnd//
+DescriptionStart:
+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.
+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_source", 1];
+// model.cfg
+....
+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
+
+type = rotation ;
+source = Door_1_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_source
+
+source = user ;
+animPeriod = 2 ;
+initPhase = 0 ;
+;
+;
+...
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animateSource
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object animateSource [source, phase, instant]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$house animateSource ["Door_1_source", 1, true ];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$barGate animateSource ["Door_1_source",0]; //Close
+barGate animateSource ["Door_1_source",1]; //Open$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animationNames
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animationNames
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+animationNames object
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animationPhase
+//KeywordEnd//
+DescriptionStart:
+Return the phase of the given animation on the given object, which is set by the animate command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animationPhase
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object animationPhase animationName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_building animate ["maindoor",1];
+sleep 1;
+_p = _building animationPhase "maindoor";
+// returns 1 (if the animation speed is = 2 seconds)$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - range 0 (start point of the animation) to 1 (end point of the animation).
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animationSourcePhase
+//KeywordEnd//
+DescriptionStart:
+Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animationSourcePhase
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object animationSourcePhase source
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_phase = house animationSourcePhase "Door_1_source";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+animationState
+//KeywordEnd//
+DescriptionStart:
+Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/animationState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+animationState unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_state = animationState player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+append
+//KeywordEnd//
+DescriptionStart:
+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$
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/append
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array1 append array2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3];
+_arr append [4,5,6];
+hint str _arr; //[1,2,3,4,5,6]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+apply
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/apply
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array apply code
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 18, 2016)
+(to anyone else wondering, I took a minute to get it): This is Array.map() is JavaScript
+//NoteEnd//
+ReturnValueStart:
+Array - resulting array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+armoryPoints
+//KeywordEnd//
+DescriptionStart:
+Returns, stored in [USERNAME].ArmaXProfile, value of armoryPoints entry. If the entry doesn't exist, it returns 0.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/armoryPoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+armoryPoints
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_points = armoryPoints ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+arrayIntersect
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/arrayIntersect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array1 arrayIntersect array2
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$_arr = [1,2,3,1,2,3,1,2,3,4,5];
+hint str (_arr arrayIntersect _arr); // [1,2,3,4,5]$/Code$
+%NextExample%
+$Code$// Remove nils :
+hint str ([1,2, nil,3] arrayIntersect [1,2, nil,3]); // [1,2,3]$/Code$
+%NextExample%
+$Code$// Also works with array elements which are equal :
+hint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+asin
+//KeywordEnd//
+DescriptionStart:
+Arcsine of a number, result in Degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/asin
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+asin x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_degrees=asin 0.5
+returns 30$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ASLToAGL
+//KeywordEnd//
+DescriptionStart:
+Converts position from PositionASL to PositionAGL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ASLToAGL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ASLToAGL posASL
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerPosAGL = ASLToAGL getPosASL player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ASLToATL
+//KeywordEnd//
+DescriptionStart:
+Converts a position from PositionASL to PositionATL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ASLToATL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ASLToATL pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ASLToATL ( getPosASL player ) isEqualTo getPosATL player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+PositionATL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assert
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assert
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assert condition
+//RawSyntaxEnd//
+ExampleStart:
+$Code$assert (1 2);$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(May 15, 2010)
+Returns false, if condition is false, and returns true, if condition is true.
+//NoteEnd//
+ReturnValueStart:
+Boolean - mirrors condition
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsCargo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName assignAsCargo vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 assignAsCargo _truck
+[_soldier1] orderGetIn true$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsCargoIndex
+//KeywordEnd//
+DescriptionStart:
+Assigns the character to a specific cargo / passenger index of the given vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsCargoIndex
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+character assignAsCargoIndex [vehicle, index]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player assignAsCargoIndex [myHelicopter, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsCommander
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsCommander
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName assignAsCommander vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 assignAsCommander _tank
+[_soldier1] orderGetIn true$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsDriver
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsDriver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName assignAsDriver vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 assignAsDriver _tank
+[_soldier1] orderGetIn true$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsGunner
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsGunner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName assignAsGunner vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 assignAsGunner _tank
+[_soldier1] orderGetIn true$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignAsTurret
+//KeywordEnd//
+DescriptionStart:
+Assigns the soldier to turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignAsTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit assignAsTurret [vehicle, [turretPath]]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignCurator
+//KeywordEnd//
+DescriptionStart:
+Assign player as curator. Two players cannot act as one curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignCurator
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+player assignCurator curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player assignCurator myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedCargo
+//KeywordEnd//
+DescriptionStart:
+Returns the list of soldiers assigned to the given vehicle as a cargo.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = assignedCargo _vehicleName$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedCommander
+//KeywordEnd//
+DescriptionStart:
+Returns the soldier assigned to the given vehicle as a commander.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedCommander
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedCommander vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_commander = assignedCommander vehicleName$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedDriver
+//KeywordEnd//
+DescriptionStart:
+Returns the soldier assigned to the given vehicle as a driver.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedDriver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedDriver vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_driver= assignedDriver vehicleName$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedGunner
+//KeywordEnd//
+DescriptionStart:
+Returns the soldier assigned to the given vehicle as a gunner.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedGunner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedGunner vehicle
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedItems
+//KeywordEnd//
+DescriptionStart:
+Get array with all assigned items.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str assignedItems player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 18, 2013)
+Arma 3, version 0.70 - headgear and goggles are not present in returned array now.
+%NextNote%
+(August 22, 2013)
+For head gear use headgear, addHeadgear and removeHeadgear. For goggles use goggles, addGoggles and removeGoggles
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedTarget
+//KeywordEnd//
+DescriptionStart:
+Returns the target assigned to the vehicle/unit. To unassign the target use doWatch objNull or commandWatch objNull.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedTarget vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_target = assignedTarget _T72$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedTeam
+//KeywordEnd//
+DescriptionStart:
+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 or remoteControling another unit
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedTeam unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_team = assignedTeam player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String or Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedVehicle
+//KeywordEnd//
+DescriptionStart:
+Returns the vehicle a unit is assigned to. If no vehicle is assigned objNull is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedVehicle unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicle = assignedVehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignedVehicleRole
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignedVehicleRole
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+assignedVehicleRole unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_RoleArray = assignedVehicleRole player ;$/Code$
+%NextExample%
+$Code$// Get weapons available to player at player occupied turret:
+_weaponsTurret = vehicle player weaponsTurret ( assignedVehicleRole player select 1);$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignItem
+//KeywordEnd//
+DescriptionStart:
+Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. If the slot is occupied by another item, it gets replaced.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit assignItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit addItem "NVGoggles";
+bluforUnit assignItem "NVGoggles";
+opforUnit addItem "NVGoggles_OPFOR";
+opforUnit assignItem "NVGoggles_OPFOR";
+independentUnit addItem "NVGoggles_INDEP";
+independentUnit assignItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignTeam
+//KeywordEnd//
+DescriptionStart:
+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
+The possible team values (colours) are:
+"MAIN" - (white)
+"RED" - (red)
+"GREEN" - (green)
+"BLUE" - (blue)
+"YELLOW" - (yellow)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit assignTeam team
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier2 assignTeam "RED";$/Code$
+%NextExample%
+$Code$// Say player is the leader and there are other players in his group and you want them to know what team they are assigned to when assignedTeam is executed on their PCs:
+{
+_x assignTeam "RED";
+if ( isPlayer _x) then
+{
+[_x, "RED"] remoteExecCall ["assignTeam", _x];
+};
+}
+forEach units group player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+assignToAirport
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/assignToAirport
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+plane assignToAirport id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$plane1 assignToAirport 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+atan
+//KeywordEnd//
+DescriptionStart:
+ArcTangent of a number, result in Degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/atan
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+atan x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_degrees = atan 1; //45$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+atan2
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/atan2
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+x atan2 y
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_xy = [5,3];
+_degrees = (_xy select 0) atan2 (_xy select 1); //59.0362$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+atg
+//KeywordEnd//
+DescriptionStart:
+Equivalent to atan
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/atg
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+atg x
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ATLToASL
+//KeywordEnd//
+DescriptionStart:
+Converts a position from PositionATL to PositionASL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ATLToASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ATLToASL pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ATLToASL ( getPosATL player ) isEqualTo getPosASL player$/Code$
+%NextExample%
+$Code$_camPosASL = ATLToASL positionCameraToWorld [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attachedObject
+//KeywordEnd//
+DescriptionStart:
+Returns the object a location is attached to. If the location is unattached, then objNull is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attachedObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+attachedObject location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locAttachedObj = attachedObject myLocation;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attachedObjects
+//KeywordEnd//
+DescriptionStart:
+Returns a list of attached objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attachedObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+attachedObjects obj
+//RawSyntaxEnd//
+ExampleStart:
+$Code${
+detach _x;
+} forEach attachedObjects player ;$/Code$
+%NextExample%
+$Code$if ( count attachedObjects player == 0) then {
+hint "There are no objects attached to player";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attachedTo
+//KeywordEnd//
+DescriptionStart:
+Returns the object it is attached to.
+Returns objNull if not attached to anything.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attachedTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+attachedTo object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isNull attachedTo _obj1) then {
+hint "_obj1 is not attached to anything.";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - parent object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attachObject
+//KeywordEnd//
+DescriptionStart:
+Attaches a location to the specified object. To detach a location, attach it to objNull.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attachObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location attachObject object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation attachObject player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attachTo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attachTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object1 attachTo [object2, offset, memPoint]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player attachTo [car, [0, 0, 1] ];$/Code$
+%NextExample%
+$Code$player attachTo [tank, [0, -1, 0], "Usti hlavne"];$/Code$
+%NextExample%
+$Code$// Automatic offset:
+ammoCrate attachTo [ player ];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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..
+%NextNote%
+(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$
+%NextNote%
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+attackEnabled
+//KeywordEnd//
+DescriptionStart:
+Return whether a group's leader can issue attack commands to soldiers under his command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/attackEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+attackEnabled name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (not attackEnabled _soldier) then {_soldier setCombatMode "Careless"}$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpack
+//KeywordEnd//
+DescriptionStart:
+Returns a class of a backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpack unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_classname = backpack player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpackCargo
+//KeywordEnd//
+DescriptionStart:
+Get array with backpacks from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpackCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpackCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str backpackCargo vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Format: ["BackpackType1","BackpackType1","BackpackType2"...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpackContainer
+//KeywordEnd//
+DescriptionStart:
+Returns a cargo container of a unit's backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpackContainer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpackContainer unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str backpackContainer player ; //1a5f7900# 163944: backpack_fast.p3d$/Code$
+%NextExample%
+$Code$hint str getMagazineCargo backpackContainer player ;
+// [
+//[
+//APERSBoundingMine_Range_Mag,
+//ClaymoreDirectionalMine_Remote_Mag,
+//SLAMDirectionalMine_Wire_Mag,
+//DemoCharge_Remote_Mag
+//],[
+//3,
+//2,
+//2,
+//1
+//]
+//]$/Code$
+%NextExample%
+$Code$( backpackContainer player ) addWeaponCargoGlobal [ weapons player select 0,1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object - cargo container or NULL-object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpackItems
+//KeywordEnd//
+DescriptionStart:
+Get array with all items (of any kind, even weapons) in backpack of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpackItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpackItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$backpackItems player ;[
+"hgun_P07_F",
+"Titan_AT"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpackMagazines
+//KeywordEnd//
+DescriptionStart:
+Get array with all magazines from backpack of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpackMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpackMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$backpackMagazines player ;[
+"Titan AT Missile(1/1)[id/cr:16/0](2x)"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+backpackSpaceFor
+//KeywordEnd//
+DescriptionStart:
+Returns how much space is in backpack for given weapon or magazine
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/backpackSpaceFor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+backpack backpackSpaceFor weaponName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( backpack player ) backpackSpaceFor "m16"; // [weapons, magazines]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+behaviour
+//KeywordEnd//
+DescriptionStart:
+Return the behaviour of a unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/behaviour
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+behaviour unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier setBehaviour CARELESS
+_b = behaviour _soldier
+returns "CARELESS"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+benchmark
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/benchmark
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+benchmark
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (benchmark 2000) : setViewDistance 2000$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(14 March 2014)
+The command is obsolete, it was used in OFP to measure PC performance. In A3 it returns 2000.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+binocular
+//KeywordEnd//
+DescriptionStart:
+Returns class name of currently used binocular weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/binocular
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+binocular unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_binocs = binocular player ; //Rangefinder$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+blufor
+//KeywordEnd//
+DescriptionStart:
+Pre-defined variable for the blufor side.
+Alias for west.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/blufor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+blufor
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( side player == blufor ) then {
+hint "BLUFOR";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+boundingBox
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/boundingBox
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+boundingBox model
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_box = boundingBox _abrams$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - An array with the extreme points of the model. Format [[x1,y1,z1],[x2,y2,z2]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+boundingBoxReal
+//KeywordEnd//
+DescriptionStart:
+Returns a bounding box of given object in model coordinates space. This command is similar to boundingBox but gives more precise measurements.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/boundingBoxReal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+boundingBoxReal obj
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - An array with the extreme points of the model. Format [[x1,y1,z1],[x2,y2,z2]].
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+boundingCenter
+//KeywordEnd//
+DescriptionStart:
+Returns the position of original (loaded) center of object in model coordinates. The result is in format [x,z,y]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/boundingCenter
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+boundingCenter object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_center = boundingCenter TruckOne$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - PositionRelative
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+breakOut
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/breakOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+breakOut name
+%NextRawSyntax%
+value breakOut name
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$call {
+scopeName "main";
+call {
+123 breakOut "main"
+};
+345
+}; // call returns 123$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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
+};
+};
+$/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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+breakTo
+//KeywordEnd//
+DescriptionStart:
+Breaks block to scope named name. Nil is returned.
+Scope name can be assigned using scopeName command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/breakTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+breakTo name
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+briefingName
+//KeywordEnd//
+DescriptionStart:
+Returns the name of the current briefing/scenario name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/briefingName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+briefingName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = briefingName ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+buildingExit
+//KeywordEnd//
+DescriptionStart:
+Returns the given indexed exit in a building. The returned value is in format Position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/buildingExit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+building buildingExit index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_building buildingExit 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+buildingPos
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/buildingPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+building buildingPos index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier setPosATL (_house1 buildingPos 2);$/Code$
+%NextExample%
+$Code$_allpositions = nearestBuilding player buildingPos -1;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(February 16, 2007)
+(building buildingPos 1) will return [0,0,0] if buildingPos with this index does not exist.
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Array - a single building position in format PositionAGL or ( since Arma 3 v.155.133934 ) Array of all building positions in format PositionAGLs if index is -1
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+buttonAction
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/buttonAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+buttonAction idc
+%NextRawSyntax%
+buttonAction control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$buttonSetAction [100, {player exec reply.sqs }]
+_action = buttonAction 100
+returns {player exec "reply.sqs"}$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+buttonSetAction
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/buttonSetAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+buttonSetAction [idc, action]
+%NextRawSyntax%
+control buttonSetAction action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$buttonSetAction [100, player exec reply.sqs ]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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]; ];
+%NextNote%
+(February 15, 2016)
+This command does not overwride the buttonaction which was set via "action" in the hpp of the dialog
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cadetMode
+//KeywordEnd//
+DescriptionStart:
+Returns if the player is currently playing in cadet or veteran mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cadetMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cadetMode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? ( cadetMode ) : _AIsoldier setSkill 0.1 //sqs$/Code$
+%NextExample%
+$Code$if ( cadetMode ) then {_AIsoldier setSkill 0.1}; //sqf$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean - true when playing in cadet mode, false when playing in veteran mode
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+call
+//KeywordEnd//
+DescriptionStart:
+Executes the function string.
+The argument(s) (if any) are passed as _this. ( argument(s) are passed in an array).
+To execute a sleep function in the called code, execute it with spawn instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/call
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+argument call body
+//RawSyntaxEnd//
+ExampleStart:
+$Code$call {"x = 3"}$/Code$
+%NextExample%
+$Code$// Operation Flashpoint syntax:
+_n = 3; call format [{var%1 = 0},_n];
+// Armed Assault syntax:_n = 3; call compile format ["var%1 = 0",_n];
+// result of both syntaxes is var3 = 0$/Code$
+%NextExample%
+$Code$// Operation Flashpoint syntax:
+_fAdd = loadFile "add.sqf"
+[1,2] call _fAdd
+// Armed Assault syntax:_fAdd = compile loadFile "add.sqf"
+_result = [1,2] call _fAdd$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(February 17, 2015)
+If the code is in non-scheduled scope and contains while-do statement, the code runs only 10000 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$
+//NoteEnd//
+ReturnValueStart:
+Anything -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+callExtension
+//KeywordEnd//
+DescriptionStart:
+Execute an extension function.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/callExtension
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+extension callExtension functionWithArguments
+//RawSyntaxEnd//
+ExampleStart:
+$Code$handle = "pipes" callExtension "openPipe(pipe)";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camCommand
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camCommand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camCommand command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camCommand "manual on";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camCommit
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camCommit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camCommit time
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camCommitPrepared
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camCommitPrepared
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camCommitPrepared time
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camCommitted
+//KeywordEnd//
+DescriptionStart:
+Checks if the conduction of the last camCommit call already finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camCommitted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camCommitted camera
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camConstuctionSetParams
+//KeywordEnd//
+DescriptionStart:
+Sets construction camera parameters. To work with "camconstruct" object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camConstuctionSetParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camConstuctionSetParams [[x,y,z], radius, maxAboveLand]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camConstuctionSetParams [ getPos player, 50, 20];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camCreate
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camCreate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type camCreate position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam = "camera" camCreate ( position player )$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camDestroy
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camDestroy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camDestroy object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$camDestroy _cam;$/Code$
+%NextExample%
+$Code$_cam cameraEffect ["terminate","back"];
+camDestroy _cam;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cameraEffect
+//KeywordEnd//
+DescriptionStart:
+Switch to the given camera or object with the given effect. 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cameraEffect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera cameraEffect [name, position, rtt]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam cameraEffect ["internal", "BACK"];$/Code$
+%NextExample%
+$Code$_cam cameraEffect ["internal", "back", "rendersurface"];$/Code$
+%NextExample%
+$Code$cam = "seagull" camCreate ( player modelToWorld [0,0,100]);
+cam cameraEffect ["FIXED", "LEFT TOP"];
+cam camCommand "MANUAL ON";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cameraEffectEnableHUD
+//KeywordEnd//
+DescriptionStart:
+Enable / disable showing of in-game UI during currently active camera effect.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cameraEffectEnableHUD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cameraEffectEnableHUD enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cameraEffectEnableHUD true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 3, 2015)
+Must be executed after camCommit.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cameraInterest
+//KeywordEnd//
+DescriptionStart:
+Return camera interest for given entity, as set by setCameraInterest, or as autodetected.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cameraInterest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cameraInterest entity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$camInterest = cameraInterest myUnit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cameraOn
+//KeywordEnd//
+DescriptionStart:
+Returns the vehicle to which the camera is attached.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cameraOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cameraOn
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cameraView
+//KeywordEnd//
+DescriptionStart:
+Returns mode of active camera view. Mode is one of:
+"INTERNAL" (1st person)
+"EXTERNAL" (3rd person)
+"GUNNER" (optics / sights)
+"GROUP" (commander view)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cameraView
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cameraView
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( cameraOn == _vehicle cameraView == "External") then
+{
+_vehicle switchCamera "Internal";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+campaignConfigFile
+//KeywordEnd//
+DescriptionStart:
+Return root of campaign description.ext entries hierarchy.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/campaignConfigFile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+campaignConfigFile
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPreload
+//KeywordEnd//
+DescriptionStart:
+Preload the scene for the prepared camera. Time gives timeout, zero means no (infinite) timeout.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPreload
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPreload time
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPreload 5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPreloaded
+//KeywordEnd//
+DescriptionStart:
+Checks whether the camera has finished preloading.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPreloaded
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camPreloaded camera
+//RawSyntaxEnd//
+ExampleStart:
+$Code$?(camPreloaded _camera) : exit$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareBank
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera bank angle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareBank
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareBank bank
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareBank -0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareDir
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera heading.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareDir direction
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareDir 150$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareDive
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera dive angle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareDive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareDive dive
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareDive -0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareFocus
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareFocus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareFocus focusRange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareFocus [50, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareFov
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera field of view (zoom). The default zoom level is 0.7, 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareFov
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareFov fieldOfView
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareFov 0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareFovRange
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera field of view range for auto zooming.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareFovRange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareFovRange fovRange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareFovRange [0.1, 0.5]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPreparePos
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera position (format Position ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPreparePos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPreparePos position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPreparePos getPos player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareRelPos
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera position relative to the current position of the currect target (see camPrepareTarget ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareRelPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareRelPos position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareRelPos [10,5,-2]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camPrepareTarget
+//KeywordEnd//
+DescriptionStart:
+Prepares the camera target to a position or to a target.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camPrepareTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camPrepareTarget position
+%NextRawSyntax%
+camera camPrepareTarget target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camPrepareTarget getPos player$/Code$
+%NextExample%
+$Code$_camera camPrepareTarget player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetBank
+//KeywordEnd//
+DescriptionStart:
+Set camera bank angle.
+Does not commit changes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetBank
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetBank bank
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camSetBank -0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Apr 15, 2010)
+Command is non-functional. Instead, use fn vbs setPitchBank in VBS2, or setVectorUp or this user function in Arma.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetDir
+//KeywordEnd//
+DescriptionStart:
+Set the direction of the given camera. Needs the call of camCommit to be conducted.
+This command is completely broken
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetDir direction
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam camSetDir 90$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(June 11, 2007)
+This command does NOT work on cameras (in ArmA 1.05 at least), use SetDir instead.
+%NextNote%
+(June 11, 2013)
+This command (with new syntax) is also broken in the Arma 3 Alpha, see this feedback tracker report
+%NextNote%
+(March 1, 2016)
+Yep, still broken.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetDive
+//KeywordEnd//
+DescriptionStart:
+Set camera dive angle.
+Does not commit changes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetDive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetDive dive
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camSetDive -0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Apr 15, 2010)
+Command is non-functional. Instead, use fn vbs setPitchBank in VBS2, or setVectorUp or this user function in Arma.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetFocus
+//KeywordEnd//
+DescriptionStart:
+focusRange is in format [distance,blur]. Sets the camera focus blur. It does not automatically commit changes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetFocus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetFocus focusRange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camSetFocus [50, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetFov
+//KeywordEnd//
+DescriptionStart:
+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.7
+The angle of the field of view is atan(FOV)*2 radians when in 4:3 aspect ratio.
+Needs the call of camCommit to be conducted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetFov
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetFov level
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam camSetFov 0.7;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(October 11, 2010)
+This command requires the camera to have a target (see camSetTarget ).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetFovRange
+//KeywordEnd//
+DescriptionStart:
+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.
+Needs the call of camCommit to be conducted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetFovRange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetFovRange fovRange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam camSetFovRange [0.1, 0.7];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetPos
+//KeywordEnd//
+DescriptionStart:
+Set the position of the given camera or seagull.Needs the call of camCommit to be conducted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetPos position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam camSetPos [2300,1000,130]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetRelPos
+//KeywordEnd//
+DescriptionStart:
+Set the position of the given camera relative to its target set with camSetTarget.Needs the call of camCommit to be conducted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetRelPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetRelPos position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cam camSetTarget _car
+_cam camSetRelPos [0,10,8]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+The location of the camera will depend on the direction the target object is facing.
+The camera does not bank with the target (bug?).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camSetTarget
+//KeywordEnd//
+DescriptionStart:
+Set the target object or position where the given camera should point at. Needs the call of camCommit to be conducted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camSetTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camera camSetTarget target
+%NextRawSyntax%
+camera camSetTarget position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camera camSetTarget player ;$/Code$
+%NextExample%
+$Code$_camera camSetTarget [2540,1503,26];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camTarget
+//KeywordEnd//
+DescriptionStart:
+Returns camera's target.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camTarget camera
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+camUseNVG
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/camUseNVG
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+camUseNVG set
+//RawSyntaxEnd//
+ExampleStart:
+$Code$camUseNVG true ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canAdd
+//KeywordEnd//
+DescriptionStart:
+Checks if given object can be stored in inventory of given object or any inventory container ( uniform, vest, backpack ) of given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object canAdd item
+%NextRawSyntax%
+object canAdd [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( player canAdd "FirstAidKit") then {
+player addItem "FirstAidKit";
+} else {
+hint "Not enough space";
+};$/Code$
+%NextExample%
+$Code$if (_box canAdd "FirstAidKit") then {
+_box addWeaponCargo ["FirstAidKit", 1];
+} else {
+hint "Not enough space";
+};$/Code$
+%NextExample%
+$Code$car canAdd [ currentWeapon player, 50];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canAddItemToBackpack
+//KeywordEnd//
+DescriptionStart:
+Checks if given object can be stored into soldier's backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canAddItemToBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit canAddItemToBackpack item
+%NextRawSyntax%
+unit canAddItemToBackpack [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_item = "HandGrenade";
+_fits = player canAddItemToBackpack _item;
+if (_fits) then {
+player addItemToBackpack _item;
+} else {
+hint "no room!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canAddItemToUniform
+//KeywordEnd//
+DescriptionStart:
+Checks if given object can be stored into soldier's uniform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canAddItemToUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit canAddItemToUniform item
+%NextRawSyntax%
+unit canAddItemToUniform [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_item = "HandGrenade";
+_fits = player canAddItemToUniform _item;
+if (_fits) then {
+player addItemToUniform _item;
+} else {
+hint "no room!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canAddItemToVest
+//KeywordEnd//
+DescriptionStart:
+Checks if given object can be stored into soldier's vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canAddItemToVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit canAddItemToVest item
+%NextRawSyntax%
+unit canAddItemToVest [item, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_item = "HandGrenade";
+_fits = player canAddItemToVest _item;
+if (_fits) then {
+player addItemToVest _item;
+} else {
+hint "no room!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cancelSimpleTaskDestination
+//KeywordEnd//
+DescriptionStart:
+Cancels a simple task destination.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cancelSimpleTaskDestination
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cancelSimpleTaskDestination task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cancelSimpleTaskDestination myTask;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canFire
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+canFire unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$?!( canFire _tank) : player sideChat "Tank disabled!"$/Code$
+%NextExample%
+$Code$if ( ! ( canFire _tank)) then {
+player sideChat "Tank disabled!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(07:16, 20 January 2007 (CEST))
+true even if unit is out of ammo. Only false if gun is damaged.
+%NextNote%
+(05:20, 24 August 2008 (CEST))
+False if there is no gunner in the vehicle, regardless of damage level.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if able to fire
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canMove
+//KeywordEnd//
+DescriptionStart:
+Returns if the given vehicle is still able to move. This command checks only the damage value, not the amount of fuel!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canMove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+canMove unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS :
+?!( canMove _tank) : player sideChat "He's nailed on the ground! Now hurry!"$/Code$
+%NextExample%
+$Code$if (! canMove _tank) then
+{
+player sideChat "He's nailed on the ground! Now hurry!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canSlingLoad
+//KeywordEnd//
+DescriptionStart:
+Returns true if it is possible to sling load cargo
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canSlingLoad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle canSlingLoad cargo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_slingable = veh1 canSlingLoad veh2;$/Code$
+%NextExample%
+$Code$hint str (( vehicle player ) canSlingLoad veh1);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canStand
+//KeywordEnd//
+DescriptionStart:
+Returns if the given soldier is able to stand up.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canStand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+canStand unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS :
+?!( canStand player ) : player groupChat "My legs! They hit my legs!"$/Code$
+%NextExample%
+$Code$if (! canStand player ) then
+{
+player groupChat "My legs! They hit my legs!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+The command may return true for dead units.
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canSuspend
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canSuspend
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+canSuspend
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onEachFrame
+{
+systemChat str canSuspend ; //false
+[] spawn { hint str canSuspend }; //true
+onEachFrame {};
+};$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+canUnloadInCombat
+//KeywordEnd//
+DescriptionStart:
+Check if cargo of this vehicle want to get out when in combat.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/canUnloadInCombat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+canUnloadInCombat vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (canUnloadInCombat _vehicle) then {...};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+captive
+//KeywordEnd//
+DescriptionStart:
+Returns if the given unit is captive. "captive" means that enemies will not shoot at the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/captive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+captive object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! captive _general) then {_general setCaptive true };$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(August 3, 2006)
+Notes from before the conversion:
+Use setCaptive to make a unit captive.
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if the unit is captive, false if not
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+captiveNum
+//KeywordEnd//
+DescriptionStart:
+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 ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/captiveNum
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+captiveNum unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_captivity = captiveNum _unit;$/Code$
+%NextExample%
+$Code$_unit setCaptive 1024;
+hint str captive _unit; //true
+hint str captiveNum _unit; //1024$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - anything from 0 to value set by setCaptive alt syntax. A non zero value means captive.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+case
+//KeywordEnd//
+DescriptionStart:
+See switch do
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/case
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+catch
+//KeywordEnd//
+DescriptionStart:
+Processes code when an exception is thrown in a try block. The exception caught can be found in the _exception variable.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/catch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+try-block catch code
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cbChecked
+//KeywordEnd//
+DescriptionStart:
+Returns the current state of a checkbox (CT_CHECKBOX type 77 of Dialog Control ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cbChecked
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cbChecked control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_checked = cbChecked _myCheckBox;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cbSetChecked
+//KeywordEnd//
+DescriptionStart:
+Sets the current state of a checkbox (CT_CHECKBOX type 77 of Dialog Control ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cbSetChecked
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control cbSetChecked state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myCheckBox cbSetChecked true;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ceil
+//KeywordEnd//
+DescriptionStart:
+The ceil value of x.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ceil
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ceil x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ceil 5.25
+Result is 6$/Code$
+%NextExample%
+$Code$ceil -5.25
+Result is -5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+channelEnabled
+//KeywordEnd//
+DescriptionStart:
+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 ]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/channelEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+channelEnabled channel
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isGlobalChatEnabled = ( channelEnabled 0) select 0; // Check if user can use text on global channel$/Code$
+%NextExample%
+$Code$_isGlobalVoiceEnabled = ( channelEnabled 0) select 1; // Check if user can use the VoN on global channel$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in format [chat, VoN], where
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cheatsEnabled
+//KeywordEnd//
+DescriptionStart:
+Checks whether cheats are enabled (whether the designers' version is running).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cheatsEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cheatsEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+checkAIFeature
+//KeywordEnd//
+DescriptionStart:
+Check if given AI feature is currently enabled. Feature may be one of:
+"AwareFormationSoft", "CombatFormationSoft".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/checkAIFeature
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+checkAIFeature feature
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_featureUsed = checkAIFeature "AwareFormationSoft"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+checkVisibility
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/checkVisibility
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+[ignore, LOD] checkVisibility [beg, end]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cansee = [ objNull, "VIEW"] checkVisibility [ eyePos player, eyePos unit1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - how much end position is visible to start position in range 0..1, where 1 is fully visible.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+civilian
+//KeywordEnd//
+DescriptionStart:
+Pre-defined variable for the civilian side.
+When used in a format statement ( hint format ["%1",civilian] ), the string returned is "CIV".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/civilian
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+civilian
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?((side _unit) == civilian ) : hint "This is a civilian unit!"$/Code$
+%NextExample%
+$Code$// SQF:
+if (( side _unit) == civilian ) then {
+hint "This is a civilian unit!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+In OFP v1.96, empty vehicles, objects and dead soldiers are on side civilian.
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+className
+//KeywordEnd//
+DescriptionStart:
+Returns short name of location.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/className
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+className loc
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearAllItemsFromBackpack
+//KeywordEnd//
+DescriptionStart:
+Removes all items from the backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearAllItemsFromBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearAllItemsFromBackpack unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearBackpackCargo
+//KeywordEnd//
+DescriptionStart:
+Removes all backpacks from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearBackpackCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearBackpackCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearBackpackCargo myBox;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearBackpackCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes all backpacks from the vehicle cargo space. MP synchronized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearBackpackCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearBackpackCargoGlobal unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearBackpackCargoGlobal jeepOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearGroupIcons
+//KeywordEnd//
+DescriptionStart:
+Removes all icon from group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearGroupIcons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearGroupIcons group
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearItemCargo
+//KeywordEnd//
+DescriptionStart:
+Removes all items from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearItemCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearItemCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearItemCargo myBox;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearItemCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes all items from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearItemCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearItemCargoGlobal box
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearItemPool
+//KeywordEnd//
+DescriptionStart:
+Removes all items from ammo box (or any general weapon holder container)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearItemPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearItemPool box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearItemPool jeepOne$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearMagazineCargo
+//KeywordEnd//
+DescriptionStart:
+Remove all magazines from the given vehicle's magazine cargo space.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearMagazineCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearMagazineCargo vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearMagazineCargo _truck;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(11:02, 24 October 2009 (CEST))
+Effect is local, run on each client for global effect.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearMagazineCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes all magazines from the vehicle cargo space. MP synchronized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearMagazineCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearMagazineCargoGlobal unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearMagazineCargoGlobal jeepOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearMagazinePool
+//KeywordEnd//
+DescriptionStart:
+Remove all magazines from the magazine pool, of which the player may choose in the following missions. Available in campaigns only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearMagazinePool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearMagazinePool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearOverlay
+//KeywordEnd//
+DescriptionStart:
+Clear the current overlay.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearOverlay map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearOverlay _map,$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearRadio
+//KeywordEnd//
+DescriptionStart:
+Clean up the content of radio protocol history.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearRadio
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearRadio;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+Use $Code$ enableRadio false;$/Code$ to disable the chat.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearWeaponCargo
+//KeywordEnd//
+DescriptionStart:
+Remove all weapons from the given vehicle's weapon cargo space.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearWeaponCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearWeaponCargo vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearWeaponCargo _truck$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(October 24, 2009)
+Only works on clients.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearWeaponCargoGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes all weapons from the vehicle cargo space. MP synchronized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearWeaponCargoGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearWeaponCargoGlobal unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clearWeaponCargoGlobal jeepOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clearWeaponPool
+//KeywordEnd//
+DescriptionStart:
+Remove all weapons from the weapon pool, of which the player may choose in the following missions. Available in campaigns only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clearWeaponPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clearWeaponPool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+clientOwner
+//KeywordEnd//
+DescriptionStart:
+Returns the client's owner id
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/clientOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clientOwner
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_id = clientOwner ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+closeDialog
+//KeywordEnd//
+DescriptionStart:
+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$
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/closeDialog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+closeDialog idc
+//RawSyntaxEnd//
+ExampleStart:
+$Code$closeDialog 2;$/Code$
+%NextExample%
+$Code$#define IDC_CANCEL 2
+closeDialog IDC_CANCEL;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+closeDisplay
+//KeywordEnd//
+DescriptionStart:
+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$
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/closeDisplay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display closeDisplay exitcode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_display closeDisplay 1;$/Code$
+%NextExample%
+$Code$#define IDC_OK 1
+_display closeDisplay IDC_OK;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 18, 2015)
+closeDisplay does not instantly close the display but does it on next display simulation cycle (when display becomes active)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+closeOverlay
+//KeywordEnd//
+DescriptionStart:
+Closes the current overlay without committing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/closeOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+closeOverlay map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+collapseObjectTree
+//KeywordEnd//
+DescriptionStart:
+Collapse the object tree.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/collapseObjectTree
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+collapseObjectTree map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$collapseObjectTree _map,$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+collect3DENHistory
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/collect3DENHistory
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+collect3DENHistory code
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+combatMode
+//KeywordEnd//
+DescriptionStart:
+Returns the combat mode of the given unit. See setCombatMode for more information about combat modes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/combatMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+combatMode grp
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (( combatMode _grp1) == "BLUE") then {_grp1 setCombatMode "GREEN"};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+String -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandArtilleryFire
+//KeywordEnd//
+DescriptionStart:
+Orders a unit to reload defined magazine commence fire burst on the given position (via the radio).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandArtilleryFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit commandArtilleryFire [position, type, rounds]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$mortar1 commandArtilleryFire [[3000, 120, 1000], 8Rnd_82mm_Mo_shells, 3]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandChat
+//KeywordEnd//
+DescriptionStart:
+Types text to the command radio channel. Note: This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit commandChat chatText
+%NextRawSyntax%
+[side, string] commandChat chatText
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne commandChat "Show this text";$/Code$
+%NextExample%
+$Code$[ playerSide,"HQ"] commandChat "Do this! That's an order!";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commander
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commander
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+commander vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$(commander _tank) action [ getout,_tank]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+((crew tank)select 0) SetVehicleVarName Tankcrew0
+//NoteEnd//
+ReturnValueStart:
+Object -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandFire
+//KeywordEnd//
+DescriptionStart:
+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 ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandFire target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ESoldier1 commandFire _WSoldier1$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandFollow
+//KeywordEnd//
+DescriptionStart:
+Order the given unit to follow the given other unit (via the radio).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandFollow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandFollow followedunit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 commandFollow _soldier2$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandFSM
+//KeywordEnd//
+DescriptionStart:
+Orders a unit to process command defined by FSM file (via the radio).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandFSM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandFSM [fsm name, position, target]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne commandFSM [ move.fsm, position player, player]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandGetOut
+//KeywordEnd//
+DescriptionStart:
+Orders the unit to get out from the vehicle (via the radio).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandGetOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+commandGetOut unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$commandGetOut _unitOne$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandingMenu
+//KeywordEnd//
+DescriptionStart:
+Return the name of the player actual topmost commanding menu.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandingMenu
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+commandingMenu
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waitUntil { commandingMenu == "RscStatus"}; hint "Press 4, I'm bleeding !";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandMove
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandMove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandMove position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 commandMove ( getMarkerPos "Marker1")$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandRadio
+//KeywordEnd//
+DescriptionStart:
+Sends the message to the command radio channel. The message is defined in the description.ext file or radio protocol.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit commandRadio radioName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player commandRadio "messageOne";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 24, 2010)
+example: $Code$ _unit commandRadio "SentCmdHide";$/Code$
+radio command from CA_Dubbing config should work
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandStop
+//KeywordEnd//
+DescriptionStart:
+Order the given unit(s) to stop (via the radio). A stop command will never finish, the unit will never be ready.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandStop
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+commandStop unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$commandStop _soldier1;$/Code$
+%NextExample%
+$Code$commandStop [_soldier1, _soldier2];$/Code$
+%NextExample%
+$Code$commandStop ( units player );$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+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).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandTarget
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandTarget target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ESoldier1 commandTarget _WSoldier1;$/Code$
+%NextExample%
+$Code$player commandTarget bob;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commandWatch
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commandWatch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName commandWatch position
+%NextRawSyntax%
+unitName commandWatch target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne commandWatch markerPos "MarkerMoveOne"$/Code$
+%NextExample%
+$Code$[s1,s2] commandWatch player$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+comment
+//KeywordEnd//
+DescriptionStart:
+Define a comment.
+Mainly used in SQF Syntax, as you're able to introduce comment lines with semicolons in a SQS script.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/comment
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+comment commentMsg
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// script.sqs
+comment "This is a commented line"$/Code$
+%NextExample%
+$Code$// function.sqf
+comment "This is a commented line";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+commitOverlay
+//KeywordEnd//
+DescriptionStart:
+Commit the current overlay.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/commitOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+commitOverlay map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$commitOverlay _map,$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+compile
+//KeywordEnd//
+DescriptionStart:
+Compile expression.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/compile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+compile expression
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_string = "a = a + 1";
+_code = compile _string;
+call _code;$/Code$
+%NextExample%
+$Code$hint str compile "a = b";
+//Result: {a=b}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Code
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+compileFinal
+//KeywordEnd//
+DescriptionStart:
+Compile expression and makes it final, preventing it from:
+repeated compile or compileFinal
+removal by nil
+remote rewrite using publicVariable, publicVariableClient and publicVariableServer
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/compileFinal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+compileFinal expression
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Code
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+completedFSM
+//KeywordEnd//
+DescriptionStart:
+Check whether the given FSM completes.
+The FSM handle is the number returned by the execFSM command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/completedFSM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+completedFSM fsmHandle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_completed = completedFSM _fsmHandle;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+composeText
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text by joining the given structured or plain texts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/composeText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+composeText [text1, text2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_txt = composeText ["First line", image "data\isniper.paa", lineBreak, "Second line"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configClasses
+//KeywordEnd//
+DescriptionStart:
+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.
+The condition code passed to configClasses should only be used for simple filter expressions and nothing more
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configClasses
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+condition configClasses config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// collect all CfgVehicles configs:
+_configs = " true " configClasses ( configFile "CfgVehicles");$/Code$
+%NextExample%
+$Code$// Return all classes that can transport 10 and more soldiers:
+_transporters = " getNumber (_x 'transportSoldier') = 10" configClasses ( configFile "CfgVehicles");$/Code$
+%NextExample%
+$Code$// Return all classes that inherit from 'RscText':
+hint str (" inheritsFrom _x == ( configFile 'RscText')" configClasses configFile );$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array - Array of Configs
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configFile
+//KeywordEnd//
+DescriptionStart:
+Return root of config entries hierarchy.
+See AllInOne Config for a full config extract as example.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configFile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configFile
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isMyClassActive = isClass ( configFile / "CfgPatches" / "MyClass");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configHierarchy
+//KeywordEnd//
+DescriptionStart:
+Returns hierarchy of the given config class. Just like with inheritsFrom, only complete config classes are supported
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configHierarchy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configHierarchy configClass
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_hierarchy = configHierarchy ( configFile "CfgVehicles" "Car");
+//[bin\config.bin,bin\config.bin/CfgVehicles,bin\config.bin/CfgVehicles/Car]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - array of parent configs
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configName
+//KeywordEnd//
+DescriptionStart:
+Returns name of config entry.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configName config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = configName ( configFile "CfgVehicles");
+// Result is "CfgVehicles"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Config.
+configNull == configNull ; // true
+isNull configNull ; // true
+configNull isEqualTo configNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_config = missionNamespace getVariable ["myConfig", configNull ];$/Code$
+%NextExample%
+$Code$str configNull ; // ""$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configProperties
+//KeywordEnd//
+DescriptionStart:
+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.
+The condition code passed to configProperties should only be used for simple filter expressions and nothing more
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configProperties
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configProperties [config, condition, inherit]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_configs = configProperties [ configFile "CfgVehicles" "O_Truck_02_box_F"];$/Code$
+%NextExample%
+$Code$_configs = configProperties [ configFile "RscText", " true ", true ];$/Code$
+%NextExample%
+$Code$// Get all hitpoints of a truck:
+_hitPoints = [];
+_hitPointsCfgs = configProperties [
+configFile "CfgVehicles" "O_Truck_02_box_F" "HitPoints",
+" true ",
+true
+];
+hint str _hitPointsCfgs;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Array of Configs
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configSourceMod
+//KeywordEnd//
+DescriptionStart:
+Returns modDir of the mod that given config class was loaded from.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configSourceMod
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configSourceMod config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$configSourceMod ( configFile "CfgVehicles" "Heli_Transport_04_base_F"); //Returns "heli"$/Code$
+%NextExample%
+$Code$configSourceMod ( configFile "CfgVehicles" "Car"); //Returns "A3"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+configSourceModList
+//KeywordEnd//
+DescriptionStart:
+Returns an array of mods which modified the given config class.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/configSourceModList
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+configSourceModList config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mods = configSourceModList (configFile "CfgVehicles" "Man");
+hint str _mods; //["curator","heli"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array Array of mods
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+connectTerminalToUAV
+//KeywordEnd//
+DescriptionStart:
+Connect person with UAV terminal to UAV unit. UAV Terminal item needs to be assigned to GPS slot.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/connectTerminalToUAV
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person connectTerminalToUAV uav
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bool = player connectTerminalToUAV uav1;$/Code$
+%NextExample%
+$Code$player connectTerminalToUAV objNull ; //disconnect$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+controlNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Control. To compare non-existent objects use isNull or isEqualTo :
+controlNull == controlNull ; // false
+isNull controlNull ; // true
+controlNull isEqualTo controlNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/controlNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull controlNull ; // false$/Code$
+%NextExample%
+$Code$str controlNull ; // No control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Control
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+controlsGroupCtrl
+//KeywordEnd//
+DescriptionStart:
+Returns a child control with specified idc from a controls group
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/controlsGroupCtrl
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlgrp controlsGroupCtrl idc
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control = _controlsGroup controlsGroupCtrl 101;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Control
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+copyFromClipboard
+//KeywordEnd//
+DescriptionStart:
+Return the content of the (text) clipboard.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/copyFromClipboard
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+copyFromClipboard
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myClipboard = copyFromClipboard;
+hint myClipboard;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+copyToClipboard
+//KeywordEnd//
+DescriptionStart:
+Copy the text to the clipboard.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/copyToClipboard
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+copyToClipboard text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$copyToClipboard str _data;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 )
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+copyWaypoints
+//KeywordEnd//
+DescriptionStart:
+Copy the chain of waypoints from source to target group. The target group will start to process waypoints from the first one.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/copyWaypoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupTo copyWaypoints groupFrom
+//RawSyntaxEnd//
+ExampleStart:
+$Code$group1 copyWaypoints group2;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cos
+//KeywordEnd//
+DescriptionStart:
+Cosine of a number, argument in degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cos x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cos 60;//returns 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+count
+//KeywordEnd//
+DescriptionStart:
+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"])
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/count
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+count array
+%NextRawSyntax%
+condition count array
+%NextRawSyntax%
+count configname
+%NextRawSyntax%
+count string
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cnt = count [0,0,1,2]; // returns 4
+_cnt = count units group player ; // returns number of units in player group$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$_cnt = count ( configFile "CfgVehicles");$/Code$
+%NextExample%
+$Code$hint str count "japa is the man!"; //16$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+countEnemy
+//KeywordEnd//
+DescriptionStart:
+Count how many units in the array are considered enemy to the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/countEnemy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName countEnemy arrayName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num = player countEnemy list _triggerOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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)
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+countFriendly
+//KeywordEnd//
+DescriptionStart:
+Count how many units in the array are considered friendly to the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/countFriendly
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName countFriendly arrayName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num = player countFriendly list _triggerOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+countSide
+//KeywordEnd//
+DescriptionStart:
+Count how many units in the array belong to given side.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/countSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side countSide arrayName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num = west countSide list _triggerOne;$/Code$
+%NextExample%
+$Code$_numCivPlayable = civilian countSide playableUnits ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(July 4, 2014)
+The countSide command will also accept an array of groups. Tested in ARMA 3 v1.22
+%NextNote%
+(October 19, 2014)
+This command considers captive units as civilians, regardless of their group's side.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+countType
+//KeywordEnd//
+DescriptionStart:
+Count how many units in the array are of given type. Other than typeOf this command also works with parent classes like "Air", "Tank" and "Car". For a full class reference see Classes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/countType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type countType arrayName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_count = "Tank" countType list _triggerOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.)
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+countUnknown
+//KeywordEnd//
+DescriptionStart:
+Count how many units in the array are unknown to the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/countUnknown
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName countUnknown arrayName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num = player countUnknown list _triggerOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+create3DENComposition
+//KeywordEnd//
+DescriptionStart:
+Create new Composition. To create individual entities, use create3DENEntity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/create3DENComposition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+create3DENComposition [configPath, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myComposition = create3DENComposition [
+configFile "CfgGroups" "West" "BLU_F" "Infantry" "BUS_InfSquad",
+screenToWorld [0.5,0.5]
+];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Eden Entities
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+create3DENEntity
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/create3DENEntity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+create3DENEntity [mode, class, position, ]
+%NextRawSyntax%
+group create3DENEntity [mode, class, position, ]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$dude1 = create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];$/Code$
+%NextExample%
+$Code$dude2 = (group dude1) create3DENEntity ["Object","B_Soldier_AR_F", screenToWorld [0.5,0.5]];$/Code$
+%NextExample%
+$Code$myMarker = create3DENEntity ["Marker","mil_warning", position player ];$/Code$
+%NextExample%
+$Code$mytrigger = create3DENEntity ["Trigger","EmptyDetectorArea10x10", position player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 29, 2016)
+The classnames for triggers can be found in the config class CfgNonAIVehicles
+//NoteEnd//
+ReturnValueStart:
+Eden Entity
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createAgent
+//KeywordEnd//
+DescriptionStart:
+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".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createAgent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createAgent [type, position, markers, placement, special]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$agent = createAgent ["SoldierWB", position player, [], 0, "FORM"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createCenter
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createCenter
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createCenter side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_SideHQ = createCenter east$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createDialog
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createDialog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createDialog dialogName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = createDialog "RscDisplayGame";
+if (!_ok) then { hint "Dialog couldn't be opened!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createDiaryLink
+//KeywordEnd//
+DescriptionStart:
+Create a link to the section of diary given by subject. Record is selected based on given object (diary record,task or unit).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createDiaryLink
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createDiaryLink [subject,object,text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_link = createDiarySubject ["Group", player,"Player"]$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createDiaryRecord
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createDiaryRecord
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName createDiaryRecord [subject, text, task, state]
+%NextRawSyntax%
+unitName createDiaryRecord [subject, [title, text], task, state]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player createDiaryRecord ["Diary", ["Intel", "Enemy base is on grid marker name='enemyBase' 161170 /marker "]]$/Code$
+%NextExample%
+$Code$player createDiaryRecord ["Diary", "Information gathered. br / img image='wellDone_ca.paa' / "]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createDiarySubject
+//KeywordEnd//
+DescriptionStart:
+Create a new subject page in a log.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createDiarySubject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person createDiarySubject [subject, displayName, picture]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = player createDiarySubject ["myPage","My page"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createDisplay
+//KeywordEnd//
+DescriptionStart:
+Create child display of given display and load from "resourceName". The notable difference between createDisplay and createDialog is that if child display class has movingEnable = 1; param, 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createDisplay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+parent createDisplay resourceName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$findDisplay 46 createDisplay "RscCredits";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 23, 2014)
+Do not simply createDisplay form Arma 3's debug console, as it will crash the game. Instead use spawn scope:
+$Code$[] spawn { findDisplay 46 createDisplay "RscCredits"};$/Code$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing or ( Since Arma 3 v1.49.131653 ) Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createGearDialog
+//KeywordEnd//
+DescriptionStart:
+Opens gear dialog for given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createGearDialog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+CreateGearDialog [unit,resource]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$createGearDialog [player, "RscDisplayGear"];
+createGearDialog [player, "RscMyDisplayGear"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 12, 2015)
+Arma 3 v. 1.42 crashes when executing examples above in debug panel.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createGroup
+//KeywordEnd//
+DescriptionStart:
+Creates a new AI 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.
+In Arma 3 when last unit leaves a group, the group gets auto deleted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createGroup side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group = createGroup east$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Group
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createGuardedPoint
+//KeywordEnd//
+DescriptionStart:
+Adds a point guarded by the given side. The actual item or position guarded is determined by the following priority.
+If idStatic is not negative, the position of a static object with the given id is guarded.
+If the given vehicle is valid, the starting position of the vehicle is guarded.
+otherwise the given position is guarded.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createGuardedPoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createGuardedPoint [side, position, idStatic, vehicle]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_point = createGuardedPoint [ east, [0, 0], -1, vehicle player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing or undocumented
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createLocation
+//KeywordEnd//
+DescriptionStart:
+Creates a location of the specified class and dimensions at the specified position. Classes are defined in CfgLocationTypes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createLocation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createLocation [className, position, sizeX, sizeY]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_location = createLocation [ "NameVillage", [4035,2151,10], 100, 100];$/Code$
+%NextExample%
+$Code$_location = createLocation [ "NameVillage", [4035,2151,10], 30, 30];
+_location setText "Player town";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(12:25, 12 February 2010)
+Possible location types, see: Location Types
+For the actual name text of the location, use setText.
+//NoteEnd//
+ReturnValueStart:
+Location
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createMarker
+//KeywordEnd//
+DescriptionStart:
+Creates a new marker at the given position. The marker name has to be unique.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createMarker
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createMarker [name, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_marker1 = createMarker ["Marker1", position player ];$/Code$
+%NextExample%
+$Code$_marker2 = createMarker ["Marker2", player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+$Code$_markerstr = createMarker ["markername",[_Xpos,_Ypos]];
+_markerstr setMarkerShape "ICON";
+_markerstr setMarkerType "hd_dot";$/Code$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createMarkerLocal
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createMarkerLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createMarkerLocal [name, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_marker = createMarkerLocal ["Marker1", position player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createMenu
+//KeywordEnd//
+DescriptionStart:
+Creates a previously added menu.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createMenu
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map createMenu index
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createMine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createMine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createMine [type, position, markers, placement]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mine = createMine ["MineMine", position player, [], 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createMissionDisplay
+//KeywordEnd//
+DescriptionStart:
+Create single missions display as a child of given display. The mission dialog will be set to the directory given as an argument "root".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createMissionDisplay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display createMissionDisplay string
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ChildDisplay = _Rootdisplay createMissionDisplay "Tutorial";$/Code$
+%NextExample%
+$Code$// In Arma 3 this would create scenarios UI
+findDisplay 46 createMissionDisplay "";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createSimpleTask
+//KeywordEnd//
+DescriptionStart:
+Creates a new Task. The task effect is local, it will only exist on PC it was added.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createSimpleTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person createSimpleTask [name, parentTask ]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentTask = player createSimpleTask ["NewTask"];$/Code$
+%NextExample%
+$Code$_childTask = player createSimpleTask ["ChildTask", _currentTask];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Task - the new task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createSite
+//KeywordEnd//
+DescriptionStart:
+Create a new site.
+This command is considered deprecated and is no longer supported
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createSite
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type createSite pos
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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]
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createSoundSource
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createSoundSource
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createSoundSource [type, position, markers, placement]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soundSource = createSoundSource ["LittleDog", position player, [], 0]$/Code$
+%NextExample%
+$Code$[] spawn {
+_alarm = createSoundSource ["Sound_Alarm", position player, [], 0]; //starts alarm
+sleep 10;
+deleteVehicle _alarm; //stops alarm
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createTask
+//KeywordEnd//
+DescriptionStart:
+Create a new AI task (subtask of parentTask). Type is name of registered task type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember createTask [[type, parentTask], priority, name1, value1...nameN, valueN]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createTeam
+//KeywordEnd//
+DescriptionStart:
+Create a team and name it.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createTeam [type, name]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_team = createTeam ["USMC_Team", "Fire Team Red"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Team Member
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createTrigger
+//KeywordEnd//
+DescriptionStart:
+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 using the alternative syntax.
+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
+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 - ""
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createTrigger
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createTrigger [type, position, makeGlobal ]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createUnit
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type createUnit [ position, group, init, skill, rank]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"SoldierWB" createUnit [ position player, group player ];$/Code$
+%NextExample%
+$Code$"soldierWB" createUnit [ getMarkerPos "barracks", _groupAlpha];$/Code$
+%NextExample%
+$Code$"soldierWB" createUnit [ getMarkerPos "marker_1", _groupAlpha,"loon1 = this;
+this addWeapon 'BAF_L85A2_RIS_SUSAT'", 0.6, "corporal"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(August 13, 2006)
+To give a newly created unit a name, put "newUnit = this" in the init field.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createVehicle
+//KeywordEnd//
+DescriptionStart:
+Creates an empty object of given classname type (See Arma 3 Assets or createVehicle/vehicles )
+For a class reference from older games see Classes.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type createVehicle position
+%NextRawSyntax%
+createVehicle [type, position, markers, placement, special]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_jeep = "Jeep" createVehicle position player ;$/Code$
+%NextExample%
+$Code$_heli = "AH1Z" createVehicle getMarkerPos "hspawn";$/Code$
+%NextExample%
+$Code$_veh = createVehicle ["ah1w", position player, [], 0, "FLY"];$/Code$
+%NextExample%
+$Code$_veh = createVehicle ["2S6M_Tunguska", getMarkerPos "marker1", ["marker2","marker3"], 0, "NONE"];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(Oct 18, 2009)
+As of Arma2, this command cannot be used to create game logics (source). Use createUnit instead.
+%NextNote%
+(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.
+%NextNote%
+(January 26 2014)
+Using getPosATL should work, if otherwise you are struggling to get a the proper position coordinates.
+%NextNote%
+(September 12, 2014)
+"vehclass" createVehicle pos is the same if not faster than createVehicle ["vehclass", pos, [], 0, "NONE"]
+%NextNote%
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createVehicleCrew
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createVehicleCrew
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+createVehicleCrew vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+createVehicleLocal
+//KeywordEnd//
+DescriptionStart:
+Creates an object of the given type. Created object is not transferred through network in MP games.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/createVehicleLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type createVehicleLocal position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_lightsource = "#lightpoint" createVehicleLocal _pos;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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 ).
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+crew
+//KeywordEnd//
+DescriptionStart:
+Returns the crew (both dead and alive) of the given vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/crew
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+crew vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player in ( crew _tank);$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(3 February, 2010)
+The crew command will return crew in order [driver,gunner,commander,turrets,cargo]
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - An array with all units in the vehicle is returned.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlActivate
+//KeywordEnd//
+DescriptionStart:
+Launch actions attached to given (button based) control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlActivate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlActivate controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlActivate _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlAddEventHandler
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlAddEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlAddEventHandler [handler,function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map ctrlAddEventHandler ["draw","_this call BIS_fnc_strategicMapOpen_draw"];$/Code$
+%NextExample%
+$Code$_map ctrlAddEventHandler ["draw",{ hintSilent str _this}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 30, 2013)
+As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlAngle
+//KeywordEnd//
+DescriptionStart:
+WIP
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlAngle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlAngle control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlAutoScrollDelay
+//KeywordEnd//
+DescriptionStart:
+Returns number of seconds until auto-scroll starts. -2 if scrollbar not present.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlAutoScrollDelay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlAutoScrollDelay control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlAutoScrollRewind
+//KeywordEnd//
+DescriptionStart:
+True if auto-scroll should move back to start after it reach end.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlAutoScrollRewind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlAutoScrollRewind control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlAutoScrollSpeed
+//KeywordEnd//
+DescriptionStart:
+Returns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlAutoScrollSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlAutoScrollSpeed control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlChecked
+//KeywordEnd//
+DescriptionStart:
+Returns the current state of checkbox (CT_CHECKBOXES, Type 7).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlChecked
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlChecked control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlClassName
+//KeywordEnd//
+DescriptionStart:
+Returns the class name of a control as it defined in config.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlClassName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlClassName control
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - class name
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlCommit
+//KeywordEnd//
+DescriptionStart:
+Commit control animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlCommit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlCommit time
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlCommit 2$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 11, 2015)
+Use this command if you want to for example change the position or size of a control.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlCommitted
+//KeywordEnd//
+DescriptionStart:
+Check if the control animation is finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlCommitted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlCommitted controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_done = ctrlCommitted _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlCreate
+//KeywordEnd//
+DescriptionStart:
+Creates new control in given display.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlCreate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlCreate [class, idc, controlsGroup]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_display ctrlCreate ["RscText", 1234];$/Code$
+%NextExample%
+$Code$_map = findDisplay 46 ctrlCreate ["RscMapControl", -1];$/Code$
+%NextExample%
+$Code$myControl = findDisplay 0 ctrlCreate ["RscText", 1234, findDisplay 0 displayCtrl 2300];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 30, 2015)
+"RscListBox" created via ctrlCreate is buggy, you can only select the first seven items.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Control
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlDelete
+//KeywordEnd//
+DescriptionStart:
+Deletes given control.
+Returns whether the deletion was successful.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlDelete
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlDelete control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlDelete (( findDisplay 20000) displayCtrl 20001);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 18, 2015)
+ctrlDelete can only delete controls created with ctrlCreate. Use ctrlShow false and ctrlEnable false to disable existing controls.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlEnable
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlEnable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlEnable [idc, enable]
+%NextRawSyntax%
+controlName ctrlEnable enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlEnable [100, false]$/Code$
+%NextExample%
+$Code$_ctrl ctrlEnable false$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlEnabled
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlEnabled idc
+%NextRawSyntax%
+ctrlEnabled controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (!(ctrlEnabled 100)) then
+{
+ctrlEnable [100, true]
+};$/Code$
+%NextExample%
+$Code$_enabled = ctrlEnabled _control$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlFade
+//KeywordEnd//
+DescriptionStart:
+Returns the current fade factor of control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlFade
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlFade controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_scale = ctrlFade _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlHTMLLoaded
+//KeywordEnd//
+DescriptionStart:
+Returns true when HTML content was successfully loaded.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlHTMLLoaded
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlHTMLLoaded control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control htmlLoad "test.html";
+if (! ctrlHTMLLoaded _control) then {
+hint "Loading test.html failed!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlIDC
+//KeywordEnd//
+DescriptionStart:
+Returns control IDC.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlIDC
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlIDC control
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlIDD
+//KeywordEnd//
+DescriptionStart:
+Returns display IDD.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlIDD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlIDD display
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlIDD findDisplay 46; //46$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapAnimAdd
+//KeywordEnd//
+DescriptionStart:
+Adds the next frame to the map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapAnimAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map ctrlMapAnimAdd [time, zoom, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map ctrlMapAnimAdd [1, 0.1, getMarkerPos "anim1"];
+ctrlMapAnimCommit _map;$/Code$
+%NextExample%
+$Code$// Center map on player:
+_ctrl ctrlMapAnimAdd [0, 0.05, player ];
+ctrlMapAnimCommit _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(17:11, 9 March 2010)
+Besides Position2D, both Objects and Position3D work.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapAnimClear
+//KeywordEnd//
+DescriptionStart:
+Clears the map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapAnimClear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlMapAnimClear controlName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapAnimCommit
+//KeywordEnd//
+DescriptionStart:
+Plays the map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapAnimCommit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlMapAnimCommit controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Center map on player:
+_ctrl ctrlMapAnimAdd [0, 0.05, player ];
+ctrlMapAnimCommit _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapAnimDone
+//KeywordEnd//
+DescriptionStart:
+Checks whether the map animation has finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapAnimDone
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlMapAnimDone controlName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapCursor
+//KeywordEnd//
+DescriptionStart:
+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. 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapCursor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlMapCursor [defaultCursor, newCursor]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map ctrlMapCursor ["Track", "Arrow"];$/Code$
+%NextExample%
+$Code$uiNamespace setVariable ["_map", findDisplay 12 displayCtrl 51];
+( uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];$/Code$
+%NextExample%
+$Code$findDisplay 12 displayCtrl 51 ctrlMapCursor ["Scroll", "Wait"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapMouseOver
+//KeywordEnd//
+DescriptionStart:
+Returns description of map sign mouse cursor is over.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapMouseOver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlMapMouseOver control
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapScale
+//KeywordEnd//
+DescriptionStart:
+Returns the current scale of given map control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapScale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlMapScale ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control = ( findDisplay 12) displayCtrl 51; //Arma 3
+_scale = ctrlMapScale _control; //returns number from 1 to 0.001$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapScreenToWorld
+//KeywordEnd//
+DescriptionStart:
+Convert screen coordinates in map to world coordinates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapScreenToWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map ctrlMapScreenToWorld [x, y]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_WorldCoord = _Control ctrlMapScreenToWorld _ScreenCoord$/Code$
+%NextExample%
+$Code$_WorldCoord = _Control ctrlMapScreenToWorld [_x,_y]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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;
+%NextNote%
+(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.
+%NextNote%
+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).
+//NoteEnd//
+ReturnValueStart:
+Array ( Position2D Format)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlMapWorldToScreen
+//KeywordEnd//
+DescriptionStart:
+Transfers a map control world position to screen coordinates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlMapWorldToScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlMapWorldToScreen position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenCoord = _control ctrlMapWorldToScreen _worldCoord;$/Code$
+%NextExample%
+$Code$_screenCoord = _control ctrlMapWorldToScreen position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array ( Position2D Format)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlModel
+//KeywordEnd//
+DescriptionStart:
+Returns model used in 3D Dialog Control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlModel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlModel control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_model = ctrlModel _control3D;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - model path
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlModelDirAndUp
+//KeywordEnd//
+DescriptionStart:
+Returns vectorDir and vectorUp of the model used in 3D Dialog Control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlModelDirAndUp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlModelDirAndUp control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vectorDirAndUp = ctrlModelDirAndUp _control3D;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format [ vectorDir, vectorUp ]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlModelScale
+//KeywordEnd//
+DescriptionStart:
+Returns 3D control model scale
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlModelScale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlModelScale control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentScale = ctrlModelScale _ctrl3D;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlParent
+//KeywordEnd//
+DescriptionStart:
+Returns container of the given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlParent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlParent controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_display = ctrlParent _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlPosition
+//KeywordEnd//
+DescriptionStart:
+Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlPosition controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = ctrlPosition _control;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlRemoveAllEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Remove all event handlers from the given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlRemoveAllEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlRemoveAllEventHandlers handlerName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlRemoveEventHandler
+//KeywordEnd//
+DescriptionStart:
+Remove a given event handler from the given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlRemoveEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlRemoveEventHandler [handler name,id]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map ctrlRemoveEventHandler ["Draw", _id];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlScale
+//KeywordEnd//
+DescriptionStart:
+Returns the current scale of the control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlScale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlScale controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_scale = ctrlScale _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetActiveColor
+//KeywordEnd//
+DescriptionStart:
+Sets text color of given control when control is selected.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetActiveColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetActiveColor color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetActiveColor [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetAutoScrollDelay
+//KeywordEnd//
+DescriptionStart:
+Sets number of second before auto-scroll starts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetAutoScrollDelay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetAutoScrollDelay delay
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetAutoScrollRewind
+//KeywordEnd//
+DescriptionStart:
+Defines if scroll should rewind when auto-scroll reach end.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetAutoScrollRewind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetAutoScrollRewind delay
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetAutoScrollSpeed
+//KeywordEnd//
+DescriptionStart:
+Sets number of second required to scroll to next line. If speed smaller than 0,auto-scroll is disabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetAutoScrollSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetAutoScrollSpeed speed
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetBackgroundColor
+//KeywordEnd//
+DescriptionStart:
+Sets background color of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetBackgroundColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetBackgroundColor color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetBackgroundColor [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetChecked
+//KeywordEnd//
+DescriptionStart:
+Sets checked state of checkbox (CT_CHECKBOXES, Type 7).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetChecked
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetChecked bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetEventHandler
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetEventHandler [handlerName, function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control [[ctrlSetEventHandler]] [ KeyDown, ]$/Code$
+%NextExample%
+$Code$(_display displayCtrl 108) [[ctrlSetEventHandler]] [ LBSelChanged, ['ListChange',_this] call FireEvents ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFade
+//KeywordEnd//
+DescriptionStart:
+Sets wanted transparency for control animation. Requires ctrlCommit to commit changes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFade
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFade fade
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFade 1;
+_control ctrlCommit 5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFocus
+//KeywordEnd//
+DescriptionStart:
+Set the input focus on given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFocus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlSetFocus controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlSetFocus _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFont
+//KeywordEnd//
+DescriptionStart:
+Sets the font of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFont
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFont fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFont TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH1
+//KeywordEnd//
+DescriptionStart:
+Sets H1 font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH1
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH1 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH1 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH1B
+//KeywordEnd//
+DescriptionStart:
+Sets H1 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH1B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH1B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH1B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH2
+//KeywordEnd//
+DescriptionStart:
+Sets H2 font of given HTML control
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH2
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH2 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH2 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH2B
+//KeywordEnd//
+DescriptionStart:
+Sets H2 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH2B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH2B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH2B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH3
+//KeywordEnd//
+DescriptionStart:
+Sets H3 font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH3
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH3 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH3 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH3B
+//KeywordEnd//
+DescriptionStart:
+Sets H3 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH3B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH3B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH3B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH4
+//KeywordEnd//
+DescriptionStart:
+Sets H4 font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH4
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH4 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH4 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH4B
+//KeywordEnd//
+DescriptionStart:
+Sets H4 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH4B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH4B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH4B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH5
+//KeywordEnd//
+DescriptionStart:
+Sets H5 font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH5
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH5 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH5 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH5B
+//KeywordEnd//
+DescriptionStart:
+Sets H5 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH5B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH5B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH5B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH6
+//KeywordEnd//
+DescriptionStart:
+Sets H6 font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH6
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH6 fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH6 TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontH6B
+//KeywordEnd//
+DescriptionStart:
+Sets H6 bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontH6B
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontH6B fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontH6B TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeight
+//KeywordEnd//
+DescriptionStart:
+Sets the font size of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeight height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeight 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH1
+//KeywordEnd//
+DescriptionStart:
+Sets H1 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH1
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH1 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH1 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH2
+//KeywordEnd//
+DescriptionStart:
+Sets H2 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH2
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH2 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH2 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH3
+//KeywordEnd//
+DescriptionStart:
+Sets H3 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH3
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH3 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH3 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH4
+//KeywordEnd//
+DescriptionStart:
+Sets H3 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH4
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH4 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH4 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH5
+//KeywordEnd//
+DescriptionStart:
+Sets H5 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH5
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH5 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH5 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontHeightH6
+//KeywordEnd//
+DescriptionStart:
+Sets H6 font size of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontHeightH6
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontHeightH6 height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontHeightH6 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontP
+//KeywordEnd//
+DescriptionStart:
+Sets P font of given HTML control or its size.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontP
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetFontP fontOrSize
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontP "TahomaB"$/Code$
+%NextExample%
+$Code$_control ctrlSetFontP 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetFontPB
+//KeywordEnd//
+DescriptionStart:
+Sets P bold font of given HTML control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetFontPB
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetFontPB fontName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetFontPB TahomaB$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetForegroundColor
+//KeywordEnd//
+DescriptionStart:
+Sets foreground color of given control. Color is in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetForegroundColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetForegroundColor color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetForegroundColor [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetModel
+//KeywordEnd//
+DescriptionStart:
+Sets model for 3D Dialog Control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetModel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetModel model
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control3D ctrlSetModel "\a3\Ui_f\objects\Compass.p3d";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetModelDirAndUp
+//KeywordEnd//
+DescriptionStart:
+Sets orientation of 3D control model. It is similar to setVectorDirAndUp command for an object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetModelDirAndUp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetModelDirAndUp [dir, up]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl3D ctrlSetModelDirAndUp [[0,1,0],[0,0,1]]; //default orientation$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetModelScale
+//KeywordEnd//
+DescriptionStart:
+Sets 3D control model scale
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetModelScale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetModelScale scale
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl3D ctrlModelScale 1.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetPosition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+controlName ctrlSetPosition [x, y]
+%NextRawSyntax%
+controlName ctrlSetPosition [x, y, w, h]
+%NextRawSyntax%
+controlName ctrlSetPosition [x, y, z]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Move control:
+_control2D ctrlSetPosition [0, 0];
+_control2D ctrlCommit 0;$/Code$
+%NextExample%
+$Code$// Move control and resize:
+_control2D ctrlSetPosition [0, 0, 1, 1];
+_control2D ctrlCommit 0;$/Code$
+%NextExample%
+$Code$_control3D ctrlSetPosition [0.5, 1, 0.5]; //centered and 1m away from screen$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(January 27, 2007)
+IMPORTANT
+You have to use ctrlCommit command to apply this effect(Arma v1.02.5103GER)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetScale
+//KeywordEnd//
+DescriptionStart:
+Sets wanted scale for control animation. Top left corner remains same. This command requires ctrlCommit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetScale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetScale scale
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetScale 0.5;
+_control ctrlCommit 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetStructuredText
+//KeywordEnd//
+DescriptionStart:
+Set the structured text which will be displayed in structured text control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetStructuredText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetStructuredText structuredText
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetStructuredText parseText "First line img image=data\isniper.paa / br / Second line"$/Code$
+%NextExample%
+$Code$// To center text vertically, add extra line above with blank space ( #160;) 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' #160; /t br/ t size='1' align='center' Button Text #160; #160; /t ";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetText
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlSetText [idc, text]
+%NextRawSyntax%
+controlName ctrlSetText text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlSetText [100, Hello world ];//for Dialogs$/Code$
+%NextExample%
+$Code$_control ctrlSetText Hello world. ;// for Displays$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(16 Nov, 2011)
+For ArmA2 textured "shortcut" buttons (type = 16), you must use the alternative syntax.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetTextColor
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetTextColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetTextColor color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetTextColor [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 10, 2015)
+When used on a RscProgress control, remove the configured "texture" first. The two will affect each other. - Arma 3 v1.42
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetTooltip
+//KeywordEnd//
+DescriptionStart:
+Sets tooltip text of given control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetTooltip
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control ctrlSetTooltip text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetTooltip tooltip$/Code$
+%NextExample%
+$Code$(( findDisplay 10000) displayCtrl 10001) ctrlSetTooltip "ThisIsAGoodTip"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetTooltipColorBox
+//KeywordEnd//
+DescriptionStart:
+Sets tooltip border color of given control. Color is in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetTooltipColorBox
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetTooltipColorBox color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetTooltipColorBox [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetTooltipColorShade
+//KeywordEnd//
+DescriptionStart:
+Sets tooltip background color of given control. Color is in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetTooltipColorShade
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetTooltipColorShade color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetTooltipColorShade [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlSetTooltipColorText
+//KeywordEnd//
+DescriptionStart:
+Sets tooltip text color of given control. Color is in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlSetTooltipColorText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display ctrlSetTooltipColorText color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control ctrlSetTooltipColorText [1, 0, 0, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlShow
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlShow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlShow [idc, show]
+%NextRawSyntax%
+controlName ctrlShow show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ctrlShow [100, false ];$/Code$
+%NextExample%
+$Code$_control ctrlShow false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlShown
+//KeywordEnd//
+DescriptionStart:
+Returns whether given control is shown.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlShown
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlShown controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = ctrlShown _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlText
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlText idc
+%NextRawSyntax%
+ctrlText controlName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = ctrlText 100$/Code$
+%NextExample%
+$Code$_text = ctrlText _control$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - The text or image path is returned, dependent on the control type.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlTextHeight
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlTextHeight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlTextHeight control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_h = ctrlTextHeight _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlType
+//KeywordEnd//
+DescriptionStart:
+Returns number representing the type of control, which is also defined by type property in config. For more information see Dialog Control
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlType control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_type = ctrlType _rscEdit; // 2$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ctrlVisible
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ctrlVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ctrlVisible idc
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = ctrlVisible 100;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if the control is shown, false if not
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorAddons
+//KeywordEnd//
+DescriptionStart:
+Returns list of addons allowed to given curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorAddons curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_addons = curatorAddons myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorCamera
+//KeywordEnd//
+DescriptionStart:
+Returns curator camera object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorCamera
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorCameraArea
+//KeywordEnd//
+DescriptionStart:
+Returns all curator camera areas.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorCameraArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorCameraArea curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_camArea = curatorCameraArea myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorCameraAreaCeiling
+//KeywordEnd//
+DescriptionStart:
+Returns ceiling height for curator camera.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorCameraAreaCeiling
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorCameraAreaCeiling curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorCameraAreCeiling BIS_curatorUnit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorCoef
+//KeywordEnd//
+DescriptionStart:
+Returns current coeficient setting.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj curatorCoef action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule curatorCoef "Place"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorEditableObjects
+//KeywordEnd//
+DescriptionStart:
+Returns all editable objects which belong to a curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorEditableObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorEditableObjects curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objects = curatorEditableObjects myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorEditingArea
+//KeywordEnd//
+DescriptionStart:
+Returns all curator editing areas.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorEditingArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorEditingArea curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_editingArea = curatorEditingArea myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorEditingAreaType
+//KeywordEnd//
+DescriptionStart:
+Returns type of edit areas assigned to curator (blacklist/whitelist).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorEditingAreaType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorEditingAreaType obj
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorMouseOver
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorMouseOver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorMouseOver
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mouseOver = curatorMouseOver ;
+// possible return value:[
+"OBJECT",
+3594ab00# 164218: apc_wheeled_01_cannon_f.p3d
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorPoints
+//KeywordEnd//
+DescriptionStart:
+Returns number of points that curator have. Points can be only in range from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorPoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorPoints curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_points = curatorPoints myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorRegisteredObjects
+//KeywordEnd//
+DescriptionStart:
+Returns array with all objects that has curator registered and their settings.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorRegisteredObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorRegisteredObjects curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorSelected
+//KeywordEnd//
+DescriptionStart:
+Returns list of all curator selected items.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorSelected
+//RawSyntaxEnd//
+ExampleStart:
+$Code$selectedItems = curatorSelected ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [[Objects],[Groups],[Waypoints],[Markers]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+curatorWaypointCost
+//KeywordEnd//
+DescriptionStart:
+Return current price for placing waypoints (curator specific).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/curatorWaypointCost
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorWaypointCost curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+current3DENOperation
+//KeywordEnd//
+DescriptionStart:
+Returns the currently performed editing operation in Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/current3DENOperation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+current3DENOperation
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (current3DENOperation == "Move") then { hint "Moving";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - operation name. Can be one of following:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentChannel
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentChannel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentChannel
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_selected = currentChannel ; // 3 - for example for the Group$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentCommand
+//KeywordEnd//
+DescriptionStart:
+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",
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentCommand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentCommand vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentMagazine
+//KeywordEnd//
+DescriptionStart:
+Returns class name of currently loaded vehicle's magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentMagazine vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_magazineClass = currentMagazine player ;//Example: "30Rnd_545x39_AK"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 4, 2010)
+See notes of currentWeapon.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentMagazineDetail
+//KeywordEnd//
+DescriptionStart:
+Returns description of vehicle's currently loaded magazine, its ammo count (current/default) and its id.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentMagazineDetail
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentMagazineDetail vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentMagazineDetail = currentMagazineDetail player ; //"6.5mm 30Rnd STANAG Mag(30/30)[id:0]"$/Code$
+%NextExample%
+$Code$_currentMagazineDetail = currentMagazineDetail Mi_48; //"30mm HE Shells(250/250)[id:21]"$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentMagazineDetailTurret
+//KeywordEnd//
+DescriptionStart:
+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 "".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentMagazineDetailTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle currentMagazineDetailTurret [turret path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_magazineDetail = MBT_Kuma currentMagazineDetailTurret [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentMagazineTurret
+//KeywordEnd//
+DescriptionStart:
+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 "".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentMagazineTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle currentMagazineTurret [turret path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_magazine = MBT_Kuma currentMagazineTurret [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentMuzzle
+//KeywordEnd//
+DescriptionStart:
+Returns current muzzle of unit's weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentMuzzle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentMuzzle gunner
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_muzzle = currentMuzzle player ;$/Code$
+%NextExample%
+$Code$_muzzle = currentMuzzle gunner vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 13, 2014)
+The return value is not always STRING. As of Arma 3 v1.36, this command returns 0 (NUMBER) for vehicles.
+E.g. when inside a vehicle:
+currentMuzzle vehicle player
+- 0
+//NoteEnd//
+ReturnValueStart:
+String - current muzzle
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentNamespace
+//KeywordEnd//
+DescriptionStart:
+Returns current global namespace the script runs in.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( currentNamespace isEqualTo uiNamespace ) then { hint "This is uiNamespace"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Namespace
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentTask
+//KeywordEnd//
+DescriptionStart:
+Return current task of given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentTask person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentTasks
+//KeywordEnd//
+DescriptionStart:
+List all uncompleted tasks.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentTasks
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentTasks member
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerTasks = currentTasks teamMember player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentThrowable
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentThrowable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentThrowable player
+//RawSyntaxEnd//
+ExampleStart:
+$Code$currentThrowable player ; //["SmokeShellGreen","SmokeShellGreenMuzzle",[1.00002e+007,0]]$/Code$
+%NextExample%
+$Code$_ct = currentThrowable player ; //["HandGrenade","HandGrenadeMuzzle",[1e+007,0]]
+_id = (_ct select 2 select 0) - 10000000; //18$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format [ magazineClassName, muzzleClassName, [ magazineId, creatorId ]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentVisionMode
+//KeywordEnd//
+DescriptionStart:
+Returns current vision mode of unit's weapon.
+0 - daytime
+1 - night vision
+2 - FLIR
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentVisionMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentVisionMode unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currMode = currentVisionMode gunner _tank$/Code$
+%NextExample%
+$Code$if ( currentVisionMode player == 1) then
+{
+hint "nightvision active";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentWaypoint
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentWaypoint groupName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = currentWaypoint group player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentWeapon
+//KeywordEnd//
+DescriptionStart:
+Return the name of the currently selected weapon (on the primary turret for vehicles).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentWeapon vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weaponClass = currentWeapon (vehicle player);//Example: M16A2GL$/Code$
+%NextExample%
+$Code$_weaponClass = currentWeapon player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(July 15, 2009)
+It seems it's not working in 1.02 for other unit than player.
+%NextNote%
+(May 4, 2010)
+This works for vehicles providing there is a gunner
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentWeaponMode
+//KeywordEnd//
+DescriptionStart:
+Returns current weapon mode of unit's weapon. Result can be: "Single", "Burst", "FullAuto", "manual", "player"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentWeaponMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentWeaponMode gunner
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weaponMode = currentWeaponMode player ;$/Code$
+%NextExample%
+$Code$_weaponMode = currentWeaponMode gunner vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentWeaponTurret
+//KeywordEnd//
+DescriptionStart:
+Returns the name of the currently selected weapon on specified turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentWeaponTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle currentWeaponTurret [turret path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weapon = MBT_Kuma currentWeaponTurret [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+currentZeroing
+//KeywordEnd//
+DescriptionStart:
+Returns zeroing of unit's weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/currentZeroing
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+currentZeroing gunner
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_zeroing = currentZeroing player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cursorObject
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cursorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cursorObject
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str [ getModelInfo cursorObject, typeOf cursorObject ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cursorTarget
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cursorTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cursorTarget
+//RawSyntaxEnd//
+ExampleStart:
+$Code$alive cursorTarget ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+%NextNote%
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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).
+%NextNote%
+(February 5, 2016)
+CursorTarget will return a Null_Object for all of thus which have a disabled simulation (_object enableSimulation false).
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+customChat
+//KeywordEnd//
+DescriptionStart:
+Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with radioChannelCreate command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/customChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit customChat [channel, message]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit customChat [1, "Hi, I am a custom chat message"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+customRadio
+//KeywordEnd//
+DescriptionStart:
+Sends the message to the custom radio channel. The message is defined in the description.ext file or radio protocol.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/customRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit customRadio [channel, message]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne customRadio [1, "WordEnemy"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cutFadeOut
+//KeywordEnd//
+DescriptionStart:
+Terminates the effect in the given layer by fading it out according to the given duration. If maned 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cutFadeOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+layer cutFadeOut duration
+%NextRawSyntax%
+layerName cutFadeOut duration
+//RawSyntaxEnd//
+ExampleStart:
+$Code$0 cutFadeOut 2;$/Code$
+%NextExample%
+$Code$_layer = "layer1" cutFadeOut 2;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cutObj
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cutObj
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cutObj [class, type, speed, showOnMap]
+%NextRawSyntax%
+layer cutObj [class, type, speed, showOnMap]
+%NextRawSyntax%
+layerName cutObj [class, type, speed, showOnMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cutObj ["TVSet", "PLAIN"];
+cutObj ["TVSet", "PLAIN", 2]$/Code$
+%NextExample%
+$Code$2 cutObj ["Sphere", "PLAIN"];$/Code$
+%NextExample%
+$Code$_layer = "layer1" cutObj ["BISLogo", "PLAIN"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cutRsc
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cutRsc
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cutRsc [class, type, speed, showOnMap]
+%NextRawSyntax%
+layer cutRsc [class, type, speed, showOnMap]
+%NextRawSyntax%
+layerName cutRsc [class, type, speed, showOnMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cutRsc ["binocular", "PLAIN"];
+cutRsc ["binocular", "PLAIN", 2];
+cutRsc ["binocular", "PLAIN", 2, false ];$/Code$
+%NextExample%
+$Code$2 cutRsc ["binocular", "PLAIN", 2];$/Code$
+%NextExample%
+$Code$_layer = "layer1" cutRsc ["binocular", "PLAIN", 2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+cutText
+//KeywordEnd//
+DescriptionStart:
+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"];
+For greater efficiency and ease of modability it is recommended to use named layers available with alternative syntax since Arma 3 v1.57.134673
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/cutText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+cutText [text, type, speed, showOnMap]
+%NextRawSyntax%
+layer cutText [text, type, speed, showOnMap]
+%NextRawSyntax%
+layerName cutText [text, type, speed, showOnMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cutText ["","BLACK OUT"];
+cutText ["Hello World!","PLAIN",2];$/Code$
+%NextExample%
+$Code$2 cutText ["Hello World!","PLAIN",2];$/Code$
+%NextExample%
+$Code$_layer1 = "normal" cutText ["In The Centre","PLAIN"];
+_layer2 = "down" cutText ["At The Bottom","PLAIN DOWN"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+damage
+//KeywordEnd//
+DescriptionStart:
+Return the damage value of an object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/damage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+damage object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (( damage player ) 0.1) : player groupChat "I'm hurt! Medic!"$/Code$
+%NextExample%
+$Code$if (( damage player ) 0.1) then {
+player groupChat "I'm hurt! Medic!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+date
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/date
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+date
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_now = date ; // _now = [2014,10,30,2,30] (Oct. 30th, 2:30am)
+_hour = _now select 3;
+_min = _now select 4;$/Code$
+%NextExample%
+$Code$if ( date select 3 = 19) then { // 7pm
+hintSilent "ah, Arma sunset"; //...cue bad guys
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [year, month, day, hour, minute]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+dateToNumber
+//KeywordEnd//
+DescriptionStart:
+Convert a date to a float number, based on Jan 1st 00:00:00 = 0 and Dec 31st 23:59:59 = 1. The same day and time in leap year will be different after 28th of February and 23:59 on 31st of December will be 1.00274
+This is how this command works. The 365 days of the year are presented in range 0...1. So each day will be:
+1 / 365 = 0.00273973
+In a leap year there are 366 days, so the range will increase by 1 day:
+1 / 365 * 366 = 1.00274
+In short, in a normal year the command returns in range 0...1 in a leap year it will return in range 0...1.00274
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/dateToNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+dateToNumber date
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_float = dateToNumber [2035,7,6,12,0]; //0.510959$/Code$
+%NextExample%
+$Code$dateToNumber date ; //will return float number for the current date.$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+daytime
+//KeywordEnd//
+DescriptionStart:
+Returns the current ingame time in hours.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/daytime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+daytime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$; assumme it is 16:30
+_daytime = daytime
+returns 16.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deActivateKey
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deActivateKey
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deActivateKey keyname
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deActivateKey Mission04Key$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+debriefingText
+//KeywordEnd//
+DescriptionStart:
+Returns debriefing text.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/debriefingText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+debriefingText end
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_deathText = debriefingText "endDeath";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+debugFSM
+//KeywordEnd//
+DescriptionStart:
+Dump (something about FSM) to debugging output. This command is (assumed to be) non-functional in the retail version.
+Non functional in retail
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/debugFSM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+FSMhandle debugFSM true
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+debugLog
+//KeywordEnd//
+DescriptionStart:
+Dump argument type and value to debugging output.
+This command is non-functional in the retail version
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/debugLog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+debugLog anything
+//RawSyntaxEnd//
+ExampleStart:
+$Code$debugLog player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+default
+//KeywordEnd//
+DescriptionStart:
+See switch do.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/default
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+deg
+//KeywordEnd//
+DescriptionStart:
+Convert a number from Radians to Degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deg
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deg x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_degrees= deg 1
+returns 57.295$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+delete3DENEntities
+//KeywordEnd//
+DescriptionStart:
+Delete given entities in Eden Editor, including anything that can be placed in editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/delete3DENEntities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+delete3DENEntities entities
+//RawSyntaxEnd//
+ExampleStart:
+$Code$delete3DENEntities [ all3DENEntities select 0,"Hotel_Whiskey"];
+// removes all units and marker named "Hotel_Whiskey"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteAt
+//KeywordEnd//
+DescriptionStart:
+Removes array element at the given index and returns removed element (modifies the original array, just like resize or set ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteAt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array deleteAt index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3];
+_rem = _arr deleteAt 1;
+hint str [_rem, _arr]; //[2,[1,3]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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)
+%NextNote%
+(May 21, 2015)
+Array "shift" implementation using deleteAt, alternative to BIS_fnc_arrayShift
+$Code$KK_fnc_shift = {
+_this deleteAt 0
+};
+// Example
+arr = [1,2,3];
+arr call KK_fnc_shift; //return of function is 1, arr now is [2,3]$/Code$
+%NextNote%
+(May 21, 2015)
+Array "pop" implementation using deleteAt, alternative to BIS_fnc_arrayPop
+$Code$KK_fnc_pop = {
+_this deleteAt ( count _this - 1)
+};
+// Example
+arr = [1,2,3];
+arr call KK_fnc_pop; //return of function is 3, arr now is [1,2]$/Code$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Anything - returns the deleted element
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteCenter
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteCenter
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteCenter side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteCenter east$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteCollection
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteCollection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteCollection object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteCollection unitName;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 20, 2014)
+In Arma 3 deleteCollection is alias for hideObject
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteEditorObject
+//KeywordEnd//
+DescriptionStart:
+Delete the editor object. Requires all editor object links to be removed prior.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map deleteEditorObject object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteGroup
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteGroup group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteGroup _groupname$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteIdentity
+//KeywordEnd//
+DescriptionStart:
+Delete an identity (created with saveIdentity ) from the campaign's progress file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteIdentity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteIdentity identityName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$?deleteIdentity playerIdentity :hint Delete ok$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteLocation
+//KeywordEnd//
+DescriptionStart:
+Delete a location.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteLocation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteLocation location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteLocation myLocation$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteMarker
+//KeywordEnd//
+DescriptionStart:
+Destroys the given marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteMarker
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteMarker name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteMarker "Marker1"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteMarkerLocal
+//KeywordEnd//
+DescriptionStart:
+Destroys the given marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteMarkerLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteMarkerLocal markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteMarkerLocal "Marker1"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteRange
+//KeywordEnd//
+DescriptionStart:
+Removes a range of array elements from the given array (modifies the original array, just like resize or set ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteRange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array deleteRange [from, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3,4,5,6];
+_arr deleteRange [1,4];
+hint str _arr; //[1,6]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteResources
+//KeywordEnd//
+DescriptionStart:
+Delete (unregister) resources of the team member. Resources are deleted in the order they were added. Case insensitive.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteResources
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember deleteResources [resource1, resource2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$teamMember _agent deleteResources ["Legs"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteSite
+//KeywordEnd//
+DescriptionStart:
+Removes the site.
+This command is considered deprecated and is no longer supported
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteSite
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteSite site
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteStatus
+//KeywordEnd//
+DescriptionStart:
+Delete a status (created with saveStatus ) from the campaign's progress file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteStatus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteStatus statusName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? deleteStatus playerStatus : saved status gone from campaign$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteTeam
+//KeywordEnd//
+DescriptionStart:
+Destroy given team.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteTeam team
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteTeam _team;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteVehicle
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteVehicle object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteVehicle _house1;$/Code$
+%NextExample%
+$Code${
+_x action ["Eject", car];
+} forEach crew car;
+deleteVehicle car;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteVehicleCrew
+//KeywordEnd//
+DescriptionStart:
+Deletes a member of the crew of a vehicle. Human players cannot be deleted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteVehicleCrew
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle deleteVehicleCrew unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$heli deleteVehicleCrew driver heli;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(April 10, 2015)
+Using the following code will remove ALL crew from the given vehicle.
+$Code${_myvehicle deleteVehicleCrew _x} forEach crew _myvehicle;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+deleteWaypoint
+//KeywordEnd//
+DescriptionStart:
+Removes the specified waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/deleteWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+deleteWaypoint [group, index]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$deleteWaypoint [_grp, 2]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+%NextNote%
+(13 Mar, 2012)
+You can also remove all waypoints with
+$Code$ deleteWaypoint [_group, all];$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+detach
+//KeywordEnd//
+DescriptionStart:
+Detaches previously attached with attachTo object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/detach
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+detach object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$obj1 attachTo [player];
+detach obj1;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+detectedMines
+//KeywordEnd//
+DescriptionStart:
+Returns an array of all mines detected by a given side
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/detectedMines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+detectedMines side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$detectedMines west ;$/Code$
+%NextExample%
+$Code$detectedMines side player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_activeMissionFSMs
+//KeywordEnd//
+DescriptionStart:
+Returns array with active Mission FSMs.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_activeMissionFSMs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_activeMissionFSMs
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ systemChat str _x} forEach diag_activeMissionFSMs ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+[[name, state, timeout],...]: Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_activeSQFScripts
+//KeywordEnd//
+DescriptionStart:
+Returns an array with active SQFs.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_activeSQFScripts
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_activeSQFScripts
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ systemChat str _x} forEach diag_activeSQFScripts ;$/Code$
+%NextExample%
+$Code$[] spawn {
+hint str diag_activeSQFScripts ; //[[" spawn ","",true,1]]
+};
+[] spawn {
+scriptName "myScript";
+hint str diag_activeSQFScripts ; //[["myScript","",true,1]]
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+[[scriptName, fileName, isRunning, currentLine],...]: Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_activeSQSScripts
+//KeywordEnd//
+DescriptionStart:
+Returns array with active SQSs.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_activeSQSScripts
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_activeSQSScripts
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ systemChat str _x} forEach diag_activeSQSScripts ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+[[name, fileName, isRunning, currentLine],...]: Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_captureFrame
+//KeywordEnd//
+DescriptionStart:
+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.
+Note : Only available in specific builds. See Performance Profiling for details.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_captureFrame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_captureFrame frame
+//RawSyntaxEnd//
+ExampleStart:
+$Code$diag_captureFrame 1; //capture the first frame after command execution$/Code$
+%NextExample%
+$Code$diag_captureFrame 24; //capture 24th frame after command execution$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_captureSlowFrame
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_captureSlowFrame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_captureSlowFrame [section, threshold]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$diag_captureSlowFrame ['total',0.003];$/Code$
+%NextExample%
+$Code$diag_captureSlowFrame ['memAl', 0.0001];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_codePerformance
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_codePerformance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_codePerformance [code, arguments, cycles]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_result = diag_codePerformance [{ private _a = 123;}, 0, 10000];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format [duration, cycles], where:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_fps
+//KeywordEnd//
+DescriptionStart:
+Returns average framerate calculated over last 16 frames.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_fps
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_fps
+//RawSyntaxEnd//
+ExampleStart:
+$Code$diag_log diag_fps;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_fpsMin
+//KeywordEnd//
+DescriptionStart:
+Returns minimal framerate. Calculated from the longest frame over last 16 frames.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_fpsMin
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_fpsMin
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_minfps = diag_fpsMin ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_frameNo
+//KeywordEnd//
+DescriptionStart:
+Returns number of frame currently displayed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_frameNo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_frameNo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currFrameNo = diag_frameNo ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_log
+//KeywordEnd//
+DescriptionStart:
+Dumps the argument's value to the report file. Each call creates a new line in the file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_log
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_log anything
+//RawSyntaxEnd//
+ExampleStart:
+$Code$diag_log time ;$/Code$
+%NextExample%
+$Code$diag_log format ["%1, %2", player, time ];$/Code$
+%NextExample%
+$Code$_arr = [1, "foo", player, "bar"];
+{
+diag_log _x ;
+} forEach _arr; // Creates 4 entries on 4 lines$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+ARMA2 crashes when diag_log is fed more than 1019 characters. diag_log might also crash ARMA2 when fed with less characters in some cases.
+Note: This issue has been fixed in patch 1.04
+%NextNote%
+To dump a string without "" use text.
+%NextNote%
+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.
+%NextNote%
+For convenience and easy debugging use my free debug_console extension which will automatically launch a console window with your output. It can also write to file. To install drop debug_console.dll into main Arma directory.
+Examples:
+$Code$"debug_console" callExtension "Default grey"; //default output
+"debug_console" callExtension "Red line without timestamp #1000"; //red with timestamp
+"debug_console" callExtension "Yellow line with timestamp #1101"; //yellow without timestamp
+"debug_console" callExtension "Writing to file ~0001"; //output to file
+"debug_console" callExtension ""; //empty line
+"debug_console" callExtension "A"; //beep sound
+"debug_console" callExtension "C"; //clear console
+"debug_console" callExtension "X"; //close console$/Code$
+Direct Download: http://killzonekid.com/pub/debug_console_v3.0.zip
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_logSlowFrame
+//KeywordEnd//
+DescriptionStart:
+Log all frames, where section takes longer than the threshold (in seconds).
+Note : Only available in specific builds. See Performance Profiling for details.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_logSlowFrame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_logSlowFrame [section, threshold]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$diag_logSlowFrame ['total',0.3]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diag_tickTime
+//KeywordEnd//
+DescriptionStart:
+Real time spent from the start of the game. Expressed in fractions of second. Resolution of 1 tick is 1 ms.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diag_tickTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+diag_tickTime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_start = diag_tickTime ;
+//code
+_stop = diag_tickTime ;
+diag_log format ["%1",_stop - _start];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(8 Sept, 2010)
+In Arma 2 Operation Arrowhead 1.54.0.72888 this returns the time in seconds since the game was started.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+dialog
+//KeywordEnd//
+DescriptionStart:
+Tests whether any user dialog is open.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/dialog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+dialog
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! dialog ) then { createDialog "Dialog1";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+diarySubjectExists
+//KeywordEnd//
+DescriptionStart:
+Checks whether given subject is present in the diary of given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/diarySubjectExists
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person diarySubjectExists name
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+didJIP
+//KeywordEnd//
+DescriptionStart:
+Checks if the current client Joined In Progress.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/didJIP
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+didJIP
+//RawSyntaxEnd//
+ExampleStart:
+$Code$clientDidJIP = didJIP ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 23, 2016)
+reports false in CfgFunctions with preInit = 1; even when the client joined in progress.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+didJIPOwner
+//KeywordEnd//
+DescriptionStart:
+Checks if the current owner of supplied Object Joined In Progress. Server execution only. On clients returns false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/didJIPOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+didJIPOwner object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ownerDidJip = didJIPOwner tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+difficulty
+//KeywordEnd//
+DescriptionStart:
+Returns high-level selected difficulty mode.
+Returned value will be: 0 (Recruit), 1 (Regular), 2 (Veteran) or 3 (Elite)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/difficulty
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+difficulty
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = difficulty ;$/Code$
+%NextExample%
+$Code$// The command returns the index of selected difficulty as they appear in CfgDifficulties
+hint str difficulty ; //Result: 4$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+difficultyEnabled
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/difficultyEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+difficultyEnabled flagName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( difficultyEnabled "armor");$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+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
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+difficultyEnabledRTD
+//KeywordEnd//
+DescriptionStart:
+Returns true if rotorlib simulation is enabled. Forcing by mission is included
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/difficultyEnabledRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+difficultyEnabledRTD
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rtdOn = difficultyEnabledRTD$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+difficultyOption
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/difficultyOption
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+difficultyOption optionName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( difficultyOption "friendlyTags");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+direction
+//KeywordEnd//
+DescriptionStart:
+Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/direction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+direction object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setDir 90;
+_d = direction player ;//returns 90$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+directSay
+//KeywordEnd//
+DescriptionStart:
+Sends the message to the direct channel. The message is defined in the description.ext file, radio protocol, or a kbAddTopic.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/directSay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit directSay radioName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableAI
+//KeywordEnd//
+DescriptionStart:
+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.
+"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.
+Note: All effects of disableAI command are cancelled after mission save or load.
+Note: In OFP is no way to undo this command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableAI
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName disableAI section
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 disableAI "AUTOTARGET";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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).
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableCollisionWith
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableCollisionWith
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle disableCollisionWith vehicle
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableConversation
+//KeywordEnd//
+DescriptionStart:
+Disable the ability to talk to other people.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableConversation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName disableConversation disable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player disableConversation true$/Code$
+%NextExample%
+$Code$soldier1 disableConversation true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(August 18, 2010)
+My previous note is incorrect now, you can use disableConversation and still use the group radio, at least in A2:OA !
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableDebriefingStats
+//KeywordEnd//
+DescriptionStart:
+Disable debrifing score table.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableDebriefingStats
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+disableDebriefingStats
+//RawSyntaxEnd//
+ExampleStart:
+$Code$disableDebriefingStats ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableNVGEquipment
+//KeywordEnd//
+DescriptionStart:
+Enables or disables transport NV (Night Vision). To disable TI (Thermal Imaging) use disableTIEquipment.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableNVGEquipment
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle disableNVGEquipment state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myTank disableNVGEquipment true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableRemoteSensors
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableRemoteSensors
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+disableRemoteSensors state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$disableRemoteSensors false;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableSerialization
+//KeywordEnd//
+DescriptionStart:
+Disable saving of script containing this command. After this script can work with the data types which do not support serialization (UI types).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableSerialization
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+disableSerialization
+//RawSyntaxEnd//
+ExampleStart:
+$Code$disableSerialization ;
+_display = findDisplay 46;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableTIEquipment
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableTIEquipment
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle disableTIEquipment state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player disableTIEquipment true ;$/Code$
+%NextExample%
+$Code$_tank disableTIEquipment true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableUAVConnectability
+//KeywordEnd//
+DescriptionStart:
+Disables unit's AV terminal(s) connecting to UAV.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableUAVConnectability
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object disableUAVConnectability [uav, checkAllItems]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit disableUAVConnectability [uav,true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+disableUserInput
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/disableUserInput
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+disableUserInput state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$disableUserInput true
+; cutscene
+disableUserInput false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayAddEventHandler
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayAddEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display displayAddEventHandler [eventName, code]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$moduleName_keyDownEHId = ( findDisplay 46) displayAddEventHandler ["KeyDown", " hint str _this;"];$/Code$
+%NextExample%
+$Code$moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler ["KeyDown", { hint str _this}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 30, 2013)
+As of Arma 3 v1.05.111658 ctrlAddEventHandler and displayAddEventHandler support script Code in addition to String [1]
+%NextNote%
+(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$
+%NextNote%
+(April 20, 2015)
+If you have a file in which there are variables defined that provide the key that triggers the eventHandler or variables that need to be passed onto the function called by the eventHandler if the if condition inside returns true, use this:
+$Code$_myCuteLittleEvent = (findDisplay 46) displayAddEventHandler ["KeyDown", "
+_keyDown = _this select 1;
+if (_keyDown == " + str (_key) + ") then { [" + str _arguments + "] call fnc_myFunction };
+false;
+"];$/Code$
+where _key is a var containing the DIK keycode for the key you want to use and where _arguments is a variable that contains stuff that needs to be passed onto fnc_myFunction.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayCtrl
+//KeywordEnd//
+DescriptionStart:
+Return child control with specified idc.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayCtrl
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display displayCtrl idc
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ChildControl = _ParentDisplay displayCtrl 101;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Control
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Display. To compare non-existent displays use isNull or isEqualTo :
+displayNull == displayNull ; // false
+isNull displayNull ; // true
+displayNull isEqualTo displayNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+displayNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull displayNull ; // false$/Code$
+%NextExample%
+$Code$str displayNull ; // No display$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayParent
+//KeywordEnd//
+DescriptionStart:
+Returns parent display of the given display.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayParent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+displayParent display
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_display = displayParent findDisplay 49; // Display #46$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayRemoveAllEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Remove all even handlers from the given display.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayRemoveAllEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display displayRemoveAllEventHandlers handlerName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displayRemoveEventHandler
+//KeywordEnd//
+DescriptionStart:
+Remove a given event handler from the given display.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displayRemoveEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display displayRemoveEventHandler [handler name,id]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+displaySetEventHandler
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/displaySetEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+display displaySetEventHandler [handlerName, function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control displaySetEventHandler [ KeyDown, ]$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Nov 25, 2009)
+Always use displayAddEventHandler instead, as DSetEH overwrites other (peoples') DEH.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+dissolveTeam
+//KeywordEnd//
+DescriptionStart:
+Dissolves the given team. All members become members of the main team. Possible team values are: "RED", "GREEN", "BLUE" or "YELLOW".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/dissolveTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+dissolveTeam teamColor
+//RawSyntaxEnd//
+ExampleStart:
+$Code$dissolveTeam RED$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+distance
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/distance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+param1 distance param2
+%NextRawSyntax%
+location1 distance location2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_meters = player distance _object;$/Code$
+%NextExample%
+$Code$_meters = player distance [1,2,3];$/Code$
+%NextExample%
+$Code$_meters = [1,2,3] distance [4,5,6];$/Code$
+%NextExample%
+$Code$_meters = position player distance nearestLocation [ position player, "hill"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(Feb 14, 2007)
+distance to position3D (array) doesnt work with OFP, only objects
+Armed Assault:
+position3D (array) and object works
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number - Distance in meters or 1e10 if distance cannot be calculated
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+distance2D
+//KeywordEnd//
+DescriptionStart:
+Returns a 2D distance ( distance projected to X,Y plane) in meters between two Objects or two Positions or Object and Position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/distance2D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+param1 distance2D param2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_meters = player distance2D heli;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - Distance in meters or 1e10 if distance cannot be calculated
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+distanceSqr
+//KeywordEnd//
+DescriptionStart:
+Computes the squared distance between two objects or positions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/distanceSqr
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+var1 distanceSqr var2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player distanceSqr (leader player)$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+distributionRegion
+//KeywordEnd//
+DescriptionStart:
+Returns the numerical index for the distribution region of this copy of ArmA.
+1 - US
+2 - Rest of the world
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/distributionRegion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+distributionRegion
+//RawSyntaxEnd//
+ExampleStart:
+$Code$distributionRegion == 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+do
+//KeywordEnd//
+DescriptionStart:
+Executes code. Used as part of construct, such as while, with, for and switch. The code is always executed in missionNamespace.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/do
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+do3DENAction
+//KeywordEnd//
+DescriptionStart:
+Performs given Eden Editor action.
+See the list of all actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/do3DENAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+do3DENAction action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$do3DENAction "MissionSave";// saves the scenario$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doArtilleryFire
+//KeywordEnd//
+DescriptionStart:
+Orders a unit to reload defined magazine commence fire burst on the given position (silently).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doArtilleryFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit doArtilleryFire [position, type, rounds]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$mortar1 doArtilleryFire [[3000, 120, 1000], 8Rnd_82mm_Mo_shells, 3]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doFire
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName doFire target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ESoldier1 doFire _WSoldier1;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(August 3, 2006)
+Notes from before the conversion:
+It is often helpful to use doTarget first.
+%NextNote%
+(March 25, 2007)
+A unit will not execute this command when his behaviour is set to "careless".
+%NextNote%
+(Feb 18, 2012)
+Board dofire not working in arma2 1.11. an entity he throws he shoots not only.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doFollow
+//KeywordEnd//
+DescriptionStart:
+Order the given unit(s) to follow the given other unit or vehicle eg (without radio messages).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doFollow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName doFollow unitName2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 doFollow _soldier2$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+These commands ( doFollow or commandFollow ) work only if the two units are in the same group.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doFSM
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doFSM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit doFSM [fsmName, position, target]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne doFSM ["move.fsm", position player, player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doGetOut
+//KeywordEnd//
+DescriptionStart:
+Orders a unit or units to get out from the vehicle (silently).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doGetOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+doGetOut unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$doGetOut _unitOne$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doMove
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doMove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit doMove position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 doMove ( position _officer);$/Code$
+%NextExample%
+$Code$this doMove ( getMarkerPos "Marker1");$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doorPhase
+//KeywordEnd//
+DescriptionStart:
+Return animation phase of door on vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doorPhase
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object doorPhase door
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_phase = heli doorPhase "door_L";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doStop
+//KeywordEnd//
+DescriptionStart:
+Order the given unit(s) to stop (without radio messages). DoStop'ed units leave the groups formation. It will prevent the unit from moving around with their group (or formation leader), while still beeing able to turn around and even move to a new position if they see fit. They 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
+.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doStop
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+doStop unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$doStop _soldier1;$/Code$
+%NextExample%
+$Code$doStop [_soldier1, _soldier2];$/Code$
+%NextExample%
+$Code$doStop ( units player );$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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".
+%NextNote%
+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).
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doTarget
+//KeywordEnd//
+DescriptionStart:
+Order the given unit(s) to target the given target (without radio messages).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit doTarget target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ESoldier1 doTarget _WSoldier1$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+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)
+%NextNote%
+(July 2, 2015)
+To expand on ceeeb's note, commandWatch objNull will also unassign target;
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+doWatch
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/doWatch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit doWatch position
+%NextRawSyntax%
+unit doWatch target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne doWatch markerPos "MarkerMoveOne"
+// The unit named "soldierOne" will watch the position where the marker "MarkerMoveOne" is placed.$/Code$
+%NextExample%
+$Code$_soldierOne doWatch _eastSoldier
+// The unit named "soldierOne" will watch the unit named "eastSoldier".$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(April 18, 2015)
+Also controls where a vehicle gunner aims.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawArrow
+//KeywordEnd//
+DescriptionStart:
+Draws a single line arrow on the map.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawArrow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawArrow [from, to, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
+{
+_this select 0 drawArrow [
+player, player getRelPos [100, 0], [1,0,0,1]
+];
+}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 7, 2015)
+Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawEllipse
+//KeywordEnd//
+DescriptionStart:
+Draws an ellipse on the map. Just like with marker or trigger area, negative a and b will result in hexagon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawEllipse
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawEllipse [c, a, b, angle, color, fill]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 7, 2015)
+Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawIcon
+//KeywordEnd//
+DescriptionStart:
+Draw an icon on the map. The command needs to be called every frame, preferably with "Draw" control event handler ctrlAddEventHandler.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawIcon [texture, color, position, width, height, angle, text, shadow, textSize, font, align]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 03, 2013)
+Support of paremeters textSize, font and align is in the game since Arma 3 version 0.72.
+%NextNote%
+(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).
+%NextNote%
+(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.
+%NextNote%
+(July 7, 2015)
+Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawIcon3D
+//KeywordEnd//
+DescriptionStart:
+Draws an ingame icon at a given position. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawIcon3D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+drawIcon3D [texture, color, pos, width, height, angle, text, shadow, textSize, font, textAlign, drawSideArrows]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Icon and text:
+onEachFrame {
+drawIcon3D ["targetIcon.paa", [1,1,1,1], getPos cursorTarget, 1, 1, 45, "Target", 1, 0.05, "TahomaB"];
+};$/Code$
+%NextExample%
+$Code$// Just text:
+addMissionEventHandler ["Draw3D", {
+drawIcon3D ["", [1,0,0,1], position cursorTarget, 0, 0, 0, "Target", 1, 0.05, "PuristaMedium"];
+}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(September 23, 2013)
+This command works well with addon textures, however getting it to display mission textures is a bit tricky. Follow this guide :
+%NextNote%
+(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$
+%NextNote%
+(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)
+%NextNote%
+(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;
+};
+}];
+$/Code$
+%NextNote%
+(April 11, 2015)
+Doesn't work when showHUD false, textAlign is broken, drawSideArrows will turn if angle is not 0 [1]
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawLine
+//KeywordEnd//
+DescriptionStart:
+Draw a line on the map.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawLine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawLine [position1, position2, color]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawLine3D
+//KeywordEnd//
+DescriptionStart:
+Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawLine3D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+drawLine3D [start, end, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onEachFrame {
+drawLine3D [ getPos player, getPos cursorTarget, [1,1,1,1]];
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(February 18, 2015)
+Visible through fog and past draw distance.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawLink
+//KeywordEnd//
+DescriptionStart:
+The editor will draw a line between the two specified editor objects. Line type can be LINE or ARROW.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawLink
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawLink [from,to,param type,line type,color]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawLocation
+//KeywordEnd//
+DescriptionStart:
+Unknown effect.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawLocation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control drawLocation location
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Unknown
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawPolygon
+//KeywordEnd//
+DescriptionStart:
+Draws given polygon on the given map control with given color. The polygon must consist of at least 3 points.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawPolygon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawPolygon [polygon, color]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drawRectangle
+//KeywordEnd//
+DescriptionStart:
+Draws a rectangle on the map.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drawRectangle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map drawRectangle [c, a, b, angle, color, fill]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl drawRectangle [
+getPos player,
+20,
+20,
+getDir player,
+[0,0,1,1],
+""
+];$/Code$
+%NextExample%
+$Code$_ctrl drawRectangle [
+player,
+10,
+20,
+getDir player,
+[1,1,1,1],
+"#(rgb,8,8,3)color(1,0,0,1)"
+];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+driver
+//KeywordEnd//
+DescriptionStart:
+Returns the driver of a vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/driver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+driver vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( driver _tank) action ["getout", _tank];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+drop
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/drop
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+drop array
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+east
+//KeywordEnd//
+DescriptionStart:
+Pre-defined variable for the eastern side.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/east
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+east
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?((side _unit) == east ) : hint "This is a eastern unit!"$/Code$
+%NextExample%
+$Code$// SQF:
+if (( side _unit) == east ) then {
+hint "This is a eastern unit!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 17, 2007)
+In ArmA terms OPFOR, BLUFOR, Independents and Civilians are used in the front end UI.
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+echo
+//KeywordEnd//
+DescriptionStart:
+Sends any text into the debugger console or the logfile. Present in internal version only, not working in the retail version.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/echo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+echo text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$echo Text in logfile$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+edit3DENMissionAttributes
+//KeywordEnd//
+DescriptionStart:
+Open a window with scenario attribute in given section.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/edit3DENMissionAttributes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+edit3DENMissionAttributes section
+//RawSyntaxEnd//
+ExampleStart:
+$Code$edit3DENMissionAttributes "Multiplayer";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+editObject
+//KeywordEnd//
+DescriptionStart:
+Show the edit object dialog for the given object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/editObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map editObject object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+editorSetEventHandler
+//KeywordEnd//
+DescriptionStart:
+Sets given event handler of given editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/editorSetEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map editorSetEventHandler [handler name,function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map editorSetEventHandler ["SelectObject",""]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+effectiveCommander
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/effectiveCommander
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+effectiveCommander vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_commander = effectiveCommander tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - commander unit
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+else
+//KeywordEnd//
+DescriptionStart:
+Executes else code when if condition returns false
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/else
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+emptyPositions
+//KeywordEnd//
+DescriptionStart:
+Returns the number of given positions in the vehicle.
+Positions can be "Commander", "Driver", "Gunner" or "Cargo"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/emptyPositions
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle emptyPositions position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_freeCargoPositions = vehicle player emptyPositions "cargo";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableAI
+//KeywordEnd//
+DescriptionStart:
+Enables parts of the AI behavior that was disabled by disableAI.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableAI
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit enableAI skilltype
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne enableAI Move$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableAIFeature
+//KeywordEnd//
+DescriptionStart:
+Enable/disable given AI feature. Feature may be one of:
+"AwareFormationSoft", "CombatFormationSoft".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableAIFeature
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+feature enableAIFeature enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"AwareFormationSoft" enableAIFeature true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableAttack
+//KeywordEnd//
+DescriptionStart:
+Set if leader can issue attack commands to the soldiers in his group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableAttack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group enableAttack enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group1 enableAttack true$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableCamShake
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableCamShake
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableCamShake value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableCamShake false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableCaustics
+//KeywordEnd//
+DescriptionStart:
+Enable/disable caustics drawing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableCaustics
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableCaustics bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableChannel
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableChannel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+channel enableChannel enable
+%NextRawSyntax%
+channel enableChannel [chat, VoN] since Arma 3 v1.59.135661
+//RawSyntaxEnd//
+ExampleStart:
+$Code$0 enableChannel false ; // Disable user ability to send voice and text on global channel$/Code$
+%NextExample%
+$Code$0 enableChannel [ true, false ]; // Enable user ability to send text but disable voice on global channel$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableCollisionWith
+//KeywordEnd//
+DescriptionStart:
+Enable collision between vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableCollisionWith
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle enableCollisionWith vehicle
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableCopilot
+//KeywordEnd//
+DescriptionStart:
+Enables copilot actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableCopilot
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle enableCopilot enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! isCopilotEnabled myHeli) then {
+myHeli enableCopilot true ;
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableDebriefingStats
+//KeywordEnd//
+DescriptionStart:
+enable debrifing score table.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableDebriefingStats
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableDebriefingStats [left, top, width, height]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableDebriefingStats [0.1, 0.1, 0.8, 0.8];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableDiagLegend
+//KeywordEnd//
+DescriptionStart:
+Enable or disable the legend for diagnotic.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableDiagLegend
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableDiagLegend Bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableDiagLegend false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableEndDialog
+//KeywordEnd//
+DescriptionStart:
+Enables the execution of a custom camera sequence after the players death, coded in the script onPlayerKilled.sqs.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableEndDialog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableEndDialog
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableEngineArtillery
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableEngineArtillery
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableEngineArtillery enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableEngineArtillery false;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableEnvironment
+//KeywordEnd//
+DescriptionStart:
+Enable/disable environmental effects (ambient life + sound).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableEnvironment
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableEnvironment enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableEnvironment false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableFatigue
+//KeywordEnd//
+DescriptionStart:
+Enables/Disables the person's fatigue.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableFatigue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit enableFatigue enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player enableFatigue false ;$/Code$
+%NextExample%
+$Code${ _x enableFatigue false ; } forEach ( units group player );$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(March 24, 2015)
+When the player dies enableFatigue is set to true after the respawn
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableGunLights
+//KeywordEnd//
+DescriptionStart:
+Force the AI to use gun lights
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableGunLights
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+thing enableGunLights value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$group enableGunLights true$/Code$
+%NextExample%
+$Code$unitName enableGunLights true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(27 July, 2011)
+This command can be used to force lights on, but not to force lights off. ( Source )
+%NextNote%
+(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 )
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableIRLasers
+//KeywordEnd//
+DescriptionStart:
+Allows the AI to use IR lasers
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableIRLasers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+thing enableIRLasers value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$(units group player) enableIRLasers true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableMimics
+//KeywordEnd//
+DescriptionStart:
+Enables/disables mimics on a given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableMimics
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit enableMimics enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cursorTarget enableMimics false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enablePersonTurret
+//KeywordEnd//
+DescriptionStart:
+Enables or disables firing from a vehicle cargo position. To get the turret path use assignedVehicleRole or getCargoIndex command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enablePersonTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle enablePersonTurret [turretPath, enable]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$heli enablePersonTurret [[1], true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableRadio
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableRadio state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableRadio false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(7 August, 2008)
+This command doesn't disable text-chat in multiplayer.
+%NextNote%
+(11 September, 2008)
+Does not affect VON.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableReload
+//KeywordEnd//
+DescriptionStart:
+Enable / disable reload when magazine is empty.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableReload
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object enableReload enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicle enableReload false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableRopeAttach
+//KeywordEnd//
+DescriptionStart:
+Enable/disable ability to attach or be attached to ropes for given vehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableRopeAttach
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle enableRopeAttach enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( vehicle player ) enableRopeAttach false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(05 April, 2014)
+Attachable nearby vehicles may not update on Sling Load Assistant until re-opened.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableSatNormalOnDetail
+//KeywordEnd//
+DescriptionStart:
+Enables/Disables satellite normal map od detail maps.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableSatNormalOnDetail
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableSatNormalOnDetail state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableSatNormalOnDetail true;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableSaving
+//KeywordEnd//
+DescriptionStart:
+Enable / disable saving of the game.
+When disabled, the autosave is created (if not forbidden by save == false).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableSaving
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableSaving enable
+%NextRawSyntax%
+enableSaving [enable, save]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableSentences
+//KeywordEnd//
+DescriptionStart:
+Enables radio transmissions to be heard and seen on screen. It does not affect KBTell conversations.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableSentences
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableSentences enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$enableSentences false;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableSimulation
+//KeywordEnd//
+DescriptionStart:
+Enable / disable simulation for given entity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableSimulation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity enableSimulation state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player enableSimulation false;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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).
+%NextNote%
+(8 May, 2012)
+re: Homer.
+Yep. That's because this functionality is now part of the basic arma netcode. Pretty nice :)
+%NextNote%
+(October 3, 2014)
+Units with disabled simulation will not be affected by gravity.
+%NextNote%
+(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$
+%NextNote%
+(May 23, 2015)
+After using enableSimulation false or enableSimulationGlobal false on an object, setPos will still update its position across the network in MP.
+%NextNote%
+(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!
+%NextNote%
+(February 5, 2016)
+cursorTarget returns a null_object for objects with disabled simulation. But you can find them with other commands such nearEntities.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableSimulationGlobal
+//KeywordEnd//
+DescriptionStart:
+MP command. Enable or disable simulation for given entity, globally. Call this only from the server. In SP use enableSimulation
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableSimulationGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity enableSimulationGlobal enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myObject enableSimulationGlobal false;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableStamina
+//KeywordEnd//
+DescriptionStart:
+Enable/disable stamina system
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableStamina
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit enableStamina enabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player enableStamina true;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableTeamSwitch
+//KeywordEnd//
+DescriptionStart:
+Enable / disable Team Switch. The default setting is enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableTeamSwitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enableTeamSwitch enable
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableUAVConnectability
+//KeywordEnd//
+DescriptionStart:
+Enables unit's AV terminal(s) connecting to UAV.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableUAVConnectability
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object enableUAVConnectability [uav, checkAllItems]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit enableUAVConnectability [uav,true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enableUAVWaypoints
+//KeywordEnd//
+DescriptionStart:
+Enables/disables the option for player to set waypoints for UAV in AV terminal.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enableUAVWaypoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uav enableUAVWaypoints enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_uav enableUAVWaypoints false ;
+hint str waypointsEnabledUAV _uav; // returns false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+endLoadingScreen
+//KeywordEnd//
+DescriptionStart:
+Finishes loading screen started by startLoadingScreen.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/endLoadingScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+endLoadingScreen
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+endMission
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/endMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+endMission endType
+//RawSyntaxEnd//
+ExampleStart:
+$Code$endMission "END1";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+engineOn
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/engineOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle engineOn state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! isEngineOn _jeep) then {_jeep engineOn true };$/Code$
+%NextExample%
+$Code$if ( local vehicle player ) then {
+vehicle player engineOn true ;
+} else {
+hint "Get in the driver seat, soldier!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enginesIsOnRTD
+//KeywordEnd//
+DescriptionStart:
+Returns which engines are producing some work.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enginesIsOnRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enginesIsOnRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_enginesTaru = enginesIsOnRTD _taru// Returns [true,true]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [ Boolean value for each engine]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enginesRpmRTD
+//KeywordEnd//
+DescriptionStart:
+Returns all engines RPM
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enginesRpmRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enginesRpmRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_UH80_E1 = ( enginesRpmRTD _UH80) select 0;//engine 1 RPM
+_UH80_E2 = ( enginesRpmRTD _UH80) select 1;//engine 2 RPM$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+enginesTorqueRTD
+//KeywordEnd//
+DescriptionStart:
+Torque produced by engines in N·m (Newton*meter)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/enginesTorqueRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enginesTorqueRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_UH80_E1 = ( enginesTorqueRTD _UH80) select 0;//engine 1 Torque
+_UH80_E2 = ( enginesTorqueRTD _UH80) select 1;//engine 2 Torque$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+entities
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all dead or alive entities with given type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/entities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entities type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allcars = entities "Car";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+estimatedEndServerTime
+//KeywordEnd//
+DescriptionStart:
+Estimated end of MP game in seconds converted to serverTime.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/estimatedEndServerTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+estimatedEndServerTime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Estimated minutes left:
+_min = ( ceil ( estimatedEndServerTime - serverTime ) / 60);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - seconds left
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+estimatedTimeLeft
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/estimatedTimeLeft
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+estimatedTimeLeft seconds
+//RawSyntaxEnd//
+ExampleStart:
+$Code$estimatedTimeLeft 600; //10 min$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+evalObjectArgument
+//KeywordEnd//
+DescriptionStart:
+Return argument in mission editor of a given object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/evalObjectArgument
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map evalObjectArgument [object, argument]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any Value
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+everyBackpack
+//KeywordEnd//
+DescriptionStart:
+Returns array of backpacks stored in given crate or vehicle. Used for accessing backpack content of a backpack on ground.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/everyBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+everyBackpack box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$everyBackpack cursorTarget ;$/Code$
+%NextExample%
+$Code$_vehicleBackpacks = everyBackpack vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+everyContainer
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/everyContainer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+everyContainer box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$everyContainer cursorTarget ;
+// [
+//[ V_PlateCarrier1_rgr,2bc06b00# 163955: dummyweapon.p3d],
+//[ U_B_CombatUniform_mcam,2bc07900# 163954: dummyweapon.p3d]
+//]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+exec
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/exec
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+argument exec script
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[player, _jeep] exec "getin.sqs"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+execEditorScript
+//KeywordEnd//
+DescriptionStart:
+Execute an editor script for the specified object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/execEditorScript
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map execEditorScript [object,script]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map execEditorScript ["_team_1","create"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+execFSM
+//KeywordEnd//
+DescriptionStart:
+Execute the scripted FSM. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.
+Argument(s) (if any) is/are passed as _this to the FSM.
+Returns the FSM handle or 0 when failed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/execFSM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+argument execFSM filename
+%NextRawSyntax%
+execFSM filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_id = player execFSM "test.fsm";$/Code$
+%NextExample%
+$Code$_handle = [_a, _b, _c] execFSM "test.fsm";$/Code$
+%NextExample%
+$Code$_handle = execFSM "test.fsm";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - FSM handle, can be used to determine (via completedFSM ) when the execed FSM has finished. In Arma 3, the handle is also available inside the FSM in _thisFSM variable.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+execVM
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/execVM
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+argument execVM filename
+%NextRawSyntax%
+execVM filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle = execVM "test.sqf";$/Code$
+%NextExample%
+$Code$_handle = player execVM "test.sqf";
+waitUntil { scriptDone _handle};$/Code$
+%NextExample%
+$Code$// In Arma 3 this is also possible:
+_handle = execVM "123.sqf";
+waitUntil { isNull _handle};$/Code$
+%NextExample%
+$Code$[4] execVM "showDamage.sqf";
+// showDamage.sqf
+_damage = _this select 0;
+hint format ["%1", _damage];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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;
+//NoteEnd//
+ReturnValueStart:
+Script Handle - can be used to determine (via scriptDone (also via isNull in Arma 3)) when the execVMed script has finished. In Arma 3, the handle is also available inside the execVMed script in _thisScript variable.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+exit
+//KeywordEnd//
+DescriptionStart:
+Stops the execution of a SQS script.
+It's ignored in SQF Scripts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/exit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+exit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$exit$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+exitWith
+//KeywordEnd//
+DescriptionStart:
+Exits current scope {...} it is executed from, 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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/exitWith
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+if exitWith code
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+exp
+//KeywordEnd//
+DescriptionStart:
+Let x be a number, then exp (x) is equal to e to the power of x (or e^x)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/exp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+exp x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_result = exp 1
+// returns 2.7182$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Note that you cannot exponent a value greater than 88.72283554077147726999 (999 repeating), as this is beyond what the game can calculate.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+expectedDestination
+//KeywordEnd//
+DescriptionStart:
+Return expected destination of unit as an array with format: [ Position, planningMode, forceReplan].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/expectedDestination
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+expectedDestination person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+exportJIPMessages
+//KeywordEnd//
+DescriptionStart:
+Export list of JIP to a file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/exportJIPMessages
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+exportJIPMessages fileName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$exportJIPMessages "myFileNameWithoutExtension";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+eyeDirection
+//KeywordEnd//
+DescriptionStart:
+Returns the direction object is watching (eyes, or a vehicle primary observer).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/eyeDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+eyeDirection unit
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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. In fact the direction returned by eyeDirection is avatar's head direction relative to the torso (minus ambient head animation factor). Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
+//NoteEnd//
+ReturnValueStart:
+Array - 3D Vector
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+eyePos
+//KeywordEnd//
+DescriptionStart:
+Returns the object's eyes / main turret position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/eyePos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+eyePos object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$eyePos player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+face
+//KeywordEnd//
+DescriptionStart:
+Returns the face of a person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/face
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+face person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$face player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+faction
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/faction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+faction unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_faction = faction _object;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+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'.
+//NoteEnd//
+ReturnValueStart:
+String. See above.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fadeMusic
+//KeywordEnd//
+DescriptionStart:
+Changes the music volume smoothly within the given time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fadeMusic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time fadeMusic volume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$5 fadeMusic 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fadeRadio
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fadeRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time fadeRadio volume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$5 fadeRadio 0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(September 11, 2008)
+Does not affect VON
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fadeSound
+//KeywordEnd//
+DescriptionStart:
+Changes the sound volume smoothly within the given time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fadeSound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time fadeSound volume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$5 fadeSound 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(January 19, 2010)
+This command doesn't work, in Arma 2 1.05.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fadeSpeech
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fadeSpeech
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time fadeSpeech volume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$5 fadeSpeech 0.1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+failMission
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/failMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+failMission endtype
+//RawSyntaxEnd//
+ExampleStart:
+$Code$failMission "LOSER";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+false
+//KeywordEnd//
+DescriptionStart:
+Always false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/false
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+false
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_var = false ;
+systemChat str _var; //false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fillWeaponsFromPool
+//KeywordEnd//
+DescriptionStart:
+Adds magazines from the campaign pool to the given unit, depending on his weapons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fillWeaponsFromPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fillWeaponsFromPool unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$fillWeaponsFromPool _soldier$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+find
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/find
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array find x
+%NextRawSyntax%
+string find x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$["Apples","Oranges","Pears"] find "Oranges"; //result is 1
+[1,[2],[[3]]] find [[3]]; //result is 2$/Code$
+%NextExample%
+$Code$if ( magazines player find "Strela" = 0) then { hint "You've got Strela!"};$/Code$
+%NextExample%
+$Code$hint str ("japa is the man!" find "the man!"); //8$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(April 10, 2015)
+Find doesn't work with multidimensional arrays in OFP/CWA. It will always returns -1.
+//NoteEnd//
+ReturnValueStart:
+Number - 0 based position of the first array element that matches x, -1 if not found
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findCover
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findCover
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(17 Oct, 2009)
+Arma 2: v1.04: Usage creates report log message: " MicroAI: Command findCover not implemented ( unit id ) "
+%NextNote%
+(07 Jan, 2011)
+OA: v1.57: Still non functional.
+%NextNote%
+(12 July, 2011)
+CO: v1.59: Still non functional.
+%NextNote%
+(13 February, 2014)
+Arma 3: Still non functional.
+%NextNote%
+(July 4, 2015)
+An alternative function in ArmA 3 might be BIS_fnc_findSafePos
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findDisplay
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findDisplay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+findDisplay idd
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_display = findDisplay 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(17 March 2010)
+I posted a tutorial on finding and using displays here.
+%NextNote%
+(07 March 2014)
+The Zeus Display uses IDD 312
+%NextNote%
+(March 25, 2015)
+Display 12 is map
+//NoteEnd//
+ReturnValueStart:
+Display
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findEditorObject
+//KeywordEnd//
+DescriptionStart:
+Return object that matches the provided reference.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map findEditorObject value
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findEmptyPosition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findEmptyPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+center findEmptyPosition [minDistance, maxDistance, vehicleType]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_position = position player findEmptyPosition [0,100];$/Code$
+%NextExample%
+$Code$_position = _center findEmptyPosition [10,100,"UH60M_EP1"];$/Code$
+%NextExample%
+$Code$// Check if exact position is empty:
+_position = _center findEmptyPosition [0,0,"B_Boat_Armed_01_minigun_F"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - A suitable empty position in format Position3D or [] if not found
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findEmptyPositionReady
+//KeywordEnd//
+DescriptionStart:
+Check if findEmptyPosition can be called without waiting for files.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findEmptyPositionReady
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+center findEmptyPositionReady [radius,maxDistance]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+findNearestEnemy
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/findNearestEnemy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object findNearestEnemy position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myNearestEnemy = ( units _myGroup select 0) findNearestEnemy player ;$/Code$
+%NextExample%
+$Code$_myNearestEnemy = player findNearestEnemy player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+finishMissionInit
+//KeywordEnd//
+DescriptionStart:
+Finish world initialization before mission is launched.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/finishMissionInit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+finishMissionInit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+finite
+//KeywordEnd//
+DescriptionStart:
+True, if number is finite (not infinite and a valid number)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/finite
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+finite x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$?!finite 10/0 : hint Infinite$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fire
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit fire weaponName
+%NextRawSyntax%
+unit fire [muzzle, mode, magazine]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier fire "M16";$/Code$
+%NextExample%
+$Code$_soldier fire "SmokeShellMuzzle";$/Code$
+%NextExample%
+$Code$_soldier fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"];$/Code$
+%NextExample%
+$Code$player playActionNow "PutDown";
+player selectWeapon "DemoChargeMuzzle";
+player fire ["DemoChargeMuzzle", "DemoChargeMuzzle", "DemoCharge_Remote_Mag"];
+player setWeaponReloadingTime [ player, "DemoChargeMuzzle", 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(August 17, 2006)
+Sometimes AI won't shoot when you use this command. It can be fixed by placing selectWeapon command before it.
+%NextNote%
+(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.
+%NextNote%
+(January 20, 2007)
+In ArmA v1.02, this command is not working with weapons in the secondary turrets (like "DSHKM" in t72)
+%NextNote%
+(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.
+%NextNote%
+(March 18, 2010)
+In Arma2 AI will automatically shoot straight up. Command seems to be broken.
+%NextNote%
+(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];
+%NextNote%
+(Feburary 25, 2011)
+Command works just fine in A2/OA. Make sure to execute it on local AI.
+%NextNote%
+(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.
+%NextNote%
+(Feburary 16, 2013)
+Command did not work with ACR 1.62. Used fireAtTarget instead.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fireAtTarget
+//KeywordEnd//
+DescriptionStart:
+Remotely forces a unit to fire the given weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fireAtTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sourceVehicle fireAtTarget [targetVehicle, weaponMuzzleName]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle = this fireAtTarget [groundtarget1,"HellfireLauncher"];$/Code$
+%NextExample%
+$Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [_helicopter, currentWeapon Igla_AA_pod_TK_EP1];$/Code$
+%NextExample%
+$Code$_handle = Igla_AA_pod_TK_EP1 fireAtTarget [helicopter];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Sep 16, 2010)
+Most likely only for missiles and for interaction with player only.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if fired, false if not
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+firstBackpack
+//KeywordEnd//
+DescriptionStart:
+Returns the first stored backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/firstBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+firstBackpack box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myVariable = firstBackpack myBox;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+flag
+//KeywordEnd//
+DescriptionStart:
+Returns the original flag pole of the flag the unit is carrying.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flag
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flag unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flag = flag _soldier;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - Flag pole object the flag belongs to. If the unit carries no flag, objNull is returned.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+flagOwner
+//KeywordEnd//
+DescriptionStart:
+Returns the global owner of a flag. A getter for setFlagOwner.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flagOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flagOwner flag
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_person = flagOwner _flagOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - The person or vehicle that owns the flag is returned. If used on anything else than a flag, the returned value is objNull. If the flag is on its pole, the return value is NULL. If the flagowner is dead, the return value is the name of the soldier model.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+flagSide
+//KeywordEnd//
+DescriptionStart:
+Returns Side of the local instance of the flag. A getter for setFlagSide.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flagSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flagSide flag
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flagSide = flagSide flag;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+flagTexture
+//KeywordEnd//
+DescriptionStart:
+Returns texture of the local instance of the flag. A getter for setFlagTexture.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flagTexture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flagTexture flagCarrier
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flagTexture = flagTexture flag;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fleeing
+//KeywordEnd//
+DescriptionStart:
+Checks if a unit is fleeing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fleeing
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fleeing unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (fleeing _east_unit) : player sideChat We have won!$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+floor
+//KeywordEnd//
+DescriptionStart:
+Returns the next lowest integer in relation to x.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/floor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+floor x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$floor 5.25
+Result is 5$/Code$
+%NextExample%
+$Code$floor -5.25
+Result is -6$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+flyInHeight
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/flyInHeight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+aircraft flyInHeight altitude
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_helicopter flyInHeight 40$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+From version 1.80+ - flyInHeight now affects not only helicopters, but also planes.
+%NextNote%
+(August 4, 2006)
+A planes flyInHeight, is restricted to a minimum of 20 meters.
+%NextNote%
+(December 15, 2008)
+A flyInHeight of 0 will keep the chopper pinned to the ground, even when the engines have been started.
+%NextNote%
+(00:53, 11 April 2009 (CEST))
+If a helo has no waypoints, it will assume a low hover without regard to this setting.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fog
+//KeywordEnd//
+DescriptionStart:
+Return the current value of the fog in range 0...1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fog
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_foglevel = fog ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fogForecast
+//KeywordEnd//
+DescriptionStart:
+Returns the forecast fog value. A value of 0 means no fog, 1 means maximum fog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fogForecast
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fogForecast
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_level = fogForecast ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fogParams
+//KeywordEnd//
+DescriptionStart:
+Returns extended params for the fog
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fogParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fogParams
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_fog = fogParams$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in format setFog : [fogValue, fogDecay, fogBase]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+for
+//KeywordEnd//
+DescriptionStart:
+Creates cycle, using C like style. See example.
+In Arma 3 use private keyword when defining any variables for the scope, see example 4.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/for_forspec
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceAddUniform
+//KeywordEnd//
+DescriptionStart:
+Create a new uniform and hard link it into slot (without any restrictions).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceAddUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit forceAddUniform type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit forceAddUniform "U_B_CombatUniform_mcam";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceEnd
+//KeywordEnd//
+DescriptionStart:
+Enforces mission termination. Can be used in an "END" trigger to force end conditions in the editor.
+Does precisely nothing, zero, zip, nada, zilch
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceEnd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+forceEnd
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (_TerritoryLost) then {forceEnd}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceMap
+//KeywordEnd//
+DescriptionStart:
+Displays the map on the screen during a mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceMap
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+forceMap show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$forceMap true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+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)
+%NextNote%
+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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceRespawn
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceRespawn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+forceRespawn unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$forceRespawn player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceSpeed
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object forceSpeed speed
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_helicopter forceSpeed 150;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(17:02, 2 March 2007 (CET))
+%NextNote%
+(9 February 2008)
+Does not seem to do anything at the current time (V1.08.5163)
+%NextNote%
+(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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceWalk
+//KeywordEnd//
+DescriptionStart:
+Forces unit to walk even if run or sprint is selected.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceWalk
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit forceWalk value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player forceWalk true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceWeaponFire
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceWeaponFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit forceWeaponFire [muzzle, firemode]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne forceWeaponFire ["arifle_MX_F", "Single"];$/Code$
+%NextExample%
+$Code$player forceWeaponFire ["hgun_ACPC2_F", "hgun_ACPC2_F"];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$gunner blackfoot forceWeaponFire ["gatling_20mm", "close"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forceWeatherChange
+//KeywordEnd//
+DescriptionStart:
+Forces saved wanted settings for weather to be actual (BEWARE: Will cause lag).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forceWeatherChange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+forceWeatherChange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$240 setOvercast 1;
+360 setRain 1;
+forceWeatherChange ; comment "force immediate change overriding smooth transition";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forEach
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forEach
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+script forEach array
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ _x setDammage 1; } forEach units group player ;$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// You can also use multiple commands in the same block.
+{
+_x setCaptive true ;
+removeAllWeapons _x ;
+doStop _x ;
+} forEach units group this ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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].
+%NextNote%
+(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$
+%NextNote%
+(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".
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Anything - will return the value of last executed statement
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forEachMember
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forEachMember
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+command forEachMember team
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forEachMemberAgent
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forEachMemberAgent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+command forEachMemberAgent team
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+forEachMemberTeam
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/forEachMemberTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+command forEachMemberTeam team
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+format
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/format
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+format [formatString, var1, var2...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$format ["Player:%1, player's side:%2", player, side player ];
+// returns "Player:WEST 1-1-A:1 (Username), player's side:WEST"$/Code$
+%NextExample%
+$Code$player addEventHandler ["HandleDamage", {
+hint format ["You just sustained %1%2 damage!", ceil (( _this select 2) * 100), "%"];
+}];
+// hints "You just sustained 20% damage!"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+The format command is very strong in combination with call. Dynamic code can be created using format and then executed with call.
+%NextNote%
+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.
+%NextNote%
+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.
+%NextNote%
+(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$
+%NextNote%
+(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)
+//NoteEnd//
+ReturnValueStart:
+String -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formation
+//KeywordEnd//
+DescriptionStart:
+Returns the current formation of a group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formation grp
+//RawSyntaxEnd//
+ExampleStart:
+$Code$formation group player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(January 9, 2007)
+Additional ARMA Formations: "File" - Column Compact. "DIAMOND" - Delta.
+//NoteEnd//
+ReturnValueStart:
+String - returns either "COLUMN", "STAG COLUMN", "WEDGE", "ECH LEFT", "ECH RIGHT", "VEE" or "LINE"
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formationDirection
+//KeywordEnd//
+DescriptionStart:
+Return the direction in degrees of the 'unit' watching in formation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formationDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formationDirection unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_degrees = FormationDirection _unit$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formationLeader
+//KeywordEnd//
+DescriptionStart:
+Return leader of the formation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formationLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formationLeader unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (formationLeader player != leader player) :
+hint Formation leader is not the group leader.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 2, 2006)
+Return value is NULL-OBJECT if no group members exist.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formationMembers
+//KeywordEnd//
+DescriptionStart:
+Return list of units (drivers) in the formation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formationMembers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formationMembers person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_drivers=FormationMembers _person$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formationPosition
+//KeywordEnd//
+DescriptionStart:
+Return position of unit in the formation
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formationPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formationPosition person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos=FormationPosition _person$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formationTask
+//KeywordEnd//
+DescriptionStart:
+Return the current task of the unit in the formation.
+You can't use it in ArmA 2, it will always returns "NOTHING"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formationTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formationTask person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_CurrentTask = FormationTask _person$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String : (EXCLUDED, MOVE, COVER, LEADER)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formatText
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text by replacing %1, %2, etc. in format with plain or structured texts given as arguments.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formatText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formatText [format, arg1, arg2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = formatText ["Image: %1", image "data\isniper.paa"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+formLeader
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/formLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+formLeader unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (formLeader player != leader player) :
+hint The formation leader is different to the group leader!
+returns X$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+freeLook
+//KeywordEnd//
+DescriptionStart:
+Returns true if freelook is active.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/freeLook
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+freeLook
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat (if freeLook then {"Quit looking around player!"} else {""});$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+from
+//KeywordEnd//
+DescriptionStart:
+Continue sequence of for var command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/from
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+fromEditor
+//KeywordEnd//
+DescriptionStart:
+Return if given team was inserted directly from mission editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fromEditor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fromEditor teamMember
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_fromEditor = fromEditor _member$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fuel
+//KeywordEnd//
+DescriptionStart:
+Checks how much fuel is left in the gas tank of a vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fuel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fuel vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( fuel vehicle player == 0) then { hint "The vehicle is out of fuel!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+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.
+//NoteEnd//
+ReturnValueStart:
+Number -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+fullCrew
+//KeywordEnd//
+DescriptionStart:
+Returns array with all crew inside given vehicle. Since Arma 3 v1.55.133810 it is possible to return empty seats as well.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/fullCrew
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fullCrew vehicle
+%NextRawSyntax%
+fullCrew [vehicle, type, includeEmpty]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = fullCrew vehicle player ;$/Code$
+%NextExample%
+$Code$_list = fullCrew [ vehicle player, "turret"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - format [[ Object unit, String role, Number cargoIndex, Array turretPath, Boolean personTurret],...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+gearSlotAmmoCount
+//KeywordEnd//
+DescriptionStart:
+Returns ammo count of assigned magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/gearSlotAmmoCount
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+gearSlotAmmoCount control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ammo = gearSlotAmmoCount _control;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+gearSlotData
+//KeywordEnd//
+DescriptionStart:
+Returns gear slot item name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/gearSlotData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+gearSlotData control
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENActionState
+//KeywordEnd//
+DescriptionStart:
+Returns state of given action in the Eden Editor.
+See the list of all actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENActionState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENActionState action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( get3DENActionState "ToggleMap" == 1) then { systemChat "Editor map is open!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENAttribute
+//KeywordEnd//
+DescriptionStart:
+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!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENAttribute
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity get3DENAttribute attribute
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat str (( get3DENMouseOver select 1) get3DENAttribute "name");
+// returns variable name of object under cursor$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENCamera
+//KeywordEnd//
+DescriptionStart:
+Returns the camera Object used by the Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENCamera
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENConnections
+//KeywordEnd//
+DescriptionStart:
+Return all connections currently present on an entity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENConnections
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENConnections entity
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENEntity
+//KeywordEnd//
+DescriptionStart:
+Returns Eden Entity based on its unique ID. If the ID points to a layer, the ID will be returned instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENEntity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENEntity id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myEntity = get3DENEntity 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Eden Entity (when the target is Eden Entity ) or Number (when the target is a layer)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENEntityID
+//KeywordEnd//
+DescriptionStart:
+Returns unique index of an Eden Entity. This number remains the same even after saving and loading the scenario.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENEntityID
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENEntityID entity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myID = get3DENEntityID player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENGrid
+//KeywordEnd//
+DescriptionStart:
+Returns the grid increment for the given transformation type.
+Transformation types:
+Rotation - "r"
+Translation - "t"
+Scale - "s"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENGrid
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENGrid type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$currentMovementIncrement = get3DENGrid "t";// returns 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENIconsVisible
+//KeywordEnd//
+DescriptionStart:
+Get visibility state of Eden Editor icons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENIconsVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENIconsVisible
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (get3DENIconsVisible select 0) then { hint "Icons are visible in the map.";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format [showMap, showScene]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENLayerEntities
+//KeywordEnd//
+DescriptionStart:
+Return all entities and sub-layer in Eden Entity layer.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENLayerEntities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENLayerEntities layerID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myLayer = -1 add3DENLayer "CTRG";
+player set3DENLayer _myLayer;
+_entities = get3DENLayerEntities _myLayer;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Eden Entities
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENLinesVisible
+//KeywordEnd//
+DescriptionStart:
+Get visibility state of Eden Editor lines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENLinesVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENLinesVisible
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (get3DENLinesVisible select 0) then { hint "Lines are visible in the map.";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format [showMap, showScene]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENMissionAttribute
+//KeywordEnd//
+DescriptionStart:
+Return value of scenario attribute.
+!
+Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENMissionAttribute
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+section get3DENMissionAttribute class
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat str ("Multiplayer" get3DENMissionAttribute "respawn");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 26, 2016)
+The class names of the vanilla sections are:
+General
+Scenario
+Environment
+Intel
+Multiplayer
+Multiplayer
+Garbage Collection
+GarbageCollection
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENMouseOver
+//KeywordEnd//
+DescriptionStart:
+Returns the Eden Entity the mouse is hovering over in Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENMouseOver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENMouseOver
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat str get3DENMouseOver ;// returns: ["Object",B Alpha 1-1:1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format: [type, Eden Entity ], where type can be: "Object", "Group", "Trigger", "Logic", "Waypoint" or "Marker"
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+get3DENSelected
+//KeywordEnd//
+DescriptionStart:
+Returns an array of all selected Eden Editor Entities, including groups, waypoints, and markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/get3DENSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+get3DENSelected type
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$systemChat str ( get3DENSelected "object");
+// outputs: [B Alpha 2-1:1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Eden Entities
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAllHitPointsDamage
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAllHitPointsDamage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAllHitPointsDamage entity
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAmmoCargo
+//KeywordEnd//
+DescriptionStart:
+Returns the amount of ammo resources in the cargo space of a rearm vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAmmoCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAmmoCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = getAmmoCargo myVehicleName;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAnimAimPrecision
+//KeywordEnd//
+DescriptionStart:
+Returns aim precision for current animation
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAnimAimPrecision
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAnimAimPrecision unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getAnimAimPrecision player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAnimSpeedCoef
+//KeywordEnd//
+DescriptionStart:
+Get coefficient for animation speed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAnimSpeedCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAnimSpeedCoef unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getAnimSpeedCoef player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getArray
+//KeywordEnd//
+DescriptionStart:
+Extract array from config entry.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getArray config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_array = getArray (configFile CfgVehicles Thing threat )$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getArtilleryAmmo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getArtilleryAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getArtilleryAmmo [unit1, unit2, unit3....]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ("8Rnd_82mm_Mo_Flare_white" in getArtilleryAmmo [
+_mortar1,
+_mortar2,
+_mortar3,
+_mortar4
+]) then {
+hint "Sir, we have white flares, sir!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getArtilleryComputerSettings
+//KeywordEnd//
+DescriptionStart:
+Returns settings from artillery computer currently opened by player.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getArtilleryComputerSettings
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getArtilleryComputerSettings
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str getArtilleryComputerSettings ; //["Semi (medium)","HE Mortar Shells",0]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getArtilleryETA
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getArtilleryETA
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit getArtilleryETA [targetPosition, magazineType]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mortar getArtilleryETA [ getPos _target, getArtilleryAmmo [_mortar] select 0];$/Code$
+%NextExample%
+$Code$_mortar getArtilleryETA [ position _target, currentMagazine _mortar];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(August 26, 2013)
+To avoid wrong ETA readings, position of the target should only be obtained via position or getPos
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAssignedCuratorLogic
+//KeywordEnd//
+DescriptionStart:
+Returns curator logic to which given player has access.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAssignedCuratorLogic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAssignedCuratorLogic player
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( getAssignedCuratorLogic player ) removeCuratorEditableObjects [ allDead, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getAssignedCuratorUnit
+//KeywordEnd//
+DescriptionStart:
+Returns unit assigned to curator logic.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getAssignedCuratorUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getAssignedCuratorUnit curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_curatorUnit = getAssignedCuratorUnit ( allCurators select 0);
+_curatorUnit joinAs [ createGroup civilian, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getBackpackCargo
+//KeywordEnd//
+DescriptionStart:
+Returns all backpack types and count from the cargo space
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getBackpackCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getBackpackCargo object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_content = getBackpackCargo carName;$/Code$
+%NextExample%
+$Code$_content = getBackpackCargo ammoBoxName;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Arrays - Format: [["5BackpacksType1","10BackpacksType2"],[5,10]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getBleedingRemaining
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getBleedingRemaining
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getBleedingRemaining unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bleedingRemaining = getBleedingRemaining _unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getBurningValue
+//KeywordEnd//
+DescriptionStart:
+Returns amount of damage from fire.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getBurningValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getBurningValue unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getCameraViewDirection
+//KeywordEnd//
+DescriptionStart:
+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]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getCameraViewDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getCameraViewDirection unit
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - 3D Vector
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getCargoIndex
+//KeywordEnd//
+DescriptionStart:
+Returns index of the unit in cargo. 0,1,2... or -1 if not in cargo.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getCargoIndex
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle getCargoIndex unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player moveInCargo heli;
+hint str (heli getCargoIndex player );$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getCenterOfMass
+//KeywordEnd//
+DescriptionStart:
+Returns center of mass of a PhysX object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getCenterOfMass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getCenterOfMass object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_com = getCenterOfMass _myCar$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [x,y,z] offset relative to the model centre
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getClientState
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getClientState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getClientState
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_state = getClientState ;$/Code$
+%NextExample%
+$Code$if ( getClientState == "BRIEFING READ") then { hint "Let the show begin!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - Client state (see table above)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getClientStateNumber
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getClientStateNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getClientStateNumber
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_state = getClientStateNumber ;$/Code$
+%NextExample%
+$Code$_inGame = getClientStateNumber 8;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - Client state (see table above)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getConnectedUAV
+//KeywordEnd//
+DescriptionStart:
+Returns UAV if unit has connection to some UAV.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getConnectedUAV
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getConnectedUAV unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getDammage
+//KeywordEnd//
+DescriptionStart:
+Returns the object damage in the range from 0 to 1. Alias of damage.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getDammage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getDammage object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_damage = getDammage player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(, 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.
+%NextNote%
+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.
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getDescription
+//KeywordEnd//
+DescriptionStart:
+Returns the string representation of unit as an four slots array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getDescription unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Return value fixed in revision 0.51.103185.
+%NextNote%
+(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"]
+//NoteEnd//
+ReturnValueStart:
+Array - [unit, uniform, vest, backpack]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getDir
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getDir object
+%NextRawSyntax%
+pos1 getDir pos2 Since Arma 3 v1.55.133361
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_azimuth = getDir player ;$/Code$
+%NextExample%
+$Code$_azimuth = player getDir tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getDirVisual
+//KeywordEnd//
+DescriptionStart:
+Returns object's heading in the range from 0 to 360 in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getDirVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getDirVisual object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dir = getDirVisual player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getDLCs
+//KeywordEnd//
+DescriptionStart:
+Returns array of appIDs of DLCs. Use filter param to get specific type of DLCs:
+0 - all
+1 - owned
+2 - not owned
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getDLCs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getDLCs filter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ownedDLCs = getDLCs 1;$/Code$
+%NextExample%
+$Code$// Is the Karts DLC owned by this client?
+hintSilent str (288520 in ( getDLCs 1));$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - array of numbers
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getEditorCamera
+//KeywordEnd//
+DescriptionStart:
+Fetches a reference to the mission editor camera.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getEditorCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getEditorCamera map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getEditorMode
+//KeywordEnd//
+DescriptionStart:
+Returns the current mode of the editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getEditorMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getEditorMode map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getEditorObjectScope
+//KeywordEnd//
+DescriptionStart:
+Returns the editor object scope of the specified editor object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getEditorObjectScope
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map getEditorObjectScope object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getElevationOffset
+//KeywordEnd//
+DescriptionStart:
+Returns the map elevation offset from [map]/config.cpp.
+Returns 0 if there's no elevationOffset defined in the config of the current world.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getElevationOffset
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getElevationOffset
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_offset = getElevationOffset ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - elevation offset of the map
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getFatigue
+//KeywordEnd//
+DescriptionStart:
+Returns fatigue of given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getFatigue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getFatigue unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = getFatigue player ;$/Code$
+%NextExample%
+$Code$if ( getFatigue player 0.5) then { player sideChat "I'm good to go!" };$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getFriend
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getFriend
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side1 getFriend side2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = west getFriend east ;$/Code$
+%NextExample%
+$Code$_isEnemy = side _killer getFriend side _victim 0.6;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - Decimal value between 0.0 to 1.0
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getFSMVariable
+//KeywordEnd//
+DescriptionStart:
+Return the value of variable in the variable space of given FSM. The FSM handle is the number returned by the execFSM command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getFSMVariable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+FSMhandle getFSMVariable name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle getFSMVariable "_foo";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getFuelCargo
+//KeywordEnd//
+DescriptionStart:
+Returns the fuel amount (between 0 and 1) in the cargo space of a refuelling vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getFuelCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getFuelCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = getFuelCargo myVehicleName;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getGroupIcon
+//KeywordEnd//
+DescriptionStart:
+Get group icon properties.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getGroupIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group getGroupIcon ID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_grpIconId = _group getVariable BIS_MARTA_ICON_TYPE ;
+_grpIcon = _group getGroupIcon _grpIconId;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getGroupIconParams
+//KeywordEnd//
+DescriptionStart:
+Returns group icons params. [color,text,scale,visible]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getGroupIconParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getGroupIconParams group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_icon = _this getVariable icon ;
+//[color,text,scale,visible]
+_params = getGroupIconParams _icon;
+_color = _params select 0;
+_text = _params select 1;
+_scale = _params select 2;
+_visible = _params select 3;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getGroupIcons
+//KeywordEnd//
+DescriptionStart:
+Returns all group icons. [id,icon,[offsetx,offsety],[..],..]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getGroupIcons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getGroupIcons group
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getHideFrom
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getHideFrom
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object getHideFrom enemy
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Array - ASLToATL representation of the believed aimPos of the enemy object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getHit
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getHit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle getHit selection
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player getHit "head";$/Code$
+%NextExample%
+$Code$_car getHit "motor";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number or Nothing when invalid input is given
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getHitIndex
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getHitIndex
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle getHitIndex hitPartIndex
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player getHitIndex 3;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number or Nothing when invalid input is given
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getHitPointDamage
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getHitPointDamage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle getHitPointDamage hitPointName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$(vehicle player) getHitPointDamage "hitEngine";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number or Nothing when invalid input is given
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getItemCargo
+//KeywordEnd//
+DescriptionStart:
+Returns all items names and count from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getItemCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getItemCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str getItemCargo cursorTarget ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Arrays - Format: [["5ItemsType1","10ItemsType2"],[5,10]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMagazineCargo
+//KeywordEnd//
+DescriptionStart:
+Returns all magazines types and count from the cargo space
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMagazineCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMagazineCargo object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_content = getMagazineCargo carName;$/Code$
+%NextExample%
+$Code$_content = getMagazineCargo ammoBoxName;$/Code$
+%NextExample%
+$Code$hint str getMagazineCargo unitBackpack cursorTarget ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of arrays. [["5MagsType1","10MagsType2"],[5,10]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMarkerColor
+//KeywordEnd//
+DescriptionStart:
+Returns the color of a given map marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMarkerColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMarkerColor markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$MarkerOne setMarkerColor ColorBlack
+_color = getMarkerColor MarkerOne
+returns "ColorBlack"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMarkerPos
+//KeywordEnd//
+DescriptionStart:
+Returns the position of a given marker. [x,y,z]
+Argument 3 (height above ground) is always zero.
+If a non-existing marker is referenced the values returned are [0,0,0].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMarkerPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMarkerPos markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$MarkerOne setMarkerPos [200,100]
+_pos = getMarkerPos MarkerOne
+returns [200,100,0]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - (format Position3D )
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMarkerSize
+//KeywordEnd//
+DescriptionStart:
+Returns the size of a given marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMarkerSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMarkerSize markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$MarkerOne setMarkerSize [100,200]
+_size = getMarkerSize MarkerOne
+returns [100,200]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMarkerType
+//KeywordEnd//
+DescriptionStart:
+Returns the type of a given marker. See cfgMarkers for a list of standard markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMarkerType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMarkerType markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$MarkerOne setMarkerType Destroy
+_type = getMarkerType MarkerOne
+returns "Destroy"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String. See cfgMarkers.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMass
+//KeywordEnd//
+DescriptionStart:
+Returns mass of a PhysX object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMass object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mass = getMass _myCar$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMissionConfig
+//KeywordEnd//
+DescriptionStart:
+Returns Config class of a scenario attribute from the 1st tier. The attribute can be defined on multiple places, the commands 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMissionConfig
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMissionConfig class
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMissionConfigValue
+//KeywordEnd//
+DescriptionStart:
+Returns value of given scenario attribute from the 1st tier. The attribute can be defined on multiple places, the commands 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMissionConfigValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMissionConfigValue attribute
+%NextRawSyntax%
+getMissionConfigValue [attribute, defaultValue]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number, String or Array, depending on the attribute value type. Nil when the attribute is undefined.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getModelInfo
+//KeywordEnd//
+DescriptionStart:
+Returns object's model info in format [modelName, modelPath, hasSkeleton]. Model path is suitable for use with createSimpleObject command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getModelInfo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getModelInfo object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_modelInfo = getModelInfo player ;$/Code$
+%NextExample%
+$Code$_modelInfo = getModelInfo cursorObject ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [modelName, modelPath, hasSkeleton]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getMousePosition
+//KeywordEnd//
+DescriptionStart:
+Returns mouse position in UI coordinates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getMousePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getMousePosition
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = getMousePosition ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - position in format [x, y], where x and y are UI coordinates
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getNumber
+//KeywordEnd//
+DescriptionStart:
+Extract number from config entry.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getNumber config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_value = getNumber ( configFile "CfgVehicles" "Thing" "maxSpeed");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(13 September 2011)
+With an not existing entry, getNumber returns 0.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectArgument
+//KeywordEnd//
+DescriptionStart:
+Return name of object argument in mission editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectArgument
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map getObjectArgument [object, argument]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectChildren
+//KeywordEnd//
+DescriptionStart:
+Return a list of all the children of the specified object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectChildren
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map getObjectChildren object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectDLC
+//KeywordEnd//
+DescriptionStart:
+Returns appID of the DLC the object belongs to or nil if object is vanilla.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectDLC
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getObjectDLC obj
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number or Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectMaterials
+//KeywordEnd//
+DescriptionStart:
+Gets all custom materials associated with the object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectMaterials
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getObjectMaterials obj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_materials = getObjectMaterials car;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings - array of materials
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectProxy
+//KeywordEnd//
+DescriptionStart:
+Return the proxy object associated with the given editor object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectProxy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map getObjectProxy object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( findDisplay 128 displayCtrl 51) getObjectProxy "_unit_1"
+// returns the object 'B 1-1-A:1 (Sean Johnson)'$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+classWorks in BIS RTE only?
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectTextures
+//KeywordEnd//
+DescriptionStart:
+Gets all custom textures (hiddenSelectionsTextures) associated with the object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectTextures
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getObjectTextures obj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_textures = getObjectTextures player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings - array of textures
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectType
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getObjectType object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objType = getObjectType player ;$/Code$
+%NextExample%
+$Code$_objType = getObjectType cursorObject ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - Object type
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getObjectViewDistance
+//KeywordEnd//
+DescriptionStart:
+Gets the values of rendering distances of objects and shadows.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getObjectViewDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getObjectViewDistance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = getObjectViewDistance ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in format [objectDistance, shadowDistance]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getOxygenRemaining
+//KeywordEnd//
+DescriptionStart:
+Returns amount of remaining oxygen.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getOxygenRemaining
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getOxygenRemaining unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_oxygen = getOxygenRemaining player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPersonUsedDLCs
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPersonUsedDLCs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPersonUsedDLCs unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objects = getPersonUsedDLCs player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPlayerChannel
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPlayerChannel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPlayerChannel player
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_channel = getPlayerChannel player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPlayerScores
+//KeywordEnd//
+DescriptionStart:
+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 []
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPlayerScores
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPlayerScores unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getPlayerScores BIS_player1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - the score of the given player in format [infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPlayerUID
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPlayerUID
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPlayerUID unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_uid = getPlayerUID player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 17, 2014)
+In Arma 3 the returned string is the steamID64 of the player. $Code$ _steamProfileUrl = http://steamcommunity.com/profiles/ + ( getPlayerUID player );$/Code$
+//NoteEnd//
+ReturnValueStart:
+String ("_SP_AI_", "_SP_PLAYER_" in SP, "" or UID number string in MP)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPos
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPos object
+%NextRawSyntax%
+origin getPos [distance, heading] Since Arma 3 v1.55.133361
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hintSilent str getPos player ;$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Find position 100 metres and 45 degrees from player position:
+player getPos [100,45];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(14 Dec, 2010)
+This command returns a PositionAGL. Apparently, Position and PositionAGL are the same thing.
+%NextNote%
+(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).
+%NextNote%
+(23 Nov, 2011)
+You can use getPos and setPos on triggers.
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionAGLS
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosASL
+//KeywordEnd//
+DescriptionStart:
+Returns the object position height above sea level.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosASL object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_AslPos = getPosASL player ;$/Code$
+%NextExample%
+$Code$hint format ["position above sea level: %1", ( getPosASL player ) select 2];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosASLVisual
+//KeywordEnd//
+DescriptionStart:
+Returns an object's rendered 3D position ASL (z value above sea level) in render time scope. Alias of visiblePositionASL.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosASLVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosASLVisual object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerRenderedPosASL = getPosASLVisual player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosASLW
+//KeywordEnd//
+DescriptionStart:
+Returns the object position height above sea surface (waves included).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosASLW
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosASLW obj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = getPosASLW _diver;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - PositionASLW
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosATL
+//KeywordEnd//
+DescriptionStart:
+Returns the position of an object relative to the terrain.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosATL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosATL object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objPosition getPosATL player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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 ) ;
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionATL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosATLVisual
+//KeywordEnd//
+DescriptionStart:
+Returns an object's rendered 3D position ATL (z value above ground) in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosATLVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosATLVisual object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerRenderedPosATL = getPosATLVisual player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionATL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosVisual
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosVisual object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerRenderedPos = getPosVisual player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionAGLS
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getPosWorld
+//KeywordEnd//
+DescriptionStart:
+Returns PositionWorld, which is PositionASL of the model centre [0,0,0] of an object, rather than transformed boundingCenter or LandContact vertices.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getPosWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getPosWorld object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_obj setPosWorld getPosWorld _obj;$/Code$
+%NextExample%
+$Code$ATLToASL (_groundObj modelToWorld [0,0,0]) isEqualTo getPosWorld _groundObj; //true$/Code$
+%NextExample%
+$Code$// Wave height under a boat:
+_h = ((boat modelToWorld [0,0,0]) vectorDiff getPosWorld boat) select 2;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionWorld
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getRelDir
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getRelDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object getRelDir position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_reldir = player getRelDir tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getRelPos
+//KeywordEnd//
+DescriptionStart:
+Returns position, which is given distance and relative direction away from original object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getRelPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object getRelPos [distance, direction]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Find position 100 metres away at player's 3 o'clock:
+_relpos = player getRelPos [100, 90];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+(3 March, 2016)
+//NoteEnd//
+ReturnValueStart:
+Array - format [x,y,z], where z is land surface in format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getRemoteSensorsDisabled
+//KeywordEnd//
+DescriptionStart:
+Get status of disabled raycasts for remote entities. See disableRemoteSensors for detailed description.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getRemoteSensorsDisabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getRemoteSensorsDisabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_status = getRemoteSensorsDisabled ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getRepairCargo
+//KeywordEnd//
+DescriptionStart:
+Returns the amount of repair resources from empty (0) to full (1) in the cargo space of a repair vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getRepairCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getRepairCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$value = getRepairCargo vehicleName;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getResolution
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getResolution
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getResolution
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getShadowDistance
+//KeywordEnd//
+DescriptionStart:
+Gets the shadows rendering distance.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getShadowDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getShadowDistance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_value = getShadowDistance;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(25 October, 2013)
+This command required one parameter of any type ( getShadowDistance anything) until Arma 3 ver. 1.06.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getSlingLoad
+//KeywordEnd//
+DescriptionStart:
+Return object which is sling loaded by vehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getSlingLoad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getSlingLoad vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cargo = getSlingLoad heli1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(05 April, 2014)
+Returns objNull when nothing is sling loaded.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getSpeed
+//KeywordEnd//
+DescriptionStart:
+Get the speed for the given speed mode.
+SpeedMode can be:
+"AUTO"
+"SLOW"
+"NORMAL"
+"FAST"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object getSpeed speedMode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_spd = player getSpeed "FAST";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getStamina
+//KeywordEnd//
+DescriptionStart:
+Get current stamina (~ seconds until depletion)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getStamina
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getStamina unit;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getStamina player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getSuppression
+//KeywordEnd//
+DescriptionStart:
+Gets the suppression value of given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getSuppression
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getSuppression unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$getSuppression AI_unit_1;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getTerrainHeightASL
+//KeywordEnd//
+DescriptionStart:
+Returns the terrain height above the sea for the given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getTerrainHeightASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getTerrainHeightASL position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_height = getTerrainHeightASL ( position player );$/Code$
+%NextExample%
+$Code$_height = getTerrainHeightASL [5213,3245];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getText
+//KeywordEnd//
+DescriptionStart:
+Extract text from config entry.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getText config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = getText ( configFile "CfgVehicles" "Thing" "icon");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getVariable
+//KeywordEnd//
+DescriptionStart:
+Return the value of variable in the variable space of given object or location.
+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
+Location getVariable String
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getVariable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+varspace getVariable name
+%NextRawSyntax%
+varspace getVariable [name, defaultValue]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_thePublicVariable = _myTruck getVariable "myPublicVariable";$/Code$
+%NextExample%
+$Code$_aLocalVariable = _myTruck getVariable ["myLocalVariable", ["Not set", _var]] select 1;$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$myMissionVar = 2015;
+missionNamespace getVariable "myMissionVar";//Returns 2015$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything or Nothing if the variable doesn't exist
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getWeaponCargo
+//KeywordEnd//
+DescriptionStart:
+Returns all weapons types and count from the cargo space
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getWeaponCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getWeaponCargo object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_content = getWeaponCargo carName;$/Code$
+%NextExample%
+$Code$_content = getWeaponCargo ammoBoxName;
+// Sample result returns:
+[["arifle_Katiba_F","launch_B_Titan_short_F"],[2,1]]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format [all_types_array, all_counts_array]. Eg: [["a", "b"], [3, 2]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+getWPPos
+//KeywordEnd//
+DescriptionStart:
+Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/getWPPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+getWPPos [group, index]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_group1,1] setWPPos [200,600,0]; _pos = getWPPos [_group1,1];
+// returns [200,600,0]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Position3D.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+glanceAt
+//KeywordEnd//
+DescriptionStart:
+Control what the unit is glancing at (target or Position ).
+How frequently the unit is glancing there depends on behaviour.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/glanceAt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit glanceAt position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_someSoldier glanceAt _otherSoldier$/Code$
+%NextExample%
+$Code$_otherSoldier glanceAt markerPos "markerOne"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+globalChat
+//KeywordEnd//
+DescriptionStart:
+Make a unit send a text message over the global radio channel. Does not need to have assigned "itemRadio" to see or transmit the messages.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/globalChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit globalChat chatText
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne globalChat "Show this text";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+globalRadio
+//KeywordEnd//
+DescriptionStart:
+Make a unit send a message over the global radio channel. The message is defined in the description.ext of the mission and may contain text and sound.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/globalRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit globalRadio radioName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne globalRadio messageOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+goggles
+//KeywordEnd//
+DescriptionStart:
+Returns name of currently used goggles (not NVGoggles).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/goggles
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+goggles unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_goggles = goggles assaultDiver; //G_Diving$/Code$
+%NextExample%
+$Code$_goggles = goggles reconTeamLeader; //G_Shades_Black$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+goto
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/goto
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+goto label
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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]
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+group
+//KeywordEnd//
+DescriptionStart:
+Returns the group a unit is assigned to.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/group
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerGrp = group player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Group -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupChat
+//KeywordEnd//
+DescriptionStart:
+Make a unit send a text message over the group radio channel. Must have assigned "itemRadio" to see or transmit the messages.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit groupChat chatText
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne groupChat "Show this text";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupFromNetId
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupFromNetId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupFromNetId id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group = groupFromNetId "4:45";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Group
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupIconSelectable
+//KeywordEnd//
+DescriptionStart:
+Return if groups icon raises onClick and onOver events.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupIconSelectable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupIconSelectable
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupIconsVisible
+//KeywordEnd//
+DescriptionStart:
+Return group icons are visible.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupIconsVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupIconsVisible
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// HC bar active
+if (isNil BIS_HC_visible ) then {BIS_HC_visible = groupIconsVisible};
+setGroupIconsVisible [true,true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupId
+//KeywordEnd//
+DescriptionStart:
+Returns group name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupId group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = groupId ( group player );$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupOwner
+//KeywordEnd//
+DescriptionStart:
+Returns ID of client to which the group is local. Can be run only from server. When called from client, it always returns 0
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupOwner group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_clientID = groupOwner _someGroup;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupRadio
+//KeywordEnd//
+DescriptionStart:
+Make a unit send a message over the group radio channel. The message is defined in the description.ext of the mission and may contain text and sound.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit groupRadio radioName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne groupRadio messageOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupSelectedUnits
+//KeywordEnd//
+DescriptionStart:
+Returns selected units in source group for normal commanding mode (individual units). For the High Command equivalent, see hcSelected.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupSelectedUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupSelectedUnits unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_selectedUnits = groupSelectedUnits player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+groupSelectUnit
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/groupSelectUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+player groupSelectUnit [unit, select]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// After leaving menu, deselect all units (command menu is not opened - no selection)
+{
+player groupSelectUnit [_x, false ];
+} forEach ( groupSelectedUnits player );$/Code$
+%NextExample%
+$Code$// Select all units when player is the leader:
+{
+player groupSelectUnit [_x, true ];
+} forEach units player ;$/Code$
+%NextExample%
+$Code$// Open communication with group leader:
+player groupSelectUnit [ leader player, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+grpNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Group. To compare non-existent groups use isNull or isEqualTo :
+grpNull == grpNull ; // false
+isNull grpNull ; // true
+grpNull isEqualTo grpNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/grpNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+grpNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull grpNull ; // false$/Code$
+%NextExample%
+$Code$str grpNull ; // NULL-group$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Group
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+gunner
+//KeywordEnd//
+DescriptionStart:
+Returns the gunner of a vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/gunner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+gunner vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$(gunner _tank1) action [ getout,_tank1]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Object -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+gusts
+//KeywordEnd//
+DescriptionStart:
+Return the current gusts value. Scale is 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/gusts
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+gusts
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_gustsval = gusts ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+halt
+//KeywordEnd//
+DescriptionStart:
+Stops the program into a debugger. In retail version using halt results in error.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/halt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+halt
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? _DbugWanted :halt$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+handgunItems
+//KeywordEnd//
+DescriptionStart:
+Returns array with all items assigned to the handgun. This command is used for infantry weapons only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/handgunItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+handgunItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$handgunItems player ;
+/*
+[
+"muzzle_snds_L",//silencer
+"",//laser
+""//optics
+]
+*/$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+handgunMagazine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/handgunMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+handgunMagazine unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint handgunMagazine player ; //["16Rnd_9x21_Mag"]$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+handgunWeapon
+//KeywordEnd//
+DescriptionStart:
+Returns the name of a unit's handgun (an empty string if there is none).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/handgunWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+handgunWeapon unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint handgunWeapon player ; //"hgun_P07_F"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+handsHit
+//KeywordEnd//
+DescriptionStart:
+Checks if a soldier's hands are hit, which results in inaccurate aiming.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/handsHit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+handsHit unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (handsHit player == 1) : player globalChat "Ouch! Don't shoot at my hands dammit!"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hasInterface
+//KeywordEnd//
+DescriptionStart:
+Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hasInterface
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hasInterface
+//RawSyntaxEnd//
+ExampleStart:
+$Code$headless = !( hasInterface || isDedicated );$/Code$
+%NextExample%
+$Code$_isHC = ! hasInterface ! isDedicated ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hasWeapon
+//KeywordEnd//
+DescriptionStart:
+Checks if a unit has the given weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hasWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName hasWeapon weaponName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$?!( player hasWeapon "M16") : player addWeapon "M16"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean -
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcAllGroups
+//KeywordEnd//
+DescriptionStart:
+Returns selected groups in high command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcAllGroups
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcAllGroups unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcGroupParams
+//KeywordEnd//
+DescriptionStart:
+Returns parameters describing group in high command bar.
+Return value is [string, float[4]]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcGroupParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit hcGroupParams group
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcLeader
+//KeywordEnd//
+DescriptionStart:
+Returns group's high command commander.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcLeader group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_leader = hcLeader groupName;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcRemoveAllGroups
+//KeywordEnd//
+DescriptionStart:
+Remove all groups from unit's high command bar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcRemoveAllGroups
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcRemoveAllGroups unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcRemoveGroup
+//KeywordEnd//
+DescriptionStart:
+Removes group from unit's high command bar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcRemoveGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit hcRemoveGroup group
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcSelected
+//KeywordEnd//
+DescriptionStart:
+Returns selected groups in high command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcSelected unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$array = hcSelected unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcSelectGroup
+//KeywordEnd//
+DescriptionStart:
+Select given group in high command bar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcSelectGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit hcSelectGroup array
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcSetGroup
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcSetGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit hcSetGroup array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit hcSetGroup [group, "HQ", teamred];$/Code$
+%NextExample%
+$Code$player hcSetGroup [group];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcShowBar
+//KeywordEnd//
+DescriptionStart:
+Shows or hides high command bar.
+There must be some groups under HC command to show HC bar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcShowBar
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcShowBar bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hcShowBar true ;$/Code$
+%NextExample%
+$Code$hcShowBar false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hcShownBar
+//KeywordEnd//
+DescriptionStart:
+Return true if the high command bar is shown/active.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hcShownBar
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hcShownBar
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( hcShownBar ) then { hint "HC bar is active";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+headgear
+//KeywordEnd//
+DescriptionStart:
+Returns headgear of unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/headgear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+headgear unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint headgear player ; //H_HelmetB$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hideBody
+//KeywordEnd//
+DescriptionStart:
+Hides the body of the given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hideBody
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hideBody person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hideBody player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hideObject
+//KeywordEnd//
+DescriptionStart:
+Hide entity. Can be used on soldiers and vehicles, also on static objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hideObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hideObject object
+%NextRawSyntax%
+object hideObject hidden
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hideObject unitName;$/Code$
+%NextExample%
+$Code$objectName hideObject true;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(July 15, 2010)
+This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.
+%NextNote%
+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$
+%NextNote%
+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
+%NextNote%
+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.
+%NextNote%
+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.
+%NextNote%
+(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.
+%NextNote%
+(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)
+%NextNote%
+(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)
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hideObjectGlobal
+//KeywordEnd//
+DescriptionStart:
+MP command. 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 != "").
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hideObjectGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hideObjectGlobal object
+%NextRawSyntax%
+object hideObjectGlobal hidden
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hideObjectGlobal nearestBuilding [2500,2500,0];$/Code$
+%NextExample%
+$Code$objectname hideObjectGlobal true;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hint
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hint text
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+Hint can be used with formatting like this:
+$Code$ hint format ["Hello %1", player ]$/Code$
+%NextNote%
+To remove the hint box from the screen, pass a null string ( "" ) to the command.
+$Code$ hint ""$/Code$
+%NextNote%
+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)
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(February 17, 2015)
+An open dialog will pause the 30-second hint fade timer.
+(A3 1.38.128937)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hintC
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hintC
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hintC content
+%NextRawSyntax%
+title hintC [content1, content2,...]
+%NextRawSyntax%
+title hintC content
+%NextRawSyntax%
+title hintC content
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hintC "Press W to move forward";$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+%NextExample%
+$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$
+%NextExample%
+$Code$_separator1 = parseText " br / ------------------------ br / ";
+_image = "\ca\ui\textures\aus_flag.paa";
+_txt = composeText [ image _image, "Heading Text", _separator1, "Content"];
+hintC _txt;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+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.
+%NextNote%
+HintC can be used with formatting like this: HintC format["Hello %1",player].
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hintCadet
+//KeywordEnd//
+DescriptionStart:
+Shows a text hint only when in cadetMode.
+The text can contain several lines. \n is used to indicate the end of a line.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hintCadet
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hintCadet text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hintCadet "Press W to move forward";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+hintCadet can be used with formatting like this:
+$Code$ hintCadet format ["Hello %1", player ]$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hintSilent
+//KeywordEnd//
+DescriptionStart:
+Same as hint, but without a sound.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hintSilent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hintSilent text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hintSilent "You texte comes here !"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hmd
+//KeywordEnd//
+DescriptionStart:
+Returns class name of currently used Head Mounted Display. Returns an empty string if the slot is empty.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hmd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hmd unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nvgs = hmd player ; //NVGoggles$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+hostMission
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/hostMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+hostMission [pConfig, pDisplay]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hostMission [configMissionName, display];$/Code$
+%NextExample%
+$Code$hostMission [ configFile /"CfgMissions"/"MPMissions"/_scenarioClassName, _currentlyActiveDisplay];$/Code$
+%NextExample%
+$Code$// Launch host mission dialog in Arma 3 from a client on dedicated server
+hostMission [
+configFile "CfgMissions" "MPmissions" "MP_COOP_m01",
+findDisplay 46
+];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(January 03, 2011)
+The command must be called in the main menu or something similar menu it seems.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+htmlLoad
+//KeywordEnd//
+DescriptionStart:
+Load HTML from file to given control. File path is relative to current mission dir or an absolute path (with drive letter etc.).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/htmlLoad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control htmlLoad filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control htmlLoad "briefing.html";$/Code$
+%NextExample%
+$Code$_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main language=English";// [1]$/Code$
+%NextExample%
+$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 language=English ;
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(September 7, 2014)
+htmlLoad works with URL's as well as html files.
+%NextNote%
+(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.
+%NextNote%
+(April 21, 2015)
+Example use of URL can be found in BIS_fnc_GUInewsfeed with the function browser.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+HUDMovementLevels
+//KeywordEnd//
+DescriptionStart:
+Returns movement borders for HUD [min speed, max speed, min alt, max alt, min dir, max dir, position[x,y,z] or target]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/HUDMovementLevels
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+HUDMovementLevels
+//RawSyntaxEnd//
+ExampleStart:
+$Code$HUDMovementLevels;//[0,0,0,0,0,0,[0,0,0]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+humidity
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/humidity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+humidity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$currentHumidity = humidity ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+if
+//KeywordEnd//
+DescriptionStart:
+The standard if, then, else construct available in many languages. This syntax however has alternate forms in the manner of an Array.
+if (condition) then { code } else { code }
+if (condition) then [ { code }, { code } ]
+Result of the Code executed is returned as the result to this command (which may be Nothing }.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/if
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+image
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text containing the given image.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/image
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+image filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_txt1 = image "data\isniper.paa";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+importAllGroups
+//KeywordEnd//
+DescriptionStart:
+Imports all groups into the RTE.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/importAllGroups
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+importAllGroups map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+importance
+//KeywordEnd//
+DescriptionStart:
+Returns a location's importance value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/importance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+importance location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locationImportance = importance myLocation$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+in
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/in
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+value in array
+%NextRawSyntax%
+unit in vehicle
+%NextRawSyntax%
+position in location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$1 in [0,1,2]; //true$/Code$
+%NextExample%
+$Code$"lol" in ["Lol", "LOL", "loL"]; //false
+"loL" in ["Lol", "LOL", "loL"]; //true$/Code$
+%NextExample%
+$Code$// Arma 3:
+[1,2,3] in [[1,2,3],[4,5,6]]; //true$/Code$
+%NextExample%
+$Code$_isInCar = player in car;$/Code$
+%NextExample%
+$Code$_isInside = [1000,2000,0] in myLocation;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inArea
+//KeywordEnd//
+DescriptionStart:
+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]. 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position inArea trigger
+%NextRawSyntax%
+position inArea marker
+%NextRawSyntax%
+position inArea location
+%NextRawSyntax%
+position inArea [center, a, b, angle, isRectangle]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerIsInside = player inArea _myTrigger;$/Code$
+%NextExample%
+$Code$_positionIsInside = _myPosition inArea [[100, 100, 0], 20, 30, 45, false];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+incapacitatedState
+//KeywordEnd//
+DescriptionStart:
+Returns the incapacitated state of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/incapacitatedState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+incapacitatedState person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_result = incapacitatedState player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+independent
+//KeywordEnd//
+DescriptionStart:
+Pre-defined variable for the independent side.
+Alias for resistance.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/independent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+independent
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQF:
+if (( side _unit) == independent ) then {
+hint "This is a independent unit!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inflame
+//KeywordEnd//
+DescriptionStart:
+Control fireplace burning. Set inflame to true (on) or false (off).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inflame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+fireplace inflame burn
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_fireplaceOne inflame true$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inflamed
+//KeywordEnd//
+DescriptionStart:
+Check if fireplace is inflamed (burning) or not.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inflamed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+inflamed fireplace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_IsAlight = inflamed _fireplaceOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inGameUISetEventHandler
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inGameUISetEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+inGameUISetEventHandler [handlerName, function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$inGameUISetEventHandler ["Action","hint 'Lights, Camera, Action!'; true "];$/Code$
+%NextExample%
+$Code$inGameUISetEventHandler ["PrevAction", " hint str _this; false "];
+inGameUISetEventHandler ["NextAction", " hint str _this; false "];
+inGameUISetEventHandler ["Action", " hint str _this; false "];$/Code$
+%NextExample%
+$Code$// Deny any weapon disassembly:
+inGameUISetEventHandler ["Action", "
+if (_this select 3 == 'DisAssemble') then {
+hint 'You are not allowed to do this';
+true
+}
+"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inheritsFrom
+//KeywordEnd//
+DescriptionStart:
+Returns base entry of config entry.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inheritsFrom
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+inheritsFrom config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_base = inheritsFrom ( configFile "CfgVehicles" "Car");
+// Result is "LandVehicle"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+initAmbientLife
+//KeywordEnd//
+DescriptionStart:
+Initialize the ambient life.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/initAmbientLife
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+initAmbientLife
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inPolygon
+//KeywordEnd//
+DescriptionStart:
+Checks whether position is inside given polygon
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inPolygon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position inPolygon polygon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isInside = [100,100,0] inPolygon [[0,0,0],[1000,1000,0],[1000,0,0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inputAction
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inputAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+inputAction name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$inputAction "leanLeft"
+// Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.$/Code$
+%NextExample%
+$Code$[] spawn {
+waitUntil { inputAction "reloadMagazine" 0};
+hint "Reload Key Pressed";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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).
+%NextNote%
+(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.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+inRangeOfArtillery
+//KeywordEnd//
+DescriptionStart:
+Returns true if all given units are able to fire at given position with given magazineType.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/inRangeOfArtillery
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+pos inRangeOfArtillery [[unit], magazineType]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isInRange = getMarkerPos "myTarget" inRangeOfArtillery [[myArty], "32Rnd_155mm_Mo_shells"]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(July 10, 2015)
+Using an empty artillery vehicle will return false.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+insertEditorObject
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/insertEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map insertEditorObject [type,value,[name1,value1,...],subtype class]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(May 7, 2015)
+"This works only in the old 3D editor" - KM
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+intersect
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/intersect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+[object, lodName] intersect [begPos, endPos]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(Jul 25, 2007)
+The most common LOD is " FIRE ", which identifies the most detailled hitbox used for ammunition.
+%NextNote%
+(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].
+%NextNote%
+(August 20, 2015)
+intersect will spam.rpt if passed to it object has no skeleton. Use getModelInfo to filter out those objects.
+//NoteEnd//
+ReturnValueStart:
+Array - array of intersections in format: [[selection, distance],...], where
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+is3DEN
+//KeywordEnd//
+DescriptionStart:
+Returns true if the Eden Editor is currently being used.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/is3DEN
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+is3DEN
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if is3DEN then { systemChat "Welcome to Eden Editor!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+is3DENMultiplayer
+//KeywordEnd//
+DescriptionStart:
+Returns true if the Eden Editor is in multiplayer mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/is3DENMultiplayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+is3DENMultiplayer
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if is3DENMultiplayer then { systemChat "Your hosting a test server!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isAbleToBreathe
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isAbleToBreathe
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isAbleToBreathe unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isAgent
+//KeywordEnd//
+DescriptionStart:
+Check if team member is an agent.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isAgent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isAgent teamMember
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isArray
+//KeywordEnd//
+DescriptionStart:
+Check if config entry represents array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isArray config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = isArray (configFile "CfgVehicles")
+// Result is false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isAutoHoverOn
+//KeywordEnd//
+DescriptionStart:
+Return true if vehicle has enabled auto hover. (always returns false if the vehicle can't set auto hover)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isAutoHoverOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isAutoHoverOn vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$status = isAutoHoverOn vehicle player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isAutonomous
+//KeywordEnd//
+DescriptionStart:
+Returns true if UAV is in autonomous mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isAutonomous
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isAutonomous uav
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bool = isAutonomous uav;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isAutotest
+//KeywordEnd//
+DescriptionStart:
+Returns true if game was started with autotest parameter
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isAutotest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isAutotest
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = isAutotest$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isBleeding
+//KeywordEnd//
+DescriptionStart:
+Returns whether the unit is bleeding.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isBleeding
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isBleeding unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isBleeding player ) then { player groupChat "I'm bleeding!!"; }$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isBurning
+//KeywordEnd//
+DescriptionStart:
+Returns whether the unit is burning.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isBurning
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isBurning unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isBurning player ) then { player groupChat "I'm burning!!"; }$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isClass
+//KeywordEnd//
+DescriptionStart:
+Check if config entry represents config class.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isClass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isClass config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = isClass ( configFile "CfgVehicles");
+// Result is true.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isCollisionLightOn
+//KeywordEnd//
+DescriptionStart:
+Returns true if vehicle collision lights are on otherwise false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isCollisionLightOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isCollisionLightOn vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_collisionLightOn = isLightOn heli;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isCopilotEnabled
+//KeywordEnd//
+DescriptionStart:
+Returns true if copilots actions are enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isCopilotEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isCopilotEnabled vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! isCopilotEnabled myHeli) then {
+myHeli enableCopilot true ;
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isDedicated
+//KeywordEnd//
+DescriptionStart:
+Return true if the machine (executing the command) is a dedicated multiplayer server. In single player returns false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isDedicated
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isDedicated
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isDedicated ) then { diag_log "Dedicated Server on the run !";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isDLCAvailable
+//KeywordEnd//
+DescriptionStart:
+Returns true if the DLC is marked as available. (Steam)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isDLCAvailable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isDLCAvailable appid
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_Karts = 288520;
+isDLCAvailable _Karts;//Returns true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 /
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEngineOn
+//KeywordEnd//
+DescriptionStart:
+Returns true if engine is on, false if it is off.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEngineOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isEngineOn vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_OnOff = isEngineOn _carOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(March 20, 2015)
+isEngineOn returns true for static objects without an engine
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualTo
+//KeywordEnd//
+DescriptionStart:
+Performs strict comparison between var1 and var2 and returns true if equal, otherwise false.
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+var1 isEqualTo var2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr1 = [1,[2,[3]]];
+_arr2 = [1,[2,[3]]];
+if (_arr1 isEqualTo _arr2) then { hint "Arrays match!"}$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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 " ".
+%NextNote%
+(May 21, 2015)
+A faster, case-sensitive alternative to BIS_fnc_areEqual using isEqualTo :
+$Code$KK_fnc_allEqual = {
+private ["_arr", "_first"];
+_arr = [];
+_first = _this select 0;
+for "_i" from 0 to count _this - 1 do {
+_arr pushBack _first;
+};
+_arr isEqualTo _this
+};
+// Example
+[[1,2],[1,2],[1,3]] call KK_fnc_allEqual; //false$/Code$
+%NextNote%
+(May 21, 2015)
+Array "compare" implementation using isEqualTo, a faster, case-sensitive alternative to BIS_fnc_arrayCompare :
+$Code$KK_fnc_compare = {
+_this select 0 isEqualTo (_this select 1)
+};
+// Example
+[[1,2,3],[1,2,3]] call KK_fnc_compare; //true$/Code$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualType
+//KeywordEnd//
+DescriptionStart:
+Compares 2 values by their type. A much faster alternative to typeName a == typeName b.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+val1 isEqualType val2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_var = [1,2,3];
+_var isEqualType 0; //false
+_var isEqualType []; //true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualTypeAll
+//KeywordEnd//
+DescriptionStart:
+Compares types of all elements of an array to the type of a single value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualTypeAll
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+arr isEqualTypeAll val
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3,4,5,6,7,8,9,0];
+_arr isEqualTypeAll ""; //false
+_arr isEqualTypeAll 0; //true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualTypeAny
+//KeywordEnd//
+DescriptionStart:
+Compares type of given value to every type in the given array and if match is found, true is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualTypeAny
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+val isEqualTypeAny types
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_var = [1,2,3];
+_var isEqualTypeAny [0,"", objNull ]; //false
+_var isEqualTypeAny [0,"", objNull,[]]; //true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualTypeArray
+//KeywordEnd//
+DescriptionStart:
+Compares types of all elements of one array to types of all elements of another array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualTypeArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+arr1 isEqualTypeArray arr2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,true,"three"];
+_arr isEqualTypeArray [0,objNull,""]; //false
+_arr isEqualTypeArray [0,false,""]; //true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isEqualTypeParams
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isEqualTypeParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+input isEqualTypeParams template
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isFilePatchingEnabled
+//KeywordEnd//
+DescriptionStart:
+Returns true if file patching is enabled otherwise false
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isFilePatchingEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isFilePatchingEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isFlashlightOn
+//KeywordEnd//
+DescriptionStart:
+Returns true if there is a linked and enabled flashlight on a given weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isFlashlightOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit isFlashlightOn weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player isFlashlightOn (currentWeapon player);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isFlatEmpty
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isFlatEmpty
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position isFlatEmpty [minDistance, -1, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Check if player position is over land:
+_overLand = !( position player isFlatEmpty [-1, -1, -1, -1, 0, false ] isEqualTo []);$/Code$
+%NextExample%
+$Code$// Check if player position is over shore line:
+_overShore = !( position player isFlatEmpty [-1, -1, -1, -1, 0, true ] isEqualTo []);$/Code$
+%NextExample%
+$Code$// Check if player position is over water:
+_overWater = !( position player isFlatEmpty [-1, -1, -1, -1, 2, false ] isEqualTo []);$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Check if area 10m around player position is relatively flat:
+_isFlat = !( position player isFlatEmpty [-1, -1, 0.3, 10, -1] isEqualTo []);$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array - Empty array [] if check failed or PositionASL if succeded. Resulting position will be original PositionAGL + getTerrainHeightASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isForcedWalk
+//KeywordEnd//
+DescriptionStart:
+Returns true if player is forced to walk with forceWalk.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isForcedWalk
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isForcedWalk unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = isForcedWalk player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isFormationLeader
+//KeywordEnd//
+DescriptionStart:
+Returns true if the specified unit is subgroup leader.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isFormationLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isFormationLeader unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isLeader = isFormationLeader player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+isLeader: Boolean - True if subgroup leader.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isHidden
+//KeywordEnd//
+DescriptionStart:
+Return whether the person is hidden (reached the hiding position). For command that tests general visibility of an object use isObjectHidden
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isHidden
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isHidden person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isInRemainsCollector
+//KeywordEnd//
+DescriptionStart:
+Checks if unit or vehicle is queued for disposal after death.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isInRemainsCollector
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isInRemainsCollector remain
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isInRemainsCollector unit1) then { hint "unit1 is queued for disposal"};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isInstructorFigureEnabled
+//KeywordEnd//
+DescriptionStart:
+True if instructor figure is enabled in Game Options.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isInstructorFigureEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isInstructorFigureEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isIRLaserOn
+//KeywordEnd//
+DescriptionStart:
+Returns true if there is a linked and enabled IR on the given weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isIRLaserOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit isIRLaserOn weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player isIRLaserOn currentWeapon player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isKeyActive
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isKeyActive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isKeyActive keyName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = isKeyActive Mission04Key$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isKindOf
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isKindOf
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object isKindOf typeName
+%NextRawSyntax%
+typeName1 isKindOf typeName2
+%NextRawSyntax%
+typeName1 isKindOf [typeName2, targetConfig]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player isKindOf "Tank";$/Code$
+%NextExample%
+$Code$"BMP2" isKindOf "Tank";$/Code$
+%NextExample%
+$Code$currentWeapon player isKindOf ["Rifle", configFile "CfgWeapons"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.)
+%NextNote%
+(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
+%NextNote%
+(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..
+%NextNote%
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isLightOn
+//KeywordEnd//
+DescriptionStart:
+Returns true if vehicle headlights are on otherwise false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isLightOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isLightOn vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_lightsOn = isLightOn vehicle player ;$/Code$
+%NextExample%
+$Code$_pilotLightOn = isLightOn heli;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isLocalized
+//KeywordEnd//
+DescriptionStart:
+Checks whether given string name is localized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isLocalized
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isLocalized stringName
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isManualFire
+//KeywordEnd//
+DescriptionStart:
+Returns true if manual fire is on.
+Always returns false for a soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isManualFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isManualFire vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = isManualFire vehicle player;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isMarkedForCollection
+//KeywordEnd//
+DescriptionStart:
+Checks whether the object is marked for weapons collection.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isMarkedForCollection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isMarkedForCollection object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_marked = isMarkedForCollection _truck$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isMultiplayer
+//KeywordEnd//
+DescriptionStart:
+Return true if multiPlayer.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isMultiplayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isMultiplayer
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (isMultiplayer) then {
+//...block
+}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isNil
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isNil
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isNil variable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isNil "_pokus") then {
+_pokus = 0;
+};$/Code$
+%NextExample%
+$Code$isNil { player getVariable "someVar"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+^ 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)
+%NextNote%
+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
+%NextNote%
+(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!
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isNull
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isNull entity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isNull obj) then { hint "doesn't exist";};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(December 9, 2015)
+isNull does not work with the TEAM_MEMBER type.
+Use this instead:
+$Code$_tmember isEqualTo teamMemberNull$/Code$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isNumber
+//KeywordEnd//
+DescriptionStart:
+Check if config entry represents number.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isNumber config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = isNumber (configFile "CfgVehicles")
+// Result is false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isObjectHidden
+//KeywordEnd//
+DescriptionStart:
+Checks visibility of a given object on the local machine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isObjectHidden
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isObjectHidden object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bobIsHidden = isObjectHidden bob;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if hidden, false if visible
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isObjectRTD
+//KeywordEnd//
+DescriptionStart:
+Returns true if RTD model is loaded
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isObjectRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isObjectRTD helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_heliRTD = isObjectRTD vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isOnRoad
+//KeywordEnd//
+DescriptionStart:
+Checks if given position is on road. Same as roadAt, only return is boolean instead of road object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isOnRoad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isOnRoad position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objOnRoad = isOnRoad player ;$/Code$
+%NextExample%
+$Code$_posOnRoad = isOnRoad ASLToAGL getPosASL player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isPipEnabled
+//KeywordEnd//
+DescriptionStart:
+Returns true if Picture in Picture (Render to Texture) is enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isPipEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isPipEnabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$PIPon = isPipEnabled;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isPlayer
+//KeywordEnd//
+DescriptionStart:
+Check if given person is a human player.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isPlayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isPlayer person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isPlayer _Soldier1) then {
+_Soldier1 setDamage 1;
+};$/Code$
+%NextExample%
+$Code$_playerCount = { isPlayer _x} count playableUnits ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isRealTime
+//KeywordEnd//
+DescriptionStart:
+Returns true if the mission editor is operating in real time mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isRealTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isRealTime map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isRealTime = isRealTime _map$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isServer
+//KeywordEnd//
+DescriptionStart:
+Returns true if the machine (executing the command) is the server in a multiplayer game or is running single player.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isServer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isServer
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! isServer ) exitWith {};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isShowing3DIcons
+//KeywordEnd//
+DescriptionStart:
+Returns true if the editor is set to draw 3D icons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isShowing3DIcons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isShowing3DIcons map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isSprintAllowed
+//KeywordEnd//
+DescriptionStart:
+Returns true if player is allowed to sprint
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isSprintAllowed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isSprintAllowed unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$isSprintAllowed player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isStaminaEnabled
+//KeywordEnd//
+DescriptionStart:
+Check if stamina depletion is enabled
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isStaminaEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isStaminaEnabled unit;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$isStaminaEnabled player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isSteamMission
+//KeywordEnd//
+DescriptionStart:
+Returns true if the current mission is a Steam Workshop mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isSteamMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isSteamMission
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isStreamFriendlyUIEnabled
+//KeywordEnd//
+DescriptionStart:
+True if stream friendly UI is enabled in Game Options.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isStreamFriendlyUIEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isStreamFriendlyUIEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isText
+//KeywordEnd//
+DescriptionStart:
+Check if config entry represents text.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isText config
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = isText (configFile "CfgVehicles")
+// Result is false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isTouchingGround
+//KeywordEnd//
+DescriptionStart:
+Returns true if object is touching the ground.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isTouchingGround
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isTouchingGround object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( isTouchingGround player ) then { hint "Terraferma!";};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isTurnedOut
+//KeywordEnd//
+DescriptionStart:
+Returns true if given unit is turned out, otherwise false.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isTurnedOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isTurnedOut unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_commanderOut = isTurnedOut (tank turretUnit [0,0]);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isTutHintsEnabled
+//KeywordEnd//
+DescriptionStart:
+True if tutorial hints are enabled in Game Options.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isTutHintsEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isTutHintsEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isUAVConnectable
+//KeywordEnd//
+DescriptionStart:
+Returns true if UAV is connectable by AV terminal(s).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isUAVConnectable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object isUAVConnectable [uav, checkAllItems]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$connectable = unit isUAVConnectable [uav,true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isUAVConnected
+//KeywordEnd//
+DescriptionStart:
+Returns true if UAV is connected to some terminal.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isUAVConnected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isUAVConnected uav
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bool = isUAVConnected cursorTarget ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isUniformAllowed
+//KeywordEnd//
+DescriptionStart:
+Check whether given uniform can be dressed by target soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isUniformAllowed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit isUniformAllowed type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_canUse = _unit isUniformAllowed "U_B_CombatUniform_mcam";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isWalking
+//KeywordEnd//
+DescriptionStart:
+Returns true if walk is toggled (W+S in Arma 3).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isWalking
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isWalking unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = isWalking player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isWeaponDeployed
+//KeywordEnd//
+DescriptionStart:
+Returns true if weapon is currently deployed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isWeaponDeployed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isWeaponDeployed unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dep = isWeaponDeployed player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(July 1, 2015)
+You can force a unit out of bipod or resting with:
+$Code$_unit playMove "";$/Code$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+isWeaponRested
+//KeywordEnd//
+DescriptionStart:
+Returns true if weapon is currently rested.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/isWeaponRested
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+isWeaponRested unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rest = isWeaponRested player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+(July 1, 2015)
+You can force a unit out of bipod or resting with:
+$Code$_unit playMove "";$/Code$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+itemCargo
+//KeywordEnd//
+DescriptionStart:
+Get array with items from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/itemCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+itemCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str itemCargo vestContainer player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Format: ["ItemType1","ItemType1","ItemType2"...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+items
+//KeywordEnd//
+DescriptionStart:
+Returns an array of names of all special items of a vehicle or a soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/items
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+items unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_itemsplayer = items player ;$/Code$
+%NextExample%
+$Code$player sideChat format ["%1", items player ];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(June 18, 2013)
+Arma 3, version 0.70 - magazines, explosives, grenades and all items currently linked on the unit are not returned now.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+itemsWithMagazines
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/itemsWithMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+itemsWithMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+join
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/join
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitArray join group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_unitOne, _unitTwo] join player ;$/Code$
+%NextExample%
+$Code$[_unitOne, _unitTwo] join ( group player );$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+joinAs
+//KeywordEnd//
+DescriptionStart:
+Joins the unit to the given group, if position id is available, this one is used.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/joinAs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit joinAs [group, id]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player joinAs [_group, 4];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+joinAsSilent
+//KeywordEnd//
+DescriptionStart:
+Joins the unit to the given group, if position id is available, this one is used. Avoid any radio communication related to joining.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/joinAsSilent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit joinAsSilent [group, id]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player joinAsSilent [_group, 4];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+I haven't done a thorough test but this function doesn't seem to work for Civilians, use joinSilent instead.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+joinSilent
+//KeywordEnd//
+DescriptionStart:
+Join all units in the array to given group silently (without radio message).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/joinSilent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitArray joinSilent group
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_unitOne, _unitTwo] joinSilent ( group player );$/Code$
+%NextExample%
+$Code$[_unitOne, _unitTwo] joinSilent player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(August 4, 2014)
+If all units of a group are joined to another group then the first group will be NULL-group afterward.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+joinString
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/joinString
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array joinString separator
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"]
+_str joinString " "; // "This is a sample string"$/Code$
+%NextExample%
+$Code$["This","is","sparta"] joinString " ~ "; // "This ~ is ~ sparta"$/Code$
+%NextExample%
+$Code$["1",2, text "3"] joinString ""; // "123"$/Code$
+%NextExample%
+$Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
+%NextExample%
+$Code$"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"$/Code$
+%NextExample%
+$Code$// Remove all \r\n from file:
+loadFile "somefile.txt" splitString toString [13,10] joinString " "$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbAddDatabase
+//KeywordEnd//
+DescriptionStart:
+Register knowledge base database to given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbAddDatabase
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbAddDatabase filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit kbAddDatabase chat.txt$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbAddDatabaseTargets
+//KeywordEnd//
+DescriptionStart:
+Register target list knowledge base database to given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbAddDatabaseTargets
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbAddDatabaseTargets filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit kbAddDatabase chat.txt$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbAddTopic
+//KeywordEnd//
+DescriptionStart:
+Register conversation topic to given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbAddTopic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbAddTopic [TopicName, filename.bikb, filename.fsm, event_handler]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player kbAddtopic[ myTest, myTest.bikb, myTest.fsm, {call compile preprocessFileLineNumbers myTest.sqf }];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+.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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbHasTopic
+//KeywordEnd//
+DescriptionStart:
+Check if conversation topic was registered to given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbHasTopic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbHasTopic TopicName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbReact
+//KeywordEnd//
+DescriptionStart:
+Pass a non-verbal communication to the receiver.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbReact
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbReact [receiver,topic,sentenceID,[argumentName,argumentValue,argumentText,argumentSpeech],...]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbRemoveTopic
+//KeywordEnd//
+DescriptionStart:
+Unregister conversation topic from given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbRemoveTopic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbRemoveTopic TopicName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbTell
+//KeywordEnd//
+DescriptionStart:
+Make the person tell to the receiver the sentence.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbTell
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbTell [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech],...,forceRadio]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+// 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];
+%NextNote%
+(may 02, 2010)
+Jezuro help on BIforum : [1]
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+kbWasSaid
+//KeywordEnd//
+DescriptionStart:
+Check if given item was said by person to someone.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/kbWasSaid
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person kbWasSaid [receiver, topic, sentenceID, maxAge]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myPlayer kbWasSaid [myReceiver, "myTopic", "mySentenceID", 3];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+keyImage
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/keyImage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+keyImage dikCode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = keyImage 28; //result is "Enter"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+keyName
+//KeywordEnd//
+DescriptionStart:
+Returns the name of a button (on the keyboard, mouse or joystick) with the given code.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/keyName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+keyName dikCode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = keyName 28; //result is "Enter"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+knowsAbout
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/knowsAbout
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+who knowsAbout target
+%NextRawSyntax%
+side knowsAbout target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_kv = _soldierOne knowsAbout _jeepOne;$/Code$
+%NextExample%
+$Code$_kv = ( side player ) knowsAbout _target;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+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 :))
+%NextNote%
+(July 05, 2009)
+In ArmA (other not tested), KnowsAbout value will stay at its highest value during approximately 2-3 min and then reinitialized.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+%NextNote%
+(May 31, 2014)
+Can also use SIDE in place of UNIT. For example:
+$Code$EAST knowsAbout player ;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Number in the range of 0 - 4, where 4 is max knowledge
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+land
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/land
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+helicopter land mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cobraOne land "LAND"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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).
+%NextNote%
+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 ;
+};
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+landAt
+//KeywordEnd//
+DescriptionStart:
+Order an AI airplane to land at a given airport. ID is the number to identify which airport on the island you want.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/landAt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+plane landAt id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_plane1 landAt 1$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+ARMA 3:
+Altis :
+0 = Airbase
+1 = AAC Airfield
+2 = Krya Nera Airstrip
+3 = Selakeno Airfield
+4 = Molos Airfield
+5 = Almyra Salt Lake Airstrip
+tom_48_97 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
+%NextNote%
+(November 8, 2014)
+In Arma 3 (1.34) landAt only works for fixed-wing aircraft. Rotary-wing craft ignore this command.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+landResult
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/landResult
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+landResult helicopter
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+language
+//KeywordEnd//
+DescriptionStart:
+Returns current game language.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/language
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+language
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+laserTarget
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/laserTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+laserTarget unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_target = laserTarget gunner heli;$/Code$
+%NextExample%
+$Code$_designatedPos = position laserTarget player;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(December 15, 2010)
+Need to be try with a soldier and laser designator
+%NextNote%
+(December 19, 2010)
+Works with either infantry or vehicles. Returns objNull if no target is present
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbAdd
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbAdd [idc, text]
+%NextRawSyntax%
+control lbAdd text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = lbAdd [101, "First item"];$/Code$
+%NextExample%
+$Code$_index = _control lbAdd "First item";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbClear
+//KeywordEnd//
+DescriptionStart:
+Clear all items in listbox or combobox with id idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbClear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbClear idc
+%NextRawSyntax%
+lbClear control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbClear 101;$/Code$
+%NextExample%
+$Code$lbClear _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbColor
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbColor [idc, index]
+%NextRawSyntax%
+control lbColor index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_colour = lbColor [101, 0];$/Code$
+%NextExample%
+$Code$_color = _control lbColor 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Array - format Color
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbCurSel
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbCurSel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbCurSel idc
+%NextRawSyntax%
+lbCurSel control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = lbCurSel 101;$/Code$
+%NextExample%
+$Code$lbCurSel _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(July 11, 2014)
+If nothing is selected this command returns -1
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbData
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbData [idc, index]
+%NextRawSyntax%
+control lbData index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_data = lbData [101, 0];$/Code$
+%NextExample%
+$Code$_data = _control lbData 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbDelete
+//KeywordEnd//
+DescriptionStart:
+Removes the item with the given index from the listbox or combobox with id idc of the topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbDelete
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbDelete [idc, index]
+%NextRawSyntax%
+control lbDelete index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbDelete [101, 0];$/Code$
+%NextExample%
+$Code$_control lbDelete 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbIsSelected
+//KeywordEnd//
+DescriptionStart:
+Check whether given row of the given listbox is selected.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbIsSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control lbIsSelected index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_selected = _control lbIsSelected 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbPicture
+//KeywordEnd//
+DescriptionStart:
+Returns the picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbPicture [idc, index]
+%NextRawSyntax%
+control lbPicture index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_picture = lbPicture [101, 0];$/Code$
+%NextExample%
+$Code$_picture = _control lbPicture 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSelection
+//KeywordEnd//
+DescriptionStart:
+Returns Array of selected rows indices in the given listbox of style LB_MULTI (multi-selection). For single selection listbox use lbCurSel instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSelection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSelection control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_indices = lbSelection _control;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetColor
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetColor [idc, index, color]
+%NextRawSyntax%
+control lbSetColor [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+%NextExample%
+$Code$_control lbSetColor [0, [0, 1, 0, 0.5]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetCurSel
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetCurSel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetCurSel [idc, index]
+%NextRawSyntax%
+control lbSetCurSel index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetCurSel [101, 0];$/Code$
+%NextExample%
+$Code$_control lbSetCurSel 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(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.
+%NextNote%
+(March 1, 2015)
+Keep in mind that running this command against control will fire attached 'onLBSelChanged' event handler.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetData
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetData [idc, index, data]
+%NextRawSyntax%
+control lbSetData [index, data]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetData [101, 1, "#1"];$/Code$
+%NextExample%
+$Code$_control lbSetData [1, "#1"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetPicture
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetPicture [idc, index, name]
+%NextRawSyntax%
+control lbSetPicture [index, name]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetPicture [101, 0, "iskoda"];$/Code$
+%NextExample%
+$Code$_control lbSetPicture [0, "iskoda"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetPictureColor
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetPictureColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetPictureColor [idc, index, color]
+%NextRawSyntax%
+control lbSetPictureColor [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetPictureColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+%NextExample%
+$Code$_ctrl lbSetPictureColor [0, [1, 1, 1, 1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetPictureColorDisabled
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetPictureColorDisabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetPictureColorDisabled [idc, index, color]
+%NextRawSyntax%
+control lbSetPictureColorDisabled [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetPictureColorDisabled [101, 0, [1, 1, 1, 0.25]];$/Code$
+%NextExample%
+$Code$_ctrl lbSetPictureColorDisabled [0, [1, 1, 1, 0.25]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetPictureColorSelected
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetPictureColorSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetPictureColorSelected [idc, index, color]
+%NextRawSyntax%
+control lbSetPictureColorSelected [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetPictureColorSelected [101, 0, [0, 1, 0, 0.5]];$/Code$
+%NextExample%
+$Code$_ctrl lbSetPictureColorSelected [0, [1, 1, 1, 1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetSelectColor
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetSelectColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetSelectColor [idc, index, color]
+%NextRawSyntax%
+control lbSetSelectColor [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetSelectColor [101, 0, [0, 1, 0, 0.5]];$/Code$
+%NextExample%
+$Code$_control lbSetSelectColor [0, [0, 1, 0, 0.5]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetSelectColorRight
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetSelectColorRight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetSelectColorRight [idc, index, color]
+%NextRawSyntax%
+control lbSetSelectColorRight [index, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetSelectColorRight [101, 0, [0, 1, 0, 0.5]];$/Code$
+%NextExample%
+$Code$_control lbSetSelectColorRight [0, [0, 1, 0, 0.5]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetSelected
+//KeywordEnd//
+DescriptionStart:
+Set the selection state of the given row of the given listbox of style LB_MULTI. For single selection listbox use lbSetCurSel instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetSelected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control lbSetSelected [index, selected]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control lbSetSelected [0, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetTooltip
+//KeywordEnd//
+DescriptionStart:
+Sets tooltip for item with given index of the listbox or combobox with id idc of the topmost user dialog to the given data.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetTooltip
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetTooltip [idc, index, tooltip]
+%NextRawSyntax%
+control lbSetTooltip [index, tooltip]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetTooltip [101, 1, "tooltip"];$/Code$
+%NextExample%
+$Code$_control lbSetTooltip [0, "another tooltip"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSetValue
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSetValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSetValue [idc, index, value]
+%NextRawSyntax%
+control lbSetValue [index, value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSetValue [101, 0, 1];$/Code$
+%NextExample%
+$Code$_control lbSetValue [0, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSize
+//KeywordEnd//
+DescriptionStart:
+Return number of items of listbox or combobox with id idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSize idc
+%NextRawSyntax%
+lbSize control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_size = lbSize 101;$/Code$
+%NextExample%
+$Code$_size = lbSize _control;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSort
+//KeywordEnd//
+DescriptionStart:
+Sorts listbox entries alphabetically ascending by their text.
+Alternative syntax (available since ARMA 3 v1.18) allows descending sorting as well.
+Order could be:
+"ASC"
+"DESC"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSort
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSort control
+%NextRawSyntax%
+lbSort [control, sortOrder]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSort _myControl;$/Code$
+%NextExample%
+$Code$lbSort [_myControl, "DESC"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbSortByValue
+//KeywordEnd//
+DescriptionStart:
+Sorts the Listbox Entries by their assigned Values.
+The Entries getting listed by their Negativity (most negative Value on Top).
+Also note that this Command will mix up the Entries randomly if multiple Entries have the same Value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbSortByValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbSortByValue control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lbSortByValue _control;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+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
+%NextNote%
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbText
+//KeywordEnd//
+DescriptionStart:
+Returns the shown text in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbText [idc, index]
+%NextRawSyntax%
+control lbText index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_text = lbText [101, 0];$/Code$
+%NextExample%
+$Code$_text = _control lbText 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lbValue
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lbValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lbValue [idc, index]
+%NextRawSyntax%
+control lbValue index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_value = lbValue [101, 0];$/Code$
+%NextExample%
+$Code$_value = _control lbValue 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+More information on the LB command family can be found here
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+leader
+//KeywordEnd//
+DescriptionStart:
+Returns the group leader for the given unit or group. For dead units, objNull is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/leader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+leader unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$leader group player == leader player$/Code$
+%NextExample%
+$Code$_GroupLeader = leader ( group ( vehicle player ))$/Code$
+%NextExample%
+$Code$_UnitLeader = leader player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+leaderboardDeInit
+//KeywordEnd//
+DescriptionStart:
+Deletes internal class for the leaderboard with given name. Returns true if the board has been found and deinitialized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/leaderboardDeInit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+leaderboardDeInit boardName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$leaderboardDeInit "TT01"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+leaderboardGetRows
+//KeywordEnd//
+DescriptionStart:
+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!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/leaderboardGetRows
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+leaderboardGetRows boardName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$leaderboardGetRows "TT01"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+leaderboardInit
+//KeywordEnd//
+DescriptionStart:
+Initialize the leaderboard structure for board with given name. Returns true if board is already initialized.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/leaderboardInit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+leaderboardInit boardName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$leaderboardInit "TT01"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+leaveVehicle
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/leaveVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group leaveVehicle vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit leaveVehicle _vehicle$/Code$
+%NextExample%
+$Code$_grp leaveVehicle _vehicle$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+libraryCredits
+//KeywordEnd//
+DescriptionStart:
+Returns the credits for the libraries used by the game.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/libraryCredits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+libraryCredits
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [array1, array2, (..), arrayN] all under the form [libraryName, credits]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+libraryDisclaimers
+//KeywordEnd//
+DescriptionStart:
+Returns the library disclaimers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/libraryDisclaimers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+libraryDisclaimers
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [array1] - only has one element at the moment, but this number might grow
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lifeState
+//KeywordEnd//
+DescriptionStart:
+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").
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lifeState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lifeState unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ls = lifeState loon;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lightAttachObject
+//KeywordEnd//
+DescriptionStart:
+Attach light to given object at given position on object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lightAttachObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light lightAttachObject [object, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(March 31, 2015)
+When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lightDetachObject
+//KeywordEnd//
+DescriptionStart:
+Detach light from object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lightDetachObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lightDetachObject light
+//RawSyntaxEnd//
+ExampleStart:
+$Code$LightDetachObject _light$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lightIsOn
+//KeywordEnd//
+DescriptionStart:
+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"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lightIsOn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lightIsOn lamppost
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? lightIsOn nearestObject [ player, "StreetLamp"] == "ON" :hint "nightime"$/Code$
+%NextExample%
+$Code$_it = lightIsOn object 159582$/Code$
+%NextExample%
+$Code$if ( count allMissionObjects "StreetLamp" == 0) then {
+hint "Objects compatible with 'lightIsOn' are not found.";
+} else {
+hint "'lightIsOn' compatible objects are found!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+Use switchLight to turn lamposts on and off.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lightnings
+//KeywordEnd//
+DescriptionStart:
+Return the current lightnings value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lightnings
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lightnings
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Get the current lightnings value:
+_lightningsVal = lightnings ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+limitSpeed
+//KeywordEnd//
+DescriptionStart:
+Limit speed of given vehicle or person to given value (in km/h).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/limitSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName limitSpeed speed
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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).
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+linearConversion
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/linearConversion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$linearConversion [4, 8, 5, 0, 1, false ];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number - respectful value from "to" range
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lineBreak
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text containing a line break.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lineBreak
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lineBreak
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_txt = composeText ["First line", lineBreak, "Second line"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lineIntersects
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lineIntersects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lineIntersects [begPos, endPos, objIgnore1, objIgnore2]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lineIntersects [ eyePos player, aimPos chopper, player, chopper]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(may 31, 2012)
+Please note the difference :
+terrainIntersect
+terrainIntersectASL
+lineIntersects
+lineIntersectsWith
+lineIntersectsObjs
+intersect
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if intersection
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lineIntersectsObjs
+//KeywordEnd//
+DescriptionStart:
+Returns list of objects intersected by given line from begPos to endPos.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lineIntersectsObjs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lineIntersectsObjs [begPos, endPos, withObj, ignoreObj, sortByDistance, flags]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(March 29, 2016)
+Distance sorting is relative to object model center, and not intersect position.
+//NoteEnd//
+ReturnValueStart:
+Array of Objects - intersecting objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lineIntersectsSurfaces
+//KeywordEnd//
+DescriptionStart:
+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.
+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"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lineIntersectsSurfaces
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_intersections = lineIntersectsSurfaces [ eyePos player, aimPos chopper, player, chopper, true, -1];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array of intersections in format [[intersectPosASL, surfaceNormal, intersectObj, parentObject],...] where:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lineIntersectsWith
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lineIntersectsWith
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lineIntersectsWith [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objects = lineIntersectsWith [ eyePos player, ATLtoASL screenToWorld [0.5,0.5]];$/Code$
+%NextExample%
+$Code$// Sort by distance:
+_objects = lineIntersectsWith [ eyePos player, ATLtoASL screenToWorld [0.5,0.5], objNull, objNull, true ];$/Code$
+%NextExample%
+$Code$// Ignore objects:
+_objects = lineIntersectsWith [ eyePos player, aimPos chopper, player, chopper];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(may 31, 2012)
+Please note the difference :
+terrainIntersect
+terrainIntersectASL
+lineIntersect s
+lineIntersect s With
+lineIntersect s Objs
+intersect
+//NoteEnd//
+ReturnValueStart:
+Array - intersecting objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+linkItem
+//KeywordEnd//
+DescriptionStart:
+Create and assign item to the correct slot. If there is an item in the targeted slot, it gets replaced.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/linkItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit linkItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit linkItem "NVGoggles";
+opforUnit linkItem "NVGoggles_OPFOR";
+independentUnit linkItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+list
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/list
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+list trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tlist = list _triggerOne;$/Code$
+%NextExample%
+$Code$hint format ["%1", thislist ];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array or Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+listObjects
+//KeywordEnd//
+DescriptionStart:
+Return the list of all objects of given type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/listObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map listObjects type
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ln
+//KeywordEnd//
+DescriptionStart:
+Natural logarithm of x.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ln
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ln x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nlog = ln 10
+// Result is 2.302$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbAddArray
+//KeywordEnd//
+DescriptionStart:
+Adds list of rows of strings.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbAddArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbAddArray [IDC,[[[text,text],[value,..],[data,..]],[[text,text],[value,..],[data,..]],]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbAddArray [102,[[["#1"],[1],["#1"]]]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - index
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbAddColumn
+//KeywordEnd//
+DescriptionStart:
+Adds an column at given position. It returns the index of the newly added column.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbAddColumn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+_ctrl lnbAddColumn position
+%NextRawSyntax%
+lnbAddColumn [idc]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbAddColumn 0.8;$/Code$
+%NextExample%
+$Code$lnbAddColumn [105,0.8];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(A3 1.28) Horizontal coordinates of columns were added relative to list width, in range from 0 to 1.
+//NoteEnd//
+ReturnValueStart:
+Number or nil
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbAddRow
+//KeywordEnd//
+DescriptionStart:
+Adds an row of strings.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbAddRow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbAddRow [IDC,[ String, String... ]]
+%NextRawSyntax%
+_ctrl lnbAddRow [ String, String... ]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbAddRow [1,["COL1","COL2"]];$/Code$
+%NextExample%
+$Code$_ctrl lnbAddRow ["COL1","COL2"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number - Row index
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbClear
+//KeywordEnd//
+DescriptionStart:
+Clears all items in the given listbox or combobox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbClear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbClear idc
+%NextRawSyntax%
+lnbClear ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbClear _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbColor
+//KeywordEnd//
+DescriptionStart:
+Returns the text color of the item with the given position of the 2D listbox. The color is returned in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbColor [idc, [row, column]]
+%NextRawSyntax%
+control lnbColor [row, column]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbColor [0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbCurSelRow
+//KeywordEnd//
+DescriptionStart:
+Returns the index of the selected row id 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbCurSelRow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbCurSelRow idc
+%NextRawSyntax%
+lnbCurSelRow ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbCurSelRow _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbData
+//KeywordEnd//
+DescriptionStart:
+Returns the additional text (invisible) in an item with the given position of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbData [idc] ]
+%NextRawSyntax%
+_ctrl lnbData [row]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbData [ lnbCurSelRow _ctrl,0]; //"#1"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbDeleteColumn
+//KeywordEnd//
+DescriptionStart:
+Removes column with given index from ListNBox control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbDeleteColumn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbDeleteColumn [idc,index]
+%NextRawSyntax%
+ctrl lnbDeleteColumn index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbDeleteColumn 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbDeleteRow
+//KeywordEnd//
+DescriptionStart:
+Removes row with the given index from the given listbox or combobox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbDeleteRow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+_ctrl lnbDeleteRow row
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbDeleteRow 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbGetColumnsPosition
+//KeywordEnd//
+DescriptionStart:
+Returns relative screen X of ListNBox control columns position [0.1,0.3,0.6...]. Use lnbSetColumnsPos to set positions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbGetColumnsPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbGetColumnsPosition _ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbGetColumnsPosition _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbPicture
+//KeywordEnd//
+DescriptionStart:
+Returns the picture name or path of the item with the given position of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbPicture [IDC, [row, column]]
+%NextRawSyntax%
+control lnbPicture [row, column]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbPicture [200, [1, 1]];$/Code$
+%NextExample%
+$Code$_control lnbPicture [1, 1]; //"a3\ui_f\data\gui\cfg\ranks\corporal_gs.paa"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetColor
+//KeywordEnd//
+DescriptionStart:
+Sets the color of the item with the given position of the 2D listbox. Color is in format Color.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetColor [idc,[row,column],color]
+%NextRawSyntax%
+_ctrl lnbSetColor [ [row,column],color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbSetColor [ [0,0], [1,0,0,1] ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetColumnsPos
+//KeywordEnd//
+DescriptionStart:
+Sets relative screen X for ListNBox control columns positions. Setter for lnbGetColumnsPosition
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetColumnsPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetColumnsPos [idc, positions]
+%NextRawSyntax%
+ctrl lnbSetColumnsPos positions
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbSetColumnsPos [101, [0.1,0.5,0.7]];$/Code$
+%NextExample%
+$Code$_ctrl lnbSetColumnsPos [0.1,0.5,0.7];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Sep 9 2014)
+See: List Box#LISTNBOX
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetCurSelRow
+//KeywordEnd//
+DescriptionStart:
+Selects the row with the given index of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetCurSelRow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetCurSelRow [idc, index]
+%NextRawSyntax%
+ctrl lnbSetCurSelRow index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$disableSerialization ;
+_ctrl = ( findDisplay 300) displayCtrl 304;
+_ctrl lnbSetCurSelRow 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetData
+//KeywordEnd//
+DescriptionStart:
+Sets the additional text (invisible) in the item with the given position of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetData [idc]
+%NextRawSyntax%
+_ctrl lnbSetData [ [row]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbSetData [ [0,0],"#1"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetPicture
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetPicture [IDC, [Row, Column], PicturePathOrPictureName]
+%NextRawSyntax%
+_ctrl lnbSetPicture [ [Row]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbSetPicture [1, [0, 0], "Picture"];$/Code$
+%NextExample%
+$Code$_ctrl lnbSetPicture [ [0, 0], "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetText
+//KeywordEnd//
+DescriptionStart:
+Sets the additional text (invisible) in the item with the given position of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetText [idc,[row,column],data]
+%NextRawSyntax%
+_ctrl lnbSetText [ [row,column],data]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbSetText [101, [0,1], "#1"];$/Code$
+%NextExample%
+$Code$_ctrl lnbSetText [ [0,1], "#1"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSetValue
+//KeywordEnd//
+DescriptionStart:
+Sets the additional integer value in the item with the position index of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSetValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSetValue [idc, [row, column], value]
+%NextRawSyntax%
+control lnbSetValue [[row, column], value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbSetValue [[0,0],1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbSize
+//KeywordEnd//
+DescriptionStart:
+Returns size of 2D listbox or combobox as [rows, columns].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbSize _ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$lnbSize _ctrl;//[8,2]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+[rows, columns]: Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbText
+//KeywordEnd//
+DescriptionStart:
+Returns the shown text in the item with the given position of the given 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control lnbText [row,column]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbText [0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lnbValue
+//KeywordEnd//
+DescriptionStart:
+Returns the additional integer value in the item with the given position of the 2D listbox.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lnbValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lnbValue [idc,[row, column]]
+%NextRawSyntax%
+ctrl lnbValue [row, column]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl lnbValue [0,0];//1, default is 0 if value is String set by lnbSetValue$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+load
+//KeywordEnd//
+DescriptionStart:
+Returns current sum of mass from items stored in all unit's containers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/load
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+load unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadAbs
+//KeywordEnd//
+DescriptionStart:
+Returns current sum of mass from items stored in all unit's containers, linked items and weapons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadAbs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadAbs unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadBackpack
+//KeywordEnd//
+DescriptionStart:
+Returns current sum of mass from items stored in a backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadBackpack unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myVariable = loadBackpack myUnit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadFile
+//KeywordEnd//
+DescriptionStart:
+Return content of given filename.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadFile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadFile filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_contents = loadFile "myFunction.sqf"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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")
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadGame
+//KeywordEnd//
+DescriptionStart:
+Load a game from the autosave. If failed, restart the mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadGame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadGame
+//RawSyntaxEnd//
+ExampleStart:
+$Code$loadGame ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadIdentity
+//KeywordEnd//
+DescriptionStart:
+Loads person's identity from Objects.sav file in campaign directory (from entry name).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadIdentity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person loadIdentity name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = player loadIdentity "playerIdentity"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadMagazine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+transport loadMagazine [turretPath, weaponName, magazineName]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player loadMagazine [[0],"m256","20Rnd_120mmHE_M1A2"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadOverlay
+//KeywordEnd//
+DescriptionStart:
+Creates the load overlay dialog for the specified type of overlay.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map loadOverlay config
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadStatus
+//KeywordEnd//
+DescriptionStart:
+Loads object's properties from Objects.sav file in campaign directory (from entry name).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadStatus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj loadStatus entryName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok = player loadStatus "playerState";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadUniform
+//KeywordEnd//
+DescriptionStart:
+Returns current sum of mass from items stored in a uniform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadUniform unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+loadVest
+//KeywordEnd//
+DescriptionStart:
+Returns current sum of mass from items stored in a vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/loadVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+loadVest unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+local
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/local
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+local object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?! local _unitName : hint "remote"$/Code$
+%NextExample%
+$Code$// SQF:
+if (! local _unitName) then {
+hint "remote";
+};$/Code$
+%NextExample%
+$Code$_isLocalGroup = local group _unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+localize
+//KeywordEnd//
+DescriptionStart:
+Used to internationalise text messages. A string is returned from Stringtable.csv (or stringtable.xml) which corresponds to the stringName.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/localize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+localize stringName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint localize "STR_WEST"; // - "BLUFOR" (in Arma2)$/Code$
+%NextExample%
+$Code$hint format ["Go %1", localize "STR_Q_NORTH"]; // - "Go North"$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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 lt; t color='#ff0000' gt; This works lt; /t gt; /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$
+//NoteEnd//
+ReturnValueStart:
+String - text found in corresponding entry in stringtable file
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+locationNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Location. To compare non-existent locations use isNull or isEqualTo :
+locationNull == locationNull ; // false
+isNull locationNull ; // true
+locationNull isEqualTo locationNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/locationNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+locationNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull locationNull ; // false$/Code$
+%NextExample%
+$Code$str locationNull ; // No location$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Location
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+locationPosition
+//KeywordEnd//
+DescriptionStart:
+Returns the position of a location. If the location is attached to an object, that object's position is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/locationPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+locationPosition location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locationPos = locationPosition myLocation;$/Code$
+%NextExample%
+$Code$_location = nearestLocation [ getPos player, "nameCity"];
+_locationPos = locationPosition _location;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 24, 2015)
+locationPosition returns a position that is altitude zero ASL.
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lock
+//KeywordEnd//
+DescriptionStart:
+Lock vehicle (disable mounting / dismounting) for player. Similar to setVehicleLock when number is used as param.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lock
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName lock locked
+%NextRawSyntax%
+vehicleName lock lockstate
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_jeepOne lock true ;$/Code$
+%NextExample%
+$Code$heli lock true ;
+locked heli; //2
+heli lock false ;
+locked heli; //0
+heli lock 1;
+locked heli; //1$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockCameraTo
+//KeywordEnd//
+DescriptionStart:
+Lock/Unlock stabilized camera (in vanilla used currently only for UAVs) to target.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockCameraTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockCameraTo [object,turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uav lockCameraTo [vehicle,[0,0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockCargo
+//KeywordEnd//
+DescriptionStart:
+Lock all cargo positions of a vehicle or lock by index. This command must be executed where vehicle is local.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockCargo lock
+%NextRawSyntax%
+vehicle lockCargo [index, lock]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicleName lockCargo true ;$/Code$
+%NextExample%
+$Code$vehicleName lockCargo [0, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockDriver
+//KeywordEnd//
+DescriptionStart:
+Lock the driver position of the vehicle. This command must be executed where vehicle is local.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockDriver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockDriver lock
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicleName lockDriver true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+locked
+//KeywordEnd//
+DescriptionStart:
+Check if vehicle is locked for Persons. If it is locked, Persons cannot mount / dismount without order.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/locked
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+locked vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locked = locked _jeepOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Number - since Arma 3: 0 - Unlocked; 1 - Default; 2 - Locked; 3 - Locked for player; -1 - vehicle is null. Older games will return Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockedCargo
+//KeywordEnd//
+DescriptionStart:
+Check whether cargo position of the vehicle is locked.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockedCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockedCargo cargoIndex
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_result = vehicleName lockedCargo 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockedDriver
+//KeywordEnd//
+DescriptionStart:
+Check whether driver position of the vehicle turret is locked.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockedDriver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lockedDriver vehicle
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockedTurret
+//KeywordEnd//
+DescriptionStart:
+Check whether gunner position of the vehicle turret is locked.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockedTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockedTurret turretPath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locked = tank lockedTurret [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockIdentity
+//KeywordEnd//
+DescriptionStart:
+Locks the identity of a person. This will disable default identity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockIdentity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lockIdentity unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_success = lockIdentity player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true, if it was applied
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockTurret
+//KeywordEnd//
+DescriptionStart:
+Lock the gunner position of the vehicle turret. This command must be executed where vehicle is local.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle lockTurret [turret path,lock]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicleName lockTurret [[0,0], true ];$/Code$
+%NextExample%
+$Code$vehicle player lockTurret [[0], true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lockWP
+//KeywordEnd//
+DescriptionStart:
+Disable switching to next waypoint (current waypoint will never complete while lockwp is used). Sometimes used during cut-scenes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lockWP
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName lockWP lock
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_groupOne lockWP true ;$/Code$
+%NextExample%
+$Code$_Soldier lockWP true ;$/Code$
+%NextExample%
+$Code$_MyTank lockWP false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+log
+//KeywordEnd//
+DescriptionStart:
+Base-10 logarithm of x.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/log
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+log x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_log = log 10; // 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+logEntities
+//KeywordEnd//
+DescriptionStart:
+Creates a log file containing the list of all game entities in scene.
+File is created in the same directory as.rpt file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/logEntities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+logEntities
+//RawSyntaxEnd//
+ExampleStart:
+$Code$logEntities ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+logNetwork
+//KeywordEnd//
+DescriptionStart:
+Registers new log file recording a network traffic and returns handle of the log.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/logNetwork
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+logNetwork logFile
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle = logNetwork "myLog.txt";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number - handle for the logging
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+logNetworkTerminate
+//KeywordEnd//
+DescriptionStart:
+Terminates a network log file started with logNetwork with the given handle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/logNetworkTerminate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+logNetworkTerminate handle
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lookAt
+//KeywordEnd//
+DescriptionStart:
+Control what the unit(s) is/are looking at (target or position).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lookAt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit lookAt position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_someSoldier lookAt _otherSoldier$/Code$
+%NextExample%
+$Code$[_someSoldier, _otherSoldier] lookAt markerPos "markerOne"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+lookAtPos
+//KeywordEnd//
+DescriptionStart:
+Center the map on,and point the camera at,the position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/lookAtPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map lookAtPos position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$(findDisplay 12) lookAtPos [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazineCargo
+//KeywordEnd//
+DescriptionStart:
+Get array with magazines from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazineCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazineCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str magazineCargo uniformContainer cursorTarget ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Format: ["MagType1","MagType1","MagType2"...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazines
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazines vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mags = magazines player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesAllTurrets
+//KeywordEnd//
+DescriptionStart:
+Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesAllTurrets
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesAllTurrets vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mags = magazinesAllTurrets vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in the following format: [[ className, turretPath, ammoCount, id, creator ],...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesAmmo
+//KeywordEnd//
+DescriptionStart:
+Returns array of arrays of all vehicle's magazines and their ammo count. 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesAmmo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$_magazinesAmmo = magazinesAmmo Mi_48;
+/*
+[
+["250Rnd_30mm_APDS_shells",250],
+["250Rnd_30mm_HE_shells",250],
+["8Rnd_LG_scalpel",8],
+["38Rnd_80mm_rockets",38]
+]
+*/$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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)
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesAmmoCargo
+//KeywordEnd//
+DescriptionStart:
+Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesAmmoCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesAmmoCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$magazinesAmmoCargo vehicle player ;$/Code$
+%NextExample%
+$Code$magazinesAmmoCargo uniformContainer player ;[
+["30Rnd_65x39_caseless_mag",30],
+["30Rnd_65x39_caseless_mag",30],
+["Chemlight_green",1]
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesAmmoFull
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesAmmoFull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesAmmoFull vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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)
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesDetail
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesDetail
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesDetail vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesDetailBackpack
+//KeywordEnd//
+DescriptionStart:
+Returns an array with the type names of all the unit's backpack magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesDetailBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesDetailBackpack unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$magazinesDetailBackpack player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesDetailUniform
+//KeywordEnd//
+DescriptionStart:
+Returns an array with the type names of all the unit's uniform magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesDetailUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesDetailUniform unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$magazinesDetailUniform player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesDetailVest
+//KeywordEnd//
+DescriptionStart:
+Returns an array with the type names of all the unit's vest magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesDetailVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+magazinesDetailVest unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$magazinesDetailVest player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazinesTurret
+//KeywordEnd//
+DescriptionStart:
+Returns all magazines of given turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazinesTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle magazinesTurret turretPath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mags = vehicle player magazinesTurret [0, 0];$/Code$
+%NextExample%
+$Code$_mags = _tank magazinesTurret [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+magazineTurretAmmo
+//KeywordEnd//
+DescriptionStart:
+Returns ammo count of given type from given turret
+Broken when vehicle has multiple magazines of the same type
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/magazineTurretAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle magazineTurretAmmo [magazineClass, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player magazineTurretAmmo ["cls", [0]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapAnimAdd
+//KeywordEnd//
+DescriptionStart:
+Add next frame to map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapAnimAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mapAnimAdd [time, zoom, position]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$mapAnimAdd [1, 0.1, markerPos "anim1"];
+mapAnimCommit ;$/Code$
+%NextExample%
+$Code$mapAnimAdd [3, 0.01, player ];
+mapAnimCommit ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapAnimClear
+//KeywordEnd//
+DescriptionStart:
+Clear map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapAnimClear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mapAnimClear
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapAnimCommit
+//KeywordEnd//
+DescriptionStart:
+Play map animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapAnimCommit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mapAnimCommit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+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)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapAnimDone
+//KeywordEnd//
+DescriptionStart:
+Check if map animation is finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapAnimDone
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mapAnimDone
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+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)
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapCenterOnCamera
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapCenterOnCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mainmap mapCenterOnCamera enable
+%NextRawSyntax%
+mapCenterOnCamera minimap
+//RawSyntaxEnd//
+ExampleStart:
+$Code$//--- Minimap update
+(( uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mapGridPosition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mapGridPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mapGridPosition param
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_gridPos = mapGridPosition player$/Code$
+%NextExample%
+$Code$_gridPos = mapGridPosition getPos player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - grid position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markAsFinishedOnSteam
+//KeywordEnd//
+DescriptionStart:
+Marks current mission as finished on Steam. Returns true if Steam query is successfully started or false otherwise.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markAsFinishedOnSteam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markAsFinishedOnSteam
+//RawSyntaxEnd//
+ExampleStart:
+$Code$markAsFinishedOnSteam ;
+endMission "END1";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerAlpha
+//KeywordEnd//
+DescriptionStart:
+Gets the marker alpha. See setMarkerAlpha.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerAlpha
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerAlpha markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$AlphaMarker = markerAlpha "myMarker;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerBrush
+//KeywordEnd//
+DescriptionStart:
+Gets the marker brush. See setMarkerBrush.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerBrush
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerBrush name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( markerBrush "Marker1" == "Solid") then { hint "Marker1 is solid!"}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerColor
+//KeywordEnd//
+DescriptionStart:
+Get marker colour. See setMarkerColor. Note: This function is identical to getMarkerColor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerColor markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( markerColor "Marker1" == "ColorRed") then { hint "Marker1 is red!"}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerDir
+//KeywordEnd//
+DescriptionStart:
+Get marker direction.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerDir markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mPos = markerDir "markerOne"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerPos
+//KeywordEnd//
+DescriptionStart:
+Get marker Position. Note: This function is identical to getMarkerPos.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerPos markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mPos = markerPos "markerOne";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(March 17, 2014)
+Position's Z coordinate will always be 0."
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerShape
+//KeywordEnd//
+DescriptionStart:
+Gets the marker shape. See setMarkerShape for a list of strings that can be returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerShape
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerShape name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( markerShape "Marker1" == "RECTANGLE") then { hint "Marker1 is a rectangle!"}$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerSize
+//KeywordEnd//
+DescriptionStart:
+Get marker size. Note: This function is identical to getMarkerSize.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerSize markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mSize = markerSize "Marker1";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerText
+//KeywordEnd//
+DescriptionStart:
+Get marker text.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerText markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint format ["Marker Text: %1", markerText "Marker1"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+markerType
+//KeywordEnd//
+DescriptionStart:
+Get type of marker. Note: This function is identical to getMarkerType. See cfgMarkers for a list of standard markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/markerType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerType markerName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( markerType "Marker1" == "Empty") then { hint "Marker1 is not an icon!"}$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String. See cfgMarkers.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+max
+//KeywordEnd//
+DescriptionStart:
+The greater of a,b
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/max
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+a max b
+//RawSyntaxEnd//
+ExampleStart:
+$Code$3 max 2
+// Result is 3$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+members
+//KeywordEnd//
+DescriptionStart:
+Return a list of members in given team.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/members
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+members team
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_members = members _team$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+min
+//KeywordEnd//
+DescriptionStart:
+The smaller of a,b
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/min
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+a min b
+//RawSyntaxEnd//
+ExampleStart:
+$Code$3 min 2
+// Result is 2$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mineActive
+//KeywordEnd//
+DescriptionStart:
+Checks if the given mine is active.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mineActive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mineActive obj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( mineActive _mine) then { hint "BOOM!"};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mineDetectedBy
+//KeywordEnd//
+DescriptionStart:
+Returns true if mine has been detected by a given side
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mineDetectedBy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+mine mineDetectedBy faction
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( allMines select 0) mineDetectedBy west ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+missionConfigFile
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionConfigFile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+missionConfigFile
+//RawSyntaxEnd//
+ExampleStart:
+$Code$for "_i" from (0) to (( count paramsArray ) - 1) do {
+missionNamespace setVariable [ configName (( missionConfigFile /"Params") select _i), paramsArray select _i];
+};$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// To get file path with description.ext to play sound via playSound3D :
+_filePath = [( str missionConfigFile ), 0, -15] call BIS_fnc_trimString ;$/Code$
+%NextExample%
+$Code$// Obtaining mission root using A3 substring functionality
+MISSION_ROOT = str missionConfigFile select [0, count str missionConfigFile - 15];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 )
+//NoteEnd//
+ReturnValueStart:
+Config
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+missionName
+//KeywordEnd//
+DescriptionStart:
+Return currently loaded mission file (path to mission.pbo, relative to game exe).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+missionName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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'.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+missionNamespace
+//KeywordEnd//
+DescriptionStart:
+Returns the global namespace attached to mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+missionNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$missionNamespace setVariable ["YourString",3];//Same as: YourString = 3;
+_yourString = missionNamespace getVariable "YourString";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Namespace
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+missionStart
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionStart
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+missionStart
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setDate ( missionStart select [0,5]);$/Code$
+%NextExample%
+$Code$// Set real date:
+//postInit = 1;
+if ( isServer ) then {
+waitUntil { time 0};
+setDate ( missionStart select [0,5]);
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Array - real local date and time (similar to date format but with seconds)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+missionVersion
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/missionVersion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+missionVersion
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_version = missionVersion ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number : SQM version
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+mod
+//KeywordEnd//
+DescriptionStart:
+Remainder of a divided by b.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/mod
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+a mod b
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rem = 3 mod 2;
+// Result is 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+modelToWorld
+//KeywordEnd//
+DescriptionStart:
+Converts position from object model space to world space. This command will take into account vectorUp of the object when calculating relative coordinates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/modelToWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object modelToWorld modelPos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_aboveAndBehindPlayer = player modelToWorld [0,-1,3];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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;
+%NextNote%
+(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 ).
+%NextNote%
+(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]);
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Array - world position in format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+modelToWorldVisual
+//KeywordEnd//
+DescriptionStart:
+Converts position from object model space to world space in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/modelToWorldVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object modelToWorldVisual modelPos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_aboveAndBehindPlayer = player modelToWorldVisual [0,-1,3];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - world position in format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moonIntensity
+//KeywordEnd//
+DescriptionStart:
+Returns the intensity of the moon's brightness in range 0...1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moonIntensity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moonIntensity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_intensity = moonIntensity ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moonPhase
+//KeywordEnd//
+DescriptionStart:
+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];
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moonPhase
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moonPhase date
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentMoonPhase = moonPhase date ;$/Code$
+%NextExample%
+$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 _day = 1 / 365;
+private _waxing = false ;
+private _fullMoonDates = [];
+for "_i" from -_day to dateToNumber [_year, 12, 31, 23, 59] step _day 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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+morale
+//KeywordEnd//
+DescriptionStart:
+Checks a current morale level of the unit (-1..+1).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/morale
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+morale unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$morale ( leader player );//result is 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+move
+//KeywordEnd//
+DescriptionStart:
+Creates a move waypoint on the given position (format Position or Position2D ) and makes it the currently active group waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/move
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group move position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_groupOne move position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+move3DENCamera
+//KeywordEnd//
+DescriptionStart:
+Moves Eden Editor camera to given position, with or without offset.
+Default camera offset: [0,-25,25]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/move3DENCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+move3DENCamera [position,useOffset]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$move3DENCamera [ getPos player,true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInAny
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInAny
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit moveInAny vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player moveInAny tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing ( Boolean since 1.27.126890 – whether the command moved the unit or not)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInCargo
+//KeywordEnd//
+DescriptionStart:
+Move soldier into vehicle cargo position (Immediate, no animation).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName moveInCargo vehicle
+%NextRawSyntax%
+unitName moveInCargo [vehicle, CargoIndex]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne moveInCargo _jeepOne;$/Code$
+%NextExample%
+$Code$_soldierOne moveInCargo [_jeepOne, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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 )
+%NextNote%
+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.
+%NextNote%
+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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInCommander
+//KeywordEnd//
+DescriptionStart:
+Move soldier into vehicle commander position (Immediate, no animation).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInCommander
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName moveInCommander vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne moveInCommander _tankOne$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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 )
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInDriver
+//KeywordEnd//
+DescriptionStart:
+Move soldier into vehicle driver position (Immediate, no animation).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInDriver
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName moveInDriver vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne moveInDriver _tankOne$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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 )
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInGunner
+//KeywordEnd//
+DescriptionStart:
+Move soldier into vehicle gunner position (Immediate, no animation).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInGunner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName moveInGunner vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne moveInGunner tankOne$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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 )
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveInTurret
+//KeywordEnd//
+DescriptionStart:
+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...
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveInTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName moveInTurret [vehicle, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne moveInTurret [_tank, [0, 0]]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(March 6, 2008)
+To find out which turrets are available on a vehicle, and what the syntax is, you can use this little script.
+%NextNote%
+(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$
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveObjectToEnd
+//KeywordEnd//
+DescriptionStart:
+Shifts an editor object to the end of the objects array. This means,that the object will be drawn last (after all other objects).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveObjectToEnd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map moveObjectToEnd object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveOut
+//KeywordEnd//
+DescriptionStart:
+Moves the soldier out of vehicle, immediately, without animation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moveOut soldier
+//RawSyntaxEnd//
+ExampleStart:
+$Code${ if ( lifeState _x == "UNCONSCIOUS") then { moveOut _x}} forEach crew cursorTarget ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(September 12, 2010)
+Seems to work only for unconscious - NOT for dead bodies. setPos /ATL/ASL seems to the only working for dead bodies.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveTime
+//KeywordEnd//
+DescriptionStart:
+Returns the current time of the most important RTM animation currently being played on the soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moveTime soldier
+//RawSyntaxEnd//
+ExampleStart:
+$Code$moveTime player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveTo
+//KeywordEnd//
+DescriptionStart:
+Low level command to person to move to given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person moveTo position
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveToCompleted
+//KeywordEnd//
+DescriptionStart:
+Check if latest low level moveTo command is finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveToCompleted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moveToCompleted person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+moveToFailed
+//KeywordEnd//
+DescriptionStart:
+Check if latest low level moveTo command failed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/moveToFailed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+moveToFailed person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+musicVolume
+//KeywordEnd//
+DescriptionStart:
+Checks the current music volume (set by fadeMusic )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/musicVolume
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+musicVolume
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+name
+//KeywordEnd//
+DescriptionStart:
+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.
+NOTE: In Arma 3 setName can be used on a person to set name. However in multiplayer name always returns profileName.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/name
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+name param
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = name vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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]
+%NextNote%
+(April 14, 2009)
+Will return
+Error: No vehicle
+for JIP players in init.sqf, if no sleep were performed
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+name_location
+//KeywordEnd//
+DescriptionStart:
+Returns the location's name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/name_location
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+name location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locationName = name myLocation;$/Code$
+%NextExample%
+$Code$name nearestLocation [ position player, "Hill"]; //""
+text nearestLocation [ position player, "Hill"]; //"Lesnoy Khrebet"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Appears to be only for the 3d editor.
+%NextNote%
+(May 17, 2015)
+To return the textual name of a location use text command instead
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nameSound
+//KeywordEnd//
+DescriptionStart:
+Returns the nameSound of a person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nameSound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nameSound person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$nameSound player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearEntities
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearEntities
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position nearEntities radius
+%NextRawSyntax%
+position nearEntities [typeName, radius]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(27 Mar, 2014)
+According to Code Optimisation, this function is the fastest and should be used instead of nearestObjects when suitable.
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestBuilding
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestBuilding
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestBuilding position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nBuilding = nearestBuilding player ;$/Code$
+%NextExample%
+$Code$_nBuilding = nearestBuilding position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestLocation
+//KeywordEnd//
+DescriptionStart:
+Return the closest location of specified class to a given position. Checked range is unlimited (i.e. covers the whole map).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestLocation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestLocation [position, locationClass]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nearestCity = nearestLocation [ getPos player, "nameCity"];$/Code$
+%NextExample%
+$Code$_anyNearestLocation = nearestLocation [ player, ""];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Location
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestLocations
+//KeywordEnd//
+DescriptionStart:
+Returns an array of locations of chosen type(s) within the given radius of the given position, sorted from nearest to farthest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestLocations
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestLocations [position, [locationType,...], radius, sortPosition]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nearbyLocations = nearestLocations [ position player, ["RockArea","VegetationFir"], 100];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of locations
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestLocationWithDubbing
+//KeywordEnd//
+DescriptionStart:
+Find the nearest location (to the given position) having it speech non-empty.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestLocationWithDubbing
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestLocationWithDubbing position
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Location
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestObject
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestObject [position, type]
+%NextRawSyntax%
+nearestObject position
+%NextRawSyntax%
+position nearestObject type
+%NextRawSyntax%
+position nearestObject id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_nObject = nearestObject [2345,6789];
+_nObject = nearestObject [ player, "StreetLamp"];$/Code$
+%NextExample%
+$Code$// Return the object with ID 123456:
+_nObject = [0,0,0] nearestObject 123456;$/Code$
+%NextExample%
+$Code$_nObject = getPos player nearestObject "StreetLamp";$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$_blood = nearestObject [ player, "#slop"];
+_step = nearestObject [ player, "#mark"];
+_track = nearestObject [ player, "#track"];
+_crater = nearestObject [ player, "#crater"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - Nearest object, objNull otherwise
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestObjects
+//KeywordEnd//
+DescriptionStart:
+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 according to distance2D to the object (i.e. 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestObjects [position, types, radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$nearestObjects [ player, ["Car","Tank"], 200];$/Code$
+%NextExample%
+$Code$nearestObjects [ player, ["house"], 200];$/Code$
+%NextExample%
+$Code$nearestObjects [[2716,2949,0], ["Car","Truck"], 100];$/Code$
+%NextExample%
+$Code$// Return every object in 50 metres radius around player:
+nearestObjects [ player, [], 50]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array - array of objects sorted according to distance2D
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearestTerrainObjects
+//KeywordEnd//
+DescriptionStart:
+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 distance2D 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", "ROCK", "BUNKER", "FORTRESS", "FOUNTAIN", "VIEW-TOWER", "LIGHTHOUSE", "QUAY", "FUELSTATION", "HOSPITAL", "FENCE", "WALL", "HIDE", "BUSSTOP", "ROAD", "FOREST", "TRANSMITTER", "STACK", "RUIN", "TOURISM", "WATERTOWER", "TRACK", "MAIN ROAD", "ROCKS", "POWER LINES", "RAILWAY", "POWERSOLAR", "POWERWAVE", "POWERWIND", "SHIPWRECK", "TRAIL"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearestTerrainObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nearestTerrainObjects [position, types, radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$nearestTerrainObjects [ player, ["Tree","Bush"], 200];$/Code$
+%NextExample%
+$Code$nearestTerrainObjects [ player, ["House"], 200];$/Code$
+%NextExample%
+$Code$nearestTerrainObjects [[2716,2949,0], ["Chapel","Fuelstation"], 100];$/Code$
+%NextExample%
+$Code$// Return every terrain object in 50 metres radius around player:
+nearestTerrainObjects [ player, [], 50]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - array of terrain objects sorted according to distance2D
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearObjects
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position nearObjects radius
+%NextRawSyntax%
+position nearObjects [typeName, radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = position player nearObjects 50;$/Code$
+%NextExample%
+$Code$_list = [_xpos,_ypos] nearObjects ["House", 20];$/Code$
+%NextExample%
+$Code$_list = player nearObjects 20;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 30, 2007)
+Units in vehicles are not detected via this command.
+%NextNote%
+(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)
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearObjectsReady
+//KeywordEnd//
+DescriptionStart:
+Check whether all data are loaded to nearObjects will return in reasonable time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearObjectsReady
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position nearObjectsReady radius
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_twnpos nearObjectsReady 500;//from ALICE$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearRoads
+//KeywordEnd//
+DescriptionStart:
+Find the road segments within the circle of given radius.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearRoads
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+pos nearRoads radius
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = player nearRoads 50;$/Code$
+%NextExample%
+$Code$_list = ( position _unit) nearRoads 50;$/Code$
+%NextExample%
+$Code$_list = [1800,5700] nearRoads 50;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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]
+//NoteEnd//
+ReturnValueStart:
+Array of Objects - road segments within radius
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearSupplies
+//KeywordEnd//
+DescriptionStart:
+Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearSupplies
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+origin nearSupplies radius
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_list = player nearSupplies 50;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nearTargets
+//KeywordEnd//
+DescriptionStart:
+Returns a list of targets within the defined range.
+"Targets" are not restricted to enemy units.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nearTargets
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit nearTargets range
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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
+%NextNote%
+(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.
+%NextNote%
+(January 21, 2012)
+Position accuracy seems to be a radius in meters from the perceived position.
+//NoteEnd//
+ReturnValueStart:
+Array - nested; consisting of:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+needReload
+//KeywordEnd//
+DescriptionStart:
+Return how much vehicle wants to reload its weapons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/needReload
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+needReload vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_seriousness = needReload _vehicle;$/Code$
+%NextExample%
+$Code$if ( needReload player == 1) then { reload player };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number Range: 0-1, 0: full mag, 1: empty mag
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+netId
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/netId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+netId var
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerNetId = netId player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+netObjNull
+//KeywordEnd//
+DescriptionStart:
+A non existing object. This value is not equal to anything, including itself
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/netObjNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+netObjNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myNetObject == netObjNull // Returns false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+newOverlay
+//KeywordEnd//
+DescriptionStart:
+Creates the new overlay dialog for the specified type of overlay.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/newOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map newOverlay config
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nextMenuItemIndex
+//KeywordEnd//
+DescriptionStart:
+Returns the next available menu item index.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nextMenuItemIndex
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nextMenuItemIndex map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nextWeatherChange
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nextWeatherChange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nextWeatherChange
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_seconds = nextWeatherChange ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nil
+//KeywordEnd//
+DescriptionStart:
+Nil value. This value can be used to undefine existing variables.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nil
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+nil
+//RawSyntaxEnd//
+ExampleStart:
+$Code$variableToDestroy = nil ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Note that ArrayName = nil destroys the arrayNAME not the array content.
+Array content is 'destroyed' when no more ArrayName s refer to the content.
+%NextNote%
+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"
+%NextNote%
+(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!
+//NoteEnd//
+ReturnValueStart:
+Void
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+nMenuItems
+//KeywordEnd//
+DescriptionStart:
+Returns the total number of user-added menu items belonging to the given menu.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/nMenuItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map nMenuItems menuName
+%NextRawSyntax%
+map nMenuItems index
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+not
+//KeywordEnd//
+DescriptionStart:
+not a.
+Exactly the same as ! a
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/not
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+not a
+//RawSyntaxEnd//
+ExampleStart:
+$Code$not false
+// Result is true.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+numberToDate
+//KeywordEnd//
+DescriptionStart:
+Convert float number to a date.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/numberToDate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+numberToDate [year,time]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_date = numberToDate [2008,0.5324]; //[2008,7,13,7,49]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+objectCurators
+//KeywordEnd//
+DescriptionStart:
+Returns array with all curators which can edit given object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/objectCurators
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectCurators obj
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+objectFromNetId
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/objectFromNetId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectFromNetId id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$objectFromNetId "2:3"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+objectParent
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/objectParent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectParent object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weaponholder = objectParent _mybackpack;$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Check if player is on foot:
+_isOnFoot = isNull objectParent player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+objNull
+//KeywordEnd//
+DescriptionStart:
+A non-existent Object. To compare non-existent objects use isNull or isEqualTo :
+objNull == objNull ; // false
+isNull objNull ; // true
+objNull isEqualTo objNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/objNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player == player ; // false if player is null$/Code$
+%NextExample%
+$Code$isNull player ; // true if player is null$/Code$
+%NextExample%
+$Code$str objNull // NULL-object$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+objStatus
+//KeywordEnd//
+DescriptionStart:
+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").
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/objStatus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectivenumber objStatus status
+//RawSyntaxEnd//
+ExampleStart:
+$Code$1 objStatus DONE
+Marks the objective named "OBJ_1" as completed.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onBriefingGroup
+//KeywordEnd//
+DescriptionStart:
+Select a sound declared in the Description.ext of the mission to be played the first time the Group tab is selected in the briefing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onBriefingGroup
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onBriefingGroup soundName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onBriefingGroup GroupVoiceOver$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onBriefingNotes
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onBriefingNotes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onBriefingNotes soundName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onBriefingNotes "NotesVoiceOver";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(8 Feb, 2007)
+In OFP it works only with the sound files defined in the mission's description.ext
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onBriefingPlan
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onBriefingPlan
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onBriefingPlan soundName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onBriefingPlan PlanVoiceOver$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(January 20, 2007)
+In OFP 1.96 only sound files defined in the mission description can be played in this way.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onBriefingTeamSwitch
+//KeywordEnd//
+DescriptionStart:
+Select a sound declared in the Description.ext of the mission to be played the first time the TeamSwitch tab is selected in the briefing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onBriefingTeamSwitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onBriefingTeamSwitch soundName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onBriefingTeamSwitch TeamSwitchVoiceOver$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onCommandModeChanged
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onCommandModeChanged
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onCommandModeChanged code
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onDoubleClick
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed when the user double clicks on the map. Command receives:,_pos array position,_units array selected units,_shift,_alt bool key state
+NOTE: This is old mission editor command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onDoubleClick
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map onDoubleClick command
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onEachFrame
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onEachFrame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onEachFrame statement
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onEachFrame { hintSilent str position player }; //Hints position every frame$/Code$
+%NextExample%
+$Code$// Private variables defined outside of onEachFrame scope are not inherited:
+_myvar = "bob";
+myvar = "bill";
+onEachFrame { hintSilent str [_myvar, myvar]};
+//Result: [any,"bill"]$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Script suspension is not permitted within onEachFrame scope:
+onEachFrame { sleep 1};
+//ERROR!!!$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(21 Dec, 2012)
+$Code$ onEachFrame {}; //Reset event$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onGroupIconClick
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onGroupIconClick
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onGroupIconClick command
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onGroupIconOverEnter
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onGroupIconOverEnter
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onGroupIconOverEnter command
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onGroupIconOverLeave
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed when pointer, previously positioned over icon, is moved away from it (3D or in a map). The code is executed once.
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: GroupIconOverLeave
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onGroupIconOverLeave
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onGroupIconOverLeave command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onGroupIconOverLeave
+{
+// 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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onHCGroupSelectionChanged
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed when high command group selection has been changed.
+Command receives 2 variables:
+_group: Group - last selected/deselected group
+_isSelected: Boolean - new selection state of the specific group
+The code is executed on every hc group selection change until it is
+removed via $Code$ onHCGroupSelectionChanged "";$/Code$ or $Code$ onHCGroupSelectionChanged {};$/Code$
+or replaced by $Code$ onHCGroupSelectionChanged "SomeOtherCommand(s)";$/Code$ or $Code$ onHCGroupSelectionChanged {SomeOtherCommand(s)};$/Code$
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: HCGroupSelectionChanged
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onHCGroupSelectionChanged
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onHCGroupSelectionChanged command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onHCGroupSelectionChanged {
+if (_isSelected) then {
+hint format ["Group %1 has been selected.", _group];
+} else {
+hint format ["Group %1 has been deselected.", _group];
+};
+};$/Code$
+%NextExample%
+$Code$onHCGroupSelectionChanged " player globalChat 'HC group selection has been changed.';";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onMapSingleClick
+//KeywordEnd//
+DescriptionStart:
+Define action performed when user clicks in map by executing command string.
+the string receives 5 (localised in scope) variables:
+_this: Anything - Params passed to onMapSingleClick
+_pos: Array - Clicked position
+_units: Array - Units which were selected (via function keys) before opening the map ( may be non-functional in Arma )
+_shift: Boolean - Whether Shift was pressed when clicking on the map
+_alt: Boolean - Whether Alt was pressed when clicking on the map
+In Arma 3 the code should return true only if you wish to override default engine handling of the mouse click on map (see example #4) For older games, when click is processed, code should ultimately return true back to the engine. If false is returned, default processing by the game engine is done. Return value of any other type (including Nothing ) is an error. In such case default processing by the game engine is done, and error message may be displayed.
+The code is executed on every click, until the Command is
+removed via onMapSingleClick "", or
+replaced by onMapSingleClick "SomeOtherCommand(s)"
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: MapSingleClick
+In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onMapSingleClick
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onMapSingleClick command
+%NextRawSyntax%
+params onMapSingleClick command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onMapSingleClick "'SoldierWB' createUnit [_pos, group player ]; true";
+// ArmA: Creates a soldier unit at the position clicked.$/Code$
+%NextExample%
+$Code$onMapSingleClick "grp1 move _pos; onMapSingleClick ''; true ";
+// ArmA: Orders "grp1" to move to position clicked. Disables further map-click actions.$/Code$
+%NextExample%
+$Code$onMapSingleClick "'SoldierWB' createUnit [_pos, group player ]; true ";
+// OFP: In OFP single quotes cannot be used for string definition, so two double-quotes have to be used instead.$/Code$
+%NextExample%
+$Code$//The following code will disable Shift+click waypoint marker creation
+onMapSingleClick {_shift};$/Code$
+%NextExample%
+$Code$//Pass params to onMapSingleClick code
+player onMapSingleClick { hint ("Hello " + name _this)}; //Hello KK$/Code$
+%NextExample%
+$Code$//Pass params to onMapSingleClick code and disable Shift+click waypoint marker creation
+player onMapSingleClick " hint (""Hello "" + name _this ); _shift"; //Hello KK$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(8 July, 2009)
+See my Multiple OnMapSingleClick script to allow you to add multiple events to the onMapSingleClick event. Some minor editing of the scripts would be required to use them in Arma.
+%NextNote%
+(April 1, 2016)
+_units param is supposed to return what groupSelectedUnits returns. Player must be leader and some units in the group must be selected on the group bar. However selected units are connected with group orders menu, which interferes with map click. In other words, when you click on the main map, the map gets focus and group orders menu closes, deselecting any selected unit, so _units is [] pretty much all the time.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onPlayerConnected
+//KeywordEnd//
+DescriptionStart:
+This command will execute attached code whenever a player is connected to a 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.
+_name : String - is profileName of the joining player.
+_uid : String - is getPlayerUID of the joining player. In Arma 3 it is also the same as Steam ID.
+_owner : ( since Arma 3 v1.49 ) Number - is owner id of the joining player. Can be used for kick or ban purposes or just for publicVariableClient.
+_jip : ( since Arma 3 v1.49 ) Boolean - is a flag that indicates whether or not the player joined after the mission has started ( J oined I n P rogress). true - when the player is JIP, otherwise false.
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: PlayerConnected
+In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onPlayerConnected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onPlayerConnected code
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onPlayerConnected "[_id, _name] execVM ""PlayerConnected.sqf""";$/Code$
+%NextExample%
+$Code$onPlayerConnected { diag_log [_id, _uid, _name]};$/Code$
+%NextExample%
+$Code$// From Arma 3 v1.49:
+onPlayerConnected {
+somevar = random 123;
+_owner publicVariableClient "somevar";
+//this will set somevar on
+//joining player PC to a random value
+};$/Code$
+%NextExample%
+$Code$// From Arma 3 v1.49:
+onPlayerConnected {isJip = _jip; _owner publicVariableClient "isJip"};
+//Each player will now have variable isJip containing individual JIP info$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onPlayerDisconnected
+//KeywordEnd//
+DescriptionStart:
+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.
+_name : String - is profileName of the leaving player.
+_uid : String - is getPlayerUID of the leaving player. In Arma 3 it is also the same as Steam ID.
+_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.
+_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.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onPlayerDisconnected
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onPlayerDisconnected code
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onPlayerDisconnected " diag_log [_id, _uid, _name]";$/Code$
+%NextExample%
+$Code$onPlayerDisconnected {
+if ( count allPlayers == 0) then {
+endMission "END1";
+};
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onPreloadFinished
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed after the preload screen finished.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onPreloadFinished
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onPreloadFinished command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onPreloadFinished 'TAG_ReceivingScreenDone = true;';$/Code$
+%NextExample%
+$Code$//removes the event immediately after the first run again
+onPreloadFinished {TAG_ReceivingScreenDone = true; onPreloadFinished {};};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onPreloadStarted
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed just before the preload screen started.
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: PreloadStarted
+In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onPreloadStarted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onPreloadStarted command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onPreloadStarted {diag_log "preload started";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onShowNewObject
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed when the user right clicks on the map and,selects New Object. Set to empty for default behavior. Command receives:,_pos array position,
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onShowNewObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map onShowNewObject command
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+onTeamSwitch
+//KeywordEnd//
+DescriptionStart:
+Defines an action performed when the team switch is finished. Commandset receives the following special variables: _from object previous unit, _to object current unit. Consecutive use of onTeamSwitch command will overwrite previously set commandset.
+i
+Since Arma 3 v1.57 a stackable version of this EH is available: TeamSwitch
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/onTeamSwitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+onTeamSwitch commandset
+//RawSyntaxEnd//
+ExampleStart:
+$Code$onTeamSwitch {[_from, _to] execVM "myTeamSwitchScript.sqf";};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+openCuratorInterface
+//KeywordEnd//
+DescriptionStart:
+Force opens curator interface.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/openCuratorInterface
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+openCuratorInterface
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Open interface:
+openCuratorInterface ;$/Code$
+%NextExample%
+$Code$// Close interface:
+findDisplay 312 closeDisplay 2;$/Code$
+%NextExample%
+$Code$// Detect if user used "Zeus" key to open curator interface in the absence of event handler for it:
+findDisplay 46 displayAddEventHandler ["KeyDown", {
+if ( inputAction "CuratorInterface" 0) then {
+hint "Curator interface is open";
+};
+false
+}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+openMap
+//KeywordEnd//
+DescriptionStart:
+Shows in-game map. If forced, cannot be closed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/openMap
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+openMap show
+%NextRawSyntax%
+openMap [show, forced]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$openMap true ;$/Code$
+%NextExample%
+$Code$openMap [ true, true ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+openYoutubeVideo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/openYoutubeVideo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+openYoutubeVideo youTubeUrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$//Open http://www.youtube.com/watch?v=UBIAbm7Rt78
+_isOpened = openYoutubeVideo "watch?v=UBIAbm7Rt78";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+opfor
+//KeywordEnd//
+DescriptionStart:
+Pre-defined variable for the opfor side.
+Alias for east.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/opfor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+opfor
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( side player == opfor ) then {
+hint "OPFOR";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+or
+//KeywordEnd//
+DescriptionStart:
+Returns true only if one or both conditions are true. In case of the alternative syntax, lazy evaluation is used (if left operand is true, evaluation of the right side is skipped completely).
+Identical to: a || b
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/or
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+a or b
+%NextRawSyntax%
+a or b
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ((OBJ1) or (_enemycount == 0)) then { hint "you win !"}$/Code$
+%NextExample%
+$Code$if (( count _array == 0) or {(_array select 0) != player }) then { hint "It works! Without lazy evaluation it would throw an error if array was empty."}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 29, 2015)
+The examples suggest that you can only use two conditions with or. You can use more if you want.
+It is not recommended to use a lot of conditions because the check will take longer to complete.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+orderGetIn
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/orderGetIn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitArray orderGetIn order
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_unitOne, _unitTwo] orderGetIn true$/Code$
+%NextExample%
+$Code$[_unitOne, _unitTwo] orderGetIn false$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+overcast
+//KeywordEnd//
+DescriptionStart:
+Return the current overcast level. Zero is clear skies, one is maximum cloud cover.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/overcast
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+overcast
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cloudLevel = overcast$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+overcastForecast
+//KeywordEnd//
+DescriptionStart:
+Return the overcast forecast.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/overcastForecast
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+overcastForecast
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+owner
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/owner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+owner object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_clientID = owner _someobject;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+param
+//KeywordEnd//
+DescriptionStart:
+Extracts a single value with given index from input argument, similar to BIS_fnc_param. When used without argument, as shown in main syntax, internal variable _this, which is usually available inside functions and event handlers, is used as argument. If input argument is not an array, it will be converted to 1 element array.
+If extracted item of input with given index is undefined, of the wrong type or of the wrong length (if the item is an array), default value is used instead. Since Arma 3 v1.53.132691, onscreen errors are displayed for when the input is of the wrong type or size.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/param
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+param [index, defaultValue, expectedDataTypes, expectedArrayCount]
+%NextRawSyntax%
+argument param [index, defaultValue, expectedDataTypes, expectedArrayCount]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[1, 2, 3] call {
+private ["_one", "_two", "_three"];
+_one = param [0, 1];
+_two = param [1, 2];
+_three = param [2, 3];
+//.....
+};$/Code$
+%NextExample%
+$Code$[123] call {
+private "_val";
+_val = param [0];
+};
+// Below would produce the same result as above
+123 call {
+private "_val";
+_val = param [0];
+};$/Code$
+%NextExample%
+$Code$_z = position player param [2, 0];
+if (_z 10) then {
+hint "YOU ARE FLYING!";
+};$/Code$
+%NextExample%
+$Code$fnc = {
+private ["_pos", "_rad"]
+_pos = param [0, [0,0,0], [ objNull, []], [2,3]];
+_rad = param [1, 0, [0]];
+_pos nearObjects _rad;
+};
+[ position player, 25] call fnc; //ok
+[ player, 25] call fnc; //ok
+[25, player ] call fnc; //default values are used$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything - extracted value on success or default value otherwise. Nothing if syntax error occurred.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+params
+//KeywordEnd//
+DescriptionStart:
+Parses input argument into array of private variables, similar to BIS_fnc_param. When used without argument, as shown in main syntax, internal variable _this, which is usually available inside functions and event handlers, is used as argument.
+In addition to simple parsing directly into variables, input can be tested in case it is undefined, of the wrong type or of the wrong size (if array) and substituted if necessary with default values. Since Arma 3 v1.53.132691, onscreen errors are displayed for when the input is of the wrong type or size.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/params
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+params [element1, element2,...elementN]
+%NextRawSyntax%
+argument params [element1, element2,...elementN]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[1, 2, 3] call {
+private ["_one", "_two", "_three"];
+_one = _this select 0;
+_two = _this select 1;
+_three = _this select 2;
+//.....
+};
+// Same as above, only using params
+[1, 2, 3] call {
+params ["_one", "_two", "_three"];
+//.....
+};$/Code$
+%NextExample%
+$Code$[123] call {
+params ["_myvar"];
+};
+// Below would produce the same result as above
+123 call {
+params ["_myvar"];
+};$/Code$
+%NextExample%
+$Code$position player params ["", "", "_z"];
+if (_z 10) then {
+hint "YOU ARE FLYING!";
+};$/Code$
+%NextExample%
+$Code$[1, nil, 2] params ["_var1", "_var2", "_var3"];
+// All 3 variables are made private but only _var1 and _var3 are defined
+[1, nil, 2] params ["_var1", ["_var2", 23], "_var3"];
+// All 3 variables are private and defined$/Code$
+%NextExample%
+$Code$[1, 2] call {
+if (! params ["_var1", "_var2", ["_var3", true, [ true ]]]) exitWith {
+hint str [_var1, _var2, _var3];
+};
+};
+// The hint shows [1,2,true]
+//Script exits, default value was used due to missing value
+[1, 2, 3] call {
+if (! params ["_var1", "_var2", ["_var3", true, [ true ]]]) exitWith {
+hint str [_var1, _var2, _var3];
+};
+};
+// The hint shows [1,2,true]
+//Script exits, default value was used due incorrect value type$/Code$
+%NextExample%
+$Code$[1, "ok", [1, 2, 3]] call {
+if (! params [
+["_var1", 0, [0]],
+["_var2", "", [""]],
+["_var3", [0,0,0], [[], objNull, 0], [2,3]]
+]) exitWith {};
+hint "ok";
+};
+// Passes validation
+[1, 2, [3, 4, 5]] call {
+if (! params ["_var1", "_var2", ["_var3", [], [[], objNull, 0], 0]]) exitWith {};
+hint "ok";
+};
+// Fails, because passed array is expected to be of 0 length, i.e. empty$/Code$
+%NextExample%
+$Code$position player params ["_x", "_y"];
+player setPos [_x, _y, 100];$/Code$
+%NextExample%
+$Code$[1, 2, 3, [4, 5, 6]] call {
+params ["_one", "_two", "_three"];
+_this select 3 params ["_four", "_five", "_six"];
+};$/Code$
+%NextExample%
+$Code${
+_x params ["_group", "_index"];
+//.....
+} forEach waypoints group player ;
+fn_someFnc = {
+params ["_position", ["_direction", 0], ["_name", ""]];
+// Extract the x, y, and z from "_position" array:
+_position params ["_x", "_y", "_z"];
+//.....
+};
+[ position player, direction player, name player ] call fn_someFnc;$/Code$
+%NextExample%
+$Code$targ addEventHandler ["HitPart", {
+_this select 0 params ["_target", "_shooter", "_projectile"];
+}];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 30, 2015)
+Because params doubles as private, instead of:
+$Code$[1, 2, 3] params ["_one", "_two", "_three"];
+private "_four";
+_four = 4;$/Code$
+You can just:
+$Code$[1, 2, 3] params ["_one", "_two", "_three", "_four"];
+_four = 4;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Boolean - false if error occurred or default value has been used, otherwise true
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+parseNumber
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/parseNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+parseNumber string
+%NextRawSyntax%
+parseNumber boolean
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_number = parseNumber "0.125"; //0.125$/Code$
+%NextExample%
+$Code$_number = parseNumber "2 abc"; //2$/Code$
+%NextExample%
+$Code$_number = parseNumber true ; //1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+parseText
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text by parsing the given XML description. Do not use parseText when displaying a localized text from stringtable.xml (see notes below).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/parseText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+parseText text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_Stxt = parseText "First line img image='data\isniper.paa'/ br/ Second line";$/Code$
+%NextExample%
+$Code$hintSilent parseText format [" t size='1.25' font='Zeppelin33' color='#ff0000' %1 lives remaining. /t ", 12];$/Code$
+%NextExample%
+$Code$_clickableLink = parseText a href='http://arma3.com' A3 /a ";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(22:07, 11 May 2007 (CEST))
+You can also colorate your text. You just have to use following tag:
+t color='#ffff00' Your yellow text! /t
+To change the size of your text, use this command:
+t size='2.2' Your bigger text! /t
+To change text font, use:
+t font='Zeppelin33' Bold Text /t
+To change horizontal alignment, use (parameter can be 'left', 'center', 'right'):
+t align='center' Centered Text /t
+To change vertical alignment within a line, use (parameter can be 'top', 'middle', 'bottom'):
+t valign='bottom' Text at Line Bottom /t
+To underline text, use:
+t underline='true' Underlined Text /t
+To put shadow under text, use:
+t shadow='true' t shadowColor='#ff0000' Text with Red Shadow /t /t
+Following statements are valid too:
+t underline='1' Underlined Text /t
+t shadow='1'shadowColor='#ff0000' Green shadow text /t
+Following fonts are valid (got from config):
+t font='Zeppelin32' Zeppelin32 (normal text) /t
+t font='Zeppelin33' Zeppelin33 (bold text) /t
+t font='Zeppelin33Italic' Zeppelin33Italic (bold italic text) /t
+t font='Bitstream' Bitstream (same as Zeppelin32) /t
+t font='TahomaB' TahomaB (same as Zeppelin32) /t
+t font='LucidaConsoleB' LucidaConsoleB (like Courier) /t
+%NextNote%
+(21 March 2009)
+Although there is a dedicated image command, parseText gives more options:
+img size='5' color='#ff0000' image='fish.paa'/
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+parsingNamespace
+//KeywordEnd//
+DescriptionStart:
+Returns the global namespace attached to config parser.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/parsingNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+parsingNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$parsingNamespace setVariable ["var1",101.23124];
+_profVar1 = parsingNamespace getVariable "var1";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(January 27, 2015)
+Any global variable defined in a config using __EXEC() will be stored in this namespace.
+For example in the description.ext:
+$Code$__EXEC(testVar = 1);$/Code$
+The variable "testVar" can be accessed during mission run time using getVariable
+$Code$ hint str ( parsingNamespace getVariable ["testVar", 0]);$/Code$
+The above example would print 1.
+This example however:
+$Code$__EXEC(_testVar = 1);$/Code$
+Would print 0, because adding an underscore will make the variable local to the config in the same way that it would make it local to a script.
+See PreProcessor Commands for more details on __EXEC()
+//NoteEnd//
+ReturnValueStart:
+Namespace
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+particlesQuality
+//KeywordEnd//
+DescriptionStart:
+Returns current settings for particles quality (configure- video- general- particles). 0-low, 1-normal, 2-high
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/particlesQuality
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+particlesQuality
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentQuality = particlesQuality ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pi
+//KeywordEnd//
+DescriptionStart:
+pi (180 degrees converted to Radians ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pi
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+pi
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_radians = 2*pi
+// Result is 6.2830$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pickWeaponPool
+//KeywordEnd//
+DescriptionStart:
+Transfer weapons and magazines from cargo of object into weapon pool (used in campaign to transfer weapons into next mission).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pickWeaponPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+pickWeaponPool object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pitch
+//KeywordEnd//
+DescriptionStart:
+Returns the pitch of a persons voice.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+pitch person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$pitch player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playableSlotsNumber
+//KeywordEnd//
+DescriptionStart:
+Returns the number of available slots in mission per side (both empty and taken). In singleplayer mission, it returns number of playable units per side.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playableSlotsNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playableSlotsNumber side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_maxBluforPlayers = playableSlotsNumber blufor ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playableUnits
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playableUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playableUnits
+//RawSyntaxEnd//
+ExampleStart:
+$Code${_x groupChat "I'm a playable unit.";} forEach playableUnits ;$/Code$
+%NextExample%
+$Code$// All playable units in a group:
+_playableInGroup = units group player arrayIntersect playableUnits ;$/Code$
+%NextExample%
+$Code$// All non-playable units in a group:
+_playableInGroup = units group player - playableUnits ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 13, 2009)
+In single-player missions, this command will return an empty array.
+%NextNote%
+(December 23, 2014)
+To get a list of all player-controlled units:
+$Code$_allPlayers = [];
+{
+if ( isPlayer _x) then
+{
+_allPlayers pushBack _x;
+};
+} forEach playableUnits ;$/Code$
+%NextNote%
+(April 15, 2015)
+Quote: $Code$ Killswitch
+In single-player missions, this command will return an empty array.$/Code$
+Use the switchableUnits command instead
+%NextNote%
+(August 16, 2015)
+playableUnits will not return dead players, use allPlayers instead.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playAction
+//KeywordEnd//
+DescriptionStart:
+When used on a person, a smooth transition to the given action will be initiated.
+For Arma 3 actions see: playAction/actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier playAction action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne playAction "SitDown"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playActionNow
+//KeywordEnd//
+DescriptionStart:
+When used on a person, a smooth transition to the given action will be initiated, but all previous playAction are discarded.
+For Arma 3 actions see: playAction/actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playActionNow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier playActionNow action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne playActionNow "SitDown";$/Code$
+%NextExample%
+$Code$rabbitTwo playActionNow "WalkF";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(October 12, 2010)
+Some other possible playactions:
+"walkf" - walk forward
+"walkb" - walk backwards
+"walkr" - strafe right
+"walkl" - strafe left
+"grabdrag" - initiate First Aid dragging animation
+"stopdrag" - stops First Aid dragging animation
+"reloadMagazine" - reloads the current magazine
+"gestureFreeze" - hand signal "Freeze"
+"GestureGo"
+"GestureCover"
+"GestureAttack"
+"GestureCeaseFire"
+"GestureFollow"
+"GestureUp"
+"GestureAdvance"
+"GesturePoint"
+Note that playAction works regardless of stance (rifle up, down, crouched, prone).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+player
+//KeywordEnd//
+DescriptionStart:
+Person controlled by player.
+In MP this value is different on each computer and on dedicated server this value is null.
+In Intros and Outros this isn't set by default and must be assigned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/player
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+player
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player addRating 500;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(20 Jul, 2010)
+Before you use the player object (usually to avoid JIP issues) all you need is to run:
+waitUntil {!isNull player};
+Anything else you see in other scripts is equivalent and/or redundant. Of course JIP players may need more than just the player to point at the actual JIP player unit, but that's script/mission-specific.
+%NextNote%
+(27 Jan, 2008)
+( isNull player ) is true for JIP players on their client during initialization.
+After initialization, it will be set, making it valid again.
+To cater for this, some people use code similar to the following in their spawned scripts:
+if (!isServer (player != player)) then
+{
+waitUntil {player == player};
+waitUntil {time 10};
+};
+// 'player' will now be valid
+_action = player addAction ["heal", "heal.sqf", [], -1, false, false, ""];
+See JIP/player topic for additional helpful information.
+%NextNote%
+(June 26, 2014)
+player can actually be REMOTE object on player's PC: http://www.youtube.com/watch?v=m6IILtfa3cQ
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playerRespawnTime
+//KeywordEnd//
+DescriptionStart:
+Return the player remaining time to respawn.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playerRespawnTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playerRespawnTime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waitUntil { playerRespawnTime = 0}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 21, 2007)
+When playerRespawnTime reaches zero the player respawns as expected. When the player has completed respawning this command returns -1.
+%NextNote%
+Also note that spawning doesn't create a body to use, but allows a player to choose an already
+existing one as defined either in the mission editor or in a script as player or playable.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playerSide
+//KeywordEnd//
+DescriptionStart:
+Returns the player's side. This is valid even when the player controlled person is dead (a difference from side player ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playerSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playerSide
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( side man1 == playerSide ) then {
+hint "man1 is on your side!";
+};$/Code$
+%NextExample%
+$Code$switch ( playerSide ) do {
+case west : {
+hint "You are BLUFOR";
+};
+case east : {
+hint "You are OPFOR";
+};
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playersNumber
+//KeywordEnd//
+DescriptionStart:
+Return count of players playing on given side. Works only in multiplayer, in singleplayer always returns 0.
+Returns number of playable slots taken by a side, not actual number of players of the side present in the mission. As a result, players who claimed a slot in the lobby but didn't start the mission yet are counted in as well.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playersNumber
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playersNumber side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_west = playersNumber west ;
+_east = playersNumber east ;
+_civ = playersNumber civilian ;
+hint format ["West:%1 East:%2, Civ:%3", _west, _east, _civ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 13, 2015)
+playersNumber returns playable AI as well as human players. It does not include non playable AI. [NOTE: This was observed in ArmA 1.05]
+To get the amount of players that are on the same side as the person executing the script:
+$Code$playersNumber playerSide;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playGesture
+//KeywordEnd//
+DescriptionStart:
+When used on a person,a smooth transition to the given move will be initiated. Command doesn't seem to be functional
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playGesture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier playGesture moveName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne playGesture "Wave"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 31, 2010)
+Rpt says "Not implemented" as of OA 1.54.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playMission
+//KeywordEnd//
+DescriptionStart:
+The mission is launched (from the main menu). Both campaign and mission are given as their directory name. If the campaign is empty, a single mission is launched. If skipBriefing is true, the intro and briefing are skipped.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playMission [campaign, mission, skipBriefing]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playMission ["XOutrage","x05Negotiator.Noe"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playMove
+//KeywordEnd//
+DescriptionStart:
+When used on person, smooth transition to given move will be done.
+List of moves in ArmA 2 List of moves in Armed Assault List of moves in Operation Flashpoint: Resistance
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playMove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName playMove moveName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne playMove "Stand"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+For an immediate transition use switchMove. This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playMoveNow
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playMoveNow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier playMoveNow moveName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player playMoveNow "AmovPercMevaSlowWrflDf"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playMusic
+//KeywordEnd//
+DescriptionStart:
+Plays music defined in CfgMusic. 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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playMusic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playMusic name
+%NextRawSyntax%
+playMusic [name, start]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playMusic "RadioAmbient1";$/Code$
+%NextExample%
+$Code$playMusic ["RadioAmbient3", 3]; //start from 00:00:03$/Code$
+%NextExample%
+$Code$// Play from 00:00:01 to 00:00:05
+0 = [] spawn {
+playMusic ["RadioAmbient5", 1];
+sleep 4;
+playMusic "";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+You can get all Music Types from Arma:_cfgMusic
+http://community.bistudio.com/wiki/Arma_2:_Music#top
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playScriptedMission
+//KeywordEnd//
+DescriptionStart:
+Load the given world, launch an empty mission and execute the given, expression. Config (optional) can reference to the config entry, replacing description.ext for this mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playScriptedMission
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playScriptedMission [world,expression,config,ignoreChildWindow]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playScriptedMission
+[
+desert_e,
+{
+private[ _handle ];
+_handle = execVM \ca\missions_e\data\scenes\credits1\init.sqf ;
+},
+configFile/ CfgMissions / Cutscenes / Credits
+];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 31, 2015)
+For this command to work, you will need to
+call command with ignoreChildWindow param set to true (in VBS docs its called fromMission)
+close any opened display (not sure about this part, but closing every display (but #0) seems to work):
+If mission is run from 2D editor, you can just close RscDisplayArcadeMap display (idd 26) (because this was done from 2D editor, so RscDisplayArcadeMap is still active in background -- benargee )
+If mission is run from single mission browser, you can just close RscDisplaySingleMission (idd 2)
+end mission
+Debriefing will show and player will be moved to new mission after clicking on Continue.
+Command is a bit bugged:
+Third (config) param doesn't seem to work
+If you run this command in mission loaded from pbo, said pbo won't be writable until you close the game (you can't update it)
+Following code will change change island to Stratis and spawns player as basic soldier at [0,0,0] coordinates.
+$Code$disableSerialization;
+playScriptedMission ['Stratis',{
+createCenter west;
+_grp = createGroup west;
+_player = _grp createUnit [ B_Soldier_F,[0,0,0],[],0, NONE ];
+selectPlayer _player;
+},missionConfigFile, true];
+//Close all displays that could be the background display... this is essentialy forceEnd command
+//Closing #0 will cause game to fail
+_zero = findDisplay(0);
+{
+if (_x != _zero) then {
+_x closeDisplay 1;
+};
+} foreach allDisplays;
+failMission END1 ;$/Code$
+(tested in Arma 3 1.54.133741)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playSound
+//KeywordEnd//
+DescriptionStart:
+selects Sound from CfgSounds declared in the Description.ext file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playSound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playSound soundName
+%NextRawSyntax%
+playSound [soundName, isSpeech]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playSound "soundname"$/Code$
+%NextExample%
+$Code$// Start a sound and then stop it after 1.2 second:
+playSound "AlarmCar";
+[] spawn
+{
+_sound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
+sleep 1.2;
+deleteVehicle _sound;
+};$/Code$
+%NextExample%
+$Code$// Start a sound and wait until it is finished:
+playSound "Alarm";
+hint "Started!";
+[] spawn
+{
+_sound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
+waitUntil { isNull _sound};
+hint "Finished!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+For dialogue involving living units it is better to use say, playSound will play a sound at the location of the player, say will play a sound at the location of the unit that is speaking, and it will only play that sound if the unit is alive.
+%NextNote%
+(December 28, 2014)
+As you may have noticed, the parameter for playsound/say3d that deals with the "volume" of the sound played has little to do with the effective loudness heard in game. What it is alters is the drop off for fading the sound at a distance. A higher decibel or integer value will increase the distance before any sort of fading will take place. The actual volume of the sound file played will factor in to this, as it does throughout the playing action.
+Amplifying the Sound
+Modifying the effective volume of sounds played by the engine is possible by "spamming" the sounds. By quickly playing the sounds overtop of one another, you can effectively amplify the volume
+This example,
+$Code$
+playSound "soundname";
+playSound "soundname";
+$/Code$
+Will effectively amplify the sound by a sensed 2x. The volume of the sound file itself will still affect the sound volume as it appears as though the arma engine has no normalization for sound files added to it.
+This technique may cause issues in sound quality in large multiplayer servers. I observed multiple instances when a triggered sound amplified with this method was out of sync with each other. Timing of the individual commands sent over the network is probably the issue. Recommend you compile your amplification code into a single finished function for better syncing for clients not activating the action/far away from the activation position.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+playSound3D
+//KeywordEnd//
+DescriptionStart:
+Plays positional sound with given filename on every computer on network. At least 2 parameters must be specified.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/playSound3D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playSound3D ["A3\Sounds_F\sfx\blip1.wav", player ]$/Code$
+%NextExample%
+$Code$playSound3D ["A3\Sounds_F\sfx\blip1.wav", player, false, getPosASL player, 1, 1, 0]$/Code$
+%NextExample%
+$Code$// Sound file extension must be specified even if a config entry has none:
+playSound3D ["A3\Sounds_F\sfx\alarm_independent", player ]; //no sound
+playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", player ]; //alarm$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(September 23, 2013)
+This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide
+%NextNote%
+(September 26, 2014)
+Currently, playSound3D is not JIP compatible, so joining players will not hear the sound if is started before and is still playing when player joins.
+%NextNote%
+(October 16, 2013)
+You need to get the correct path for custom mission sounds. Use missionConfigFile with BIS_fnc_trimString (to trim off " description.ext "), then add your mission's sound directory and sound file:
+$Code$_soundPath = [( str missionConfigFile ), 0, -15] call BIS_fnc_trimString;
+_soundToPlay = _soundPath + "sounds\some_sound_file.ogg";
+playSound3D [_soundToPlay, _sourceObject, false, getPos _sourceObject, 10, 1, 50];
+//Volume db+10, volume drops off to 0 at 50 meters from _sourceObject$/Code$
+%NextNote%
+(November 8, 2014)
+When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+position
+//KeywordEnd//
+DescriptionStart:
+Synonym for getPos.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/position
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+position object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionAGLS
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+positionCameraToWorld
+//KeywordEnd//
+DescriptionStart:
+Transforms position from camera coordinate space to world coordinate space.
+Camera axes are relative to camera orientation. x axis goes from left of the camera to right of the camera, z axis goes from underneath the camera to above the camera and y axis goes from back of the camera to where the camera is looking.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/positionCameraToWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+positionCameraToWorld cameraPos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_worldPos = positionCameraToWorld _cameraPos;$/Code$
+%NextExample%
+$Code$// Example demonstrating reversed y and z:
+player setDir 0; //assuming player is looking forward
+hint str [ positionCameraToWorld [0,0,0], positionCameraToWorld [0,0,1]];
+//[[2481.35,567 1.21,1.51395],[2481.35,567 2.21,1.46955]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 17, 2008)
+By measuring the distance between the camera and the player one can determine whether 1st-person or 3rd-person view is being used:
+$Code$ if (( positionCameraToWorld [0,0,0] distance player ) 2) then { hint "3rd person"} else { hint "1st person"};$/Code$
+%NextNote%
+(22:45, 17 October 2010 (CEST))
+The camera coordinate system is different from the model coordinate system: when modelToWorld uses [x, y, z] then positionCameraToWorld uses [x, z, y]. So for a steady camera the following is true:
+$Code$ positionCameraToWorld [5,10,15] == _camera modelToWorld [5,15,10];$/Code$
+%NextNote%
+(July 20, 2014)
+When over land, the position returned is in format PositionATL, and over sea, PositionASLW.
+//NoteEnd//
+ReturnValueStart:
+Array - Camera world position, format PositionAGL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+posScreenToWorld
+//KeywordEnd//
+DescriptionStart:
+Convert screen coordinates in map to world coordinates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/posScreenToWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map posScreenToWorld [x, y]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_WorldCoord = _Control posScreenToWorld _ScreenCoord$/Code$
+%NextExample%
+$Code$_WorldCoord = _Control posScreenToWorld [_x,_y]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 7, 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;
+//NoteEnd//
+ReturnValueStart:
+Array ( Position2D Format)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+posWorldToScreen
+//KeywordEnd//
+DescriptionStart:
+Convert world coordinates to screen coordinates in map.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/posWorldToScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map posWorldToScreen position
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array ( Position2D Format)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectAdjust
+//KeywordEnd//
+DescriptionStart:
+Set post process effect parameters
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectAdjust
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+effect ppEffectAdjust settings
+%NextRawSyntax%
+effect ppEffectAdjust settings
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"colorCorrections" ppEffectAdjust [1,1,-0.01,[0.0,0.0,0.0,0.0],[1.5,1,1.2,0.6],[0.199,0.587,0.114,0.20]];$/Code$
+%NextExample%
+$Code$// Black White:
+_eff ppEffectAdjust [1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectCommit
+//KeywordEnd//
+DescriptionStart:
+Commit post process effect in given time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectCommit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+effect ppEffectCommit commit
+%NextRawSyntax%
+effect ppEffectCommit commit
+%NextRawSyntax%
+[effect1,...] ppEffectCommit commit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"colorCorrection" ppEffectCommit 3;$/Code$
+%NextExample%
+$Code$_hndl ppEffectCommit 3;$/Code$
+%NextExample%
+$Code$[_hndl1, _hndl2] ppEffectCommit 3;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectCommitted
+//KeywordEnd//
+DescriptionStart:
+Check whether given post process effect is committed
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectCommitted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ppEffectCommitted effect
+%NextRawSyntax%
+ppEffectCommitted effect
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ppEffectCommitted "colorCorrection";$/Code$
+%NextExample%
+$Code$ppEffectCommitted _hndl;$/Code$
+%NextExample%
+$Code$if ( ppEffectCommitted "colorCorrection") then { hint "alteration done !"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectCreate
+//KeywordEnd//
+DescriptionStart:
+Creates Post process effects specified by effect name and priority. Supported effects are:
+"RadialBlur"
+"ChromAberration"
+"WetDistortion"
+"ColorCorrections"
+"DynamicBlur"
+"FilmGrain"
+"ColorInversion"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectCreate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ppEffectCreate [name, priority]
+%NextRawSyntax%
+ppEffectCreate [[name1, priority1],...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ppGrain = ppEffectCreate ["filmGrain", 2005];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 24, 2015)
+"wetDistortion" only works if handle is used. Arma 3 (1.48.131561)
+//NoteEnd//
+ReturnValueStart:
+Number - handle or -1 if failed
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectDestroy
+//KeywordEnd//
+DescriptionStart:
+Destroy Post process effects given by handle or array of handles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectDestroy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ppEffectDestroy effect
+%NextRawSyntax%
+ppEffectDestroy [effect1,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ppEffectDestroy _hndl;$/Code$
+%NextExample%
+$Code$ppEffectDestroy [_hndl0, _hndl1, _hndl2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectEnable
+//KeywordEnd//
+DescriptionStart:
+Enable / disable Post process effects
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectEnable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+effect ppEffectEnable enable
+%NextRawSyntax%
+effect ppEffectEnable enable
+%NextRawSyntax%
+[effect1,...] ppEffectEnable enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"colorCorrections" ppEffectEnable true ;$/Code$
+%NextExample%
+$Code$_hndl ppEffectEnable true ;$/Code$
+%NextExample%
+$Code$[_hndl1, _hndl2] ppEffectEnable true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectEnabled
+//KeywordEnd//
+DescriptionStart:
+Checks whether given post process effect is enabled
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ppEffectEnabled effect
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_enabled = ppEffectEnabled _hndl;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ppEffectForceInNVG
+//KeywordEnd//
+DescriptionStart:
+Forces use of Post process effects in NVG.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ppEffectForceInNVG
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+number ppEffectForceInNVG bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ppGrain ppEffectForceInNVG true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+precision
+//KeywordEnd//
+DescriptionStart:
+Return the precision of the given entity, how is the entity able to be precise when moving to given target.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/precision
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+precision entity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( position _this distance _dangerPos = precision _this) then {...};
+//used in formationCDanger.fsm$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preloadCamera
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preloadCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preloadCamera position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waitUntil { preloadCamera markerPos "cam_location_2"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preloadObject
+//KeywordEnd//
+DescriptionStart:
+Preload all textures, materials and proxies needed to render given object. Object can be determined either by config class name ( CfgVehicles ), or by Unit.
+Returns true once all data is loaded and ready.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preloadObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+distance preloadObject object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$spawn { waitUntil {10 preloadObject "SoldierW"}}$/Code$
+%NextExample%
+$Code$spawn { waitUntil {10 preloadObject leader player }}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preloadSound
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preloadSound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preloadSound soundName
+//RawSyntaxEnd//
+ExampleStart:
+$Code${
+waitUntil { preloadSound _x};
+} forEach getArray ( missionConfigFile "CfgSounds" "sounds");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preloadTitleObj
+//KeywordEnd//
+DescriptionStart:
+Object title - Preload data the object can be defined in the Description.ext file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preloadTitleObj
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preloadTitleObj [name, type]
+%NextRawSyntax%
+preloadTitleObj [name, type, speed, showInMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok=preloadTitleObj [ BISLogo, plain ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preloadTitleRsc
+//KeywordEnd//
+DescriptionStart:
+Resource title - Preload data.
+The resource can be defined in the Description.ext file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preloadTitleRsc
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preloadTitleRsc [name, type]
+%NextRawSyntax%
+preloadTitleRsc [name, type, speed, showInMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ok=preloadTitleRsc [ BIS, PLAIN ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preprocessFile
+//KeywordEnd//
+DescriptionStart:
+Reads and processes the content of the specified file. Preprocessor is C-like, supports comments using // or /* and */ and macros defined with #define. 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preprocessFile
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preprocessFile fileName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_content = preprocessFile "myFunction.sqf";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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".
+%NextNote%
+(July 8, 2011)
+Use preprocessFileLineNumbers instead as it provides more context information on error.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+preprocessFileLineNumbers
+//KeywordEnd//
+DescriptionStart:
+Returns the preprocessed content of the given file. The preprocessor is C-like, it supports comments using // or /* and */ and macros defined with #define.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/preprocessFileLineNumbers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+preprocessFileLineNumbers fileName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_string = preprocessFileLineNumbers "myFunction.sqf"
+// Result is " if a b then {a} else {b}"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+primaryWeapon
+//KeywordEnd//
+DescriptionStart:
+Returns name of unit's primary weapon (empty string if none).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/primaryWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+primaryWeapon unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pWeap = primaryWeapon player ;$/Code$
+%NextExample%
+$Code$hint primaryWeapon player ; //"arifle_MX_ACO_pointer_F"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+primaryWeapon tells you what weapon the unit has irrespective of the status of the weapon. For example a unit that has an M16 on his back will still report an M16 as its primary weapon.
+%NextNote%
+(October 11, 2015)
+To directly detect the active weapon use currentWeapon command.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+primaryWeaponItems
+//KeywordEnd//
+DescriptionStart:
+Returns array with all items assigned to the primary weapon. This command is used for infantry weapons only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/primaryWeaponItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+primaryWeaponItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$primaryWeaponItems player ;
+/*
+[
+"muzzle_snds_H",//silencer
+"acc_pointer_IR",//laser
+"optic_Aco",//optics
+"bipod_01_F_blk"//bipod
+]
+*/$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 16, 2015)
+Since revision 129742, this command also returns an attached bipod.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+primaryWeaponMagazine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/primaryWeaponMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+primaryWeaponMagazine unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint primaryWeaponMagazine player ; //["30Rnd_65x39_caseless_mag"]$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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!
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+priority
+//KeywordEnd//
+DescriptionStart:
+Return the priority of the task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/priority
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+priority task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_prioTsk01 = priority task01$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+private
+//KeywordEnd//
+DescriptionStart:
+Sets a variable to the innermost scope as demonstrated in Example 3.
+Since Arma 3 v1.53.132932 private can be used as keyword as shown in Example 4.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/private
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+private variableName
+%NextRawSyntax%
+private variableNameList
+%NextRawSyntax%
+value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$private "_varname";$/Code$
+%NextExample%
+$Code$private ["_varname1", "_varname2"];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Usage of private as keyword:
+private _myvar = 123;
+//is the same as
+private "_myvar";
+_myvar = 123;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(February 25, 2015)
+Recursive loops require the use of private. Without it, your variables will be overwritten.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+processDiaryLink
+//KeywordEnd//
+DescriptionStart:
+Open the diary screen on the record specified by link.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/processDiaryLink
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+processDiaryLink link
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+productVersion
+//KeywordEnd//
+DescriptionStart:
+Returns the product's friendly name, identifier and version. In Arma 3 it also returns branch identifier, whether or not the game was launched using mods, and the platform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/productVersion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+productVersion
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str productVersion ; // would return ["Arma 2 OA", "arma2oa", 162, 95208] on Arma 2 OA 1.62.95208$/Code$
+%NextExample%
+$Code$hint str productVersion ; // ["Arma 3","Arma3",137,128764,"Development",false,"Windows"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+profileName
+//KeywordEnd//
+DescriptionStart:
+Returns profile name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/profileName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+profileName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myProfileName = profileName ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+profileNamespace
+//KeywordEnd//
+DescriptionStart:
+Returns the global namespace attached to the active user profile.
+Use setVariable and getVariable to save and load data to this Namespace. A variable can be deleted by setting its value to nil.
+The variables are stored next to the user profile in a file named myUsername.vars.TakeOnHProfile (e.g. in the My Documents\Take On Helicopters folder).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/profileNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+profileNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_namespace = profileNamespace ;$/Code$
+%NextExample%
+$Code$profileNamespace setVariable ["var_kills",10000];
+_playerKills = profileNamespace getVariable "var_kills";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+The variables are loaded when the user profile is loaded or changed.
+//NoteEnd//
+ReturnValueStart:
+Namespace
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+profileNameSteam
+//KeywordEnd//
+DescriptionStart:
+Returns name of the current Steam profile.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/profileNameSteam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+profileNameSteam
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mySteamProfileName = profileNameSteam ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+progressLoadingScreen
+//KeywordEnd//
+DescriptionStart:
+If loading screen is shown, sets progress bar to the given value (interval is from 0 to 1])
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/progressLoadingScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+progressLoadingScreen progress
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+progressPosition
+//KeywordEnd//
+DescriptionStart:
+Returns the current position in the progress bar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/progressPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+progressPosition control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pos = progressPosition _control$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+progressSetPosition
+//KeywordEnd//
+DescriptionStart:
+Sets progress position of the progress bar ( DialogControls-ProgressBar )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/progressSetPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+control progressSetPosition pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_control progressSetPosition 0.5$/Code$
+%NextExample%
+$Code$with uiNamespace do {
+bar = findDisplay 46 ctrlCreate ["RscProgress", -1];
+bar ctrlSetPosition [0,0,1,0.01];
+bar ctrlCommit 0;
+bar progressSetPosition 0.75;
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+publicVariable
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/publicVariable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+publicVariable varName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$publicVariable "CTFscoreOne";$/Code$
+%NextExample%
+$Code$myPubVar = [123, "456", true ];
+publicVariable "myPubVar";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+{
+// set the nil variable with a default value for server and both JIP 'join at mission start'
+PV_abc = [7, 8, 9];
+};
+// else public variable has already been set due to a public variable broadcast.
+%NextNote%
+(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".
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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")
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+publicVariableClient
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/publicVariableClient
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+clientID publicVariableClient varName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$3 publicVariableClient "CTFscoreOne";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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$
+%NextNote%
+(April 12, 2015)
+Tested in Arma 3 v1.43, publicVariableClient works client-to-client if owner id of the targeted client is known.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+publicVariableServer
+//KeywordEnd//
+DescriptionStart:
+Send the variable value to the server - same limitations regarding variable type as publicVariable.
+In Arma 3 it is possible to broadcast nil value
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/publicVariableServer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+publicVariableServer varName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$publicVariableServer "CTFscoreOne";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pushBack
+//KeywordEnd//
+DescriptionStart:
+Insert an element to the back of the given array. This command modifies the original array. (see also: pushBackUnique )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pushBack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array pushBack element
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3];
+_arr pushBack 4;
+hint str _arr; //[1,2,3,4]$/Code$
+%NextExample%
+$Code$_arr = [1,[2,4],3];
+(_arr select 1) pushBack [5,6];
+hint str _arr //[1,[2,4,[5,6]],3]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Aug 1, 2014)
+(A3 1.26) It is recommended to use pushBack instead of BIS_fnc_arrayPush.
+$Code$_array = [1,2,3];
+_array pushBack 4; //same as [_array, 4] call BIS_fnc_arrayPush ;
+$/Code$
+%NextNote%
+(August 23, 2014)
+It's highly recommended to use the new pushBack command, up to 43% faster than set and up to 11843% faster a plus b !
+%NextNote%
+(November 26, 2014)
+pushBack does not support nil while set and a plus b do. For example:
+$Code$_array = [];
+for "_i" from 0 to 3 do
+{
+_array pushBack nil ;
+};
+hint str _array; // hint is []$/Code$
+%NextNote%
+(May 21, 2015)
+Array "push" implementation using pushBack, alternative to BIS_fnc_arrayPush
+$Code$KK_fnc_push = {
+_this select 0 pushBack (_this select 1);
+_this select 0
+};
+// Example
+arr = [1,2,3];
+[arr, 4] call KK_fnc_push; //both arr and return of function are now [1,2,3,4]$/Code$
+//NoteEnd//
+ReturnValueStart:
+Number - index of inserted element
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+pushBackUnique
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/pushBackUnique
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array pushBackUnique element
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3];
+_index = _arr pushBackUnique 3;
+hint str [_index, _arr]; //[-1,[1,2,3]]$/Code$
+%NextExample%
+$Code$_arr = [1,2,3];
+_index = _arr pushBackUnique 4;
+hint str [_index, _arr]; //[3,[1,2,3,4]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - index of inserted element or -1
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+putWeaponPool
+//KeywordEnd//
+DescriptionStart:
+Transfer weapons and magazines from weapon pool into cargo of object obj. Used in campaign to transfer weapons into next mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/putWeaponPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+putWeaponPool object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+queryItemsPool
+//KeywordEnd//
+DescriptionStart:
+Returns the number of items of type in the weapon pool (used in campaigns to transfer weapons to the next mission).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/queryItemsPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+queryItemsPool name
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+queryMagazinePool
+//KeywordEnd//
+DescriptionStart:
+Return number of magazines of type name in magazine pool (used in campaign to transfer magazines into next mission).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/queryMagazinePool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+queryMagazinePool name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num = queryMagazinePool "M16";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+queryWeaponPool
+//KeywordEnd//
+DescriptionStart:
+Return number of weapons of type name in weapon pool (used in campaign to transfer weapons into next mission).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/queryWeaponPool
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+queryWeaponPool name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_num=queryWeaponPool M16$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rad
+//KeywordEnd//
+DescriptionStart:
+Convert x from Degrees to Radians. 360 degrees is equal to 2 multiplied with pi.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rad x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_radians = rad 180
+// Result is 3.1415 (eg pi$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioChannelAdd
+//KeywordEnd//
+DescriptionStart:
+Add the units to the custom radio channel.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioChannelAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+index radioChannelAdd units
+//RawSyntaxEnd//
+ExampleStart:
+$Code$2 radioChannelAdd [player, unit1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioChannelCreate
+//KeywordEnd//
+DescriptionStart:
+Create a custom radio channel with the given color, label, call sign and registered characters. The index returned can be used to manipulate the created channel later. There are 10 slots for custom radio channels which would correspond to channels 6-15 (see getPlayerChannel ). The command will find an unused index in this range and create it when found.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioChannelCreate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+radioChannelCreate [color, label, callSign, units]
+%NextRawSyntax%
+radioChannelCreate [color, label, callSign, characters, sentenceType]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player]];$/Code$
+%NextExample%
+$Code$_index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], Q-dance Radio, %UNIT_NAME, [ player ], false ];
+// disable automatic quotes for chat in channel (ArmA 3)$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(January 21, 2016)
+Make sure you add all units you intend to speak or receive messages on created custom channel to the channel.
+//NoteEnd//
+ReturnValueStart:
+Number - created channel id (used in customChat command)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioChannelRemove
+//KeywordEnd//
+DescriptionStart:
+Remove the characters from the custom radio channel.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioChannelRemove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+index radioChannelRemove characters
+//RawSyntaxEnd//
+ExampleStart:
+$Code$3 radioChannelRemove [myCharacter1, myCharacter2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioChannelSetCallSign
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioChannelSetCallSign
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+index radioChannelSetCallSign callSign
+//RawSyntaxEnd//
+ExampleStart:
+$Code$4 radioChannelSetCallSign "%UNIT_NAME";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioChannelSetLabel
+//KeywordEnd//
+DescriptionStart:
+Set the custom radio channel's label.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioChannelSetLabel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+index radioChannelSetLabel label
+//RawSyntaxEnd//
+ExampleStart:
+$Code$5 radioChannelSetLabel "Q-dance Radio";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+radioVolume
+//KeywordEnd//
+DescriptionStart:
+Checks the current radio volume (set by fadeRadio ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/radioVolume
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+radioVolume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_volume = radioVolume;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rain
+//KeywordEnd//
+DescriptionStart:
+Returns the current value of rain density in range 1...0
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rain
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rain
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rainLevel = rain ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rainbow
+//KeywordEnd//
+DescriptionStart:
+Returns the current rainbow intensity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rainbow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rainbow
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+random
+//KeywordEnd//
+DescriptionStart:
+Random real (floating point) value from 0 (inclusive) to x (not inclusive).
+Since Arma 3 v1.55.133393 alternative syntax is added, allowing to define Gaussian Distribution params. Uses the same method as setTriggerTimeout command. Quite useful for spawning loot for example, making more valuable items more rare.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/random
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+random x
+%NextRawSyntax%
+random [min, mid, max] Since Arma 3 v1.55.133393
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rNumber = random 1;$/Code$
+%NextExample%
+$Code$_rNumber = random -10;$/Code$
+%NextExample%
+$Code$// To select random value from an array:
+_array = ["apples", "pears", "bananas", "M16"];
+_random = _array select floor random count _array;
+// or since Arma 3 v1.55.133393
+_random = selectRandom _array;$/Code$
+%NextExample%
+$Code$// Compare (each command was executed 100000 times to gather statistics):
+floor random 10;
+// 0 - 10099 (10%)
+// 1 - 10040 (10%)
+// 2 - 10154 (10%)
+// 3 - 9910 (10%)
+// 4 - 10023 (10%)
+// 5 - 9937 (10%)
+// 6 - 10118 (10%)
+// 7 - 9716 (10%)
+// 8 - 9986 (10%)
+// 9 - 10017 (10%)
+floor random [0,5,10];
+// 0 - 109 (0%)
+// 1 - 1604 (2%)
+// 2 - 6839 (7%)
+// 3 - 16671 (17%)
+// 4 - 24706 (25%)
+// 5 - 24702 (25%)
+// 6 - 16626 (17%)
+// 7 - 6925 (7%)
+// 8 - 1702 (2%)
+// 9 - 116 (0%)
+floor random [0,10,0];
+// 0 - 19 (0%)
+// 1 - 209 (0%)
+// 2 - 817 (1%)
+// 3 - 2384 (2%)
+// 4 - 4841 (5%)
+// 5 - 8976 (9%)
+// 6 - 14067 (14%)
+// 7 - 18955 (19%)
+// 8 - 23605 (24%)
+// 9 - 26127 (26%)
+floor random [0,10,5];
+// 0 - 11 (0%)
+// 1 - 98 (0%)
+// 2 - 430 (0%)
+// 3 - 1149 (1%)
+// 4 - 2384 (2%)
+// 5 - 4546 (5%)
+// 6 - 8612 (9%)
+// 7 - 16283 (16%)
+// 8 - 28393 (28%)
+// 9 - 38094 (38%)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 12, 2015)
+Random selections including negative numbers can be obtained via:
+$Code$_Xrnd = round(random 200) -100;$/Code$
+This will yield numbers between -100 and 100.
+Be careful using random numbers in multiplayer, each client will come up with a different result. See multiplayer tutorials for more general information about locality.
+The number returned is unlikely to be a whole number. To return a whole number use either round, ceil or floor together with random :
+x=round(random 5) will return 0,1,2,3,4 or 5. (non-uniform distribution, 0 and 5 are half as likely to be selected than any of the other numbers)
+x=floor(random 5) will return 0,1,2,3 or 4. (uniform distribution, all numbers have the same probability of being selected)
+x=ceil(random 5) will return 0,1,2,3,4 or 5. (0 is very unlikely, but possible, as ceil 0 is 0)
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rank
+//KeywordEnd//
+DescriptionStart:
+Returns the rank of the given unit. Rank can be one of the following:
+"PRIVATE"
+"CORPORAL"
+"SERGEANT"
+"LIEUTENANT"
+"CAPTAIN"
+"MAJOR"
+"COLONEL"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rank
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rank unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rank = rank player;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rankId
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rankId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rankId unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myIdRank = rankId player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rating
+//KeywordEnd//
+DescriptionStart:
+Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies (see Rating Values ). Can be changed via addRating by the mission designer.
+The rating of the player is displayed as the "score" at the end of the mission. Via Description.ext one can define how many points it takes to get a perfect score, as well as the number of stars.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rating
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rating unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_score = rating player$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+In ArmA 1.18 rating does only return rating levels for units that are local.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rectangular
+//KeywordEnd//
+DescriptionStart:
+Checks if a location is rectangular (returns true) or elliptical (returns false).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rectangular
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rectangular location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isRect = rectangular myLocation;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+registeredTasks
+//KeywordEnd//
+DescriptionStart:
+List all registered task types.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/registeredTasks
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+registeredTasks member
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tasklist = registeredTasks teamMember player ;$/Code$
+%NextExample%
+$Code$_rabbit = createAgent ["Rabbit_F", position player,[], 0, "None"];
+hint str registeredTasks teamMember _rabbit;
+// Hint shows ["Animal Main Task"] in Arma 3.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+registerTask
+//KeywordEnd//
+DescriptionStart:
+Register a new task type. Parameters are defined in the given config class (subclass of CfgTasks).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/registerTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember registerTask entryName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+reload
+//KeywordEnd//
+DescriptionStart:
+Reload all weapons
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/reload
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+reload unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( needReload player == 1) then { reload player };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+reloadEnabled
+//KeywordEnd//
+DescriptionStart:
+Check whether magazine is reloaded whenever emptied.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/reloadEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+Boolean reloadEnabled unitName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remoteControl
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remoteControl
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+who remoteControl whom
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$// Return control to player:
+objNull remoteControl driver UAV;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+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".
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remoteExec
+//KeywordEnd//
+DescriptionStart:
+Asks server to execute given scripted function or script command. 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remoteExec
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+params remoteExec [functionName, targets, JIP];
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// runs hint "hello" on each connected client
+"hello" remoteExec [" hint "];$/Code$
+%NextExample%
+$Code$// runs hint "hello" on first connected client
+"hello" remoteExec [" hint ", 3];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server
+"hello" remoteExec [" hint ", -2];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$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$
+%NextExample%
+$Code$// runs "someFuncWithNoArgs" on each connected client
+remoteExec ["someFuncWithNoArgs"];$/Code$
+%NextExample%
+$Code$// removes a message identified by "IamUnique" from the JIP queue
+remoteExec ["", "IamUnique"];$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Object obj will have its ammo set to 1 where it is local
+[obj,[ primaryWeapon obj, 1]] remoteExec [" setAmmo ", obj];$/Code$
+%NextExample%
+$Code$myJipID = "hello" remoteExec ["", 0];
+if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(December 29, 2015)
+remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string passed to BattlEye is formatted the same way as the following example's output:
+$Code$ format ["%1 %2", functionName, str params]$/Code$
+%NextNote%
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remoteExecCall
+//KeywordEnd//
+DescriptionStart:
+Asks server to execute given scripted function or script command. The environment chosen for the execution is as follows:
+Scripted function - unscheduled environment ( suspension is NOT allowed).
+Script command - unscheduled environment ( suspension is NOT allowed).
+remoteExecCall 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.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remoteExecCall
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+params remoteExecCall [functionName, targets, JIP]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// runs hint "hello" on each connected client
+"hello" remoteExecCall [" hint "];$/Code$
+%NextExample%
+$Code$// runs hint "hello" on first connected client
+"hello" remoteExecCall [" hint ", 3];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server
+"hello" remoteExecCall [" hint ", -2];$/Code$
+%NextExample%
+$Code$// runs hint "hello" everywhere but server, JIPs the message
+// and returns e.g. "3_1" as a unique JIP id
+myJipID = "hello" remoteExecCall [" hint ", -2, true ];$/Code$
+%NextExample%
+$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" remoteExecCall [" hint ", -2, "some_JIP_ID"];$/Code$
+%NextExample%
+$Code$// runs "someFuncWithNoArgs" on each connected client
+remoteExecCall ["someFuncWithNoArgs"];$/Code$
+%NextExample%
+$Code$// removes a message identified by "IamUnique" from the JIP queue
+remoteExecCall ["", "IamUnique"];$/Code$
+%NextExample%
+$Code$// all clients will have their ammo set to 1 for their current weapon
+{ player setAmmo [ primaryWeapon player, 1];} remoteExecCall [" bis_fnc_call ", 0];$/Code$
+%NextExample%
+$Code$// Object obj will have its ammo set to 1 where it is local
+[obj,[ primaryWeapon obj, 1]] remoteExecCall [" setAmmo ", obj];$/Code$
+%NextExample%
+$Code$myJipID = "hello" remoteExecCall ["", 0];
+if ( isNil "myJipID") then { hint "empty function name is not allowed"; };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 16, 2015)
+Removal of persistent call must be in the following format no argument remoteExecCall [ empty string, JIP id ]. For example:
+$Code$ remoteExecCall ["", "5:8"];$/Code$
+%NextNote%
+(December 29, 2015)
+remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string passed to BattlEye is formatted the same way as the following example's output:
+$Code$ format ["%1 %2", functionName, str params]$/Code$
+//NoteEnd//
+ReturnValueStart:
+Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remove3DENConnection
+//KeywordEnd//
+DescriptionStart:
+Remove connection between entities.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remove3DENConnection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+remove3DENConnection [type, from, to]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$remove3DENConnection ["RandomStart", get3DENSelected "Object","marker_0"]
+// Remove random start on marker "marker_0" from all selected objects.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the connection was removed
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remove3DENEventHandler
+//KeywordEnd//
+DescriptionStart:
+Removes Eden Editor event handler of given type and ID.
+See the list of all Eden Editor Event Handlers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remove3DENEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+remove3DENEventHandler [type,id]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$eh = add3DENEventHandler ["onUndo",{ systemChat "Zip..."}];
+remove3DENEventHandler ["onUndo",eh];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+remove3DENLayer
+//KeywordEnd//
+DescriptionStart:
+Remove Eden Editor editing layer.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/remove3DENLayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+remove3DENLayer layerID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myLayer = -1 add3DENLayer "Enemy Base";
+remove3DENLayer _myLayer ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the layer was removed successfully (i.e., correct layer ID was used)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAction
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeAction index
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeAction 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAll3DENEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Removes all Eden Editor event handlers of given type.
+See the list of all Eden Editor Event Handlers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAll3DENEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAll3DENEventHandlers type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAll3DENEventHandlers "onUndo";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllActions
+//KeywordEnd//
+DescriptionStart:
+Removes all unit's user added actions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllActions
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllActions unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllActions player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(30 October, 2013)
+Syntax of this command was until Arma 3 ver. 1.06: unit removeAllActions number
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllAssignedItems
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllAssignedItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllAssignedItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllAssignedItems player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllContainers
+//KeywordEnd//
+DescriptionStart:
+Removes all containers from the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllContainers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllContainers unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllContainers player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(2013)
+This will remove the Uniform, Vest and Backpack from a unit leaving them unable to hold or pickup inventory items.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllCuratorAddons
+//KeywordEnd//
+DescriptionStart:
+Restrict access to all addons for given curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllCuratorAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllCuratorAddons curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllCuratorAddons myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllCuratorCameraAreas
+//KeywordEnd//
+DescriptionStart:
+Delete all curator camera areas.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllCuratorCameraAreas
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllCuratorCameraAreas curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllCuratorCameraAreas myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllCuratorEditingAreas
+//KeywordEnd//
+DescriptionStart:
+Delete all curator edit areas.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllCuratorEditingAreas
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllCuratorEditingAreas curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllCuratorEditingAreas myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Removes all event handlers of given type that were added by addEventHandler. Since VBS2 v1.24 can be applied on individual weapon rounds.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName removeAllEventHandlers handlerType
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeAllEventHandlers "killed";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllHandgunItems
+//KeywordEnd//
+DescriptionStart:
+Removes all items from weapon except magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllHandgunItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllHandgunItems unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllItems
+//KeywordEnd//
+DescriptionStart:
+Removes all special items from the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllItems unitName;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(June 18, 2013)
+Arma 3, version 0.70 - removes only items listed by command items.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllItemsWithMagazines
+//KeywordEnd//
+DescriptionStart:
+Removes all itemsWithMagazines from the uniform, vest and backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllItemsWithMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllItemsWithMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllItemsWithMagazines player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllMissionEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Removes all mission event handlers of the given type which were added by addMissionEventHandler.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllMissionEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllMissionEventHandlers type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllMissionEventHandlers "Loaded";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllMPEventHandlers
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllMPEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName removeAllMPEventHandlers event
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeAllMPEventHandlers "mpkilled";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllMusicEventHandlers
+//KeywordEnd//
+DescriptionStart:
+Removes all music track event handlers of given type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllMusicEventHandlers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllMusicEventHandlers type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllMusicEventHandlers "MusicStart"$/Code$
+%NextExample%
+$Code$removeAllMusicEventHandlers "MusicStop"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllPrimaryWeaponItems
+//KeywordEnd//
+DescriptionStart:
+Removes all items from weapon except magazine.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllPrimaryWeaponItems unit
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeAllWeapons
+//KeywordEnd//
+DescriptionStart:
+Remove all weapons and magazines of the unit.
+On vehicles only ammo is removed
+Does not remove map, compass, radio. Use
+unitname removeweapon "itemmap"
+for that purpose.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeAllWeapons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeAllWeapons unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeAllWeapons player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(October 14, 2014)
+removeAllWeapons doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually:
+$Code${tank removeWeapon _x} forEach weapons tank;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeBackpack
+//KeywordEnd//
+DescriptionStart:
+Removes unit's backpack
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeBackpack unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeBackpack this ;$/Code$
+%NextExample%
+$Code$removeBackpack mySoldierDude;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeBackpackGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes backpack from a unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeBackpackGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeBackpackGlobal unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeBackpackGlobal player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeCuratorAddons
+//KeywordEnd//
+DescriptionStart:
+Restrict curator use of given addons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeCuratorAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj removeCuratorAddons addons
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule removeCuratorAddons [addon1,addon2]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeCuratorCameraArea
+//KeywordEnd//
+DescriptionStart:
+Removes curator camera area.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeCuratorCameraArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj removeCuratorCameraArea cameraAreaID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCurator removeCuratorCameraArea 3;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeCuratorEditableObjects
+//KeywordEnd//
+DescriptionStart:
+Unregister objects which can be edited by a curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeCuratorEditableObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj removeCuratorEditableObjects [[objects],removeCrew]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule removeCuratorEditableObjects [[ cursorTarget ],true]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeCuratorEditingArea
+//KeywordEnd//
+DescriptionStart:
+Removes editing area for given curator.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeCuratorEditingArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj removeCuratorEditingArea editAreaID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCurator removeCuratorEditingArea 3;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeDrawIcon
+//KeywordEnd//
+DescriptionStart:
+Removes an icon for an editor object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeDrawIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map removeDrawIcon [object,string identifier]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeDrawLinks
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeDrawLinks
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map removeDrawLinks [from,param type]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeEventHandler
+//KeywordEnd//
+DescriptionStart:
+Removes event handler added by addEventHandler.
+When any handler is removed, all handler indices higher than the deleted one should be decremented.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName removeEventHandler [type, index]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeEventHandler ["killed", 0]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeFromRemainsCollector
+//KeywordEnd//
+DescriptionStart:
+Removes vehicles/units from disposal manager, added earlier with addToRemainsCollector
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeFromRemainsCollector
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeFromRemainsCollector remains
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeFromRemainsCollector [unit1, unit2, vehicle1];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeGoggles
+//KeywordEnd//
+DescriptionStart:
+Removes goggles from unit (diver goggles for example). This command does not remove NVGoggles. Use unassignItem and removeItem or just unlinkItem for latter.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeGoggles
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeGoggles unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeGoggles assaultDiver;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeGroupIcon
+//KeywordEnd//
+DescriptionStart:
+Remove icon with given ID from group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeGroupIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group removeGroupIcon iconID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_target removeGroupIcon (_target getvariable "hc_attackicon");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeHandgunItem
+//KeywordEnd//
+DescriptionStart:
+Removes given weapon item from the handgun weapon cargo space.
+As of Arma 3 DEV 1.37, this command also supports weapon magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeHandgunItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeHandgunItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeHandgunItem "muzzle_snds_L";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeHeadgear
+//KeywordEnd//
+DescriptionStart:
+Removes headgear from a unit. If unit has no headgear command quietly fails.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeHeadgear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeHeadgear unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeHeadgear player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeItem
+//KeywordEnd//
+DescriptionStart:
+Removes item from the inventory.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit unassignItem "NVGoggles";
+bluforUnit removeItem "NVGoggles";
+opforUnit unassignItem "NVGoggles_OPFOR";
+opforUnit removeItem "NVGoggles_OPFOR";
+independentUnit unassignItem "NVGoggles_INDEP";
+independentUnit removeItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeItemFromBackpack
+//KeywordEnd//
+DescriptionStart:
+Removes item from soldier's backpack.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeItemFromBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeItemFromBackpack item
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeItemFromUniform
+//KeywordEnd//
+DescriptionStart:
+Removes item from soldier's uniform. Can be used with magazines and weapons too.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeItemFromUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeItemFromUniform item
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeItemFromVest
+//KeywordEnd//
+DescriptionStart:
+Removes item from soldier's vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeItemFromVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeItemFromVest item
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeItems
+//KeywordEnd//
+DescriptionStart:
+Removes all items with given template from the inventory.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeItems item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeItems "FirstAidKit";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMagazine
+//KeywordEnd//
+DescriptionStart:
+Remove magazine from the unit.
+Note: You may create invalid combinations with this function. When doing so, application behaviour is undefined.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName removeMagazine magazineName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeMagazine "M16"$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMagazineGlobal
+//KeywordEnd//
+DescriptionStart:
+Removes the magazine from the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMagazineGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeMagazineGlobal magazineName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeMagazineGlobal "30Rnd_65x39_caseless_mag";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMagazines
+//KeywordEnd//
+DescriptionStart:
+Remove all magazines of given type from the unit.
+Note: You may create invalid combinations with this function. When doing so, application behaviour is undefined.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName removeMagazines magazineName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeMagazines "M16";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+Though BIS did not provide a command to remove all magazines of every type, it can still be accomplished using forEach magazines. example:
+{player removeMagazine _x} forEach magazines player
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMagazinesTurret
+//KeywordEnd//
+DescriptionStart:
+Removes all magazines of the given type from the unit. 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMagazinesTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle removeMagazinesTurret [magazineName, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player removeMagazinesTurret ["60rnd_cmflaremagazine",[-1]]$/Code$
+%NextExample%
+$Code$_tank removeMagazinesTurret ["20Rnd_120mmSABOT_M1A2",[0]]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(July 30, 2011)
+Here's how you would remove all machine gun ammo from an M1A2 TUSK:
+remove the gunner's M240 ammo.
+$Code$this removeMagazinesTurret ["1200Rnd_762x51_M240",[0]];$/Code$
+remove the commander's M2 ammo.
+$Code$this removeMagazinesTurret ["100Rnd_127x99_M2",[0,0]];$/Code$
+remove the loader's M240 ammo.
+$Code$this removeMagazinesTurret ["100Rnd_762x51_M240",[0,1]];$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMagazineTurret
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMagazineTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle removeMagazineTurret [magazineName, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player removeMagazineTurret ["60rnd_cmflaremagazine",[-1]]$/Code$
+%NextExample%
+$Code$_tank removeMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMenuItem
+//KeywordEnd//
+DescriptionStart:
+Removes a previously added menu item.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMenuItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map removeMenuItem index
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMissionEventHandler
+//KeywordEnd//
+DescriptionStart:
+Removes mission event handler added by addMissionEventHandler.
+When any handler is removed, all handler indices higher that the deleted one should be decremented.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMissionEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeMissionEventHandler [type, index]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 6, 2015)
+As of Arma 3 version 1.38 you can safely remove mission event handlers without worrying about decrementing higher indices.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMPEventHandler
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMPEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName removeMPEventHandler [event, index]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeMPEventHandler ["killed", 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(25 July, 2011)
+At least for MPKilled it needs to be executed where the target unit is local. The effect (the removal) is global.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeMusicEventHandler
+//KeywordEnd//
+DescriptionStart:
+Removes specified music track event handler.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeMusicEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeMusicEventHandler [type, id]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeMusicEventHandler ["MusicStart", 12];$/Code$
+%NextExample%
+$Code$removeMusicEventHandler ["MusicStop", 12];$/Code$
+%NextExample%
+$Code$hnd_stop = addMusicEventHandler ["MusicStop",{}];
+removeMusicEventHandler ["MusicStop",hnd_stop];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removePrimaryWeaponItem
+//KeywordEnd//
+DescriptionStart:
+Removes given weapon item from the primary weapon cargo space.
+As of Arma 3 DEV 1.37, this command also supports weapon magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removePrimaryWeaponItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removePrimaryWeaponItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removePrimaryWeaponItem "acc_flashlight";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeSecondaryWeaponItem
+//KeywordEnd//
+DescriptionStart:
+Removes given weapon item from the secondary weapon cargo space. This command also supports weapon magazines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeSecondaryWeaponItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeSecondaryWeaponItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeSecondaryWeaponItem ( secondaryWeaponItems select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeSimpleTask
+//KeywordEnd//
+DescriptionStart:
+Remove a simple task from the list of simple tasks.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeSimpleTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person removeSimpleTask task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeSimpleTask _tskKillSpongebob$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeSwitchableUnit
+//KeywordEnd//
+DescriptionStart:
+Remove a unit from the list of units available for Team Switch.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeSwitchableUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeSwitchableUnit unitName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeTeamMember
+//KeywordEnd//
+DescriptionStart:
+Remove given member from given team. Effect is local, unless both member and team are local to PC on which command is executed, then effect is global.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeTeamMember
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+team removeTeamMember member
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_team removeTeamMember _teamMember;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeUniform
+//KeywordEnd//
+DescriptionStart:
+Removes uniform from unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeUniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeUniform unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeUniform player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeVest
+//KeywordEnd//
+DescriptionStart:
+Removes vest from unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeVest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+removeVest unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$removeVest player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeWeapon
+//KeywordEnd//
+DescriptionStart:
+Remove weapon from a unit. The unit must be local to the computer where command is executed. For a global version of this command see removeWeaponGlobal.
+Note : It is possible to create invalid combinations with this command (ie, attempting to remove a weapon that a unit does not possess). When doing so, application behaviour is undefined.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeWeapon weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player removeWeapon "BAF_L85A2_RIS_SUSAT";$/Code$
+%NextExample%
+$Code$An_2 removeWeapon "M240_veh";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(May 27, 2009)
+CTD may occur in certain conditions: when shooter is AI and is currently shooting at target in some proximity (tested with M136 on ACE 1.08 and Compact Fix 1.14H+). Even "dropweapon" action may cause CTD with AI.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeWeaponGlobal
+//KeywordEnd//
+DescriptionStart:
+Remove a weapon from a unit. An attempt to remove a weapon, which is not in unit's possession, is simply ignored.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeWeaponGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit removeWeaponGlobal weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code${
+_x removeWeaponGlobal "Laserdesignator";
+} forEach allUnits ;$/Code$
+%NextExample%
+$Code${
+if ( typeOf _x == "O_Heli_Attack_02_black_F") then {
+_x removeWeaponGlobal "rockets_Skyfire";
+};
+} forEach vehicles ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+removeWeaponTurret
+//KeywordEnd//
+DescriptionStart:
+Removes weapon from the turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/removeWeaponTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle removeWeaponTurret [weaponName, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tank removeWeaponTurret ["LMG_M200",[0,0]];$/Code$
+%NextExample%
+$Code$vehicle player removeWeaponTurret ["SportCarHorn",[-1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+requiredVersion
+//KeywordEnd//
+DescriptionStart:
+Check if version of application is available. If the current version is older than the required one, a warning message is shown and false is returned.
+Version of format Major.Minor, e.g. 1.30
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/requiredVersion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+requiredVersion version
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if !( requiredVersion "1.09") exitWith {};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 12, 2008)
+If the script contains a command that was introduced after the required version, it will still generate a syntax error, even if this test is done at the top of the script (as the whole script is parsed before execution).
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+resetCamShake
+//KeywordEnd//
+DescriptionStart:
+Stops any ongoing camera shake effects. Does not prevent new effects from being created. To disallow new effects altogether, enableCamShake should be used.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/resetCamShake
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+resetCamShake
+//RawSyntaxEnd//
+ExampleStart:
+$Code$resetCamShake ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+resetSubgroupDirection
+//KeywordEnd//
+DescriptionStart:
+Resets direction of subgroup.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/resetSubgroupDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+resetSubgroupDirection unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$resetSubgroupDirection myUnit;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+resistance
+//KeywordEnd//
+DescriptionStart:
+Resistance side.
+When used in a format statement ( hint format ["%1",resistance] ), the string returned is "GUER".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/resistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+resistance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?((side _unit) == resistance ) : hint "This is a resistance unit!"$/Code$
+%NextExample%
+$Code$// SQF:
+if (( side _unit) == resistance ) then {
+hint "This is a resistance unit!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+resize
+//KeywordEnd//
+DescriptionStart:
+Change array size. Can be used to add or remove elements from an array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/resize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+arrayName resize count
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arrayNum = [0,1,2,3,4];
+_arrayNum resize 2; // _arrayNum = [0,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+resources
+//KeywordEnd//
+DescriptionStart:
+Returns the resources of a team member. Results are local to the PC on which command was executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/resources
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+resources member
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+respawnVehicle
+//KeywordEnd//
+DescriptionStart:
+Sets vehicle as respawnable in MP game. The vehicle will be spawned at the locality and coordinates it was prior to destruction. If respawn type is set to base respawn (type 3) and vehicle respawn marker is provided (respawn_vehicle_XXXSIDEXXX), vehicle will spawn on the marker.
+NOTE : Command has to be executed where vehicle is local
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/respawnVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle respawnVehicle [delay, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$car respawnVehicle [5, 3];
+// 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times.$/Code$
+%NextExample%
+$Code$car respawnVehicle [30];
+// 'car' will respawn at the predefined marker for the side after 30 seconds. The unit will respawn an unlimited number of times.$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(May 28, 2007)
+For this command to work (in MP) you need the appropriate markers in the mission.
+The markers are...
+respawn_vehicle_west
+respawn_vehicle_east
+respawn_vehicle_guerilla
+respawn_vehicle_civilian
+Also, by default it will use respawnDelay from the description.ext as mentioned unless you specify
+respawnVehicleDelay = x;
+Where x is delay in seconds.
+In Multiplayer the respawned vehicle remains local to the client who was the last driver of the vehicle or the client who was the leader of the last AI driver of the vehicle.
+If the vehicle has yet to be driven or the AI driver is local to the Server then the respawned vehicle will be local to the Server.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+restartEditorCamera
+//KeywordEnd//
+DescriptionStart:
+Restarts the mission editor camera (if it was deleted by a script,for example).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/restartEditorCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+restartEditorCamera map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+reveal
+//KeywordEnd//
+DescriptionStart:
+Reveals a target to a group. If toWhom is a unit, unit's group is considered. If toWhom is a vehicle, vehicle commander's group is considered.
+The knowledge value will be set to the highest level any unit of the revealing side has about the revealed target. If the revealing side has no knowledge about the revealed target, the value will be set to 1.
+Since ARMA 2 OA 1.60 the alternative syntax is available. Values greater than or equal 1.5 reveal the side of the target, too.
+The knowledge level can only be increased, not decreased by this command.
+In MP targetKnowledge and knowsAbout infos get updated only on the PC where command was executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/reveal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+toWhom reveal target
+%NextRawSyntax%
+toWhom reveal [target, accuracy]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne reveal _soldierTwo; //soldierOne knowsAbout information about soldierTwo is updated$/Code$
+%NextExample%
+$Code$player reveal cursorObject ; //player knowsAbout information about object under cursor is updated$/Code$
+%NextExample%
+$Code$_soldierOne reveal [_soldierTwo, 1.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(January 15, 2007)
+In OFP v1.96, When a target is revealed to a unit, it's knowsAbout rating is set to 1, unless it was already more than 1 in which case reveal does nothing. See knowsAbout for more details about knowsAbout ratings and limitations.
+%NextNote%
+(January 24, 2008)
+Use reveal to allow client to see a created vehicle faster - the associated menu interaction will become available therefore, like the player has option to get in sooner.
+_tank = "M1A1" createVehicle (position player);
+player reveal _tank;
+//get in user actions become available instantly
+%NextNote%
+(January 15, 2012)
+The same idea from Doolittle's note applies to beaming of units. If you setPos an unit or a player, reveal (all) nearby objects and vehicles to make the interaction possible a lot quicker.
+%NextNote%
+(January 15, 2012)
+Revealing a targetUnit will also add it to nearTargets database of the given sourceUnit. The quality/detail level of the info depends on the knowsAbout value used with reveal. More detail in the nearTargets page.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+revealMine
+//KeywordEnd//
+DescriptionStart:
+Sets given mine as known to the side. (Knowledge about a mine is always shared across all units in a side.)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/revealMine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side revealMine mine
+//RawSyntaxEnd//
+ExampleStart:
+$Code$west revealMine _mine;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+reverse
+//KeywordEnd//
+DescriptionStart:
+Reverses given array by reference (modifies the original array, just like resize ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/reverse
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+reverse array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arr = [1,2,3];
+reverse _arr;
+hint str _arr; //[3,2,1]$/Code$
+%NextExample%
+$Code$_wordArr = toArray "gateman";
+reverse _wordArr;
+hint toString _wordArr; //nametag$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+reversedMouseY
+//KeywordEnd//
+DescriptionStart:
+Return if mouse vertical axe is inverted.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/reversedMouseY
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+reversedMouseY
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+roadAt
+//KeywordEnd//
+DescriptionStart:
+Returns road segment at given position, objNull otherwise. Same as isOnRoad only returns the actual road object instead of boolean.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/roadAt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+roadAt position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_road = roadAt ASLToAGL getPosASL player ;$/Code$
+%NextExample%
+$Code$_isOnRoad = ! isNull roadAt player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - road segment or objNull
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+roadsConnectedTo
+//KeywordEnd//
+DescriptionStart:
+Find the road segments connected to the given road segment.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/roadsConnectedTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+roadsConnectedTo roadSegment
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_road = ( player nearRoads 50) select 0;
+_connectedRoads = roadsConnectedTo _road;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of Objects - connected road segments
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+roleDescription
+//KeywordEnd//
+DescriptionStart:
+Returns unit description set in Editor and visible on role selection screen in MP. Works in MP and SP.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/roleDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+roleDescription unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_playerRole = roleDescription player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 29, 2015)
+One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachedObjects
+//KeywordEnd//
+DescriptionStart:
+Returns list of attached objects on ropes
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachedObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachedObjects vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cargoArray = ropeAttachedObjects heli1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachedTo
+//KeywordEnd//
+DescriptionStart:
+Returns the object it is attached to by rope
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachedTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachedTo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_heli = ropeAttachedTo veh1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachEnabled
+//KeywordEnd//
+DescriptionStart:
+Returns true if vehicle can be attached to ropes
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeAttachEnabled vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeAttachEnabled veh1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeAttachTo
+//KeywordEnd//
+DescriptionStart:
+Attach vehicle to rope with optional offset
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeAttachTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+[veh, toPoint, ropeEndDownDir] ropeAttachTo rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[veh1,[0,0,0],[0,0,-1]] ropeAttachTo ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeCreate
+//KeywordEnd//
+DescriptionStart:
+Create a rope (PhysX rope in Arma 3).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeCreate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeCreate [fromObject, fromPoint, toObject, toPoint, segments, length]
+%NextRawSyntax%
+ropeCreate [fromObject, fromPoint, length, segments, unroll]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myRope = ropeCreate [ vehicle player, "slingload0", myCargo, [0, 0, 0], 10]; //A3 example$/Code$
+%NextExample%
+$Code$myRope = ropeCreate [ vehicle player, "fastrope0", 10, 10, true ]; //TakeOn example$/Code$
+%NextExample%
+$Code$myRope = ropeCreate [veh1, [0,0,-2], veh2, [0,0,0], 10] //A3 1.34$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(July 9, 2015)
+Parameters segments and unroll are not supported in Arma 3. Segments are set automatically according the length of a rope.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeCut
+//KeywordEnd//
+DescriptionStart:
+Cut rope and detach rope from vehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeCut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeCut [rope, distance]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeCut [ ropes heli1 select 0, 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeDestroy
+//KeywordEnd//
+DescriptionStart:
+Destroy a rope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeDestroy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeDestroy rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeDestroy myRope;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeDetach
+//KeywordEnd//
+DescriptionStart:
+Detach a rope from an object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeDetach
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle ropeDetach rope;
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player ropeDetach myRope;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeEndPosition
+//KeywordEnd//
+DescriptionStart:
+Return rope end positions in Position3D format
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeEndPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeEndPosition rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ends = ropeEndPosition ( ropes heli1 select 0);
+_end1 = _ends select 0;
+_end2 = _ends select 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [endPos1,endPos2]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeLength
+//KeywordEnd//
+DescriptionStart:
+Return rope length in meters (set by ropeCreate, ropeCut, ropeUnwind )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeLength
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeLength rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_length = ropeLength ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 19, 2016)
+When a rope gets stretched ropeLength will still return the same length as before.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropes
+//KeywordEnd//
+DescriptionStart:
+Returns a vehicle's rope objects in an Array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropes vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( ropes vehicle player );$/Code$
+%NextExample%
+$Code$_rope1 = ( ropes heli1) select 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(05 April, 2014)
+The ropes command seems to return each individual sling load rope. ropes will return an empty Array if the sling load ropes are not deployed. Ropes as of A3 1.33 have a cfgVehicles classname of "Rope".
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeUnwind
+//KeywordEnd//
+DescriptionStart:
+Unwind rope to target length. Use relative parameter for changing rope length +/- from current length
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeUnwind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeUnwind [rope, speed, targetLength, relative]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$ropeUnwind [ ropes heli1 select 0, 3, 10];//set rope length to 10m at 3m/s$/Code$
+%NextExample%
+$Code$ropeUnwind [ ropes heli1 select 0, 3, -5, true];//decrease rope length by 5m at 3m/s$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 8, 2014)
+Unwinding speed is not linear but instead automatically accelerates at the beginning and slows down at the end.
+The speed also only seems to have no effect when pulling the rope in. (unless the end of the rope is not attached to anything)
+High unwinding speeds (over ~250) can cause your cargo to get stuck in midair.
+%NextNote%
+(January 4, 2015)
+Rope length limits are between 0.5 and 100 meters.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+ropeUnwound
+//KeywordEnd//
+DescriptionStart:
+False if unwinding in progress, otherwise true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/ropeUnwound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+ropeUnwound rope
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isUnwound = ropeUnwound ( ropes heli1 select 0);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rotorsForcesRTD
+//KeywordEnd//
+DescriptionStart:
+Returns force produced by rotors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rotorsForcesRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rotorsForcesRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_rotorForces = rotorsForcesRTD _taru// Returns [[-465.981,351.941,45960.5],[-469.079,397.451,46933.3]]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 4, 2014)
+There is no official information I can find on what these values mean. According to my testing on the Mi-290 Taru, here is what I have come up with:
+$Code$[[ rotor 1 roll +right/-left, rotor 1 pitch +down/-up, rotor 1 collective +up/-down ],
+[ rotor 2 roll +right/-left, rotor 2 pitch +down/-up, rotor 2 collective +up/-down ]]$/Code$
+When yawing left and right, rotor 1 and 2 collective differ from each other. This is normal behaviour with coaxial rotors. Yawing right increase rotor 1 collective and decreases rotor 2 collective. Yawing left does the opposite. Rotor 1 in this example seems to be the bottom rotor.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+rotorsRpmRTD
+//KeywordEnd//
+DescriptionStart:
+Returns rotors RPM
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/rotorsRpmRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+rotorsRpmRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_mh9_main = ( rotorsRpmRTD _MH9) select 0;//main rotor
+_mh9_tail = ( rotorsRpmRTD _MH9) select 1;//tail rotor$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+round
+//KeywordEnd//
+DescriptionStart:
+Rounds up or down to the closest integer.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/round
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+round x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_val= round 5.25, result is 5$/Code$
+%NextExample%
+$Code$_val= round 5.55, result is 6$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+runInitScript
+//KeywordEnd//
+DescriptionStart:
+Launch init.sqs or init.sqf scripts.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/runInitScript
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+runInitScript
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneH
+//KeywordEnd//
+DescriptionStart:
+Returns the height of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the Y axis, the value will be positive but resulting Y will end up beyond the bottom border. Therefore in order to calculate Y of the bottom screen border, the length of safeZoneY must be subtracted from safeZoneH, but because it is negative, it must be added instead. _screenBottomBorderY = safeZoneH + safeZoneY. The measurement units depend on the current screen resolution getResolution. See also SafeZone
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneH
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+SafeZoneH
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenHeight = safeZoneH ;$/Code$
+%NextExample%
+$Code$_screenBottomBorderY = safeZoneH + safeZoneY ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneW
+//KeywordEnd//
+DescriptionStart:
+Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of safeZoneX must be subtracted from safeZoneW, but because it is negative, it must be added instead. _screenRightBorderX = safeZoneW + safeZoneX. The measurement units depend on the current screen resolution getResolution. See also SafeZone
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneW
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+safeZoneW
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenWidth = safeZoneW ;$/Code$
+%NextExample%
+$Code$_screenRightBorderX = safeZoneW + safeZoneX ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneWAbs
+//KeywordEnd//
+DescriptionStart:
+Returns SafeZone width (of all monitors, in case there's more than one)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneWAbs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+safeZoneWAbs
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_szW = safeZoneWAbs;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneX
+//KeywordEnd//
+DescriptionStart:
+Returns the X of the left border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the left border of the screen. Since it is going in opposite way of the X axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneX
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+SafeZoneX
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenLeftBorderX = safeZoneX ; // returns a float value 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneXAbs
+//KeywordEnd//
+DescriptionStart:
+Returns SafeZone left border (of all monitors, in case there's more than one)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneXAbs
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+safeZoneXAbs
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_szX = safeZoneXAbs;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+safeZoneY
+//KeywordEnd//
+DescriptionStart:
+Returns the Y of the top border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the top border of the screen. Since it is going in opposite way of the Y axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/safeZoneY
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+SafeZoneY
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenTopBorderY = safeZoneY ; // returns a float value 0$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveGame
+//KeywordEnd//
+DescriptionStart:
+Autosave game (used for Retry).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveGame
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+saveGame
+//RawSyntaxEnd//
+ExampleStart:
+$Code$saveGame ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveIdentity
+//KeywordEnd//
+DescriptionStart:
+Saves person's identity to Objects.sav file in campaign directory as entry name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveIdentity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName saveIdentity name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player saveIdentity "playerid"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 12, 2006)
+Can be also used in singleplayer missions to save player status before cutscenes and load it to player's double.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveJoysticks
+//KeywordEnd//
+DescriptionStart:
+Saves joysticks key mappings into the joysticks.cfg file. Engine add these joysticks to the Joystick Scheme mapping dialog in options controls section.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveJoysticks
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+saveJoysticks
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveOverlay
+//KeywordEnd//
+DescriptionStart:
+Save the current overlay.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveOverlay
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+saveOverlay map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$saveOverlay _map$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveProfileNamespace
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveProfileNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+saveProfileNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$saveProfileNamespace;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Variables are also saved when the game is quit.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveStatus
+//KeywordEnd//
+DescriptionStart:
+Saves object's properties to Objects.sav file in campaign directory as entry name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveStatus
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object saveStatus name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player saveStatus "playerstate"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+saveVar
+//KeywordEnd//
+DescriptionStart:
+Save variable value into the campaign space. This variable is available to all following missions in the campaign.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/saveVar
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+saveVar varname
+//RawSyntaxEnd//
+ExampleStart:
+$Code$saveVar varOne$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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);).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+savingEnabled
+//KeywordEnd//
+DescriptionStart:
+Check if saving the game is enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/savingEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+savingEnabled
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( savingEnabled ) then {
+hint "Saving is enabled!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+say
+//KeywordEnd//
+DescriptionStart:
+Unit will say given sound.
+When the Unit is a Person, it will also perform corresponding lipsync effect provided an appropriate.lip file has been created for this sound.
+A unit that has been killed or does not exist will not say anything.
+Compare this with playSound which will always play a sound at the location of the player.
+If the camera is not within given range, title is not shown and the sound will not be heard.
+Sound is defined in CfgSound of the Description.ext.
+NOTE: say will mimic either say2D or say3D depending on whether it is there executed in a cut scene or in a game scene.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/say
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+from say sound
+%NextRawSyntax%
+from say [sound, maxTitlesDistance, speed]
+%NextRawSyntax%
+[from, to] say sound
+%NextRawSyntax%
+[from, to] say [sound, maxTitlesDistance, speed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( units player select 1) say ["whisper1",5];$/Code$
+%NextExample%
+$Code$// Arma 3:
+player say "scuba_breath";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(7 March 2013)
+Say will occur in 3D when the player is active, during cutscenes it will not. Use say3D for cutscenes.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+say2D
+//KeywordEnd//
+DescriptionStart:
+Plays given sound in 2D
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/say2D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+from say2D sound
+%NextRawSyntax%
+from say2D [sound, maxTitlesDistance, speed]
+%NextRawSyntax%
+[from, to] say2D sound
+%NextRawSyntax%
+[from, to] say2D [sound, maxTitlesDistance, speed]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+say3D
+//KeywordEnd//
+DescriptionStart:
+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 CfgSound of the Description.ext.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/say3D
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+from say3D sound
+%NextRawSyntax%
+from say3D [sound, maxTitlesDistance, speed]
+%NextRawSyntax%
+[from, to] say3D sound
+%NextRawSyntax%
+[from, to] say3D [sound, maxTitlesDistance, speed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$helicopter1 say3D "Fortunateson"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scopeName
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scopeName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scopeName name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$scopeName "main";
+while {true} do {
+scopeName "loop1";
+while {true} do {
+scopeName "loop2";
+...
+};
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+score
+//KeywordEnd//
+DescriptionStart:
+Returns the person's score in MP.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/score
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+score unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_pScore = score player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scoreSide
+//KeywordEnd//
+DescriptionStart:
+Returns score for the given side.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scoreSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scoreSide side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_number = scoreSide west ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+screenToWorld
+//KeywordEnd//
+DescriptionStart:
+Returns the position on landscape ( PositionAGL ) corresponding to the given point on screen (in UI coordinates).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/screenToWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+screenToWorld screen
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wPos = screenToWorld [0.5,0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - PositionAGL, world position on surface [x,y,0]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scriptDone
+//KeywordEnd//
+DescriptionStart:
+Check if a script is finished running using the Script_(Handle) returned by execVM or spawn.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scriptDone
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scriptDone handle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS Syntax:
+@ scriptDone _Handle$/Code$
+%NextExample%
+$Code$// SQF Syntax:
+script_handler = [parameters] execVM "scriptname.sqf";
+waitUntil { scriptDone script_handler };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(03:54, 11 September 2009)
+A Null Script handle can be created in this manner:
+$Code$_handle = 0 spawn {};$/Code$
+That is what any Script_(Handle) becomes when a script is finished running, meaning it will test as true with:
+$Code$ scriptDone _handle $/Code$ and it returns " NULL-script " when converted to string. This in turn lets you initialize the variable with a completed Script_(Handle) and lets you test the variable even though nothing else may have set the handle by creating a script with spawn or execVM. It also lets you store and manage script handles in arrays, and a few other sexy things.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scriptName
+//KeywordEnd//
+DescriptionStart:
+Assign a user friendly name to the VM script this command is executed from.
+Once name is assigned, it cannot be changed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scriptName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scriptName name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$scriptName "leetScript.sqf";$/Code$
+%NextExample%
+$Code$scriptName format ["%1ARTY\data\scripts\ARTY_sadarmDeploy.sqf (_this: %1)",_this];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scriptNull
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scriptNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scriptNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_script = scriptNull ;
+for "_i" from 1 to 10 do {
+waitUntil { isNull _script};
+_script = 0 spawn {
+hint "script started";
+sleep 1;
+hint "script finished";
+};
+};$/Code$
+%NextExample%
+$Code$if ( scriptDone (_obj getVariable ["objScript", scriptNull ])) then {
+_obj setVariable ["objScript", _obj spawn {
+waitUntil { damage _this 0.9};
+hint "Critical Damage!";
+}];
+};$/Code$
+%NextExample%
+$Code$str scriptNull ; // NULL-script$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Script - NULL script
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+scudState
+//KeywordEnd//
+DescriptionStart:
+Current state of given Scud launcher. Following states are recognized:
+0 - No activity
+1 - Launch preparation,
+2 - Launch prepared
+3 - Ignition
+4 - Launched.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/scudState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+scudState scudName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (( scudState _scud) == 3) exitWith
+{
+player sideChat "SCUD Launch status: Missile Ignition";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+This command checks the scud status (Non-integral values are used to indicate transition between states).
+To make the scud be upright, launch or cancel launch you need to use actions.
+$Code$scud1 action ["scudLaunch",scud1]; // erect the missile
+scud1 action ["scudStart",scud1]; // launch the missile
+scud1 action ["scudCancel",scud1]; // down the missile
+$/Code$
+(Make sure either the scud launcher has a crew inside or you use the game logic to perform actions).
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+secondaryWeapon
+//KeywordEnd//
+DescriptionStart:
+Returns name of a unit's secondary weapon (empty string if none).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/secondaryWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+secondaryWeapon unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sWeap = secondaryWeapon player ;$/Code$
+%NextExample%
+$Code$hint secondaryWeapon player ; //"launch_NLAW_F"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+secondaryWeaponItems
+//KeywordEnd//
+DescriptionStart:
+Returns array with all items assigned to the secondary weapon. This command is used for infantry weapons only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/secondaryWeaponItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+secondaryWeaponItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$secondaryWeaponItems player ; //["","",""]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+secondaryWeaponMagazine
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/secondaryWeaponMagazine
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+secondaryWeaponMagazine unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint secondaryWeaponMagazine player ; //["NLAW_F"]$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+select
+//KeywordEnd//
+DescriptionStart:
+Selects an element from an array, config entry from Config or substring from a string or a range from an array.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/select
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array select index
+%NextRawSyntax%
+array select boolean
+%NextRawSyntax%
+config select index
+%NextRawSyntax%
+string select [start, length]
+%NextRawSyntax%
+array select [start, count]
+%NextRawSyntax%
+array select expression
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[1,2,3,4] select 2; //result is 3
+position player select 2; //result is Z coordinate of player position$/Code$
+%NextExample%
+$Code$["", currentWeapon player ] select alive player ; //if dead "" is selected$/Code$
+%NextExample%
+$Code$( configFile "cfgVehicles" typeOf vehicle player "Turrets") select 0 "gunnerAction";$/Code$
+%NextExample%
+$Code$hint str ("japa is the man!" select [8]); //the man!
+hint str ("japa is the man!" select [0,7]); //japa is$/Code$
+%NextExample%
+$Code$hint str ([1,2,3,4,5,6] select [1,4]); //[2,3,4,5]$/Code$
+%NextExample%
+$Code$_even = [1,2,3,4,5,6,7,8,9,0] select {_x%2 == 0}; // returns [2, 4, 6, 8, 0]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(3 March 2009)
+When combined with the count command, this can be used to read all entries out of a config; even when you don't know exactly how many entries there will be. See the notes under count for more info.
+%NextNote%
+(27 Sep, 2013)
+Rounding of fractions with select is not the same as when you use round command:
+$Code$_roundThis = 0.5;
+hint str ([0,1] select _roundThis); //0
+hint str round _roundThis; //1$/Code$
+%NextNote%
+(30 May, 2014)
+In ArmA3 ver 1.18, Boolean type supported. Which true defaulted as 1 and false as 0.
+$Code$[0,1] select (56 40) // 1
+[0,1,2] select ((! isNil "v") false ) // 0$/Code$
+%NextNote%
+(June 22, 2015)
+Usually when select tries to pick up element out of range, Arma throws "division by zero" error. However there are exceptions. Basically as long as index of element you are selecting is less then or equal to array size, you will get no error.
+$Code$[] select 0; //ok, result is nil
+[1,2,3] select 3; //ok, result is nil
+[1,2,3] select 4; //division by zero$/Code$
+//NoteEnd//
+ReturnValueStart:
+Anything
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectBestPlaces
+//KeywordEnd//
+DescriptionStart:
+Find the places with the maximum value of expression in the given area. Places can be on water. Results are sorted by value. Search pattern is randomised every command execution.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectBestPlaces
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+selectBestPlaces [position, radius, expression, precision, sourcesCount]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myPlaces = selectBestPlaces [ position player, 50, "meadow + 2*hills", 1, 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(Jul 17, 2010)
+see http://forums.bistudio.com/showthread.php?t=93897 for some more information (though neither official, nor complete). The most important information is the list of useable keywords for the expression which is: forest, trees, meadow, hills, houses, sea, night, rain, windy and deadBody. The keyword will be replaced by the actual value at the given sample position and thus the expression gets evaluated. For example the following expression (which returns high values in forest) "forest + trees - meadow - houses - (10 * sea)" might be transformed to 0 + 0.1 - 0.7 - 0 - (10 * 0) which is - with it's result of -0.6 - not in the forest, though there are some tree(s) around. You get the idea.
+Also note that you may aswell check such an expression value at a single position by passing a low radius and a sourceCount of 1, which is often just as useful as retrieving multiple (and already sorted) positions.
+Also do not underestimate the keywords night, rain or windy, for if you couple them with the other keywords, you can easily get a highly dynamic system at a very low cost. (this, btw., is how animals "choose" where and when to spawn)
+%NextNote%
+(Apr 3, 2014)
+In ArmA3 ver 1.14 Two new expressions are available: waterDepth (0-1) and camDepth (0-1), along with three simple operators: interpolate, randomGen and factor that can be used together with expressions. E.g.
+$Code$
+p = selectBestPlaces [
+position player,
+500,
+"(2 * (waterDepth interpolate [1,16,0,1]) * ((0.1+houses factor [0.1,0.8]) * (randomGen 1 + houses)))",
+1,
+1];
+$/Code$
+A lgorithm randomGen:
+$Code$
+randomGen A(number): randomly generate a float number from 0 - A
+$/Code$
+A lgorithm factor:
+$Code$
+A(number) factor [p,q] =
+p A q: [(A -p)/(q-p)]
+$/Code$
+A lgorithm interpolate:
+$Code$
+A(number) interpolate [p,q,r,s] =
+A =p:r
+A =q:s
+p A q: [(A -p)/(q-p)]*(s-r) +r
+$/Code$
+%NextNote%
+(June 15, 2015)
+precision seems to have range 0 - 100. At very low values the command is extremely slow. 100 makes it quite fast. It looks like precision is some kind of grid search size. Large chunks make the search faster but less accurate.
+Resulting array is [] if sourcesCount is 0 or expression is "". In all other cases it seems that result is array of arrays of the set max count. The sole indication of successful search is expressionResult value when it is 0.
+//NoteEnd//
+ReturnValueStart:
+Array - in Format [[position: Position2D, expressionResult: Number ],...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectDiarySubject
+//KeywordEnd//
+DescriptionStart:
+Select the subject page in a log.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectDiarySubject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person selectDiarySubject subject
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectedEditorObjects
+//KeywordEnd//
+DescriptionStart:
+Returns a list of currently selected editor objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectedEditorObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+selectedEditorObjects map
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_selObjects = selectedEditorObjects _map
+Result can be: ["_vehicle_0","_vehicle_9","_vehicle_11"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectEditorObject
+//KeywordEnd//
+DescriptionStart:
+Select an editor object. Does not un-select previously selected objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map selectEditorObject object
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectionPosition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectionPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object selectionPosition selectionName
+%NextRawSyntax%
+object selectionPosition [selectionName, LODName]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_inModelPosition = player selectionPosition "head_hit";$/Code$
+%NextExample%
+$Code$_inModelPosition = player selectionPosition "pelvis";$/Code$
+%NextExample%
+$Code$_inModelPosition = player selectionPosition "head";$/Code$
+%NextExample%
+$Code$_inModelPosition = player selectionPosition "camera";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(January 5, 2007)
+To know more selections simply create an eventHandler damage on an object.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - in format PositionRelative ([x,y,z] relative position in model space)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectLeader
+//KeywordEnd//
+DescriptionStart:
+Select a group's leader. In MP the group has to be local to the PC executing the command. Locality of the group can be checked with local command and group ownership with groupOwner command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName selectLeader unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$group player selectLeader player ;$/Code$
+%NextExample%
+$Code$// Make unit a leader from server:
+[ group _unit, _unit] remoteExec ["selectLeader", groupOwner _unit];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectNoPlayer
+//KeywordEnd//
+DescriptionStart:
+Switch player to no unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectNoPlayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+selectNoPlayer
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+-- Worldeater 09:48, 15 October 2010 (CEST)
+%NextNote%
+(May 2, 2015)
+SP only.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectPlayer
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectPlayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+selectPlayer unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$selectPlayer bob;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+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
+%NextNote%
+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.
+%NextNote%
+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.
+%NextNote%
+(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.
+%NextNote%
+(June 24, 2015)
+Most of the notes above do not apply to Arma 3 anymore.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectRandom
+//KeywordEnd//
+DescriptionStart:
+Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectRandom
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+selectRandom array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_randomElement = selectRandom [1,2,3,4,5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Anything - random value
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectWeapon
+//KeywordEnd//
+DescriptionStart:
+Selects the given weapon.
+Note: For weapons that have more than one muzzle, you have to input the muzzlename and not the weaponName.
+The only weapons that have muzzleNames seem to be rifles with grenade launchers, handgrenades, smokeshells and satchels.
+In all other cases the weaponName must be used.
+Fortunately, in OFP, in most cases, both names are the same. But check.
+In ArmA the weaponNames and muzzleNames are different.
+For muzzle names see cfgWeapons.
+NOTE: The unit must be local to the PC on which command is executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectWeapon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName selectWeapon muzzleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 selectWeapon "LAWLauncher";$/Code$
+%NextExample%
+$Code$player selectWeapon "M203Muzzle";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(5 Aug, 2008)
+Rather than simply using selectWeapon to select your default weapon after adding them to your player, it is recommended you use a script instead similar to the following, which caters for multiple muzzles:
+SelectWeapon.sqf
+// Desc: select default weapon handle multiple muzzles
+if (count weapons player 0) then
+{
+private['_type', '_muzzles'];
+_type = ((weapons player) select 0);
+// check for multiple muzzles (eg: GL)
+_muzzles = getArray(configFile cfgWeapons _type muzzles );
+if (count _muzzles 1) then
+{
+player selectWeapon (_muzzles select 0);
+}
+else
+{
+player selectWeapon _type;
+};
+};
+%NextNote%
+(22 Mar, 2010)
+Can be used with primaryWeapon to select the primary weapon.
+An example with muzzle care (see Dr_EyeBall note) :
+if ( (primaryWeapon player) != ) then
+{
+private['_type', '_muzzles'];
+_type = primaryWeapon player;
+// check for multiple muzzles (eg: GL)
+_muzzles = getArray(configFile cfgWeapons _type muzzles );
+if (count _muzzles 1) then
+{
+player selectWeapon (_muzzles select 0);
+}
+else
+{
+player selectWeapon _type;
+};
+};
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+selectWeaponTurret
+//KeywordEnd//
+DescriptionStart:
+Selects the given weapon on specified turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/selectWeaponTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle selectWeaponTurret [weapon, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$MBT_Kuma selectWeaponTurret ["LMG_coax",[0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sendAUMessage
+//KeywordEnd//
+DescriptionStart:
+Send the command to the list of clients.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sendAUMessage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sendAUMessage [clientList, command]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$sendAUMessage [[dpnid1, dpnid2], "ConnectTo: 192.168.1.66"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sendSimpleCommand
+//KeywordEnd//
+DescriptionStart:
+Sends a simple command to the vehicle's driver / gunner.
+Gunner commands
+FIRE
+CEASE FIRE
+MANUAL FIRE
+CANCEL MANUAL FIRE
+KEY FIRE
+Driver commands
+FORWARD
+STOP
+BACK
+FAST
+KEY FAST
+SLOW
+KEY SLOW
+LEFT
+RIGHT
+KEY UP
+KEY DOWN
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sendSimpleCommand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName sendSimpleCommand command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player sendSimpleCommand "STOP";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Valid commands include: "FORWARD", "SLOW", "FAST" "BACK", "LEFT", "RIGHT", "STOP", "FIRE", "CEASE FIRE", "MANUAL FIRE", "CANCEL MANUAL FIRE". There may be more.
+Only vehicles crewed by a player can use sendSimpleCommand.
+%NextNote%
+Other commands that work: "KEY FIRE", "KEY FAST", "KEY SLOW", "KEY DOWN", "KEY UP". These will simulate key presses.
+In Arma 3 player doesn't always need to be in the vehicle to give commands.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sendTask
+//KeywordEnd//
+DescriptionStart:
+Create a new AI task (subtask of parentTask). Type is name of registered task type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sendTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sender sendTask [receiver,[type] or [type,parentTask],priority,name1,value1,name2,value2,...]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sendTaskResult
+//KeywordEnd//
+DescriptionStart:
+Send a result of the task to the task sender.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sendTaskResult
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task sendTaskResult [state,result,sentence]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sendUDPMessage
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sendUDPMessage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sendUDPMessage [ip, port, message]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = sendUDPMessage ["192.168.0.1", 2302, "Here goes you message..."];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+serverCommand
+//KeywordEnd//
+DescriptionStart:
+Executes a server command on the server. In order to be able to execute admin command the user must be logged in as admin. Commands available for non-admin users are: #login, #vote and #userlist. Which command is available can be detected with serverCommandAvailable and whether or not it can be executed with serverCommandExecutable. NOTE: This command 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/serverCommand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+serverCommand command
+%NextRawSyntax%
+password serverCommand command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$serverCommand "#logout";$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$serverCommand format ["#kick %1",_name];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Boolean - always true for some reason (since A3 v1.39 also false if a non valid command is used ("#blah"))
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+serverCommandAvailable
+//KeywordEnd//
+DescriptionStart:
+Returns true if the serverCommand can be performed on the machine, false if not. serverCommand can be executed only from User Interface Event Handlers, so calling this command elsewhere may return true even if serverCommand would have no effect.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/serverCommandAvailable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+serverCommandAvailable command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_can = serverCommandAvailable "#kick";$/Code$
+%NextExample%
+$Code$if ( serverCommandAvailable "#logout") then {
+hint "You are an admin";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+serverCommandExecutable
+//KeywordEnd//
+DescriptionStart:
+Returns true if the serverCommand can be performed on the machine and in this exact environment, otherwise false. serverCommand can be executed only from User Interface Event Handlers, and this command also checks if that's the case.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/serverCommandExecutable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+serverCommandExecutable command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_can = serverCommandAvailable "#kick";$/Code$
+%NextExample%
+$Code$// Add button to the main map to lock server, which could only be activated by admin:
+with uiNamespace do {
+ctrl = findDisplay 12 ctrlCreate ["RscButton", -1];
+ctrl ctrlSetPosition [0,0,0.5,0.1];
+ctrl ctrlCommit 0;
+ctrl ctrlSetText "LOCK SERVER";
+ctrl ctrlAddEventHandler ["ButtonDown",
+{
+if ( serverCommandExecutable "#lock") then {
+serverCommand "#lock";
+} else {
+hint "You need to be logged in as admin to do this";
+};
+}];
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+serverName
+//KeywordEnd//
+DescriptionStart:
+Returns name of the hosting server in MP, "" in SP.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/serverName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+serverName
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+serverTime
+//KeywordEnd//
+DescriptionStart:
+Server time synchronized to clients. Returns always 0 in Singleplayer.
+Note that in ArmA2 1.05 Final, this command only returns the time since the Server was actually started.
+NOTE: serverTime is available to both server and clients and shows the same value when synced. The only time it is not synced is on the server, right after server restart and only for the first 300 seconds. Client side serverTime is synced from the start. serverTime is also different from server time and server diag_tickTime
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/serverTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+serverTime
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint format ["Synced server time : %1", serverTime ];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(Sep 8, 2010(CEST) 19:31)
+There is a bug in this command, about 3 minutes after missionstart this command returns something completely different.
+See http://dev-heaven.net/issues/13581 for further infomation.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set
+//KeywordEnd//
+DescriptionStart:
+Changes the element at the given (zero-based) index of the array.
+If the element does not exist, resize index+1 is called to create it.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array set [index, value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_arrayOne set [0, "Hello"];$/Code$
+%NextExample%
+$Code$_arrayTwo set [ count _arrayTwo, "Bye"];
+// appends "Bye" as last element to _arrayTwo$/Code$
+%NextExample%
+$Code$_arrayThree set [( count _arrayThree) - 1, 23];
+// replaces the last element of _arrayTwo with 23$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENAttribute
+//KeywordEnd//
+DescriptionStart:
+Set one of entity attributes.
+!
+Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENAttribute
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity set3DENAttribute [class, value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player set3DENAttribute ["allowDamage",false];
+// Mark player as invincible$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the value was set
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENAttributes
+//KeywordEnd//
+DescriptionStart:
+Set entity 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!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENAttributes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENAttributes [[ entities1, class1, value1 ],..., [ entitiesN, classN, valueN ]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$set3DENAttributes [[ get3DENSelected "Object","ControlMP",true]];
+// Set all selected objects as playable$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the value was set
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENGrid
+//KeywordEnd//
+DescriptionStart:
+Sets the grid increment for the given transformation type.
+Transformation types:
+Rotation - "r"
+Translation - "t"
+Scale - "s"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENGrid
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENGrid [type,value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$set3DENGrid ["t",100];// 100m movement increment$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENIconsVisible
+//KeywordEnd//
+DescriptionStart:
+Toggle visibility of Eden Editor icons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENIconsVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENIconsVisible [showMap, showScene]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$set3DENIconsVisible [false, false];
+// Hide all icons$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENLayer
+//KeywordEnd//
+DescriptionStart:
+Set layer for Eden Entity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENLayer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity set3DENLayer layerID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myLayer = -1 add3DENLayer "CTRG";
+player set3DENLayer _myLayer;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the entity was moved succesfully
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENLinesVisible
+//KeywordEnd//
+DescriptionStart:
+Toggle visibility of Eden Editor lines.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENLinesVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENLinesVisible [showMap, showScene]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$set3DENLinesVisible [false, false];
+// Hide all lines$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENMissionAttributes
+//KeywordEnd//
+DescriptionStart:
+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!
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENMissionAttributes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+set3DENMissionAttributes [[ section, class1, value1 ],..., [ section, classN, valueN ]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$set3DENMissionAttributes [["Multiplayer","respawn",3],["Multiplayer","respawnDelay",10]];
+// Set respawn type to 3 and respawn delay to 10 seconds$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool - true if the value was set
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+set3DENObjectType
+//KeywordEnd//
+DescriptionStart:
+Sets the classname of one or more given Eden Editor objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/set3DENObjectType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objects set3DENObjectType classname
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[ get3DENMouseOver select 1] set3DENObjectType "B_crew_F";
+// turns object under cursor into a blufor crewman$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAccTime
+//KeywordEnd//
+DescriptionStart:
+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].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAccTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setAccTime accFactor
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setAccTime 0.1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAirportSide
+//KeywordEnd//
+DescriptionStart:
+Set owning side of the airport. ID is the number to identify which airport on the island you want to check.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAirportSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+id setAirportSide side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$0 setAirportSide east$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAmmo
+//KeywordEnd//
+DescriptionStart:
+Sets custom ammo count in the currently loaded magazine of the specified weapon. The unit must be local to the computer where command is executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setAmmo [weapon, count]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Set player's handgun magazine ammo count to 10 rounds:
+player setAmmo [ handgunWeapon player, 10];$/Code$
+%NextExample%
+$Code$// Set player's current weapon magazine ammo count to 1 round:
+player setAmmo [ currentWeapon player, 1];$/Code$
+%NextExample%
+$Code$// If player is a gunner in a vehicle, set current weapon magazine ammo count to 5 rounds:
+if ( local vehicle player ) then {
+vehicle player setAmmo [ currentWeapon vehicle player, 5];
+} else {
+hint "Vehicle must be local to this machine for 'setAmmo' to work";
+};$/Code$
+%NextExample%
+$Code$// If you try to set more ammo than the magazine can hold, it will be clipped at default magazine capacity:
+player setAmmo [ primaryWeapon player, 1000000]; //full mag with default ammo count$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAmmoCargo
+//KeywordEnd//
+DescriptionStart:
+Set amount of ammo resources in cargo space of a rearm vehicle. Ammo resource is used to resupply vehicles that take ammo. Soldiers use individual magazines instead. Amount: 1 is full cargo.
+The actual quantity to work with is determined by the model's class in CfgVehicles
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAmmoCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setAmmoCargo ammoCargo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ammoTruck1 setAmmoCargo 0.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(31 Aug, 2011)
+While the amount of total 'ammo' that can be reloaded is defined in the truck/supply point's CfgVehicles entry, the amount each round of ammunition takes from that total is defined in the CfgAmmo 'Cost' entry for that round.
+Your typical truck has 300000 ammo capacity, and the tunguska's missiles have a Cost of 50000. So the tunguska can reload a total of 6 missiles from the ammo truck before the ammo capacity is depleted and needs to be set with setAmmoCargo.
+A similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling.
+%NextNote%
+(July 10, 2015)
+(ArmA 3 1.44) setAmmoCargo will have no effect if the vehicle doesn't support getAmmoCargo.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAnimSpeedCoef
+//KeywordEnd//
+DescriptionStart:
+Sets a coefficient for animation speed
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAnimSpeedCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setAnimSpeedCoef coef
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setAnimSpeedCoef 0.75;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAperture
+//KeywordEnd//
+DescriptionStart:
+Sets custom camera aperture (-1 to do it automatically).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAperture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setAperture aperture
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setAperture 0.3$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+It's up to the maker of the mission to decide if HDR effects are to be disabled and what aperture to be used. Of course, this static aperture setting will not work well after lighting conditions changed too much.
+( forum discussion )
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setApertureNew
+//KeywordEnd//
+DescriptionStart:
+Sets custom camera aperture ([-1] to do it automatically).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setApertureNew
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setApertureNew [min, std, max, stdLum]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 10, 2014)
+Effects of command are persistent after mission end.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setArmoryPoints
+//KeywordEnd//
+DescriptionStart:
+Stores passed number into [USERNAME].ArmaXProfile file, where it assigns it as a value to armoryPoints entry. If entry doesn't exist, it is created.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setArmoryPoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setArmoryPoints points
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setArmoryPoints ( armoryPoints + 20);$/Code$
+%NextExample%
+$Code$setArmoryPoints 3.14;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAttributes
+//KeywordEnd//
+DescriptionStart:
+Returns a structured text created by the given structured or plain text by setting attributes to the given values.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAttributes
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+text setAttributes [name1, value1, name2, value2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$txt = img setAttributes [ image, data\iSoldier.paa ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 9, 2014)
+This command doesn't seem to work in Arma 3.
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setAutonomous
+//KeywordEnd//
+DescriptionStart:
+Sets UAV autonomous mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setAutonomous
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uav setAutonomous bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uav setAutonomous true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setBehaviour
+//KeywordEnd//
+DescriptionStart:
+Set group/unit behaviour mode. Behaviour is one of:
+"CARELESS"
+"SAFE"
+"AWARE"
+"COMBAT"
+"STEALTH".
+See this page for details of the effect of this command on AI units.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setBehaviour
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName setBehaviour behaviour
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group1 setBehaviour SAFE$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+Although setBehaviour can be called on an individual unit, the entire group will be affected.
+%NextNote%
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setBleedingRemaining
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setBleedingRemaining
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setBleedingRemaining time
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit setBleedingRemaining 60;$/Code$
+%NextExample%
+$Code$player setDamage 0.25;
+player setBleedingRemaining 120;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCameraInterest
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCameraInterest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+entity setCameraInterest interest
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier setCameraInterest 50;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCamShakeDefParams
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCamShakeDefParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setCamShakeDefParams [power, duration, frequency, minSpeed, minMass, caliberCoefHit, vehicleCoef]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setCamShakeDefParams [1, 2, 3, 4, 5,.5,.5];$/Code$
+%NextExample%
+$Code$setCamShakeDefParams [100, 10, 10, 4, 5, 1, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 1, 2014)
+Doesn't appear to have any effect in ArmA 3.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCamShakeParams
+//KeywordEnd//
+DescriptionStart:
+Set camera shake parameters.
+Will not have any effect until shake is started via addCamShake.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCamShakeParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setCamShakeParams [posCoef, vertCoef, horzCoef, bankCoef, interpolation]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setCamShakeParams [0.1, 1, 1, 1, true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCamUseTi
+//KeywordEnd//
+DescriptionStart:
+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 Col
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCamUseTi
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+Bool setCamUseTi modeIndex
+//RawSyntaxEnd//
+ExampleStart:
+$Code$true setCamUseTi 1;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCaptive
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCaptive
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName setCaptive status
+%NextRawSyntax%
+unitName setCaptive status
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setCaptive true ;$/Code$
+%NextExample%
+$Code$_soldier1 setCaptive 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCenterOfMass
+//KeywordEnd//
+DescriptionStart:
+Changes the center of mass of an object smoothly during the given time (in seconds). A time of zero (or using the alternative syntax) means an immediate change.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCenterOfMass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+myObject setCenterOfMass [com, time]
+%NextRawSyntax%
+myObject setCenterOfMass com
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myObject setCenterOfMass [[0,-1,0],0.5];$/Code$
+%NextExample%
+$Code$myObject setCenterOfMass [0,-1,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCollisionLight
+//KeywordEnd//
+DescriptionStart:
+Switches collision lights of a vehicle on/off. Note that the vehicle has to be local, for global variant use Arma 3 Actions "CollisionLightOn"/"CollisionLightOff"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCollisionLight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setCollisionLight set
+//RawSyntaxEnd//
+ExampleStart:
+$Code$heli setCollisionLight true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCombatMode
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCombatMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName setCombatMode mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group1 setCombatMode BLUE$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCompassOscillation
+//KeywordEnd//
+DescriptionStart:
+Sets compass oscillation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCompassOscillation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setCompassOscillation [angle, frequencyMin, frequencyMax]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setCompassOscillation [1, 1, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCuratorCameraAreaCeiling
+//KeywordEnd//
+DescriptionStart:
+Sets maximal height to which curator camera can move.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCuratorCameraAreaCeiling
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj setCuratorCameraAreaCeiling height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCurator setCuratorCameraAreaCeiling 50;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCuratorCoef
+//KeywordEnd//
+DescriptionStart:
+Sets coef for some action (coef have to be bigger than -1 000 000, anything lower is considered as disabled action).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCuratorCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj setCuratorCoef [action,coef]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule setCuratorCoef ["Place", 1]$/Code$
+%NextExample%
+$Code$curatorModule setCuratorCoef ["Delete", -1e10]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(March 25, 2015)
+Possible actions are:
+place
+edit
+delete
+destroy
+group
+synchronize
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCuratorEditingAreaType
+//KeywordEnd//
+DescriptionStart:
+Set whether curator can edit in all editing areas (true) or outside of them (false).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCuratorEditingAreaType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj setCuratorEditingAreaType bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$curatorModule setCuratorEditingAreaType true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCuratorWaypointCost
+//KeywordEnd//
+DescriptionStart:
+Sets cost of waypoints (used for placing, editing and deleting).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCuratorWaypointCost
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+curatorObj setCuratorWaypointCost cost
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myCUrator setCuratorWaypointCost 0.1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCurrentChannel
+//KeywordEnd//
+DescriptionStart:
+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 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCurrentChannel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setCurrentChannel channel
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isDirectSelected = setCurrentChannel 5; // sets Direct channel as current active$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCurrentTask
+//KeywordEnd//
+DescriptionStart:
+Set the task as a current task of the person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCurrentTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setCurrentTask task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setCurrentTask tskKillSpongebob;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCurrentWaypoint
+//KeywordEnd//
+DescriptionStart:
+Sets the currently active waypoint for a group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCurrentWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName setCurrentWaypoint waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_grp setCurrentWaypoint [_grp, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+(27 Aug 2007)
+(A1 1.08) Does not seem to work with Game Logic. Crashes to desktop.
+%NextNote%
+(26 Nov 2008)
+Note that a waypoints number as seen in the mission editor is not the same as it's waypoint number using this command. In the mission editor, waypoint 0 refers to the first placed waypoint, whereas waypoint 0 with the setCurrentWaypoint command refers to the unit's initial position waypoint.
+%NextNote%
+(17 Jan 2010)
+(A2 1.05) This command may crash the game to desktop if you call it from the on act field of a waypoint that belongs to that same unit.
+%NextNote%
+(13 Aug 2012)
+Using this command forces the last waypoint to complete. Any code in the on Act of that waypoint will run.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setCustomAimCoef
+//KeywordEnd//
+DescriptionStart:
+Set custom aim precision coefficient for weapon sway
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setCustomAimCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setCustomAimCoef coef
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setCustomAimCoef 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDamage
+//KeywordEnd//
+DescriptionStart:
+Damage / repair object.
+Damage 0 means fully functional, damage 1 means completely destroyed / dead.
+This function is identical to setDammage.
+It was introduced to fix a spelling error in original function name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDamage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setDamage damage
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setDamage 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+In OFP, setting a unit's damage to a negative value will set it's health to full, but impair their aim.
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDammage
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDammage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setDammage damage
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setDammage 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+In OFP, setting a unit's damage to a negative value will set it's health to full, but impair their aim.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDate
+//KeywordEnd//
+DescriptionStart:
+Sets the actual mission date and time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setDate [year, month, day, hour, minute]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setDate [1986, 2, 25, 16, 0]; //(4:00pm February 25, 1986)$/Code$
+%NextExample%
+$Code$// Set real date:
+//postInit = 1;
+if ( isServer ) then {
+waitUntil { time 0};
+setDate ( missionStart select [0,5]);
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+This command is special in that it is "smart". If you add 120 minutes, for example, it will actually advance hours by 2, and so on.
+10:00, 7/12/2010 (BST)
+%NextNote%
+This command sets the date for the southern hemisphere only, i.e. when the map is in northern hemisphere a date [2010,12,7,17,0] is in day light and and date [2010,6,7,17,0] is in darkness.
+21:35, 31 October 2011 (EET)
+%NextNote%
+In multiplayer, the effect of this command is local, not global. The date from the server is synchronized with clients when they join the game (including start of the mission and joining in progress). E.g. if this command is executed on server in the init.sqf before the mission starts, every client will be synchronized with server as mission is started. However, if you run this command in the middle of the mission, effect is local.
+10 September 2013 (EET)
+%NextNote%
+This command is JIP compatible. Players joining after mission start will get current server date set up.
+%NextNote%
+(October 4, 2014)
+Since an unknown version of ARMA 3, this command sadly now has global effect when executed on the server.
+%NextNote%
+(February 5, 2015)
+Arma 3 1.38.128937- Leapyear BUG - setdate [2016,12,31,23,59] yields an ingame date of the 1st of January 2017. If left to tick over from the 30th of December it ticks to 1st January skipping the 31st of December entirely.
+Feedback_Link
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDebriefingText
+//KeywordEnd//
+DescriptionStart:
+Sets debriefing text for endType defined in CfgDebriefing.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDebriefingText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+endType setDebriefingText [title, description]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_currentObjective = ( taskDescription ( currentTask player )) select 2;
+"endDeath" setDebriefingText ["You Lose","All of your men were killed while assaulting the " + _currentObjective];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDefaultCamera
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDefaultCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setDefaultCamera [position, direction]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setDefaultCamera [[5000,5000,200],[1,1,-1]];$/Code$
+%NextExample%
+$Code$// Lift camera 100m up above current player position and point downwards:
+setDefaultCamera [ ATLtoASL ( player modelToWorld [0,0,100]),[0,0,-1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDestination
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDestination
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setDestination [position, planningMode, forceReplan]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bob setDestination [ screenToWorld [0.5,0.5], "LEADER PLANNED", true ]$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDetailMapBlendPars
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDetailMapBlendPars
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setDetailMapBlendPars [fullDetail, noDetail]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setDetailMapBlendPars [20, 50];$/Code$
+%NextExample%
+$Code$setDetailMapBlendPars ( if ( currentWeapon player in [
+"Binocular",
+"Rangefinder",
+"Laserdesignator"
+]) then [
+{[300,600]},
+{[20,50]}
+]);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDir
+//KeywordEnd//
+DescriptionStart:
+Sets object heading. Angles are measured in degrees clockwise from north. The accepted heading range is from 0 to 360 Negative angles represent a counter-clockwise angle and the angle can be of any size.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setDir heading
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setDir 45
+// Will set soldier1 to face North East$/Code$
+%NextExample%
+$Code$_soldier1 setDir -675
+// Will also set soldier1 to face North East$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(November 27, 2013)
+Make sure you setDir BEFORE you set position. Setting direction after set position could lead to unpredictable behaviour. For example main part of the hospital building in Arma 3 can lose collision detection near both side entrances. AI will also can get confused and will stop detecting obstacles if setDir called after setPos.
+%NextNote%
+(May 9, 2007)
+Though effects of this command remain local, you can do a setPos afterwards to synchronize the direction on all machines in MP.
+$Code$myObj setDir 90;
+myObj setPos getPos myObj;$/Code$
+%NextNote%
+(January 9, 2009)
+In ArmA, the effect of setDir is synchronized across the network.
+%NextNote%
+(April 5th, 2011)
+In OA 1.59 the comment of Manny still holds true for createVehicle'd empty vehicles by the server.
+For the player object a local setDir alone is enough.
+%NextNote%
+(July 10, 2010)
+In ArmA 2 OA, this command only makes the unit glance momentarily to the direction. To change his heading more permanently use setFormDir.
+%NextNote%
+(August 28, 2013)
+Be careful letting the command to do the conversion for you when the angle is 0 or 360
+$Code$ player setDir 360+1;
+hint str direction player ; //1
+player setDir -360+1;
+hint str direction player ; //1.00001
+player setDir 360*5+1;
+hint str direction player ; //1.00002
+player setDir -360*5+1;
+hint str direction player ; //0.999972
+player setDir 360*10+1;
+hint str direction player ; //0.999876
+player setDir -360*10+1;
+hint str direction player ; //1
+player setDir 360*100000+1;
+hint str direction player ; //358.24
+player setDir -360*100000+1;
+hint str direction player ; //1.76001
+player setDir 360*10000000+1;
+hint str direction player ; //298.591
+player setDir -360*10000000+1;
+hint str direction player ; //61.4094$/Code$
+%NextNote%
+(November 25, 2013)
+In Arma 3, setDir affects vectorUp, vectorDir and velocity of the object it applied to. While this is not noticeable with stationary objects, a moving objects will have its orientation and velocity reset. So if you are planning on using setDir on a moving object, make sure you read the velocity value before and restore it after if you want the object to continue to move.
+$Code$_vel = velocity _object;
+_object setDir 45;
+_object setVelocity _vel;
+$/Code$
+With orientation it is a bit more complicated. setDir resets vectorUp to [0,0,1] and changes vectorDir accordingly to accommodate set direction. If your object's vectorUp is not [0,0,1] and you want to keep it this way, then you have to use setVectorDirAndUp to change object's direction not setDir. This is also the reason why it is better to use setVectorDirAndUp instead of setDir on attached objects for a better control of object's orientation.
+%NextNote%
+(November 22, 2014)
+To setDir for AI unit, setFormDir first:
+$Code$_ai setFormDir 180;
+_ai setDir 180;$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDirection
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setDirection direction
+//RawSyntaxEnd//
+ExampleStart:
+$Code$location1 = createLocation ["VegetationPalm", getPos player, 200, 200];
+location1 setText "Benargee's Palm Tree";
+location1 setDirection 45;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDrawIcon
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDrawIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setDrawIcon [object,texture,color,offset,width,height,maintain size?,angle,string identifier,shadow,is3D,draw line?,priority]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setDropInterval
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setDropInterval
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+particleSource setDropInterval interval
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_source setDropInterval 0.05$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setEditorMode
+//KeywordEnd//
+DescriptionStart:
+Sets map mode to MAP,3D or PREVIEW.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setEditorMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setEditorMode mode
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setEditorObjectScope
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setEditorObjectScope
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setEditorObjectScope [objects, editorType, condition, scope, subordinatesAlso]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map setEditorObjectScope [ [],"vehicle", "side effectiveCommander _x != side player", "HIDE", false]$/Code$
+%NextExample%
+$Code$((findDisplay 128) displayCtrl 51) setEditorObjectScope [ ["_unit_0"], "", "true", "ALLNODRAG", false]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setEffectCondition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setEffectCondition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setEffectCondition statement
+%NextRawSyntax%
+waypoint setEffectCondition statement
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_triggerObj setEffectCondition "thisList";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFace
+//KeywordEnd//
+DescriptionStart:
+Set person's face. For a list of available faces, check Category:CfgIdentities.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setFace face
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldier1 setFace WhiteHead_02$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFaceAnimation
+//KeywordEnd//
+DescriptionStart:
+Set facial animation phase (eye blinking), blink is in the range from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFaceAnimation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setFaceAnimation blink
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setFaceAnimation 0.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(09:01, 23 December 2008 (CET))
+Setting face animation to 4 will give "devilish" features (ArmA)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFatigue
+//KeywordEnd//
+DescriptionStart:
+Sets the person's fatigue, from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFatigue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setFatigue value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setFatigue 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(05 April, 2014)
+setFatigue will affect fatigue of a local unit only. If you execute it on remote unit, the getFatigue value will only change locally with no effect on remote unit. Scripted setFatigue changes don't broadcast at all. In short, use setFatigue on local units only.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFlagOwner
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFlagOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flag setFlagOwner owner
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flag1 setFlagOwner _soldier1;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFlagSide
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFlagSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flag setFlagSide side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flag1 setFlagSide east ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFlagTexture
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFlagTexture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+flag setFlagTexture texture
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_flagE setFlagTexture "\ca\misc\data\sever_vlajka.paa";$/Code$
+%NextExample%
+$Code$_flagW setFlagTexture "\ca\misc\data\usa_vlajka.paa";$/Code$
+%NextExample%
+$Code$flag1 setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";$/Code$
+%NextExample%
+$Code$flagARMA3 setFlagTexture "\a3\ui_f\data\Logos\arma3_expansion_ca.paa";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFog
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setFog fog
+%NextRawSyntax%
+time setFog [fogValue, fogDecay, fogBase]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$15 setFog 0.5;$/Code$
+%NextExample%
+$Code$// Force no fog:
+0 setFog 0;
+forceWeatherChange ;
+999999 setFog 0;$/Code$
+%NextExample%
+$Code$0 setFog [1, 0.01, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+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.
+%NextNote%
+(December 15, 2015)
+setTimeMultiplier DOES affect transition time.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFormation
+//KeywordEnd//
+DescriptionStart:
+Set group formation.
+Formation is one of:
+"COLUMN"
+"STAG COLUMN"
+"WEDGE"
+"ECH LEFT"
+"ECH RIGHT"
+"VEE"
+"LINE"
+"FILE" (ArmA)
+"DIAMOND" (ArmA)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFormation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setFormation formation
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_groupOne setFormation LINE$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFormationTask
+//KeywordEnd//
+DescriptionStart:
+Set the current task of the formation member.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFormationTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setFormationTask task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(16:57, 2 March 2007 (CET))
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFormDir
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFormDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setFormDir heading
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_group1 setFormDir 180;$/Code$
+%NextExample%
+$Code$_unit1 setFormDir random 360;$/Code$
+%NextExample%
+$Code$//center the main turret
+( group BIS_Crew1) setFormDir ( getDir BIS_Armor);
+( group BIS_Crew2) setFormDir ( getDir BIS_Armor);$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFriend
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFriend
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side1 setFriend [side2, value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$west setFriend [ resistance, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(18:49, 28 December 2006)
+This command might be buggy in ArmA (or the description regarding enemy status is wrong). See this discussion.
+%NextNote%
+(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.
+%NextNote%
+(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$
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFromEditor
+//KeywordEnd//
+DescriptionStart:
+Set if given team member was inserted directly from editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFromEditor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember setFromEditor fromEditor
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_teamMember setFromEditor true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFSMVariable
+//KeywordEnd//
+DescriptionStart:
+Set variable to given value in the variable space of given FSM.
+The FSM handle is the number returned by the execFSM command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFSMVariable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+handle setFSMVariable [name, value]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle = execFSM "test.fsm";
+_handle setFSMVariable ["_foo", 23];
+
+// sets variable _foo in the FSM to 23$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 23, 2014)
+If the variable is not yet defined within the FSM it will be created.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFuel
+//KeywordEnd//
+DescriptionStart:
+Sets fuel percentage from 0 (empty) to 1 (full). The vehicle must be local to the computer where command is executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFuel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setFuel amount
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_jeepOne setFuel 0.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setFuelCargo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setFuelCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setFuelCargo amount
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_refuelTruckOne setFuelCargo 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(July 10, 2015)
+(ArmA 3 1.44) setFuelCargo will have no effect if the vehicle doesn't support getFuelCargo.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupIcon
+//KeywordEnd//
+DescriptionStart:
+Set group icons properties.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setGroupIcon [id, icon, offset]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupIconParams
+//KeywordEnd//
+DescriptionStart:
+Set group icons parameters. [color,string,float,bool]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupIconParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setGroupIconParams properties
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_grp setGroupIconParams [_color,_text,_scale,_visible];
+_grp setGroupIconParams [[0,0,0,0],,1,false];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupIconsSelectable
+//KeywordEnd//
+DescriptionStart:
+Sets if group icons raises onclick and onover events.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupIconsSelectable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setGroupIconsSelectable bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setGroupIconsSelectable true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - always objNull
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupIconsVisible
+//KeywordEnd//
+DescriptionStart:
+Sets if group icons are visible.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupIconsVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setGroupIconsVisible array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setGroupIconsVisible [true,true];//[show markers on map, show markers on player hud]
+setGroupIconsVisible [true,false]; //Show only 2D
+setGroupIconsVisible [false,false];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupId
+//KeywordEnd//
+DescriptionStart:
+Sets a group's identity, how it will be displayed in chat, for example. The identity setup consists of format keywords (marked with %) and param keywords taken from CfgWorlds config. Basically it is like format command but with some special group keywords. For Arma 3 possible values are:
+%GroupSquad
+"Squad1" - 1
+"Squad2" - 2
+"Squad3" - 3
+"Squad4" - 4
+%GroupPlatoon
+"Platoon1" - 1
+"Platoon2" - 2
+"Platoon3" - 3
+"Platoon4" - 4
+%GroupCompany
+"CompanyAlpha" - Alpha
+"CompanyBravo" - Bravo
+"CompanyCharlie" - Charlie
+"CompanyDelta" - Delta
+"CompanyEcho" - Echo
+"CompanyFoxtrot" - Foxtrot
+"CompanyGolf" - Golf
+"CompanyHotel" - Hotel
+"CompanyIndia" - India
+"CompanyKilo" - Kilo
+"CompanyLima" - Lima
+"CompanyMike" - Mike
+"CompanyNovember" - November
+"CompanyOscar" - Oscar
+"CompanyPapa" - Papa
+"CompanyQuebec" - Quebec
+"CompanyRomeo" - Romeo
+"CompanySierra" - Sierra
+"CompanyTango" - Tango
+"CompanyUniform" - Uniform
+"CompanyVictor" - Victor
+"CompanyWhiskey" - Whiskey
+"CompanyXray" - X-Ray
+"CompanyYankee" - Yankee
+"CompanyZulu" - Zulu
+%GroupNames
+"Alpha" - Alpha
+"Bravo" - Bravo
+"Charlie" - Charlie
+"Delta" - Delta
+"Echo" - Echo
+"Foxtrot" - Foxtrot
+"Golf" - Golf
+"Hotel" - Hotel
+"November" - November
+"Kilo" - Kilo
+"Yankee" - Yankee
+"Zulu" - Zulu
+"Two" - Two
+"Three" - Three
+"Buffalo" - Buffalo
+"Guardian" - Guardian
+"Convoy" - Convoy
+"Fox" - Fox
+%GroupColors
+"GroupColor1" - Black
+"GroupColor2" - Red
+"GroupColor3" - Green
+"GroupColor4" - Blue
+"GroupColor5" - Yellow
+"GroupColor6" - Orange
+"GroupColor7" - Pink
+"GroupColor0" -
+"Six" - Six
+For global variant of this command use setGroupIdGlobal.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setGroupId [nameFormat, nameParam1,..., nameParamN]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Arma 3 :
+group player setGroupId ["%GroupNames :=: %GroupColors","Alpha","GroupColor2"];
+hint groupId group player ; //"Alpha :=: Red"
+player sideChat "lalala"; //Alpha :=: Red (KK): "lalala"$/Code$
+%NextExample%
+$Code$// OFP :
+_group1 setGroupId ["Delta","GroupColor4"]$/Code$
+%NextExample%
+$Code$// ArmA / ArmA 2 :
+_group1 setGroupId ["Assault Squad"]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+Letter is one of:
+"Alpha"
+"Bravo"
+"Charlie"
+"Delta"
+"Echo"
+"Foxtrot"
+"Golf"
+"Hotel"
+"Kilo"
+"Yankee"
+"Zulu"
+"Buffalo"
+"Convoy"
+"Guardian"
+"November"
+"Two"
+"Three"
+"Fox"
+Colour may be one of the following:
+"GroupColor0" - (Nothing)
+"GroupColor1" - Black
+"GroupColor2" - Red
+"GroupColor3" - Green
+"GroupColor4" - Blue
+"GroupColor5" - Yellow
+"GroupColor6" - Orange
+"GroupColor7" - Pink
+"Six" - Six
+%NextNote%
+(August 4, 2006)
+Notes from before the conversion:
+Note that this command does not name the group. To call a group "grp1", for example, write this in the init field of the group leader :
+grp1 = group this
+%NextNote%
+(December 9, 2006)
+Selfdefined Callsigns:
+In Armed Assault you're able to define the callsignletter by yourself. This can be for example "Fireteam", or "Specialforces".
+this setgroupId ["Attackteam"]
+%NextNote%
+In OFP v1.96, the radio callsign strings for a mission can be redefined by creating a stringtable.csv in the mission folder. All string names except FOX can be found within the main stringtable.csv. Note "SIX" has a string suggesting it is a groupname, although the engine uses it as a colour. Some examples of the string names : STR_CFG_GRPNAMES_ALPHA, STR_CFG_GRPNAMES_FOX, STR_CFG_GRPCOL_BLACK, STR_CFG_GRPNAMES_SIX, STR_CFG_FIREFLYBASE, STR_CFG_PAPABEAR, STR_CFG_HQ_BASE, STR_CFG_HQ_BASE.
+%NextNote%
+(April 21, 2015)
+List of available keywords from config: $Code$"if ((configName _x) select [0, 5] == 'group') then {
+diag_log ('%' + configName _x);
+for '_i' from 0 to count _x - 1 do {
+diag_log ('* ""' + configName (_x select _i) + '"" - ' + getText ((_x select _i) 'name'));
+};
+}; false" configClasses (configFile "CfgWorlds");$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupIdGlobal
+//KeywordEnd//
+DescriptionStart:
+A global equivalent of setGroupId
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupIdGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setGroupIdGlobal [nameFormat, nameParam1,..., nameParamN]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGroupOwner
+//KeywordEnd//
+DescriptionStart:
+Changes the ownership of a group (and all its units) to a given client. Group leader can't be a player. Only works when called from a server. Returns true if locality was changed. For agents use setOwner command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGroupOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+group setGroupOwner clientID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_localityChanged = _someGroup setGroupOwner ( owner _playerObject);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(July 30, 2015)
+In ArmA3 1.48, setGroupOwner does NOT work if group has no units
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setGusts
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setGusts
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setGusts value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$60 setGusts 0.75;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHideBehind
+//KeywordEnd//
+DescriptionStart:
+Sets the data for hiding. objectWhereHide can be taken using findCover. hidePosition can be taken using getHideFrom. Command is not functional in ArmA 2.
+This command is not implemented
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHideBehind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setHideBehind [objectWhereHide, hidePosition]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHit
+//KeywordEnd//
+DescriptionStart:
+Damage / repair part of object. The object must be local to the computer where command is executed.
+Damage 0 means fully functional, damage 1 means completely destroyed / dead. Note: Some part names are in Czech; see translation table.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setHit [part, damage]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player setHit ["motor", 1]$/Code$
+%NextExample%
+$Code$vehicle player setHit ["mala vrtule", 0.95]$/Code$
+%NextExample%
+$Code$if ( local _heli) then {
+_heli setHit ["velka vrtule", 0];
+} else {
+hint "Vehicle " + str _heli + " must be local to this machine to do that!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+Damaging specific parts of the vehicle will not update its overall damage value (as of v1.03):
+player setHit [ hands, 0.9];
+hint str (damage player); //will return 0
+%NextNote%
+Direct use of the names of sections of the model is likely a bad practice, and will not work on some addons.
+So instead:
+_MH60S setHit [ elektronika, _hit];
+should be used:
+_MH60S setHit [getText(configFile cfgVehicles MH60S HitPoints HitAvionics name ), _hit];
+%NextNote%
+Since there is no getHit (as of 1.61), you can use canMove command to check if vehicle is capable of moving.
+For land wheeled vehicles canMove will return false if any real wheel (damaging nonexistent wheels doesn't count) has hitpoint damage greater than 0.9. Having HitEngine damage greater than 0.9 will make canMove to return false as well (plus will result in vehicle exploding). HitFuel however doesn't make canMove return false even though having high HitFuel damage will make car explode.
+For helicopters HitEngine with damage greater than 0.9 will make canMove return false as well. Having HitHRotor (main rotor) damaged even up to 1 will never make canMove return false. However, if HitVRotor (tail rotor) will have damage greater than 0.703608 it will make canMove return false (even though some helicopters are controllable and flyable by player with broken tail rotor).
+In same manner you can use canFire to check if turret hitpoints are not damaged enough to be able to fire. (canFire always returns false if there is nobody in vehicle)
+Update: Since ArmA 3 1.31 getHit has been introduced.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHitIndex
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHitIndex
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setHitIndex [hitPartIndex, damage]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player setHitIndex [1, 1];$/Code$
+%NextExample%
+$Code$player setHitIndex [7, 0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHitPointDamage
+//KeywordEnd//
+DescriptionStart:
+Set the current level of damage for a specific Hit Point (specified by its config class).
+0: no damage
+1: full damage
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHitPointDamage
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setHitPointDamage [hitPointName, damage]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player setHitPointDamage ["hitEngine2", 1.0];$/Code$
+%NextExample%
+$Code$player setHitPointDamage ["hitHead", 0.5];
+player setHitPointDamage ["hitBody", 0.5];
+player setHitPointDamage ["hitHands", 0.5];
+player setHitPointDamage ["hitLegs", 0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(August 30, 2012)
+This command is using the Hit Points (defined in the HitPoints class in the config) while setHit is using Named Selections (defined in the model itself).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHorizonParallaxCoef
+//KeywordEnd//
+DescriptionStart:
+Sets coef used to shift horizon position based on camera height (use 0 to disable shifting).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHorizonParallaxCoef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setHorizonParallaxCoef coef
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setHorizonParallaxCoef 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setHUDMovementLevels
+//KeywordEnd//
+DescriptionStart:
+Set min/max movement borders displayed in HUD gauges. Use -1 to skip some value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setHUDMovementLevels
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setHUDMovementLevels [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, targetOrPosition]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setHUDMovementLevels [20,30,-1,-1,0.23,2.1,[0,0,0]]$/Code$
+%NextExample%
+$Code$setHUDMovementLevels [20,30,-1,-1,0.23,2.1,player]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setIdentity
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setIdentity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setIdentity identity
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setIdentity MyLittleSoldier ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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
+%NextNote%
+(November 18, 2006)
+Preview of all faces in Armed Assault can be found on Czech Biki
+%NextNote%
+(May 10, 2008)
+Glasses and Female faces do not work as of Arma patch 1.12beta.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setImportance
+//KeywordEnd//
+DescriptionStart:
+Sets the importance value of location.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setImportance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setImportance value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setImportance 2$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLeader
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLeader
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+team setLeader leader
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightAmbient
+//KeywordEnd//
+DescriptionStart:
+Set ambient color of light. This includes surfaces that face away from the light, unlike setLightColor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightAmbient
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightAmbient [r, g, b]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightAmbient [0.5,0,0]; //produces red light around the origin source$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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).
+%NextNote%
+(Mar 25, 2014)
+When both setLightAmbient and setLightColor were [0,0,0], there won’t be any visual presentation on the light source.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightAttenuation
+//KeywordEnd//
+DescriptionStart:
+Sets attenuation of light. Standard method of attenuation (1 / (constant + linear*dist + quadratic*dist*dist)). start param represents distance, where the attenuation starts to take effects (dist = distance - start).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightAttenuation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightAttenuation [start, constant, linear, quadratic, hardlimitstart, hardlimitend]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightAttenuation [2,4,4,0,9,10];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(Mar 25, 2014)
+(A3 1.14) setLightAttenuation array will present fallowing visual effects:
+[start(SCALAR), constant(SCALAR), linear (SCALAR), quadratic(SCALAR)]
+start(SCALAR) – Number can be unlimited, this parameter determines the range that the light source takes effect. Terrain environmental color will be bathed by ‎setLightAmbient within the range and its covered objects will reflect the color by ‎setLightColor.
+constant(SCALAR) – Support signed number, this parameter determines the brightness proportion of the light source, higher the number is, less the brightness will be, vice versa. Any minus value passed will be treated as 0 (100% brightness). In other words, this parameter is related with ‎‎setLightBrightness and ‎setLightIntensity.
+linear (SCALAR) – Support signed number, effective range is from 0 ~ 100 (passed minus value will be treated as 0), this parameter determines the concentration of the light source, higher the number is, more will the light concentrate, vice versa. In other words, this parameter will turn the source into spotlight and sharpens its light circle border.
+Please pay attention to a special value: 4.31918e-005
+e.g.
+$Code$
+_light setLightAttenuation [2,4, 4.31918e-005,0]; //This value will make the light source reach an ultra high effect range. Any initial param set before will be discarded and overwritten.
+$/Code$
+quadratic(SCALAR) – Support signed number (range unlimited, passed minus number will be treated as 0), this parameter determines the range that the light source is visible and its visual presentation looks similar to linear. 0 means the maximum visible range. In further explanation, a less bright source can’t be seen out of the range on the land but still visible on the sea, and a bright enough source won’t be effected by the passed range who is still visible out of the range.
+Please pay attention to a special value: 4.31918e-005
+e.g.
+$Code$
+_light setLightAttenuation [6,0,0, 4.31918e-005 ]; //This value will make the light source reach an ultra high effect range. Any initial param set before will be discarded and overwritten.
+$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightBrightness
+//KeywordEnd//
+DescriptionStart:
+Set brightness of light.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightBrightness
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightBrightness brightness
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightBrightness 2;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightColor
+//KeywordEnd//
+DescriptionStart:
+Set diffuse color of light. Illuminates surfaces that are facing the light.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightColor [r, g, b]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightColor [0.5,0,0]; //produces red$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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).
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightDayLight
+//KeywordEnd//
+DescriptionStart:
+Sets if light can be used during the day.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightDayLight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightDayLight bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightDayLight true;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightFlareMaxDistance
+//KeywordEnd//
+DescriptionStart:
+Sets max distance where the flare is visible.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightFlareMaxDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightFlareMaxDistance distance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightFlareMaxDistance 500;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightFlareSize
+//KeywordEnd//
+DescriptionStart:
+Sets relative size of the flare for the light.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightFlareSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightFlareSize size
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightFlareSize 5;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightIntensity
+//KeywordEnd//
+DescriptionStart:
+Sets intensity of light.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightIntensity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightIntensity value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightIntensity 4;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightnings
+//KeywordEnd//
+DescriptionStart:
+Changes the lightnings value smoothly during the given time (in seconds).
+A time of zero means there will be an immediate change.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightnings
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setLightnings value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$1800 setLightnings 0.7;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLightUseFlare
+//KeywordEnd//
+DescriptionStart:
+Sets if light has flare.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLightUseFlare
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+light setLightUseFlare bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLight setLightUseFlare true;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setLocalWindParams
+//KeywordEnd//
+DescriptionStart:
+Sets parameters for helicopter rotor wash. Visually it affects how much the grass and bushes bend under a helicopter and how big is the area of the effect. Default [1.0, 1.0].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setLocalWindParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setLocalWindParams [strength, diameter]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setLocalWindParams [10, 5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMagazineTurretAmmo
+//KeywordEnd//
+DescriptionStart:
+Sets ammo count to given amount for given turret.
+Broken when vehicle has multiple magazines of the same type
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMagazineTurretAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setMagazineTurretAmmo [magazineClass, ammoCount, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerAlpha
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerAlpha
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+marker setMarkerAlpha alpha
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"my_marker" setMarkerAlpha 0.5;$/Code$
+%NextExample%
+$Code$"enemy_convoy_marker" setMarkerAlpha 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerAlphaLocal
+//KeywordEnd//
+DescriptionStart:
+Sets the marker alpha. The marker is only modified on the computer where the command is called.
+When alpha equals 1, the marker is visible, but if alpha equals 0, then the marker is invisible.
+Alpha can be numbers and fractions.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerAlphaLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+marker setMarkerAlphaLocal alpha
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"my_marker" setMarkerAlphaLocal 0.5;$/Code$
+%NextExample%
+$Code$"enemy_convoy_marker" setMarkerAlphaLocal 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(January 7, 2010)
+%NextNote%
+The range for 'alpha' is 0... 1
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerBrush
+//KeywordEnd//
+DescriptionStart:
+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"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerBrush
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerBrush brush
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerBrush "DIAGGRID";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerBrushLocal
+//KeywordEnd//
+DescriptionStart:
+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" (A2/A3 only)
+"SolidBorder" (OA/A3 only)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerBrushLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerBrushLocal brush
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerBrushLocal "DiagGrid";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerColor
+//KeywordEnd//
+DescriptionStart:
+Set marker color. Color is one of:
+"Default"
+"ColorBlack"
+"ColorGrey"
+"ColorRed"
+"ColorRedAlpha" (Arma 2 only)
+"ColorGreen"
+"ColorGreenAlpha" (Arma 2 only)
+"ColorBlue"
+"ColorYellow"
+"ColorOrange"
+"ColorWhite"
+"ColorPink"
+"ColorBrown"
+"ColorKhaki"
+"ColorWEST"
+"ColorEAST"
+"ColorGUER"
+"ColorCIV"
+"ColorUNKNOWN"
+"Color1_FD_F" (Light red)
+"Color2_FD_F" (Light khaki)
+"Color3_FD_F" (Light orange)
+"Color4_FD_F" (Light blue)
+Arma 3
+"ColorBLUFOR"
+"ColorCivilian"
+"ColorIndependent"
+"ColorOPFOR"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerColor color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerColor "ColorBlack";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerColorLocal
+//KeywordEnd//
+DescriptionStart:
+Set marker color. Color is one of:
+"Default"
+"ColorBlack"
+"ColorGrey"
+"ColorRed"
+"ColorRedAlpha" (Arma 2 only)
+"ColorGreen"
+"ColorGreenAlpha" (Arma 2 only)
+"ColorBlue"
+"ColorYellow"
+"ColorOrange"
+"ColorWhite"
+"ColorPink"
+"ColorBrown"
+"ColorKhaki"
+"ColorWEST"
+"ColorEAST"
+"ColorGUER"
+"ColorCIV"
+"ColorUNKNOWN"
+"Color1_FD_F" (Light red)
+"Color2_FD_F" (Light khaki)
+"Color3_FD_F" (Light orange)
+"Color4_FD_F" (Light blue)
+Arma 3
+"ColorBLUFOR"
+"ColorCivilian"
+"ColorIndependent"
+"ColorOPFOR"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerColorLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerColorLocal color
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerColorLocal "ColorBlack";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerDir
+//KeywordEnd//
+DescriptionStart:
+Sets the orientation of the marker. Angle is in degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerDir angle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerDir 90;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerDirLocal
+//KeywordEnd//
+DescriptionStart:
+Sets the orientation of the marker. Angle is in degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerDirLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerDirLocal angle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerDirLocal 90;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerPos
+//KeywordEnd//
+DescriptionStart:
+Moves the marker. Pos format is Position2D.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerPos pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerPos getMarkerPos "MarkerTwo"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+Effect is local in OFP.
+%NextNote%
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerPosLocal
+//KeywordEnd//
+DescriptionStart:
+Moves the marker. Pos format is Position2D.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerPosLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerPosLocal pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerPosLocal getMarkerPos "MarkerTwo";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerShape
+//KeywordEnd//
+DescriptionStart:
+Selects the shape (type) of the marker.
+Shape can be "ICON", "RECTANGLE" or "ELLIPSE".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerShape
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerShape shape
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerShape "RECTANGLE";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerShapeLocal
+//KeywordEnd//
+DescriptionStart:
+Selects the shape (type) of the marker.
+Shape can be "ICON", "RECTANGLE" or "ELLIPSE".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerShapeLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerShapeLocal shape
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerShapeLocal "RECTANGLE";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerSize
+//KeywordEnd//
+DescriptionStart:
+Set marker size.
+Size is in format [a-axis, b-axis].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerSize [a-axis, b-axis]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerSize [100, 200];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerSizeLocal
+//KeywordEnd//
+DescriptionStart:
+Set marker size.
+Size is in format [a-axis, b-axis].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerSizeLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerSizeLocal [a-axis, b-axis]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerSizeLocal [100, 200];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerText
+//KeywordEnd//
+DescriptionStart:
+Sets the text label of an existing marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerText text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerText "You are here.";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+createMarker is GLOBAL in multiplayer, so all markers created with it exist for all clients. But they are not visible. Almost all setMarker commands can then be used for different effects on LOCAL clients.
+BUT if you use the setMarkerText command, then the marker will become visible to all clients since the command is GLOBAL.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerTextLocal
+//KeywordEnd//
+DescriptionStart:
+Sets the text label of an existing marker.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerTextLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerTextLocal text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"Marker1" setMarkerTextLocal "You are here.";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerType
+//KeywordEnd//
+DescriptionStart:
+Set marker type. See cfgMarkers for a list of standard markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerType type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerType "Warning";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMarkerTypeLocal
+//KeywordEnd//
+DescriptionStart:
+Set marker type. See cfgMarkers for a list of standard markers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMarkerTypeLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+markerName setMarkerTypeLocal type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"MarkerOne" setMarkerTypeLocal "Warning";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMass
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+myObject setMass [mass, time]
+%NextRawSyntax%
+myObject setMass mass
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myObject setMass [10,0.5];$/Code$
+%NextExample%
+$Code$myObject setMass 10;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMimic
+//KeywordEnd//
+DescriptionStart:
+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"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMimic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setMimic mimic
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 setmimic angry$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+In OFP v1.96, a character will keep any facial expression you set indefinately. Setmimic to "" to return soldier to automatic facial expressions.
+%NextNote%
+(Jan 19, 2010)
+Not working in Arma 2 1.05.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMousePosition
+//KeywordEnd//
+DescriptionStart:
+Moves mouse pointer to specified position on the screen. x and y could be any number, but will be clipped so mouse never leaves the screen area.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMousePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setMousePosition [x, y]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setMousePosition [0.5, 0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMusicEffect
+//KeywordEnd//
+DescriptionStart:
+Defines the music track played on activation.
+Track is a subclass name of CfgMusic. In addition, "$STOP$" (stops the current music track).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMusicEffect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setMusicEffect track
+%NextRawSyntax%
+waypoint setMusicEffect track
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setMusicEffect Track1$/Code$
+%NextExample%
+$Code$[_group1,1] setMusicEffect $STOP$$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setMusicEventHandler
+//KeywordEnd//
+DescriptionStart:
+Sets given music track event handler. Will overwrite other music event handlers. Use addMusicEventHandler if you want to stack them.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setMusicEventHandler
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setMusicEventHandler [type, function]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ehID = setMusicEventHandler ["MusicStart", " hint str _this"];$/Code$
+%NextExample%
+$Code$_ehID = setMusicEventHandler ["MusicStop", " hint str _this"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - id of the event handler
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setName
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setName name
+%NextRawSyntax%
+unit setName [name, firstName, lastName]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setName "My Location Name";$/Code$
+%NextExample%
+$Code$player setName "New Name";$/Code$
+%NextExample%
+$Code$player setName ["Ben Kerry","Ben","Kerry"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(July 9, 2010‎)
+Appears to be only for the 3d editor.
+%NextNote%
+(September 19, 2013‎)
+Support of a person as the first parameter from Arma 3 v. 1.02.
+%NextNote%
+(April 12, 2014)
+Seems to have no effect on players in Multiplayer. (ArmA 3 v1.00)
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setNameSound
+//KeywordEnd//
+DescriptionStart:
+Sets the nameSound of a person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setNameSound
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setNameSound name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit1 setNameSound "dixon";$/Code$
+%NextExample%
+$Code$unit1 setNameSound ""; // will reset to default behaviour$/Code$
+%NextExample%
+$Code$_name = "Masood";
+unit1 setNameSound _name;
+unit1 setName _name;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(December 22, 2013)
+setting an incorrect value like "0" or "randomString" will remove the callsign (" /* 2, */ fall back")
+%NextNote%
+(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".
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectArguments
+//KeywordEnd//
+DescriptionStart:
+Set object arguments in mission editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectArguments
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setObjectArguments [object,[name1,value1,...]]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectMaterial
+//KeywordEnd//
+DescriptionStart:
+Sets material of object selection. The selection number is defined through the hiddenselection []={} array in the vehicle's config (starting with 0).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectMaterial
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj setObjectMaterial [selectionNumber, material]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$car setObjectMaterial [0,"A3\Structures_F\Data\Windows\window_set.rvmat"];
+car setObjectMaterial [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectMaterialGlobal
+//KeywordEnd//
+DescriptionStart:
+Set the material of the given selection on all computers in a network session.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectMaterialGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj setObjectMaterialGlobal [selection, material]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setObjectMaterialGlobal [0, "A3\Structures_F\Data\Windows\window_set.rvmat"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectProxy
+//KeywordEnd//
+DescriptionStart:
+Set the proxy object associated with the given editor object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectProxy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setObjectProxy [object,proxy object]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map setObjectProxy ["_group_0", vehicle (leader _group)];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectTexture
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectTexture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setObjectTexture [selectionNumber,texture]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objectname setObjectTexture [0, "\pboname\texture.paa"];
+_objectname setObjectTexture [1, "\pboname\texture2.paa"];$/Code$
+%NextExample%
+$Code$_obj setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"];$/Code$
+%NextExample%
+$Code$_obj setObjectTexture [0, "#(argb,512,512,1)r2t(rendersurface,1.333)"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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
+%NextNote%
+(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)
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectTextureGlobal
+//KeywordEnd//
+DescriptionStart:
+Set the texture of the given selection on all computers in a network session.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectTextureGlobal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj setObjectTextureGlobal [selection, texture]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setObjectTextureGlobal [0, "\MyAddon\blue.paa"];$/Code$
+%NextExample%
+$Code$//set up persistent texture keeper
+player addEventHandler ["Take", {
+( getObjectTextures player + [ uniformContainer player getVariable "texture"])
+params ["_texUniform", "_texInsignia", "_texCustom"];
+if ( isNil "_texCustom") exitWith {};
+if (_texUniform == _texCustom) exitWith {};
+player setObjectTextureGlobal [0, _texCustom];
+false
+}];
+//Example: make current uniform persistently blue
+_texture = "#(rgb,8,8,3)color(0,0,1,1)"; //blue texture
+player setObjectTextureGlobal [0, _texture]; //set it on player
+uniformContainer player setVariable ["texture", _texture, true ]; //store it on uniform$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(March 8, 2015)
+The effect is persistent and will be synchronized for players who join in progress. (Tested with Arma 3 v1.40)
+%NextNote%
+(December 29, 2015)
+In some cases the ".paa" files do not work. Instead you can try ".jpg" files.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setObjectViewDistance
+//KeywordEnd//
+DescriptionStart:
+Sets the rendering distance of objects (and shadows).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setObjectViewDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setObjectViewDistance distance
+%NextRawSyntax%
+setObjectViewDistance [objectDistance, shadowDistance]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setObjectViewDistance 2000;$/Code$
+%NextExample%
+$Code$setObjectViewDistance [2000,800];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setOvercast
+//KeywordEnd//
+DescriptionStart:
+Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change. An overcast setting of zero means clear (sunny) weather, and one means storms and rain are very likely. Higher overcast values also result in higher wind speeds.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setOvercast
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setOvercast overcast
+//RawSyntaxEnd//
+ExampleStart:
+$Code$50 setOvercast 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+Use setRain if you want to make sure it rains.
+%NextNote%
+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.
+%NextNote%
+Arma 3 's volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, 0 setOvercast 0 will not have the desired effect. You can use skipTime to get to the desired cloud coverage.
+NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with skipTime while setting overcast transition time to 86400 seconds (24 hours) -- Killzone_Kid
+$Code$86400 setOvercast 1;
+skipTime 24;
+//to remain on the same date:
+skipTime -24;
+86400 setOvercast 1;
+skipTime 24;
+$/Code$
+%NextNote%
+With removal of simulSetHumidity‎, in order to add instant cloud cover, execute simulWeatherSync with delay (for now):
+$Code$ skipTime -24;
+86400 setOvercast 1;
+skipTime 24;
+0 = [] spawn {
+sleep 0.1;
+simulWeatherSync ;
+};$/Code$
+There is slight freeze with simul command.
+%NextNote%
+Delay in Arma 3 doesn't work for quick changes. Using 120 setOvercast 1 only reaches full overcast after about 50 minutes. Using setTimeMultiplier does speed up the overcast, but it doesn't render any clouds. You will need to skipTime or forceWeatherChange to render clouds if you want it to happen within the hour.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setOwner
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setOwner clientID
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_someObject setOwner 12;$/Code$
+%NextExample%
+$Code$_someObject setOwner ( owner _playerObject);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setOxygenRemaining
+//KeywordEnd//
+DescriptionStart:
+Sets oxygen remaining. It has no effect when soldier is not diving. Oxygen remaining is a number between 0 and 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setOxygenRemaining
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setOxygenRemaining value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setOxygenRemaining 0; // Drowns player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setParticleCircle
+//KeywordEnd//
+DescriptionStart:
+Update particle source to create particles on circle with given radius. Velocity is transformed and added to total velocity.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setParticleCircle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+particleSource setParticleCircle [radius, velocity]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setParticleClass
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setParticleClass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+source setParticleClass className
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_source01 = "#particlesource" createVehicleLocal _pos01;
+_source01 setParticleClass "ObjectDestructionFire1Smallx";
+_source01 attachTo [_object,[0,0,0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setParticleFire
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setParticleFire
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+source setParticleFire [coreIntensity, coreDistance, damageTime]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_emitter = "#particlesource" createVehicleLocal ( getPos player );
+_emitter setParticleClass "MediumSmoke";
+_emitter setParticleFire [0.3,1.0,0.1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setParticleParams
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setParticleParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+particleSource setParticleParams array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$see ParticleArray$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setParticleRandom
+//KeywordEnd//
+DescriptionStart:
+Set randomization of particle source parameters.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setParticleRandom
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+particleSource setParticleRandom [lifeTime, position, moveVelocity, rotationVelocity, size, color, randomDirectionPeriod, randomDirectionIntensity, {angle}, bounceOnSurface]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_PS setParticleRandom [0, [0.1, 0.1, 0.1], [0, 0, 0.5], 0, 0.1, [0, 0, 0, 0], 0, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPilotLight
+//KeywordEnd//
+DescriptionStart:
+Switches headlights of a vehicle on/off. Note that the vehicle has to be local, for global variant use Arma 3 Actions " LightOn "/" LightOff "
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPilotLight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setPilotLight set
+//RawSyntaxEnd//
+ExampleStart:
+$Code$car setPilotLight true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPiPEffect
+//KeywordEnd//
+DescriptionStart:
+Sets Render Target's visual effect (Picture-in-Picture).
+0: Normal - [0]
+1: Night Vision - [1]
+2: Thermal - [2]
+3: Color Correction - [3, enabled, brightness, contrast, offset, blend [r,g,b,a], lerp [r,g,b,a], rgb [r,g,b,a]]
+4: Mirror - [4] currently not working
+5: Chromatic Aberration - [5, enabled, powerx, powery, (bool) aspectCorrection] currently not working
+6: Film Grain - [6, enabled, intensity, sharpness, grainsize, intensityx1, intensityx2, (bool) monochromatic] currently not working
+7: Thermal Inverted [7]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPiPEffect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+name setPiPEffect [effect, optionalParam1,..., optionalParamN]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$"rendersurface" setPiPEffect [0];$/Code$
+%NextExample%
+$Code$"rendertarget0" setPiPEffect [3, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];$/Code$
+%NextExample%
+$Code$cam = "camera" camCreate ( player modelToWorld [0,-5,2]);
+cam cameraEffect ["internal","back","rtt"];
+"rtt" setPiPEffect [2];
+with uiNamespace do {
+pic = findDisplay 46 ctrlCreate ["RscPicture", -1];
+pic ctrlSetPosition [0,0,1,1];
+pic ctrlCommit 0;
+pic ctrlSetText "#(argb,512,512,1)r2t(rtt,1.0)";
+};$/Code$
+%NextExample%
+$Code$// Black White:
+"rtt" setPiPEffect [3,1,1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPitch
+//KeywordEnd//
+DescriptionStart:
+Sets the pitch of a persons voice.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setPitch pitch
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit1 setPitch 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPlayable
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPlayable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setPlayable unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setPlayable _aPerson$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(december 19, 2009)
+if you want to add a TeamSwitchable unit (at least in Arma2), better use addSwitchableUnit
+%NextNote%
+(may 23, 2011)
+This command does not work as well as addSwitchableUnit : http://dev-heaven.net/issues/show/4461 (ArmA 2 OA v1.59)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPlayerRespawnTime
+//KeywordEnd//
+DescriptionStart:
+Set the time interval to wait on player respawn. It is set to mission default on mission start again.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPlayerRespawnTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setPlayerRespawnTime interval
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setPlayerRespawnTime 5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPos
+//KeywordEnd//
+DescriptionStart:
+Sets object position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setPos pos
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$_obj setPos [ getPos _obj select 0, getPos _obj select 1, -5];$/Code$
+%NextExample%
+$Code$player setPos ( getPos _obj);$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(14 Dec, 2010)
+This command takes a PositionAGL. Apparently, Position and PositionAGL are the same thing.
+%NextNote%
+(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.
+%NextNote%
+(23 Nov, 2011)
+You can use getPos and setPos on triggers.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosASL
+//KeywordEnd//
+DescriptionStart:
+Sets the object position above sea level. The pos array uses the PositionASL format.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setPosASL pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setPosASL [ getPosASL player select 0, ( getPosASL player select 1) + 10, getPosASL player select 2];$/Code$
+%NextExample%
+$Code$this setPosASL [ position this select 0, position this select 1, 9]; //[ X, Y, Z]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosASL2
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosASL2
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj setPosASL2 pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setPosASL2 [ getPosASL player select 0, ( getPosASL player select 1) + 10, getPosASL player select 2]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(21 Aug, 2013)
+This command appears to do nothing in both Arma 2 and Arma 3. Tested on 21-08-2013.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosASLW
+//KeywordEnd//
+DescriptionStart:
+Sets the object position above sea surface. The pos array uses the PositionASLW format.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosASLW
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+obj setPosASLW pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_diver setPosASLW [( position _diver) select 0, ( position _diver) select 1, -10];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosATL
+//KeywordEnd//
+DescriptionStart:
+Sets the position of an object relative to the terrain.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosATL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setPosATL pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setPosATL [ getPosATL player select 0, ( getPosATL player select 1) - 10, getPosATL player select 2];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(Feb 26, 2012)
+Please Note : this command demands PositionATL format ; one does not simply give 2D position, as this function won't do anything.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosition
+//KeywordEnd//
+DescriptionStart:
+Sets the position of a location.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setPosition pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setPosition [1000,5320,10]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setPosWorld
+//KeywordEnd//
+DescriptionStart:
+Sets position of an object based on PositionWorld, which is PositionASL of the model centre [0,0,0].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setPosWorld
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setPosWorld position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_obj setPosWorld getPosWorld _obj;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRadioMsg
+//KeywordEnd//
+DescriptionStart:
+Sets radio trigger menu title text (0 - 0 - map radio). Use "NULL" to disable radio slot. Use "" to restore default title
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRadioMsg
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+index setRadioMsg text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$1 setRadioMsg "Click meeeeeeeeee"; //changes title of radio Alpha$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRain
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRain
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setRain rain
+//RawSyntaxEnd//
+ExampleStart:
+$Code$60 setRain 1;$/Code$
+%NextExample%
+$Code$// Force no rain:
+0 setRain 0;
+forceWeatherChange ;
+999999 setRain 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+%NextNote%
+(December 15, 2015)
+setTimeMultiplier does NOT affect transition time.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRainbow
+//KeywordEnd//
+DescriptionStart:
+Changes the rainbow value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRainbow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setRainbow value
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRandomLip
+//KeywordEnd//
+DescriptionStart:
+Enables/Disables random lip. When enabled, the unit continuously moves its lips as if it's talking.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRandomLip
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setRandomLip bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setRandomLip true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRank
+//KeywordEnd//
+DescriptionStart:
+Sets rank of given unit.
+Possible values: PRIVATE, CORPORAL, SERGEANT, LIEUTENANT, CAPTAIN, MAJOR or COLONEL.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRank
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName setRank rank
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setRank "COLONEL"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(April 12, 2014)
+Behavior when used on players in multiplayer seems unpredictable. (ArmA 3 1.00)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRectangular
+//KeywordEnd//
+DescriptionStart:
+Set the shape of a location to be either rectangular or elliptical. Locations default shape is elliptical.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRectangular
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setRectangular set
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setRectangular true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setRepairCargo
+//KeywordEnd//
+DescriptionStart:
+Set amount of repair resources in cargo space of repair vehicle.
+Amount 1 is full cargo.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setRepairCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setRepairCargo amount
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_repairTruck1 setRepairCargo 0$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(July 10, 2015)
+(ArmA 3 1.44) setRepairCargo will have no effect if the vehicle doesn't support getRepairCargo.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setShadowDistance
+//KeywordEnd//
+DescriptionStart:
+Sets the shadows rendering distance.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setShadowDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setShadowDistance value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setShadowDistance 1000$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSide
+//KeywordEnd//
+DescriptionStart:
+Sets a location's side. The default side is Unknown.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSide
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setSide side
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setSide resistance$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(16:00, 3 December 2013 (CEST))
+For units, vehicles you can use: " array joinSilent createGroup Side ", e.g. in init: "[this] joinSilent createGroup EAST;" described in the note below
+%NextNote%
+(19:05, 6 August 2009 (CEST))
+This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to. setSide does not work for men, vehicles, etc.: it is intended for locations ( i.e., territory). If you want to switch a unit's ( e.g., the player's) side in the middle of a battle, make the unit joinSilent a group on the given side instead. If you want the unit to become the group leader after joining, use selectLeader. I haven't tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work. (It begs the question why we don't have a setSide object function, though.)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimpleTaskCustomData
+//KeywordEnd//
+DescriptionStart:
+Set custom data for the task. Tooltip will be drawn in task list on the right side. Descriptin will be drawn in task description panel on the bottom.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskCustomData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setSimpleTaskCustomData [IconPath, tooltip, description]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimpleTaskDescription
+//KeywordEnd//
+DescriptionStart:
+Attach descriptions to the simple task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setSimpleTaskDescription [description, descriptionShort, descriptionHUD]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$mytask setSimpleTaskDescription ["Today you have to kill Spongebob","Kill Spongebob","Here he is!"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimpleTaskDestination
+//KeywordEnd//
+DescriptionStart:
+Attach a destination to the simple task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskDestination
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setSimpleTaskDestination pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tskGoHere setSimpleTaskDestination ( getMarkerPos "obj1");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimpleTaskTarget
+//KeywordEnd//
+DescriptionStart:
+Attach a target to the simple task. Overrides setSimpleTaskDestination.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskTarget
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setSimpleTaskTarget [target, precisePosition]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$task setSimpleTaskTarget [targetVehicle, true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimpleTaskType
+//KeywordEnd//
+DescriptionStart:
+Attach type to the simple task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimpleTaskType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setSimpleTaskType taskType
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSimulWeatherLayers
+//KeywordEnd//
+DescriptionStart:
+Sets number of simul weather layers, affects quality of simul weather clouds.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSimulWeatherLayers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setSimulWeatherLayers layers
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSize
+//KeywordEnd//
+DescriptionStart:
+Sets the size (radius) of a location.
+The width is 2 * x, the height is 2 * y.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setSize size
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setSize [10,30]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSkill
+//KeywordEnd//
+DescriptionStart:
+Sets ability level of person (commander unit). Value of skill may vary from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSkill
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setSkill skill
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_hero setskill 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+Approximate ranges are:
+Novice 0.25
+Rookie = 0.25 and = 0.45
+Recruit 0.45 and = 0.65
+Veteran 0.65 and = 0.85
+Expert 0.85
+%NextNote%
+(June 30, 2007)
+If "SuperAI" is turned on in the Difficulty Menu, the skill level is always 1, no matter what was defined in the editor or via this command.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSlingLoad
+//KeywordEnd//
+DescriptionStart:
+Creates sling loading from first object to second object if possible. To unload cargo, pass objNull as second param.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSlingLoad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setSlingLoad cargo
+//RawSyntaxEnd//
+ExampleStart:
+$Code$heli1 setSlingLoad veh1;$/Code$
+%NextExample%
+$Code$// To unload cargo:
+heli setSlingLoad objNull ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(November 8, 2014)
+"... if possible "
+FYI, that only means that 'vehicle' has to be able to lift 'cargo'. The position/distance does not matter, 'cargo' is automatically moved to a position that is close enough but doesn't doesn't collide with 'vehicle'. (can also be used if 'vehicle' is not flying, in which case 'cargo' will be placed and attached on the ground next to it).
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSoundEffect
+//KeywordEnd//
+DescriptionStart:
+Defines the different sound effects.
+Sound / voice plays a 2D / 3D sound from CfgSounds.
+SoundEnv plays an enviromental sound from CfgEnvSounds.
+SoundDet (only for triggers) creates a dynamic sound object attached to a trigger defined in CfgSFX.
+Use "$NONE$" to stop the sound (1st item). Also use $NONE$ to skip the sound (1st item), when there is none to be used (Example 3).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSoundEffect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setSoundEffect [sound, voice, soundEnv, soundDet]
+%NextRawSyntax%
+waypoint setSoundEffect [sound, voice, soundEnv, soundDet]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setSoundEffect [ Alarm,,, ];$/Code$
+%NextExample%
+$Code$[_group1,2] setSoundEffect [ Alarm,,, ];$/Code$
+%NextExample%
+$Code$_trigger setSoundEffect [ $NONE$,,, MySound ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSpeaker
+//KeywordEnd//
+DescriptionStart:
+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];
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSpeaker
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person setSpeaker speaker
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unit1 setSpeaker "Male02GRE";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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
+-
+-
+-
+-
+%NextNote%
+(November 10, 2014)
+In order to stop a unit from talking you can use:
+_unit setSpeaker NoVoice
+This will have no negative on the ability to command the unit.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSpeech
+//KeywordEnd//
+DescriptionStart:
+Add speech to location.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSpeech
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setSpeech speech
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSpeedMode
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSpeedMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+groupName setSpeedMode mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_groupOne setSpeedMode LIMITED$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(14 Feb 2010)
+Although setSpeedMode can be called on an individual unit, the entire group will be affected.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setStamina
+//KeywordEnd//
+DescriptionStart:
+Set units' stamina (seconds until depletion)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setStamina
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setStamina stamina
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player SetStamina 42;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(December 30, 2015)
+"setStamina" has the same effect as "setFatigue".
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setStaminaScheme
+//KeywordEnd//
+DescriptionStart:
+Set stamina bar color. The scheme can be "Normal", "FastDrain", "Exhausted" or "Default".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setStaminaScheme
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setStaminaScheme "scheme"
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setStaminaScheme "Default";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setStatValue
+//KeywordEnd//
+DescriptionStart:
+Sets a value to a given stat.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setStatValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setStatValue [StatName, Value]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSuppression
+//KeywordEnd//
+DescriptionStart:
+Sets the person's suppression, from 0 to 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSuppression
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setSuppression value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$AI_unit_1 setSuppression 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setSystemOfUnits
+//KeywordEnd//
+DescriptionStart:
+Set system of units.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setSystemOfUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setSystemOfUnits value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myNum = 5;
+myNumNew = setSystemOfUnits myNum;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTargetAge
+//KeywordEnd//
+DescriptionStart:
+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".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTargetAge
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setTargetAge age
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setTargetAge 10 MIN$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTaskResult
+//KeywordEnd//
+DescriptionStart:
+Set a result of the task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTaskResult
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setTaskResult [state,result]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTaskState
+//KeywordEnd//
+DescriptionStart:
+Set the state of a given task.
+State value may be one of:
+"Succeeded"
+"Failed"
+"Canceled"
+"Created"
+"Assigned"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTaskState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+task setTaskState state
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tskKillSpongebob setTaskState "Succeeded";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTerrainGrid
+//KeywordEnd//
+DescriptionStart:
+Operation Flashpoint, VBS1 : Set desired terrain resolution (in meters).
+For default landscapes, supported resolutions are:
+50 - smoothest, less lag
+25 - default in multiplayer
+12.5 - default in singleplayer
+6.25
+3.125 - bumpiest, higher lag
+If you select unsupported resolutions, nearest supported value is used instead.
+Armed Assault, VBS2 : Terrain resolution is fixed, determined by the world created. This function controls terrain LOD instead (the distance in which the terrain mesh resolution starts to degrade). Higher number means less vertices are used for terrain rendering, making distant hills less smooth. Value 12.5 corresponds to selecting Terrain Detail Normal in Video options, 50 to Very Low, 3.125 to Very High.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTerrainGrid
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setTerrainGrid grid
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setTerrainGrid 12.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+Notes from before the conversion:
+This is like opening up your video preferences and changing "terrain detail", i.e.: setTerrainGrid 50 = lowest detail
+setTerrainGrid 3.125 = highest detail It is similar to the command setViewDistance.
+%NextNote%
+(August 18, 2007)
+Effects on grass:
+50: disables/removes grass altogether.
+25: grass is visible.
+Lower values make grass drawn a bit further at distance. However the effect is decreasing rapidly: Grass radius of 25 is 100%. 12.5 is now like 100% + 20%, 6.25 is like 100% + 20% + 5% and 3.125 is 100% + 20% + 5% + 1%. Note these are estimates!
+Demo Mission Test_VD_TD.Sara.rar : ViewDistance and TerrainGrid can be changed via RadioTriggers
+%NextNote%
+(December 15, 2019)
+ArmA2 Supported Reso:
+In ArmA2 you are not stuck to 50, 25, 12 etc. 45 is a lower setting then 25!
+%NextNote%
+(March 13, 2013)
+ArmA 3 Multiplayer default:
+Some testing indicates that the default value for Arma 3 multiplayer is 10 - just like before. 10 is between "Normal" and "High".
+An user's terrain detail setting is ignored in multiplayer just like in ArmA 2.
+%NextNote%
+(November 19, 2014)
+TerrainGrid values for Arma 3 1.34:
+Low = 50 (NoGrass)
+Standard = 25
+High = 12.5
+Very High = 6.25
+Ultra = 3.125
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setText
+//KeywordEnd//
+DescriptionStart:
+Sets the text associated with a location. This text will be displayed on the game map at the location's position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setText text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setText Rahmadi Village$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTimeMultiplier
+//KeywordEnd//
+DescriptionStart:
+Sets a time multiplier for in-game time. The command range is now capped at 0.1 - 120 to avoid performance problems.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTimeMultiplier
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setTimeMultiplier value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setTimeMultiplier 60;$/Code$
+%NextExample%
+$Code$setTimeMultiplier 0.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTitleEffect
+//KeywordEnd//
+DescriptionStart:
+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".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTitleEffect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTitleEffect [type, effect, text]
+%NextRawSyntax%
+waypoint setTitleEffect [type, effect, text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setTitleEffect [ TEXT, PLAIN DOWN, Hello world. ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerActivation
+//KeywordEnd//
+DescriptionStart:
+Defines the trigger activation type.
+See ArmA:Mission Editor - Triggers for a thorough overview of triggers and its fields for activation, effects, etc.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerActivation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerActivation [by, type, repeating]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setTriggerActivation [ WEST, EAST D, true]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerArea
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerArea [a, b, angle, isRectangle, c]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setTriggerArea [100, 50, 45, false ];$/Code$
+%NextExample%
+$Code$// Possible since Arma 3 v1.59.135137:
+_trigger setTriggerArea [100, 50, 45, false, 100];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerStatements
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerStatements
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerStatements [condition, activation, deactivation]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trg setTriggerStatements ["this", " hint 'trigger on'", " hint 'trigger off'"]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(Mar 14, 2011)
+An array with three arguments is mandatory for this function.
+%NextNote%
+(September 16, 2014)
+Magic variable thisList does not contain dead units.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerText
+//KeywordEnd//
+DescriptionStart:
+Sets the text label attached to the trigger object. This is used for example as a radio slot label for radio activated triggers.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerText text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$trigger setTriggerText Call for support$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerTimeout
+//KeywordEnd//
+DescriptionStart:
+Defines the time between condition satisfaction and trigger activation (randomly from min to max, with an average value mid). If the last argument is true, the condition must be fullfilled all the time.
+For a normal trigger, min, mid and max are used to generate random duration according to Gaussian Distribution. For a "Seized" type of trigger, the duration value is generated using side ruling power
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerTimeout
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerTimeout [min, mid, max, interruptable]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setTriggerTimeout [5, 10, 7, false ];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setTriggerType
+//KeywordEnd//
+DescriptionStart:
+Sets the type of action processed by the trigger after activation (no action, a waypoints switch or an end of mission):
+"NONE"
+"EAST G" - Guarded by OPFOR
+"WEST G" - Guarded by BLUFOR
+"GUER G" - Guarded by Independent
+"SWITCH" - Switch waypoints/break loop (see Triggers )
+"END1" - End #1
+"END2" - End #2
+"END3" - End #3
+"END4" - End #4
+"END5" - End #5
+"END6" - End #6
+"LOOSE" - Lose //it is not a typo on the wiki, it is indeed misspelt in the game engine.
+"WIN" - (not found in ArmA)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setTriggerType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger setTriggerType action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger setTriggerType END1$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(July 15, 2009)
+Is: _ trigger setTriggerType "WEST G" really defining a "GUARDED BY WEST" trigger ?
+It seems not working in ArmA 2 v. 1.02.
+See also my note here: http://community.bistudio.com/wiki/triggerType
+%NextNote%
+(July 15, 2009)
+Seems unlikely. Check these examples used by BI missions:
+http://pastebin.jonasscholz.de/13
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setType
+//KeywordEnd//
+DescriptionStart:
+Changes a location to the specified class. Location classes are defined in CfgLocationTypes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+location setType name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myLocation setType RockArea$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnconscious
+//KeywordEnd//
+DescriptionStart:
+Set / reset the unconscious life state of the given unit (in MP works only for a local unit).
+In Arma 3 this command is disabled since "UNCONSCIOUS" lifeState doesn't exist in Arma 3
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnconscious
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnconscious set
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit setUnconscious true;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnitAbility
+//KeywordEnd//
+DescriptionStart:
+Sets skill of given unit. Unlike with setSkill it is possible to use values 1 with this command, and even though skill will correctly return set value, the actual unit ability will be capped to max available.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitAbility
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnitAbility skill
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_unit setUnitAbility 1;$/Code$
+%NextExample%
+$Code$bob setUnitAbility - log 0;
+hint str skill bob; //1.#INF$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 8, 2014)
+AFAIK not used in Arma 3 anymore (or equals to setSkill)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnitPos
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnitPos mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier setUnitPos "UP";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(18 September 2008‎)
+Command most likely only works if run before join into group after createUnit array.
+%NextNote%
+(21 October 2009)
+In Arma, this command does not change the stance of player units. In VBS2 after v1.30, this command does affect players (it changes their stance, but doesn't force them to stay in that stance).
+%NextNote%
+(11 March 2011)
+The above comment by Dwarden about 'an additional join required' is no longer true for Operation Arrowhead.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnitPosWeak
+//KeywordEnd//
+DescriptionStart:
+Set unit position rules. Mode may be one of:
+"DOWN" - person goes prone and stays prone.
+"UP" - person stands and stays standing.
+"Middle" - Kneel Position. ArmA version 1.04
+"AUTO" - person chooses mode according to circumstances.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitPosWeak
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUnitPosWeak mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier disableAI "FSM";
+_soldier setUnitPosWeak "DOWN";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+This command is the lowest level of priority for setting unit position and to be used in scripted
+FSM's.
+The current priorities are:
+1. Unit pos commanded (from the commanding menu, higher priority).
+2. Unit pos scripted (from setUnitPos scripting command, medium priority).
+3. Unit pos FSM / setUnitPosWeak (used in the formation FSM, lowest priority).
+Command most likely only works if run before join into group after createUnit array.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnitRank
+//KeywordEnd//
+DescriptionStart:
+Sets rank of given unit.
+Possible rank values, and the associated rating that is automatically given:
+PRIVATE: 0
+CORPORAL: 500
+SERGEANT: 1500
+LIEUTENANT: 2500
+CAPTAIN: 3500
+MAJOR: 5000
+COLONEL: 7500
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitRank
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName setUnitRank rank
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setUnitRank COLONEL$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(December 24, 2015)
+In Arma 3, if the rank is not spelled correctly or the string is empty, it will default to Private. This command is not case sensitive. For Arma 3 the rating set by this command is as follows.
+(PRIVATE: 0)
+(CORPORAL: 50)
+(SERGEANT: 150)
+(LIEUTENANT: 250)
+(CAPTAIN: 350)
+(MAJOR: 500)
+(COLONEL: 750) The rating listed here will be present on base type respawn.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnitRecoilCoefficient
+//KeywordEnd//
+DescriptionStart:
+Proportionaly increase/decrease unit's recoil. Drives muzzle up with every shot when supplied positive number and down when negative. 0 cancels recoil.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnitRecoilCoefficient
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName setUnitRecoilCoefficient coefficient
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setUnitRecoilCoefficient 10$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUnloadInCombat
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUnloadInCombat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setUnloadInCombat [allowCargo, allowTurrets]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_veh setUnloadInCombat [ true, false ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setUserActionText
+//KeywordEnd//
+DescriptionStart:
+Changes user added action menu item text.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setUserActionText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setUserActionText [index, text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_id = player addAction ["Hello", ""];
+player setUserActionText [_id, "Good Bye"];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVariable
+//KeywordEnd//
+DescriptionStart:
+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$ ).
+All available data type combinations:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVariable
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName setVariable [name, value, public]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myTruck setVariable ["myPublicVariable", 123, true ];$/Code$
+%NextExample%
+$Code$_myTruck setVariable ["myLocalVariable", ["321", _var], false ];$/Code$
+%NextExample%
+$Code$missionNamespace setVariable ["myName", "KK"];
+hint myName; //KK$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(18 August, 2007)
+According to Suma, beginning with ArmA version 1.08, "setVariable now should work on any entity which can be targeted by AI, including soldier and game logic units. This includes most buildings, but not other static objects.
+Using it with buildings one should be aware the building may be discarded because of streaming. In such case the variable space is lost. When used for buildings, the storage should therefore be considered non-reliable." Reference: Make setVariable work on other things than just vehicles
+%NextNote%
+(3 November, 2009)
+Public variable parameter works also for groups in ArmA II. Ref: A2 CIT.
+%NextNote%
+(January 18, 2010)
+this command doesn't work with tasks in Arma 2 1.05
+%NextNote%
+(February 8, 2010)
+In Arma 2 1.05 the missionNamespace object allows only the two main Arguments by syntax. Publishing the Variable afterwards works fine.
+%NextNote%
+(January 25, 2011)
+this command does work with tasks in Arma 2 OA 1.57
+%NextNote%
+(19 July, 2011)
+My finds with 1.59 are:
+not working for Task (example anyone?)
+public is JIP synced for Object and Group
+public parameter is not available for Namespace, Location (, Task )
+%NextNote%
+(8 May, 2012)
+IMPORTANT: This will not work on groups if you do it from the init line (you'll experience locality issues). Do something like this instead:
+Put this on init line:
+$Code$b_GroupSetup = [ group this, "3/B", "Tank", "Platoon"] execVM "grouptest.sqf";$/Code$
+grouptest.sqf:
+$Code$ if ( isServer ) then {
+private ["_GroupSelect", "_GroupDesig", "_GroupType", "_GroupSize"];
+_GroupSelect = _this select 0;
+_GroupDesig = _this select 1;
+_GroupType = _this select 2;
+_GroupSize = _this select 3;
+_GroupSelect setVariable ["groupDetails", [_GroupDesig, _GroupType, _GroupSize, 0, [], ""], true ];
+};$/Code$
+%NextNote%
+(June 13, 2014)
+(A3) Disable randomization and set a color to randomized vehicles by using ‘this setVariable ["color",X]’ in the init of the vehicle where X is a number ranging from 0 to the number of skins (minus 1). If the number is out of range, the skin is still randomized.
+%NextNote%
+(December 9, 2015)
+This command does not work with CfgAmmo or CfgNonAIVehicles objects, like bullets, mines or butterflies.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVectorDir
+//KeywordEnd//
+DescriptionStart:
+Set object's direction vector. Up vector will remain unchanged.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVectorDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setVectorDir [x,y,z]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(March 16, 2008)
+Command can be also used to rotate camera in all three axis.
+%NextNote%
+(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.
+%NextNote%
+(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.)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVectorDirAndUp
+//KeywordEnd//
+DescriptionStart:
+Sets orientation of an object. The command takes 2 vector arrays, one for vectorDir and one for vectorUp. Default object orientation will always have vectorDir pointing forward (North) along Y axis and vectorUp pointing up along Z axis - [[0,1,0],[0,0,1]], as shown on the diagram below.
+When attaching object to an object the axes are relative to the object that gets the attachment. If it is player object for example, then X goes from left to right, Y goes from back to front, and Z goes from down up.
+The setDir command is incompatible with setVectorDirAndUp and should not be used together on the same object. Using setVectorDirAndUp alone should be sufficient for any orientation.
+In Multiplayer, setVectorDirAndUp must be executed on the machine where the object it applied to is local.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVectorDirAndUp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setVectorDirAndUp [[x1, y1, z1],[x2, y2, z2]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// set exact yaw, pitch, and roll
+_y = 45; _p = -80; _r = 0;
+BRICK 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$
+%NextExample%
+$Code$// To rotate BRICK on Z axis 90 degrees clockwise, change its vectorDir but leave vectorUp unchanged.
+BRICK setVectorDirAndUp [[1,0,0],[0,0,1]];$/Code$
+%NextExample%
+$Code$// To rotate BRICK on Y axis 90 degrees clockwise, change its vectorUp but leave vectorDir unchanged.
+BRICK setVectorDirAndUp [[0,1,0],[1,0,0]];$/Code$
+%NextExample%
+$Code$// To rotate BRICK on X axis 90 degrees (tilt forward), change both vectorDir and vectorUp accordingly.
+BRICK setVectorDirAndUp [[0,0,-1],[0,1,0]];$/Code$
+%NextExample%
+$Code$// More complex orientations
+//tilt forward 90 + rotate left 90
+BRICK setVectorDirAndUp [[1,0,0],[0,1,0]];
+//tilt backward 45 degrees
+BRICK setVectorDirAndUp [[0,0.5,0.5],[0,-0.5,0.5]];
+//tilt forward 30 degrees
+BRICK setVectorDirAndUp [[0,0.66,-0.33],[0,0.33,0.66]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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).
+%NextNote%
+(May 9, 2008)
+The object's vectorDir can only control its pitch, while its vectorUp can only control its bank. To set an object's yaw (direction), use the setdir command, before using this command.
+You would think vectorUp would control pitch as well, but any pitch that would be set due to vectorUp is ignored. The same is true with vectorDir and yaw; any vectorDir that would adjust yaw is also ignored. If this doesn't make sense, try to visualize it with a box or soda can.
+This command does NOT work with values relative to a unit, but rather it works with world vectors (think world coordinates as opposed to model coordinates). As a result, this command can be difficult to use in many situations, because the input values needed to get a certain pitch / bank for an object vary, depending on what direction the object is facing (yaw).
+A function to set an object's pitch / bank can be found here
+%NextNote%
+(October 23rd, 2009)
+Note this odd command may now be better understood. There's a thread about it here:
+BI Studios Forum Thread
+%NextNote%
+(1 Jun, 2014)
+(ArmA3 ver 1.20) setDir overwrites setVectorDirAndUp (P.S. setVectorDirAndUp also affects setVelocity.), so use setDir before BIS_fnc_setPitchBank, which is an easier workaround on vector, if changing yaw, pitch and bank are needed. setVectorDirAndUp is CCW, so if we wanna to set an obj 40 degrees CW, 170 degrees pitch and 85 degrees bank:
+$Code$_obj setDir (40 - 180); [_obj, 170, 85] call BIS_fnc_setPitchBank ;$/Code$
+Same as:
+$Code$_obj setVectorDirAndUp [[0.63,0.75,0.17],[-0.75,0.65,-0.084]];$/Code$
+Be aware that attachTo may flip vectorDir if pitch beyond 90 degrees and cause unexpected behavior to BIS_fnc_setPitchBank, e.g.
+$Code$[_obj, 100, 0] call BIS_fnc_setPitchBank ; //vector: [-0.14,-0.09,0.98],[-0.83,-0.51,-0.17]$/Code$
+$Code$_obj attachTo [_logic,[0,0,2]];
+[_obj, 100, 0] call BIS_fnc_setPitchBank ; //vector: [0.11,0.33,0.93],[-0.06,0.94,-0.32]
+compass direction algorism failed if obj was attached at present.$/Code$
+To overcome such limitation we can use fallowing function for a better workaround. (code originated from bapedibupa, remodified)
+$Code$
+_obj attachTo [_logic,[0,0,2]];
+[_obj,[120,-78,37]] call fnc_SetPitchBankYaw; // pitch: 120, bank: -78, yaw: 37$/Code$
+$Code$
+fnc_SetPitchBankYaw = {
+private ["_object","_rotations","_aroundX","_aroundY","_aroundZ","_dirX","_dirY",
+"_dirZ","_upX","_upY","_upZ","_dir","_up","_dirXTemp","_upXTemp"];
+_object = _this select 0;
+_rotations = _this select 1;
+_aroundX = _rotations select 0;
+_aroundY = _rotations select 1;
+_aroundZ = (360 - (_rotations select 2)) - 360;
+_dirX = 0;
+_dirY = 1;
+_dirZ = 0;
+_upX = 0;
+_upY = 0;
+_upZ = 1;
+if (_aroundX != 0) then {
+_dirY = cos _aroundX;
+_dirZ = sin _aroundX;
+_upY = - sin _aroundX;
+_upZ = cos _aroundX;
+};
+if (_aroundY != 0) then {
+_dirX = _dirZ * sin _aroundY;
+_dirZ = _dirZ * cos _aroundY;
+_upX = _upZ * sin _aroundY;
+_upZ = _upZ * cos _aroundY;
+};
+if (_aroundZ != 0) then {
+_dirXTemp = _dirX;
+_dirX = (_dirXTemp* cos _aroundZ) - (_dirY * sin _aroundZ);
+_dirY = (_dirY * cos _aroundZ) + (_dirXTemp * sin _aroundZ);
+_upXTemp = _upX;
+_upX = (_upXTemp * cos _aroundZ) - (_upY * sin _aroundZ);
+_upY = (_upY * cos _aroundZ) + (_upXTemp * sin _aroundZ);
+};
+_dir = [_dirX,_dirY,_dirZ];
+_up = [_upX,_upY,_upZ];
+_object setVectorDirAndUp [_dir,_up];
+};
+$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVectorUp
+//KeywordEnd//
+DescriptionStart:
+Set object's up vector. Direction vector will 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVectorUp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setVectorUp [x, y, z]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Turn object upside down:
+_obj setVectorUp [0,0,-1];$/Code$
+%NextExample%
+$Code$// Align object with the terrain underneath:
+_obj setVectorUp surfaceNormal position _obj;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+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.
+-- General Barron 21:07, 3 March 2009 (CET)
+%NextNote%
+(March 22, 2007)
+An in-depth discussion on the concept of vectors is available here.
+%NextNote%
+(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).
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleAmmo
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setVehicleAmmo value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setVehicleAmmo 0;$/Code$
+%NextExample%
+$Code$_vehicle setVehicleAmmo 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+This command does not add magazines to vehicle weapons that normally start with more than one magazine. It can however, remove these magazines.
+%NextNote%
+A2:OA v1.59 - Magazines of vehicle turrets are also refilled by this command.
+%NextNote%
+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.
+%NextNote%
+In ArmA 3, using this command seems correctly rearm the vehicle and its turrets in all situations (tested with beta 0.72).
+%NextNote%
+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)
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleAmmoDef
+//KeywordEnd//
+DescriptionStart:
+Sets how much ammunition (compared to the current configuration of magazines, but fully loaded) the vehicle has. Note that the ammo will beaddet only to local turrets. To check the locality of turret use turretLocal.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleAmmoDef
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit setVehicleAmmoDef value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setVehicleAmmoDef 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(December 20, 2014)
+For vehicles this command operates relative to its stock magazine loadout (i.e. its CfgVehicles magazines[] values). Thus setVehicleAmmoDef 1 will fully restore a vehicle to its default ammunition capacity, resetting any changes made by intentionally/implicitly adding/removing magazines.
+Use setVehicleAmmo to operate in relation to a vehicle's current magazine loadout.
+-- Actium ( talk ) 22:49, 20 December 2014 (CET)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleArmor
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleArmor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setVehicleArmor value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setVehicleArmor 0.5;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleId
+//KeywordEnd//
+DescriptionStart:
+Sets id (integer value) to vehicle. By this id vehicle is referenced by triggers and waypoints.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleId
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setVehicleId id
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setVehicleId 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleLock
+//KeywordEnd//
+DescriptionStart:
+Sets vehicle lock. Possible values:
+"UNLOCKED"
+"DEFAULT"
+"LOCKED"
+"LOCKEDPLAYER"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleLock
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setVehicleLock lockState
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_veh1 setVehicleLock "LOCKED";$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(October 22, 2014)
+In Arma 3:
+setVehicleLock "UNLOCKED" = same as " lock 0"
+setVehicleLock "DEFAULT" = same as " lock 1"
+setVehicleLock "LOCKED" = same as " lock 2"
+setVehicleLock "LOCKEDPLAYER" = same as " lock 3"
+%NextNote%
+(March 4, 2015)
+DEFAULT lock is default vehicle lock when vehicle placed in editor. If player is in a group of AIs and not the leader, he will not be able to enter this vehicle as he will not have GetIn action for this vehicle.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehiclePosition
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehiclePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setVehiclePosition [position, markers, placement, special]
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$heli setVehiclePosition [ player, [], 0, "FLY"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Boolean - true on success, false on failure
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleTiPars
+//KeywordEnd//
+DescriptionStart:
+Sets the "heat" state of different vehicle parts (for TI detection). This allows simulation of heated up parts of a vehicle without it actually having to utilize them. (0: cold, 1: hot)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleTiPars
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setVehicleTiPars [engine, wheels, weapon]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player setVehicleTiPars ["pars"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVehicleVarName
+//KeywordEnd//
+DescriptionStart:
+Sets string representation of an object to a custom string. For example it is possible to return "MyFerrari" instead of default "ce06b00# 164274: offroad_01_unarmed_f.p3d" when querying object as string:
+$Code$ hint str _offroad; //MyFerrari$/Code$
+When a vehicle is created and named in the editor, the name becomes both the variable containing the vehicle object and the string representation of the vehicle object. vehicleVarName on the other hand is only string representation of the object. So if you want to refer to the actual object by its vehicleVarName, an extra step needed to assign the object to a variable of the same name. For example to see and refer to offroad as myFerrari:
+$Code$_offroad setVehicleVarName "MyFerrari"; MyFerrari = _offroad;$/Code$
+In multiplayer environment setVehicleVarName has to be executed on every PC if you want the custom name to be known everywhere. If vehicle is created and named in the editor, the vehicle name will be known globally automatically.
+To reset vehicleVarName and str representation of the object to original form set vehicleVarName to an empty string:
+$Code$_offroad setVehicleVarName "";$/Code$
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVehicleVarName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object setVehicleVarName name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player setVehicleVarName "aP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVelocity
+//KeywordEnd//
+DescriptionStart:
+Set velocity (speed vector) of a vehicle. Units are in metres per second.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVelocity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName setVelocity [x, y, z]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_truck1 setVelocity [20, 0, 0];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(20 Jun, 2014)
+(ArmA3 1.22) setVelocity will be affected by setDir and setVectorDirAndUp. So use it after them.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVelocityTransformation
+//KeywordEnd//
+DescriptionStart:
+Interpolate and sets vectors. For additional info see this resource.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVelocityTransformation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+objectName setVelocityTransformation [position1, position2, velocity1, velocity2, direction1, direction2, up1, up2, time]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tracker setVelocityTransformation [
+getPosASL _currentPos,
+getPosASL _nextPos,
+velocity _currentVelocity,
+velocity _nextVelocity,
+vectorDir _currentVectorDir,
+vectorDir _nextVectorDir,
+vectorUp _currentVectorUp,
+vectorUp _nextVectorUp,
+_timeDiff
+];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setViewDistance
+//KeywordEnd//
+DescriptionStart:
+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).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setViewDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setViewDistance distance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setViewDistance 2250;$/Code$
+%NextExample%
+$Code$//reset view distance in Arma 3
+setViewDistance -1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+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.
+%NextNote%
+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.
+%NextNote%
+In ArmA 2 viewDistance can be set up to 15 km with this command ( while from interface only 10 km )
+%NextNote%
+(October 15, 2014)
+In Arma 3, Values below 200 have no visible effect.
+%NextNote%
+(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.
+%NextNote%
+(June 8, 2015)
+Client-side max view distance is limited by the server's view distance.
+Tested in Arma 3.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setVisibleIfTreeCollapsed
+//KeywordEnd//
+DescriptionStart:
+Sets whether or not the object is visible even if the tree is collapsed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setVisibleIfTreeCollapsed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map setVisibleIfTreeCollapsed [object, visible]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_map setVisibleIfTreeCollapsed ["_unit_0", true]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaves
+//KeywordEnd//
+DescriptionStart:
+Changes the waves value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaves
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setWaves value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$180 setWaves.5;$/Code$
+%NextExample%
+$Code$0 setWaves 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointBehaviour
+//KeywordEnd//
+DescriptionStart:
+Switches the unit behaviour when the waypoint becomes active.
+Possible values are:
+"UNCHANGED"
+"CARELESS"
+"SAFE"
+"AWARE"
+"COMBAT"
+"STEALTH"
+See the AIBehaviour page for details of the effect of this command on AI units.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointBehaviour
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointBehaviour mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointBehaviour "AWARE";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 26, 2008)
+Modes are case sensitive - "safe" won't work, while "SAFE" is ok.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointCombatMode
+//KeywordEnd//
+DescriptionStart:
+The group combat mode is switched when the waypoint becomes active.
+Possible mode values are:
+"NO CHANGE" (No change)
+" 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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointCombatMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointCombatMode mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointCombatMode "RED";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointCompletionRadius
+//KeywordEnd//
+DescriptionStart:
+The completion radius allows units to call the waypoint completed once they are inside of the given circle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointCompletionRadius
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointCompletionRadius radius
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[grp, 2] setWaypointCompletionRadius 30;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(29 January 2010‎, 14:12)
+The completion radius is currently important for units moving in the Combat mode.
+With default completion radius = 0 the leader always finishes in the exact location of the waypoint.
+By providing a completion radius you allow him to plan his road to a cover nearby instead.
+This does not necessarily mean the waypoint is complete once they are inside of the circle.
+The way it works now it is complete once unit is inside and does not think it would be reasonable to move any closer.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointDescription
+//KeywordEnd//
+DescriptionStart:
+Sets the description shown in the HUD while the waypoint is active.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointDescription text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointDescription "Move here.";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointFormation
+//KeywordEnd//
+DescriptionStart:
+Switches the group formation when the waypoint becomes active.
+Possible values are:
+"NO CHANGE"
+"COLUMN"
+"STAG COLUMN"
+"WEDGE"
+"ECH LEFT"
+"ECH RIGHT"
+"VEE"
+"LINE"
+"FILE"
+"DIAMOND"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointFormation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointFormation formation
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointFormation "LINE";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointHousePosition
+//KeywordEnd//
+DescriptionStart:
+For waypoints attached to a house, this defines the target house position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointHousePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointHousePosition pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointHousePosition 1;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointLoiterRadius
+//KeywordEnd//
+DescriptionStart:
+Assignes loiter radius to waypoint
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointLoiterRadius
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointLoiterRadius radius
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointLoiterRadius 200;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointLoiterType
+//KeywordEnd//
+DescriptionStart:
+Sets the waypoint loiter type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointLoiterType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointLoiterType type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointLoiterType "CIRCLE";$/Code$
+%NextExample%
+$Code$[_grp, 2] setWaypointLoiterType "CIRCLE_L";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointName
+//KeywordEnd//
+DescriptionStart:
+Changes the waypoint name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointName name
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointPosition
+//KeywordEnd//
+DescriptionStart:
+Moves the waypoint to a random position in a circle with the given center and radius.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointPosition [center, radius]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointPosition [ position player, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointScript
+//KeywordEnd//
+DescriptionStart:
+Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use SQS -Syntax. The script receives the following arguments in _this variable: [group, position, target]
+In Arma 3, command argument can be a String with code, a reference to.sqf script (it will have to explicitly end with.sqf ) or a reference to.sqs script.
+See Mission editor Description for more information about scripted waypoints.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointScript
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointScript command
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointScript "find.sqs player ";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointSpeed
+//KeywordEnd//
+DescriptionStart:
+Switches the group speed mode when the waypoint becomes active.
+Possible values are:
+"UNCHANGED"
+"LIMITED"
+"NORMAL"
+"FULL"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointSpeed mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointSpeed "FULL";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointStatements
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointStatements
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointStatements [condition, statement]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$new_wp setWaypointStatements [" true ", " hint 'hello'; hint 'goodbye'"];$/Code$
+%NextExample%
+$Code$new_wp setWaypointStatements [" true ", " diag_log ['GroupLeader: ', this ]; diag_log ['Units: ', thislist ]"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointTimeout
+//KeywordEnd//
+DescriptionStart:
+Defines the time between condition satisfaction and waypoint finish (randomly from min to max, with an average value mid).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointTimeout
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointTimeout [min, mid, max]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointTimeout [5, 10, 6];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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...
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointType
+//KeywordEnd//
+DescriptionStart:
+Changes the waypoint type.
+Type can be:
+"MOVE"
+"DESTROY"
+"GETIN"
+"SAD"
+"JOIN"
+"LEADER"
+"GETOUT"
+"CYCLE"
+"LOAD"
+"UNLOAD"
+"TR UNLOAD"
+"HOLD"
+"SENTRY"
+"GUARD"
+"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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointType type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] setWaypointType "HOLD";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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$
+%NextNote%
+(December 22, 2015)
+To spawn a helicopter with troops inside and make them land and unload.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWaypointVisible
+//KeywordEnd//
+DescriptionStart:
+Sets the visibility of the waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWaypointVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWaypointVisible visible
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[grp, 2] setWaypointVisible false ;$/Code$
+%NextExample%
+$Code$[ group player, currentWaypoint ( group player )] setWaypointVisible false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWeaponReloadingTime
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWeaponReloadingTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_done = _vehicle setWeaponReloadingTime [ gunner ( vehicle player ), currentMuzzle ( gunner ( vehicle player )), 0.5];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Boolean - true if given weapon is found
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWind
+//KeywordEnd//
+DescriptionStart:
+Set current (forced == false) or permanent (forced == true) wind vector.
+NOTE : The effect is global only if command is executed on the server. Wind set locally will sync back to server value in a while.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+setWind [x, y, forced]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$setWind [10, 10, true];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWindDir
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWindDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setWindDir value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$60 setWindDir 180$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / global
+//LocalityEnd//
+NoteStart:
+(April 12, 2014)
+Seems to make wind [0,0] in MP. (ArmA 3 1.00)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWindForce
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWindForce
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setWindForce wind
+//RawSyntaxEnd//
+ExampleStart:
+$Code$1800 setWindForce 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWindStr
+//KeywordEnd//
+DescriptionStart:
+Changes the wind strength smoothly during the given time (in seconds). A time of zero means there will be an immediate change.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWindStr
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time setWindStr value
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+setWPPos
+//KeywordEnd//
+DescriptionStart:
+Set waypoint position
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/setWPPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint setWPPos pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_groupOne, 1] setWPPos markerPos "MarkerOne";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+show3DIcons
+//KeywordEnd//
+DescriptionStart:
+Toggle the drawing of 3D icons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/show3DIcons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map show3DIcons bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showChat
+//KeywordEnd//
+DescriptionStart:
+Shows/hides the whole chat window.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showChat bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showChat false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showCinemaBorder
+//KeywordEnd//
+DescriptionStart:
+Forces drawing of cinema borders when using custom camera camCreate. This is normally used in cutscenes to indicate player has no control.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showCinemaBorder
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showCinemaBorder show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showCinemaBorder false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(13 October 2007)
+This command does only work when Mission is started. Use waitUntil { time 0}; to be sure it works.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showCommandingMenu
+//KeywordEnd//
+DescriptionStart:
+Create the commanding menu described by the given config class or menu name. When the name is empty, the current menu is hidden.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showCommandingMenu
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showCommandingMenu name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showCommandingMenu "";$/Code$
+%NextExample%
+$Code$showCommandingMenu "MyClassName";$/Code$
+%NextExample%
+$Code$showCommandingMenu "#USER:Tag_Menu_myMenu_0";$/Code$
+%NextExample%
+$Code$showCommandingMenu "RscMainMenu";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 22nd, 2012)
+//This script will create a custom menu, and display it once.
+MY_SUBMENU_inCommunication =
+[
+[ User submenu,true],
+[ Option-1, [2],, -5, [[ expression, player sidechat -1 ]], 0, 0, \ca\ui\data\cursor_support_ca ],
+[ Option 0, [3],, -5, [[ expression, player sidechat 0 ]], 1, 0, \ca\ui\data\cursor_support_ca ],
+[ Option 1, [4],, -5, [[ expression, player sidechat 1 ]], 1, CursorOnGround, \ca\ui\data\cursor_support_ca ]
+];
+MY_MENU_inCommunication =
+[
+// First array: User menu This will be displayed under the menu, bool value: has Input Focus or not.
+// Note that as to version Arma2 1.05, if the bool value set to false, Custom Icons will not be displayed.
+[ User menu,false],
+// Syntax and semantics for following array elements:
+// [ Title_in_menu, [assigned_key], Submenu_name, CMD, [[ expression,script-string]], isVisible, isActive, optional icon path ]
+// Title_in_menu: string that will be displayed for the player
+// Assigned_key: 0 - no key, 1 - escape key, 2 - key-1, 3 - key-2,..., 10 - key-9, 11 - key-0, 12 and up... the whole keyboard
+// Submenu_name: User menu name string (eg #USER:MY_SUBMENU_NAME ), for script to execute.
+// CMD: (for main menu:) CMD_SEPARATOR -1; CMD_NOTHING -2; CMD_HIDE_MENU -3; CMD_BACK -4; (for custom menu:) CMD_EXECUTE -5
+// script-string: command to be executed on activation. (no arguments passed)
+// isVisible - Boolean 1 or 0 for yes or no, - or optional argument string, eg: CursorOnGround
+// isActive - Boolean 1 or 0 for yes or no - if item is not active, it appears gray.
+// optional icon path: The path to the texture of the cursor, that should be used on this menuitem.
+[ First, [0],, -5, [[ expression, player sidechat First ]], 1, 1 ],
+[ Second, [2],, -5, [[ expression, player sidechat Second ]], 1, 1 ],
+[ Submenu, [3], #USER:MY_SUBMENU_inCommunication, -5, [[ expression, player sidechat Submenu ]], 1, 1 ]
+];
+showCommandingMenu #USER:MY_MENU_inCommunication ;
+// Appendix, list of optional argument strings
+HasRadio
+CanAnswer
+IsLeader
+IsAlone
+IsAloneInVehicle
+IsCommander
+VehicleCommander
+CommandsToGunner
+CommandsToPilot
+NotEmpty
+NotEmptySoldiers
+NotEmptyCommanders
+NotEmptyMainTeam
+NotEmptyRedTeam
+NotEmptyGreenTeam
+NotEmptyBlueTeam
+NotEmptyYellowTeam
+NotEmptySubgroups
+NotEmptyInVehicle
+SelectedTeam
+SelectedUnit
+FuelLow
+AmmoLow
+Injured
+Multiplayer
+AreActions
+CursorOnGroupMember
+CursorOnHoldingFire
+CursorOnEmptyVehicle
+CursorOnVehicleCanGetIn
+CursorOnFriendly
+CursorOnEnemy
+CursorOnGround
+CanSelectUnitFromBar
+CanDeselectUnitFromBar
+CanSelectVehicleFromBar
+CanDeselectVehicleFromBar
+CanSelectTeamFromBar
+CanDeselectTeamFromBar
+FormationLine
+FormationDiamond
+SomeSelectedHoldingFire
+PlayableLeader
+PlayableSelected
+IsWatchCommanded
+IsSelectedToAdd
+HCIsLeader
+HCCursorOnIcon
+HCCursorOnIconSelectable
+HCCanSelectUnitFromBar
+HCCanDeselectUnitFromBar
+HCCanSelectTeamFromBar
+HCCanDeselectTeamFromBar
+HCNotEmpty
+PlayerVehicleCanGetIn
+IsXbox
+IsTeamSwitch
+CursorOnNotEmptySubgroups
+SomeSelectedHaveTarget
+CursorOnGroupMemberSelected
+HCCursorOnIconSelectableSelected
+HCCursorOnIconenemy
+PlayerOwnRadio
+CursorOnNeedFirstAID
+CursorOnNeedHeal
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showCompass
+//KeywordEnd//
+DescriptionStart:
+Shows or hides the compass on the map screen, if enabled for the mission and you possess the item. (default true )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showCompass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showCompass show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showCompass false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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")
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showCuratorCompass
+//KeywordEnd//
+DescriptionStart:
+Hides or shows compass in curator interface.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showCuratorCompass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showCuratorCompass bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showCuratorCompass true;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showGPS
+//KeywordEnd//
+DescriptionStart:
+Shows or hides the GPS receiver on the map screen, if enabled for the mission and you possess the item. (default false )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showGPS
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showGPS show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showGPS true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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")
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showHUD
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showHUD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showHUD enable
+%NextRawSyntax%
+showHUD [hud, info, radar, compass, direction, menu, group, cursors]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showHUD false ;$/Code$
+%NextExample%
+$Code$// Hide vehicle radar and compass:
+showHUD [ true, true, false, false, true, true, true, true ];$/Code$
+%NextExample%
+$Code$// Check if HUD visibility is hardcoded in mission config and showHUD command is overriden:
+_disabledShowHUD = isArray ( missionConfigFile "showHUD");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showLegend
+//KeywordEnd//
+DescriptionStart:
+Show/hide map legend.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showLegend
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map showLegend bool
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showMap
+//KeywordEnd//
+DescriptionStart:
+Enable Map (default true )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showMap
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showMap show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showMap false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+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$.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownArtilleryComputer
+//KeywordEnd//
+DescriptionStart:
+Checks whether the player has the artillery computer currently open.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownArtilleryComputer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownArtilleryComputer
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownArtilleryComputer ) then { hint "Artillery Computer shown on screen"; };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownChat
+//KeywordEnd//
+DescriptionStart:
+Returns true if chat window is enabled. Chat window can be disabled with showChat command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownChat
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = shownChat ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownCompass
+//KeywordEnd//
+DescriptionStart:
+Checks if client has Compass enabled in description.ext ( showCompass param) or force enabled with showCompass command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownCompass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownCompass
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownCompass ) then { hint "You have Compass enabled"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownCuratorCompass
+//KeywordEnd//
+DescriptionStart:
+Returns true if compass is shown.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownCuratorCompass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownCuratorCompass
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showNewEditorObject
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showNewEditorObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map showNewEditorObject [type,class,side,position]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Any
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownGPS
+//KeywordEnd//
+DescriptionStart:
+Checks if client has GPS reciever enabled in description.ext ( showGPS param) or force enabled with showGPS command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownGPS
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownGPS
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownGPS ) then { hint "You have GPS reciever enabled"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownHUD
+//KeywordEnd//
+DescriptionStart:
+Returns array of Booleans corresponding to the visibility of various HUD elements (see extended showHUD ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownHUD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownHUD
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_hudStatus = shownHUD ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format [hud, info, radar, compass, direction, menu, group, cursors]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownMap
+//KeywordEnd//
+DescriptionStart:
+Checks if client has Map enabled in description.ext ( showMap param) or force enabled with showMap command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownMap
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownMap
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownMap ) then { hint "You have Map enabled"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownPad
+//KeywordEnd//
+DescriptionStart:
+Checks if client has Notepad enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownPad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownPad
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownPad ) then { hint "You have Notepad enabled."};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownRadio
+//KeywordEnd//
+DescriptionStart:
+Check if player has Radio enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownRadio
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownRadio ) then { hint "You have Radio enabled."};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownUAVFeed
+//KeywordEnd//
+DescriptionStart:
+Returns true if video feed transmitted from UAV is shown.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownUAVFeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownUAVFeed
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_bool = shownUAVFeed ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownWarrant
+//KeywordEnd//
+DescriptionStart:
+Check if player has ID card enabled. Obsolete command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownWarrant
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownWarrant
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+shownWatch
+//KeywordEnd//
+DescriptionStart:
+Checks if client has Watch enabled in description.ext ( showWatch param) or force enabled with showWatch command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/shownWatch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+shownWatch
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( shownWatch ) then { hint "You have Watch enabled"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showPad
+//KeywordEnd//
+DescriptionStart:
+Shows or hides the notebook on the map screen, if enabled for the mission. (default true ). It is no longer relevant to Arma 2.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showPad
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showPad show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showPad false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showRadio
+//KeywordEnd//
+DescriptionStart:
+Shows or hides the radio on the map screen, if enabled for the mission and you possess the item. (default true )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showRadio show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showRadio false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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")
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showSubtitles
+//KeywordEnd//
+DescriptionStart:
+Enable / disable showing of subtitles. Return the previous state.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showSubtitles
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showSubtitles enable
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showSubtitles false;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showUAVFeed
+//KeywordEnd//
+DescriptionStart:
+Shows/hides video feed transmitted from UAV.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showUAVFeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showUAVFeed bool
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showUAVFeed true ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showWarrant
+//KeywordEnd//
+DescriptionStart:
+Enable ID card (default false ). Obsolete command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showWarrant
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showWarrant show
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showWatch
+//KeywordEnd//
+DescriptionStart:
+Shows or hides the watch on the map screen, if enabled for the mission and you possess the item. (default true )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showWatch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+showWatch show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$showWatch false ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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")
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+showWaypoint
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/showWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint showWaypoint show
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] showWaypoint "ALWAYS";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+side
+//KeywordEnd//
+DescriptionStart:
+Returns the side of a unit, vehicle, object or location. Once dead, a unit will be on the civilian side. Query the side of the Group to get a reliable result.
+When used in conjunction with a format statement hint format ["%1", side player ], the returned strings are: " WEST ", " EAST ", " GUER ", " CIV ", " LOGIC ", " ENEMY " (eg: renegades), " FRIENDLY ", " AMBIENT LIFE ", " EMPTY " or " UNKNOWN ".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/side
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+side object
+%NextRawSyntax%
+side location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? ( side player == west ) : hint "Player is on the West side."
+// SQS$/Code$
+%NextExample%
+$Code$if ( side player == west ) then { hint "Player is on the West side"};
+// SQF$/Code$
+%NextExample%
+$Code$_sideLocation = side myLocation;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+In ArmA, the following objects are on side civilian : dead bodies and vehicles, empty vehicles, all mission editor placed objects (that do not have an inherit side), all objects with interactive components such as ladders and doors, man made structures such as buildings (including classless wrp placed objects), docks, high tension powerlines, see-saws, large rubbish bins, fountains. Basically if an object uses a non-simple damage or physics simulation it is likely to be on the civilian side.
+NOTE: If you need to know the side of a dead body, you can use faction command as a workaround -- Killzone_Kid
+%NextNote%
+In OFP 1.96, side return value for empty vehicles will be civilian.
+%NextNote%
+In OFP v1.96, the side return value for a vehicle is based on the side of it's commander, then gunner, then driver, then cargo. It will retain it's side value until it is either empty, or a unit of another side takes over in a equal or higher role, irrespective of the side of other units still on board. This can be used to simulate friendly fire, as a vehicle can be made to appear to be an enemy even though all units on board are actually friendly.
+%NextNote%
+Units with negative score(rating) are sideEnemy.
+%NextNote%
+The Side for civilians is civilian and the string name of the side is "CIV". For Resistance/Independent (Guerilla) they are resistance and "GUER".
+%NextNote%
+As CEEB says above, in ArmA2, side for a vehicle often depends on who the command or driver is, for example, A KA52, piloted by a USMC guy will have side WEST. For an accurate result of what 'where the vehicle was made', use faction. This ignores the pilot/commander, so in my example here, this KA52 will always return faction "RU". Note that faction returns different values to side though.
+%NextNote%
+Side values for ambient life (animals) are bizarre. side _unit returns "CIV", but playerSide returns "AMBIENT LIFE" when the player is an animal. In that case, playerSide == side player returns false!
+Fortunately, you can easily check if a unit is an animal with _unit isKindOf "ANIMAL"'
+%NextNote%
+Units who set via 'this setcaptive true' are always on side civilian.
+%NextNote%
+(July 30, 2015)
+This is probably the most confusing section of the wiki so here I give my clarification:
+In ArmA3 1.48, forEach'ing playableUnits to find certain players from certain sides, you will need to do it like this:
+$Code$if (side _x isEqualTo EAST) then { diag_log format["%1's side is %2", name _x, side _x];$/Code$
+Instead, this page might trick you into thinking that you will need to check for player's side like this:
+$Code$side _x isEqualTo "EAST"$/Code$ ^^^^^ That does NOT work.
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideAmbientLife
+//KeywordEnd//
+DescriptionStart:
+Returns side of ambient life, for example ambient life placed in Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideAmbientLife
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideAmbientLife
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sideAmbientLife = sideAmbientLife ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideChat
+//KeywordEnd//
+DescriptionStart:
+Types text to the side radio channel. Must have assigned "itemRadio" to see or transmit the messages.
+Note: This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName sideChat chatText
+%NextRawSyntax%
+[side, string] sideChat chatText
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne sideChat "Show this text";$/Code$
+%NextExample%
+$Code$PAPABEAR = [West,"HQ"]; PAPABEAR sideChat "Hi there";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+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!".
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideEmpty
+//KeywordEnd//
+DescriptionStart:
+Returns empty side, for example static buildings in Eden Editor.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideEmpty
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideEmpty
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sideEmpty = sideEmpty ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideEnemy
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideEnemy
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideEnemy
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( side player == sideEnemy ) then {
+hint "We've got a renegade!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideFriendly
+//KeywordEnd//
+DescriptionStart:
+The Friendly side (used for captives).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideFriendly
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideFriendly
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideLogic
+//KeywordEnd//
+DescriptionStart:
+The Logic side.
+Side of Game Logics and Modules.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideLogic
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideLogic
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( side _obj == sideLogic ) then {
+hint "It's a logic!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideRadio
+//KeywordEnd//
+DescriptionStart:
+Send the message to the side radio channel. Message is defined in Description.ext file.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName sideRadio chat
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldierOne sideRadio messageOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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".
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sideUnknown
+//KeywordEnd//
+DescriptionStart:
+The unknown side.
+Used when the side of a unit is unknown, e.g. for spotted targets with insufficient information.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sideUnknown
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sideUnknown
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simpleTasks
+//KeywordEnd//
+DescriptionStart:
+Return all simple tasks assigned to given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simpleTasks
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simpleTasks person
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simulationEnabled
+//KeywordEnd//
+DescriptionStart:
+Check if the entity has enabled simulation.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simulationEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simulationEnabled entity
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simulCloudDensity
+//KeywordEnd//
+DescriptionStart:
+Returns density of clouds at given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simulCloudDensity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simulCloudDensity pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$simulCloudDensity (getPos player)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simulCloudOcclusion
+//KeywordEnd//
+DescriptionStart:
+Returns clouds occlusion between two given points (0 - no clouds, 1 - full clouds).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simulCloudOcclusion
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simulCloudOcclusion [pos1,pos2]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$canSeeSun = ( simulCloudOcclusion == 0)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simulInClouds
+//KeywordEnd//
+DescriptionStart:
+Returns if given position is in clouds.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simulInClouds
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simulInClouds pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$simulInClouds (getPos player)$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+simulWeatherSync
+//KeywordEnd//
+DescriptionStart:
+Synchronizes Simul Weather with Arma weather, generates all keyframes.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/simulWeatherSync
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+simulWeatherSync
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sin
+//KeywordEnd//
+DescriptionStart:
+Sine of x, argument in Degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sin
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sin x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sine = sin 30;//result is 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+size
+//KeywordEnd//
+DescriptionStart:
+Returns a location's size.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/size
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+size location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locSize = size myLocation$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array = in format [x,y] in meters
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sizeOf
+//KeywordEnd//
+DescriptionStart:
+Returns the diameter of bounding sphere of the object of given type in meters. Size returned is usually bigger than the biggest size of the object along any of the axes. For example if object is 10 x 4 x 5 the sizeOf value returned expected to be around 10. If you need to estimate the size of the object more precisely, use boundingBox or boundingBoxReal.
+NOTE: The object has to be present in current mission to be able to read its size (otherwise zero will be returned).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sizeOf
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sizeOf type
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dimension = sizeOf "M1Abrams"; //returns 10.7833$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+skill
+//KeywordEnd//
+DescriptionStart:
+Returns current level of ability of person, in range between 0 and 1. Skill 1 is highest skill.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/skill
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+skill unitName
+%NextRawSyntax%
+unitName skill skillType
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_skill = skill unit1$/Code$
+%NextExample%
+$Code$_myEndurance = player skill Endurance$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Skill of AI units set via the slider in unit placement screen varies from 0.2 to 1.0.
+If superAI is enabled all units have skill of 1.0 regardless of the skill slider
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+skillFinal
+//KeywordEnd//
+DescriptionStart:
+Returns final, recalculated sub skill value of given unit. (with regard to AI Level coefficient (Difficulty settings)).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/skillFinal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName skillFinal sub-skill
+//RawSyntaxEnd//
+ExampleStart:
+$Code$cursorTarget skillFinal Endurance$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Since 1.40 the command works also in MP environment
+%NextNote%
+(January 31, 2015)
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+skipTime
+//KeywordEnd//
+DescriptionStart:
+Jumps the specified number of hours forward or backward. The time of day and tides are adjusted, but no changes are made to any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/skipTime
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+skipTime duration
+//RawSyntaxEnd//
+ExampleStart:
+$Code$skipTime 5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+To simulate a smooth time-lapse effect (e.g. in cut-scenes), you can use the following code:
+$Code$while {true} do {skiptime 0.00333; sleep 0.1};$/Code$
+%NextNote%
+To skip forward to a specific time, irrespective of the current mission time, use
+$Code$skipTime (_timeToSkipTo - daytime + 24 ) % 24;$/Code$
+%NextNote%
+In ArmA OFP, skipTime does not actually estimate weather changes beyond moving the clouds across the sky. Weather counters continue as if no time has passed. The setDate command can be used instead of skiptime to change the time without the visual give-away of the lower clouds jumping.
+%NextNote%
+I cannot confirm this for OA 1.60 beta (85889):
+MP: Even though the immediate effect of skipTime is only local,
+the new time will propagate through the network after 30 seconds or so.
+Instead the date, which includes time, is synced automatically for new JIP clients - NOT for present instances.
+So one has to apply skipTime on all instances in MP (server + all present clients).
+%NextNote%
+This command is blocking and in some cases it may take up to 1.5 seconds (probably depends on CPU) for it to calculate the changes to the environment, during which the game will microfreeze. It largely depends on weather changes, which are quite random. However one thing remains consistent, skipTime 24 hours is always almost instant. This is quite helpful when used in conjunction with commands such as setOvercast for instant and seamless effect. To try it yourself use this script:
+$Code$[] spawn {
+for "_i" from 1 to 24 do {
+_time = diag_tickTime ;
+skipTime _i;
+diag_log [_i, diag_tickTime - _time];
+sleep 3;
+};
+};$/Code$
+One of the results (results will vary depending on weather conditions):
+$Code$[1,1.44507]
+[2,1.46118]
+[3,1.33105]
+[4,1.396]
+[5,0.0310059]
+[6,1.37891]
+[7,1.4502]
+[8,1.37817]
+[9,1.37695]
+[10,1.37012]
+[11,1.448]
+[12,1.32593]
+[13,1.45508]
+[14,1.448]
+[15,0.0349121]
+[16,0.0368652]
+[17,1.25903]
+[18,1.38599]
+[19,1.4519]
+[20,0.052002]
+[21,0.0400391]
+[22,0.0490723]
+[23,1.35205]
+[24,0.0151367] //this is always the lowest$/Code$
+%NextNote%
+In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sleep
+//KeywordEnd//
+DescriptionStart:
+Suspend 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.
+Note that this command will suspend the script indefinitely if game simulation is paused in SP. To avoid this, use uiSleep.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sleep
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sleep delay
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[] spawn { sleep 5; hint "after 5 sec..."};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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).
+%NextNote%
+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.
+%NextNote%
+(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".
+%NextNote%
+(July 12, 2014)
+Sleep will treat negative values as if they were 0. (Tested in Arma 3 v1.22)
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderPosition
+//KeywordEnd//
+DescriptionStart:
+Return current thumb position of slider idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderPosition idc
+%NextRawSyntax%
+sliderPosition control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_slidepos1 = sliderPosition 105;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderRange
+//KeywordEnd//
+DescriptionStart:
+Return limits, as an Array [min, max] of slider idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderRange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderRange idc
+%NextRawSyntax%
+sliderRange control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_slidelimits1 = sliderRange 105;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [min, max]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderSetPosition
+//KeywordEnd//
+DescriptionStart:
+Set current thumb position of slider idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderSetPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderSetPosition [idc, pos]
+%NextRawSyntax%
+control sliderSetPosition pos
+//RawSyntaxEnd//
+ExampleStart:
+$Code$sliderSetPosition [101, 50];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderSetRange
+//KeywordEnd//
+DescriptionStart:
+Set limits of slider idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderSetRange
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderSetRange [idc, min, max]
+%NextRawSyntax%
+control sliderSetRange [min, max]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$sliderSetRange [101, 0, 100];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderSetSpeed
+//KeywordEnd//
+DescriptionStart:
+Set speed of slider with id idc of topmost user dialog.
+Click to arrow - move by line
+Click to scale outside thumb - move by page.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderSetSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderSetSpeed [idc,line,page]
+%NextRawSyntax%
+control sliderSetSpeed [line, page]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$sliderSetSpeed [101, 0.5, 2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sliderSpeed
+//KeywordEnd//
+DescriptionStart:
+Return speed, as an Array [min, max] of slider idc of topmost user dialog.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sliderSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sliderSpeed idc
+%NextRawSyntax%
+sliderSpeed control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_slidespeed1 = sliderSpeed 105;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [min, max]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+slingLoadAssistantShown
+//KeywordEnd//
+DescriptionStart:
+Returns true of Sling Load Assistant is open
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/slingLoadAssistantShown
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+slingLoadAssistantShown
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waitUntil { slingLoadAssistantShown };
+hint "You lack rudimentary motor skills and basic eye-hand coordination.";
+//scold user for unethical practices$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+soldierMagazines
+//KeywordEnd//
+DescriptionStart:
+Get array with all magazines of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/soldierMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldierMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+someAmmo
+//KeywordEnd//
+DescriptionStart:
+Check if unit has some ammo.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/someAmmo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+someAmmo unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? not (someAmmo _loon1) : hint "Loon1 is out of ammo!"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sort
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sort
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+array sort order
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+%NextExample%
+$Code$_dev = ["ja","pa","pa","tram","tara"];
+_dev sort false ;
+hint str _dev; //["tram","tara","pa","pa","ja"]$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Sort buildings by distance and return position of the most distant building:
+_buildings = player nearObjects ["Land_Cargo_Patrol_V1_F", 500];
+{
+_buildings set [_forEachIndex, [_x distance player, _x]];
+} forEach _buildings;
+_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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(April 16, 2015)
+The algorithm for sorting subarrays: compare 1st element, if equal compare 2nd, if equal compare 3rd...etc.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+soundVolume
+//KeywordEnd//
+DescriptionStart:
+Check current sound volume (set by fadeSound ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/soundVolume
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soundVolume
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vol = soundVolume$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+spawn
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/spawn
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+arguments spawn code
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_handle = [] spawn { player globalChat "Hello world!"};$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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)
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Script Handle - can be used to determine (via scriptDone (also via isNull in Arma 3)) when the spawned script has finished. In Arma 3, the handle is also available inside the spawned script in _thisScript variable.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+speaker
+//KeywordEnd//
+DescriptionStart:
+Returns the speaker of a person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/speaker
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+speaker person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$speaker player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+speed
+//KeywordEnd//
+DescriptionStart:
+Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to: 3.6 * ( velocityModelSpace _obj select 1)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/speed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+speed object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (speed _truck1) = 100 : hint "You're going too fast!"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+speedMode
+//KeywordEnd//
+DescriptionStart:
+Returns speed mode of the group, which can be any of the following:
+"LIMITED"
+"NORMAL"
+"FULL"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/speedMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+speedMode groupName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_grpspeed1 = speedMode grp1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+splitString
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/splitString
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+str splitString delimiters
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"]
+_str joinString " "; // "This is a sample string"$/Code$
+%NextExample%
+$Code$"\A3\ui_f\data\map\vehicleicons\iconLogic_ca.paa" splitString "\.";
+// ["A3","ui_f","data","map","vehicleicons","iconLogic_ca","paa"]$/Code$
+%NextExample%
+$Code$"1:2:3" splitString ":"; // ["1","2","3"]$/Code$
+%NextExample%
+$Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
+%NextExample%
+$Code$"Japa is the best!" splitString "" joinString " "; // "J a p a i s t h e b e s t !"$/Code$
+%NextExample%
+$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$
+%NextExample%
+$Code$// Remove all \r\n from file:
+loadFile "somefile.txt" splitString toString [13,10] joinString " "$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sqrt
+//KeywordEnd//
+DescriptionStart:
+Returns square root of x.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sqrt
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sqrt x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sq = sqrt 9; // Result is 3$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(18:05, 24 August 2014 (EST))
+Alternatively use "x^0.5" or "x^(1/2)". $Code$_sq = 9^0.5; //Result is 3
+_sq = 9^(1/2); //Result is 3$/Code$
+You can use this method to get any root.
+Cubed root = x^(1/3) or x^0.333[repeating].
+Root 4 = x^(1/4) or x^0.25.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+squadParams
+//KeywordEnd//
+DescriptionStart:
+Returns data about squad of given unit loaded from squad.xml.
+All items in returned array are String.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/squadParams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+squadParams unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_info = squadParams player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(July 19, 2015)
+Returns an empty array in singleplayer.
+//NoteEnd//
+ReturnValueStart:
+Array - [[squadNick,squadName,squadEmail,squadWeb,squadPicture,squadTitle],[memberId,memberNick,memberName,memberEmail,memberIcq,memberRemark]]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+stance
+//KeywordEnd//
+DescriptionStart:
+Returns the stance of given unit - can be "STAND", "CROUCH", "PRONE", "UNDEFINED" (for example, swimming) or "" (on non-human object )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/stance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+stance unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (stance player == "STAND") then { hint "I am standing now!"; };$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+startLoadingScreen
+//KeywordEnd//
+DescriptionStart:
+Shows loading screen with the given text, using the given resource. While loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed. The loading screen does not end by itself and needs endLoadingScreen command, so make sure there is one at the end of loading operation.
+NOTE: The game simulation is disabled during Loading Screen operation (at least in SP), therefore any use of sleep command will pause the game indefinitely. If you have to "sleep", use uiSleep
+By default (if custom resource is not provided) startLoadingScreen will use "RscDisplayNotFreeze" resource. If you are using custom resource (could be also defined in description.ext ), the following resource's controls are supported by the engine:
+idc = 101; - text (type = 0;) or picture (type = 48;). The text will be set to the text provided by the command param.
+idc = 103; - progress (type = 8;) or animated texture (type = 45;). This control indicates global hardcoded mission loading progress and is useless after mission is loaded.
+idc = 104; - progress (type = 8;). This control's progress is initially set to 0 and can be manipulated with progressLoadingScreen command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/startLoadingScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+startLoadingScreen [text, resource]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$startLoadingScreen ["Loading My Mission, please wait..."];$/Code$
+%NextExample%
+$Code$startLoadingScreen ["Can't skip loading time...", "MyLoadingRsc"];$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 15, 2009)
+As it stops simulation as well as scene drawing, be sure not to put any sleep (or waitUntil if you are checking for in-game changes ; waitUntil for var initialization or script loading is ok) command between startLoadingScreen and endLoadingScreen.
+%NextNote%
+(January 18, 2010)
+edit 10:15 : Whatever transparence you define in your own resource, there will be a black screen to cache loading.
+It's up to you to choose a nice blue background :-)
+Resource has to be defined in description.ext ; it must NOT be defined as RscTitles ! Here is an example :
+Details anzeigen
+$Code$
+// basic defines
+//
+class RscText
+{
+type = 0;
+idc = -1;
+x = 0;
+y = 0;
+h = 0.037;
+w = 0.3;
+style = 0x100;
+font = Zeppelin32;
+SizeEx = 0.03921;
+colorText[] = {1,1,1,1};
+colorBackground[] = {0, 0, 0, 0};
+linespacing = 1;
+};
+class RscPicture
+{
+access=0;
+type=0;
+idc=-1;
+style=48;
+colorBackground[]={0,0,0,0};
+colorText[]={1,1,1,1};
+font="TahomaB";
+sizeEx=0;
+lineSpacing=0;
+text="";
+};
+class RscLoadingText : RscText
+{
+style = 2;
+x = 0.323532;
+y = 0.666672;
+w = 0.352944;
+h = 0.039216;
+sizeEx = 0.03921;
+colorText[] = {0.543,0.5742,0.4102,1.0};
+};
+class RscProgress
+{
+x = 0.344;
+y = 0.619;
+w = 0.313726;
+h = 0.0261438;
+texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
+colorFrame[] = {0,0,0,0};
+colorBar[] = {1,1,1,1};
+};
+class RscProgressNotFreeze
+{
+idc = -1;
+type = 45;
+style = 0;
+x = 0.022059;
+y = 0.911772;
+w = 0.029412;
+h = 0.039216;
+texture = "#(argb,8,8,3)color(0,0,0,0)";
+};
+//
+// the loading screen itself
+//
+class Harrier_loadingScreen
+{
+idd = -1;
+duration = 10e10;
+fadein = 0;
+fadeout = 0;
+name = "loading screen";
+class controlsBackground
+{
+class blackBG : RscText
+{
+x = safezoneX;
+y = safezoneY;
+w = safezoneW;
+h = safezoneH;
+text = "";
+colorText[] = {0,0,0,0};
+colorBackground[] = {0,0,0,1};
+};
+class nicePic : RscPicture
+{
+style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO
+x = safezoneX + safezoneW/2 - 0.25;
+y = safezoneY + safezoneH/2 - 0.2;
+w = 0.5;
+h = 0.4;
+text = "img\nicePic.paa";
+};
+};
+class controls
+{
+class Title1 : RscLoadingText
+{
+text = "$STR_LOADING"; // "Loading" text in the middle of the screen
+};
+class CA_Progress : RscProgress // progress bar, has to have idc 104
+{
+idc = 104;
+type = 8; // CT_PROGRESS
+style = 0; // ST_SINGLE
+texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
+};
+class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse
+{
+idc = 103;
+};
+class Name2: RscText // the text on the top-left
+{
+idc = 101;
+x = 0.05;
+y = 0.029412;
+w = 0.9;
+h = 0.04902;
+text = "";
+sizeEx = 0.05;
+colorText[] = {0.543,0.5742,0.4102,1.0};
+};
+};
+};
+$/Code$
+%NextNote%
+(February 19, 2015)
+Based on what Lou Montana has previously said, the simulation does become disabled upon using this command. If you wish to use a delay 'sleep' will not work. The work around would be to use 'uiSleep'
+%NextNote%
+(November 21, 2015)
+In Arma 3 default loading screen has no control do display text. The description of the command now contains information what is needed to create custom loading screen resource.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+step
+//KeywordEnd//
+DescriptionStart:
+Optionally can set step. If you want to count down, step must be specified, and set negative. Default value is 1.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/step
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+stop
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/stop
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName stop toggle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$loon1 stop true$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(January 6, 2011)
+This command appears to be local only.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+stopped
+//KeywordEnd//
+DescriptionStart:
+Check if unit is stopped by stop command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/stopped
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+stopped unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$? (stopped _loon1) : hint "Loon1 is stopped"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+str
+//KeywordEnd//
+DescriptionStart:
+Converts any value into a string by placing " and " around the argument. This command will not parse any escaped " within the string. In order to preserve "", use single quotes:
+$Code$ str "string "" string"; //"string " string" - not a valid string
+str 'string "" string'; //"string "" string" - a valid string$/Code$
+When used on object, object debug name is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/str
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+str value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_s = str (2 + 3);
+// The value of _s is the string "5"$/Code$
+%NextExample%
+$Code$a = [];
+ac = 0;
+while {ac 5} do {
+ac = count a;
+a set [ac, format ["Index %1", ac]];
+};
+hintSilent str a;
+// Hints all of ["Index 0","Index 1","Index 2","Index 3","Index 4"] including brackets, quotes and commas.$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+When applied to a unit, this returns the variable name that was assigned to the unit in the editor. For example, if you have created a playable unit with the name 'thePlayer' then you can use 'str player' to return "thePlayer";
+%NextNote%
+(April 5, 2012)
+When applied to a string, places quotes around it. If it also contains quotes, be careful in how you use it; e.g. including it as part of a string and then compiling it as code won't work.
+%NextNote%
+(December 5, 2014)
+In addition to the note above, if you try to count that string, the added quotations marks are valid characters and will be counted.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+sunOrMoon
+//KeywordEnd//
+DescriptionStart:
+Returns the sun to moon transition state in range 0...1
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/sunOrMoon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+sunOrMoon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_transitionState = sunOrMoon ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+supportInfo
+//KeywordEnd//
+DescriptionStart:
+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 *:*.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/supportInfo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+supportInfo mask
+//RawSyntaxEnd//
+ExampleStart:
+$Code$supportInfo "b:select*"; //Returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]$/Code$
+%NextExample%
+$Code$// Return all available commands:
+_commands = supportInfo "";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(September 24, 2014)
+To get the list of all supported commands in Arma 3 one can simply:
+$Code${ diag_log _x} forEach supportInfo "";$/Code$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+suppressFor
+//KeywordEnd//
+DescriptionStart:
+Force suppressive fire from the unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/suppressFor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit suppressFor duration
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_soldier1 suppressFor 10
+// Will force soldier1 to do suppressive fire to known enemies during 10 seconds$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+surfaceIsWater
+//KeywordEnd//
+DescriptionStart:
+Returns whether water is at given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/surfaceIsWater
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+surfaceIsWater position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isWater= surfaceIsWater [1000, 3000];$/Code$
+%NextExample%
+$Code$_isWater = surfaceIsWater position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(4 May, 2012)
+Does not work with inland water. Works only with sea water.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+surfaceNormal
+//KeywordEnd//
+DescriptionStart:
+Returns surface normal on given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/surfaceNormal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+surfaceNormal position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_normal = surfaceNormal [300, 500];$/Code$
+%NextExample%
+$Code$_normal = surfaceNormal position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Example: [-0.102321,0.19977,0.974486]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+surfaceType
+//KeywordEnd//
+DescriptionStart:
+Returns what surface type is at the given position.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/surfaceType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+surfaceType position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_surface = surfaceType [4500, 4500];$/Code$
+%NextExample%
+$Code$_surface = surfaceType position player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 05, 2010)
+In ArmA 2 returned value is "#UTGRASS" for natural surface and "#UTCONCRETE" for urban surface.
+%NextNote%
+(December 16, 2006)
+Only seems to return either "#GRASSSOUTH" or "#GRASSGENERAL", even when you're in a building or in water.
+%NextNote%
+(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.
+%NextNote%
+(12 Sep 2014)
+(A3 1.28) Surface types:
+#GdtStratisConcrete
+#GdtStratisDryGrass
+#GdtStratisGreenGrass
+#GdtStratisRocky
+#GdtStratisForestPine
+#GdtStratisBeach
+#GdtStratisDirt
+#GdtVRsurface01
+#GdtDirt
+#GdtGrassGreen
+#GdtGrassDry
+#GdtSoil
+#GdtThorn
+#GdtStony
+#GdtConcrete
+#GdtMarsh
+#GdtBeach
+#GdtSeabed
+#GdtDead
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+swimInDepth
+//KeywordEnd//
+DescriptionStart:
+Sets the target depth level for swimming soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/swimInDepth
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit swimInDepth value
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldier swimInDepth -20$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switch
+//KeywordEnd//
+DescriptionStart:
+Checks if the given parameter matches any case. If so, the code block of that case will be executed. After that the switch ends so no further cases will be checked.
+If a case has no code block, the code of the next case will automatically be executed. This makes it possible to formulate a logical "or" for cases which otherwise would contain the exact same code. (See example 4 below)
+The default block will only be executed if no case matches, no matter at which position inside the switch it is.
+switch returns whatever the return value of the case block is.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switch
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchableUnits
+//KeywordEnd//
+DescriptionStart:
+Return a list of units accessible through Team Switch.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchableUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+switchableUnits
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(July 06, 2011)
+On dedicated server this command returns empty array.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchAction
+//KeywordEnd//
+DescriptionStart:
+When used on a person, the given action 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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchAction
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier switchAction action
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne switchAction "SitDown"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchCamera
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchCamera
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitName switchCamera mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player switchCamera "Gunner";$/Code$
+%NextExample%
+$Code$vehicle player switchCamera "External";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchGesture
+//KeywordEnd//
+DescriptionStart:
+When used on a person,the given move is started immediately (there is no transition).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchGesture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier switchGesture moveName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$soldierOne switchGesture "Wave";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 31, 2010)
+Rpt says "Not implemented" as of OA 1.54.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchLight
+//KeywordEnd//
+DescriptionStart:
+Controls whether a lamp is lit or not. For working with CfgNonAIVehicles class "StreetLamp" only.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchLight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+lamp switchLight mode
+//RawSyntaxEnd//
+ExampleStart:
+$Code$( object 12345) switchLight "off"$/Code$
+%NextExample%
+$Code$nearestObject [player, "Streetlamp"] switchLight "OFF"$/Code$
+%NextExample%
+$Code$if ( count allMissionObjects "StreetLamp" == 0) then {
+hint "Objects compatible with 'switchLight' are not found.";
+} else {
+hint "'switchLight' compatible objects are found!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(January 23, 2010)
+If you want turn street lamp off in ArmA2, the syntax is:
+ID959522=position player nearestObject 959522
+ID959522 switchLight "off"
+%NextNote%
+(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${
+_x setHit ["light_1_hitpoint", 0.97];
+_x setHit ["light_2_hitpoint", 0.97];
+_x setHit ["light_3_hitpoint", 0.97];
+_x setHit ["light_4_hitpoint", 0.97];
+} forEach nearestObjects [ player, [
+"Lamps_base_F",
+"PowerLines_base_F",
+"PowerLines_Small_base_F"
+], 500];$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+switchMove
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/switchMove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+person switchmove movename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_loon1 switchMove "FXStandDip"$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(August 03, 2008)
+This command will not cause an AnimChanged or AnimDone event. However, playMove will.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizedObjects
+//KeywordEnd//
+DescriptionStart:
+Return the list of objects synchronized with the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizedObjects
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+synchronizedObjects unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_objects = synchronizedObjects _logic$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+command to select the actual vehicle.
+This command only returns the synchronized objects when used on intelligent objects such as units or
+logic objects. All other objects returns an empty array.
+In MP this command returns only values when the object is local. otherwise it returns an empty array.
+%NextNote%
+(February 26, 2015)
+When returning the synchronized objects, they are returned in order of their type:
+"Man","Logic","EmptyDetector"
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizedTriggers
+//KeywordEnd//
+DescriptionStart:
+Returns the list of triggers synchronized with a given waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizedTriggers
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+synchronizedTriggers waypoint
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizedWaypoints
+//KeywordEnd//
+DescriptionStart:
+Returns the list of waypoints synchronized with a given trigger or waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizedWaypoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+synchronizedWaypoints obj
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizeObjectsAdd
+//KeywordEnd//
+DescriptionStart:
+Add given objects to the unit's list of synchronized objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizeObjectsAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit synchronizeObjectsAdd [objects]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_acm = _groupLogic createUnit [ AmbientCombatManager,position player,[],0, NONE ];
+_acm synchronizeObjectsAdd [player];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizeObjectsRemove
+//KeywordEnd//
+DescriptionStart:
+Remove given objects from the unit's list of synchronized objects.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizeObjectsRemove
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit synchronizeObjectsRemove [objects]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizeTrigger
+//KeywordEnd//
+DescriptionStart:
+Synchronizes the trigger with zero or more waypoints.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizeTrigger
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger synchronizeTrigger [waypoint1, waypoint2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger synchronizeTrigger []$/Code$
+%NextExample%
+$Code$_trigger synchronizeTrigger [_waypoint1]$/Code$
+%NextExample%
+$Code$_trigger synchronizeTrigger [_waypoint1, [_group5, 7], _waypoint3]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizeWaypoint
+//KeywordEnd//
+DescriptionStart:
+Synchronizes the waypoint with other waypoints. Each waypoint is given as an array [group, index].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizeWaypoint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint synchronizeWaypoint [waypoint1, waypoint2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_group1, 2] synchronizeWaypoint [ [_group2, 3] ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 31, 2008)
+To 'unsynchronize' a waypoint use: Waypoint synchronizeWaypoint []
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+synchronizeWaypoint_trigger
+//KeywordEnd//
+DescriptionStart:
+Synchronizes a trigger with other waypoints. Each waypoint is given as an array [group, index].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/synchronizeWaypoint_trigger
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+trigger synchronizeWaypoint [waypoint1, waypoint2,...]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myTrigger synchronizeWaypoint [ [_group2, 3] ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+systemChat
+//KeywordEnd//
+DescriptionStart:
+Types text to the system radio channel. This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/systemChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+systemChat text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$systemChat "Hello world!";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+systemOfUnits
+//KeywordEnd//
+DescriptionStart:
+Returns the currently selected system of units.
+0: Metric
+1: Mixed (ground vehicles use Metric / air vehicles use Imperial)
+2: Imperial
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/systemOfUnits
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+systemOfUnits
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_system = systemOfUnits;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tan
+//KeywordEnd//
+DescriptionStart:
+Tangent of x, argument in Degrees.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tan
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tan x
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_tangent = tan 45
+// Result is 1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+targetKnowledge
+//KeywordEnd//
+DescriptionStart:
+Returns unit's knowledge about target. The returned array includes information whether the target is
+known by group
+known by the unit
+last time the target was seen by the unit
+last time the target endangered the unit
+target side
+position error
+target position
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/targetKnowledge
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit targetKnowledge target
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allInfo = _soldierOne targetKnowledge _jeepOne;$/Code$
+%NextExample%
+$Code$_posError = (_soldierOne targetKnowledge _jeepOne) select 5;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array (7 elements)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+targetsAggregate
+//KeywordEnd//
+DescriptionStart:
+Aggregate candidates.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/targetsAggregate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+[speaker, side, unit, place, time] targetsAggregate candidates
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_aggregation = [_this,,,, ] targetsAggregate _selected;//ca\characters\scripts\reactCore_Full.fsm$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+targetsQuery
+//KeywordEnd//
+DescriptionStart:
+Returns sorted array of targets, known to the enquirer (including own troops), where the accuracy coefficient reflects how close the result matches the query. This command could be CPU intensive.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/targetsQuery
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+enquirer targetsQuery [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// Return all known targets for player:
+_targets = player targetsQuery [ objNull, sideUnknown, "", [], 0];$/Code$
+%NextExample%
+$Code$// Prioritise all known OPFOR targets and return targets less than 10 seconds old:
+_targets = player targetsQuery [ objNull, east, "", [], 10];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - sorted array of returned targets in the following format:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskAlwaysVisible
+//KeywordEnd//
+DescriptionStart:
+Returns true if the task is flagged to be always visible or false if not.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskAlwaysVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskAlwaysVisible task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Bool
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskChildren
+//KeywordEnd//
+DescriptionStart:
+Return the child tasks of the specified task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskChildren
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskChildren task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskCompleted
+//KeywordEnd//
+DescriptionStart:
+Return if task is completed. (state Succeeded, Failed or Canceled)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskCompleted
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskCompleted task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskCustomData
+//KeywordEnd//
+DescriptionStart:
+Returns custom data attached to the local task or an empty array if there are no custom data attached.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskCustomData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskCustomData task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of string - iconPath, iconText, descriptionText
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskDescription
+//KeywordEnd//
+DescriptionStart:
+Returns the sub-parts of the task description. The returned Array is in format [Task description, Task title, Task waypoint description].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskDescription task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_taskDescArray = taskDescription _task;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 "".
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskDestination
+//KeywordEnd//
+DescriptionStart:
+Returns the position of the task (as specified by destination parameter in config).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskDestination
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskDestination task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (! isNull currentTask player ) then { taskDestination currentTask player }; //return Position ( Array )$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array (A3 1.28 Returns Nothing if identity is taskNull )
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskHint
+//KeywordEnd//
+DescriptionStart:
+Shows info about new, changed or failed task. The text can contain several lines. \n is used to indicate the end of a line.
+To maintain Arma 3 visual style, it's recommended to use BIS_fnc_showNotification instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskHint
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskHint [hintText, [r, g, b, a], icon]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$taskhint ["Task failed!\nBad job!", [1, 0, 0, 1], "taskFailed"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+Here are the BIS colors:
+$Code$
+taskHint ["New Task!\nHere's your new task!", [1, 1, 1, 1], "taskNew"];
+taskHint ["Task Assigned!\nDo this now!", [1, 1, 1, 1], "taskCurrent"];
+taskHint ["Task Succeeded!\nGood job!", [0.600000,0.839215,0.466666,1], "taskDone"];
+taskHint ["Task Failed!\nBad job!", [0.972549,0.121568,0,1], "taskFailed"];
+taskHint ["Task Canceled!\nNever mind!", [0.75,0.75,0.75,1], "taskFailed"];
+$/Code$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskNull
+//KeywordEnd//
+DescriptionStart:
+A non-existing Task. To compare non-existent tasks use isNull or isEqualTo :
+taskNull == taskNull ; // false
+isNull taskNull ; // true
+taskNull isEqualTo taskNull ; // true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull taskNull ; // false$/Code$
+%NextExample%
+$Code$str taskNull ; // No task$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskParent
+//KeywordEnd//
+DescriptionStart:
+Return the parent task of the specified task.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskParent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskParent task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskResult
+//KeywordEnd//
+DescriptionStart:
+Send a result of the task to the task sender.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskResult
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskResult task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskState
+//KeywordEnd//
+DescriptionStart:
+Returns the current state of a task.
+Possible return values are:
+None
+Created
+Assigned
+Succeeded
+Failed
+Canceled
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskState task
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tskSomeTask = player createSimpleTask ["NewTask"];
+hint format["Taskstate: %1", taskState tskSomeTask];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - current state of task
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+taskType
+//KeywordEnd//
+DescriptionStart:
+Returns the type of the given task
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/taskType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+taskType task
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamMember
+//KeywordEnd//
+DescriptionStart:
+Return an agent for given person.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamMember
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember person
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_agent = teamMember player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Team Member
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamMemberNull
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamMemberNull
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMemberNull
+//RawSyntaxEnd//
+ExampleStart:
+$Code$! isNull teamMemberNull ; // false$/Code$
+%NextExample%
+$Code$str teamMemberNull ; // NULL - team member$/Code$
+%NextExample%
+$Code$if (_teamMember isEqualTo teamMemberNull ) then {
+hint "is null member";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Team Member
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamName
+//KeywordEnd//
+DescriptionStart:
+Return a name of given team.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamName team
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = teamName _team;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teams
+//KeywordEnd//
+DescriptionStart:
+Return a list of teams in the current mission.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teams
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teams
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_teams = teams ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamSwitch
+//KeywordEnd//
+DescriptionStart:
+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)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamSwitch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamSwitch
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(May 13, 2015)
+To get a unit back to it's normal AI behaviour after using team switch, simply use this code on the unit:
+$Code$_unit enableAI "TEAMSWITCH";$/Code$
+(Tested in Arma 3 1.44)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamSwitchEnabled
+//KeywordEnd//
+DescriptionStart:
+Check if Team Switch is currently enabled.
+Team Switch is enabled by default.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamSwitchEnabled
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamSwitchEnabled
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+teamType
+//KeywordEnd//
+DescriptionStart:
+Returns a type of given team.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/teamType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamType team
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_type = teamType _team;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+terminate
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/terminate
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+terminate scriptHandle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_script = [] execVM "script.sqf";
+sleep 5;
+terminate _script;
+hint "'script.sqf' has been terminated after 5 seconds";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+terrainIntersect
+//KeywordEnd//
+DescriptionStart:
+Checks for intersection of terrain between two positions. Returns true if intersects with terrain. Uses PositionAGL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/terrainIntersect
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+terrainIntersect [pos1, pos2]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$terrainIntersect [getPosATL player, getPosATL chopper]$/Code$
+%NextExample%
+$Code$_doesIntersect = terrainIntersect [ position player, position enemy1 ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(may 31, 2012)
+Please note the difference :
+terrainIntersect
+terrainIntersectASL
+lineIntersect s
+lineIntersect s With
+lineIntersect s Objs
+intersect
+%NextNote%
+(may 31, 2012)
+This command is CPU intensive on the engine, be careful with its use.
+%NextNote%
+(Jun 23, 2012)
+This command was changed to ATL and counterpart for ASL was added in build 94049.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+terrainIntersectASL
+//KeywordEnd//
+DescriptionStart:
+Checks for intersection of terrain between two positions. Returns true if intersects with terrain. Uses PositionASL
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/terrainIntersectASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+terrainIntersectASL [pos1, pos2]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$terrainIntersectASL [getPosASL player, getPosASL chopper]$/Code$
+%NextExample%
+$Code$_doesIntersect = terrainIntersectASL [ eyePos player, eyePos enemy1 ];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(may 31, 2012)
+Please note the difference :
+terrainIntersect
+terrainIntersectASL
+lineIntersect s
+lineIntersect s With
+lineIntersect s Objs
+intersect
+%NextNote%
+(may 31, 2012)
+This command is CPU intensive on the engine, be careful with its use.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+text
+//KeywordEnd//
+DescriptionStart:
+Creates a structured text containing the given plain text.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/text
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+text param
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_stxt2 = text "Hello world.";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Structured Text
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+text_location
+//KeywordEnd//
+DescriptionStart:
+Returns a location's text value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/text_location
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+text location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_townName = text myTownLocation;$/Code$
+%NextExample%
+$Code$_loc = text nearestLocation [ position player, "NameMarine"]; //"Marina Bay"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+textLog
+//KeywordEnd//
+DescriptionStart:
+Dump argument value to debugging output.
+Note : This command is non-functional in the retail version.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/textLog
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+textLog anything
+//RawSyntaxEnd//
+ExampleStart:
+$Code$textLog player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+textLogFormat
+//KeywordEnd//
+DescriptionStart:
+Debugging output. This command is non-functional in the retail version.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/textLogFormat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+textLogFormat [format, arg1, arg2,...]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tg
+//KeywordEnd//
+DescriptionStart:
+Identical to tan
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tg
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tg x
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+then
+//KeywordEnd//
+DescriptionStart:
+First or second element of array is executed depending on result of if condition. Result of the expression executed is returned as a result (result may be Nothing ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/then
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+throw
+//KeywordEnd//
+DescriptionStart:
+Throws an exception. The exception is processed by first catch block.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/throw
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+throw expression
+%NextRawSyntax%
+if
+//RawSyntaxEnd//
+ExampleStart:
+$Code$try { throw "invalid argument"} catch { hint str _exception};$/Code$
+%NextExample%
+$Code$// Since Arma 3 v1.53.133045:
+123 try { if (_this != 123) throw "invalid argument"} catch { hint str _exception};$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+time
+//KeywordEnd//
+DescriptionStart:
+Returns time elapsed since mission started (in seconds). The value is different on each client. If you need unified time, use serverTime.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/time
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+time
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_future = time + 30;
+waitUntil { time = _future}; /* continue after 30 seconds... */$/Code$
+%NextExample%
+$Code$// Wait until mission fully started:
+waitUntil { time 0};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+%NextNote%
+(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)
+%NextNote%
+(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.
+%NextNote%
+(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.)
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+timeMultiplier
+//KeywordEnd//
+DescriptionStart:
+Returns the value set with setTimeMultiplier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/timeMultiplier
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+timeMultiplier
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_multiplier = timeMultiplier ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - current time muliplier
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+titleCut
+//KeywordEnd//
+DescriptionStart:
+this command was obsoleted, use cutText instead.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/titleCut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+titleCut [text, type, speed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$titleCut ["Hello, how are you?","Plain Down",3];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+titleFadeOut
+//KeywordEnd//
+DescriptionStart:
+Terminate the title effect and set duration of the fade out phase to the given time.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/titleFadeOut
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+titleFadeOut duration
+//RawSyntaxEnd//
+ExampleStart:
+$Code$titleText ["Hi", "plain"]; titleFadeOut 2$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+titleObj
+//KeywordEnd//
+DescriptionStart:
+Shows object defined in global config in CfgTitles. Type may be one of:
+"PLAIN"
+"PLAIN DOWN"
+"BLACK"
+"BLACK FADED"
+"BLACK OUT"
+"BLACK IN"
+"WHITE OUT"
+"WHITE IN"
+See Title Effect Type for more information about these types.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/titleObj
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+titleObj [class, type, speed, showOnMap]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$titleObj ["BISLogo", "PLAIN"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+titleRsc
+//KeywordEnd//
+DescriptionStart:
+Resource title - Resource can be defined in Description.ext Also see cutRsc, with these two commands you can show two different resources at once.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/titleRsc
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+titleRsc [text, type, speed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$titleRsc [ BIS, PLAIN ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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'.
+%NextNote%
+(September 25, 2014)
+In OFP/CWA any x Rsc will hide all the elements of the HUD, including the map.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+titleText
+//KeywordEnd//
+DescriptionStart:
+Displays text across the screen.
+If used along with cutText two different texts (in different type styles) can be shown at once.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/titleText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+titleText [text, type, speed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$titleText ["Show this text", "PLAIN"];
+titleText ["Your message", "BLACK", 2];$/Code$
+%NextExample%
+$Code$// Use #define to display predefined messages:
+#define MY_MSG "This is my message.";
+titleText [MY_MSG, "PLAIN", 3];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / local
+//LocalityEnd//
+NoteStart:
+(November 21, 2014)
+The third parameter or 'speed', as it's called in the description, refers to the amount of time the message will be shown on-screen. Multiply each number by 10 to get the number of seconds it will be shown. You can even use floats as input, like 0.1, to show a message for only 1 second.
+Note : Calculating the time with that method does not include the time it takes to fade in/out, which is about 1 second unless you use numbers lower than 1.
+Note : Using anything lower than 0.001 seems to have no effect, or the effect is so little it's negligible.
+(A3 1.34.128075)
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+to
+//KeywordEnd//
+DescriptionStart:
+Continue sequence of 'for' command.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/to
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+toArray
+//KeywordEnd//
+DescriptionStart:
+Converts the supplied String into an Array of Numbers.
+The numbers in the created array are the decimal Unicode representations of characters.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/toArray
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+toArray string
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint format["%1",toArray("AaÅ’")]
+// returns "[65,97,338]"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+toLower
+//KeywordEnd//
+DescriptionStart:
+Converts the supplied string to all lowercase characters.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/toLower
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+toLower string
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint toLower("AaBb1")
+// returns "aabb1"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+toString
+//KeywordEnd//
+DescriptionStart:
+Converts the supplied Array of Numbers into a String.
+The numbers in the array to be converted are the decimal Unicode representations of characters.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/toString
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+toString array
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint toString [65,97,338];
+// returns "AaÅ’"$/Code$
+%NextExample%
+$Code$["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 10, 2015)
+Tabs and new lines can be created with toString [9] and toString [10], respectively. Alternatively, a new line can also be created with toString [92,110] ("\n"). If you save these strings into a variable, they can be manipulated like any other string. For example, the following code will work just fine and return the expected output:
+$Code$_tab = toString [9];
+for "_i" from 0 to 3 do
+{
+_tab = _tab + ( toString [9]);
+};
+copyToClipboard format ["x%1x",tab];$/Code$
+%NextNote%
+(August 25, 2015)
+While you can convert any String to Array with toArray command, only numbers from 1 to 55295 (not 65535 as expected) can be successfully converted to String with toString and then back to Array with toArray without loss of data.
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+toUpper
+//KeywordEnd//
+DescriptionStart:
+Converts the supplied string to all uppercase characters.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/toUpper
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+toUpper string
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint toUpper("AaBb1")
+// returns "AABB1"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerActivated
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerActivated
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerActivated trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( triggerActivated trg1) then {
+// Code
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+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).
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerActivation
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerActivation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerActivation trigger
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerArea
+//KeywordEnd//
+DescriptionStart:
+Returns currently monitored trigger area. 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.
+NOTE : Since Arma 3 v1.59.135137, triggerArea returns 3rd dimension for the monitored area. If height is not set, the value for it would be -1;
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerArea
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerArea trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_area = triggerArea sensor1; // result is [200, 120, 45, false]$/Code$
+%NextExample%
+$Code$// Since Arma 3 v1.59.135137:
+_area = triggerArea sensor1; // result is [200, 120, 45, false, -1];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array in format [a, b, angle, isRectangle, c], where:
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerAttachedVehicle
+//KeywordEnd//
+DescriptionStart:
+Returns vehicle attached to the trigger (for example using triggerAttachVehicle ).
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerAttachedVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerAttachedVehicle trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$return = triggerAttachedVehicle triggerName;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerAttachObject
+//KeywordEnd//
+DescriptionStart:
+Assigns a static object to the trigger. The activation source is changed to "STATIC".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerAttachObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerName triggerAttachObject objectId
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_trigger triggerAttachObject 1234;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerAttachVehicle
+//KeywordEnd//
+DescriptionStart:
+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".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerAttachVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerName triggerAttachVehicle objects
+//RawSyntaxEnd//
+ExampleStart:
+$Code$trigger triggerAttachVehicle [ player ];$/Code$
+%NextExample%
+$Code$trigger triggerAttachVehicle [];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerStatements
+//KeywordEnd//
+DescriptionStart:
+Returns trigger statements in the form [cond, activ, desactiv].
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerStatements
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerStatements trigger
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerText
+//KeywordEnd//
+DescriptionStart:
+Returns trigger text.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerText trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$result = triggerText triggerName;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerTimeout
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerTimeout
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerTimeout trigger
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerTimeoutCurrent
+//KeywordEnd//
+DescriptionStart:
+Returns trigger timeout or -1 if countdown is not in progress.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerTimeoutCurrent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerTimeoutCurrent trigger
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_remaining = triggerTimeoutCurrent _trigger;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(November 26, 2013)
+Triggers have their own schedule. If you create a trigger with timeout and try to read triggerTimeoutCurrent immediately it will return -1. This is because the countdown will not start until the next scheduled trigger check is due, and this could take up to 0.5 seconds.
+//NoteEnd//
+ReturnValueStart:
+Number - time remaining before trigger activation.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+triggerType
+//KeywordEnd//
+DescriptionStart:
+Returns trigger type.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/triggerType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+triggerType trigger
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(July 15, 2009)
+Arma 2 v. 1.02:
+triggerType _triggername gives null string as result for "GUARDED BY EAST" / "GUARDED BY WEST" type triggers.
+Expected result was "WEST G" / "EAST G" :(
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+true
+//KeywordEnd//
+DescriptionStart:
+Always true
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/true
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+true
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_var = true ;
+systemChat str _var; //true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+try
+//KeywordEnd//
+DescriptionStart:
+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 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$
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/try
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+try code
+%NextRawSyntax%
+args try code
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Exception Type
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+turretLocal
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/turretLocal
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle turretLocal turretPath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isLocal = vehicle player turretLocal [0];$/Code$
+%NextExample%
+$Code$if (heli turretLocal [1]) then {heli setVehicleAmmo 1};$/Code$
+%NextExample%
+$Code$if ( isNil {heli turretLocal [5]}) then { hint "Turret 5 is non-existent"};$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean or Nothing ( nil ) if the turret is non-existent
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+turretOwner
+//KeywordEnd//
+DescriptionStart:
+Returns id of the owner of the turret. On clients always returns 0.
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/turretOwner
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle turretOwner turretPath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ownerId = vehicle player turretOwner [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - owner id
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+turretUnit
+//KeywordEnd//
+DescriptionStart:
+Returns the unit in the vehicle turret. Driver turret [-1] is supported since Arma 3 v1.57.135045
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/turretUnit
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle turretUnit turretpath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicle turretUnit _thisTurret$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvAdd
+//KeywordEnd//
+DescriptionStart:
+Adds an item with given text to Tree View with given idc under specified path (zero based).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvAdd [idc, path, text]
+%NextRawSyntax%
+control tvAdd [path, text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvAdd [101, [0], "First item"];$/Code$
+%NextExample%
+$Code$_ctrl tvAdd [[], "Parent_A"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number - New path number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvClear
+//KeywordEnd//
+DescriptionStart:
+Removes all items from Tree View with given idc.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvClear
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvClear idc
+%NextRawSyntax%
+tvClear control
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvClear 101;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvCollapse
+//KeywordEnd//
+DescriptionStart:
+Collapses tree item pointed to by the path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvCollapse
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvCollapse [idc, [path]]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvCollapse [101, [0]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvCount
+//KeywordEnd//
+DescriptionStart:
+Returns childrens count of item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvCount
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvCount [idc, [path]]
+%NextRawSyntax%
+_ctrl tvCount [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvCount [101, [0]];$/Code$
+%NextExample%
+$Code$_ctrl tvCount [1,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvCurSel
+//KeywordEnd//
+DescriptionStart:
+Returns path to currently selected item. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvCurSel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvCurSel idc
+%NextRawSyntax%
+tvCurSel _ctrl
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvCurSel 101;$/Code$
+%NextExample%
+$Code$tvCurSel _ctrl;$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvData
+//KeywordEnd//
+DescriptionStart:
+Returns string data from item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvData [idc, [path]]
+%NextRawSyntax%
+control tvData [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvData [101, [0]];$/Code$
+%NextExample%
+$Code$(_display displayCtrl 101) tvData [0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvDelete
+//KeywordEnd//
+DescriptionStart:
+Removes an item on given path from Tree View with given idc.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvDelete
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvDelete [idc, [path]]
+%NextRawSyntax%
+_ctrl tvDelete [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvDelete [101, [0, 0]];$/Code$
+%NextExample%
+$Code$_ctrl tvDelete [0, 0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvExpand
+//KeywordEnd//
+DescriptionStart:
+Expands tree item pointed to by the path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvExpand
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvExpand [idc, [path]]
+%NextRawSyntax%
+_ctrl tvExpand [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl tvExpand [1];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvPicture
+//KeywordEnd//
+DescriptionStart:
+Returns name of picture from item pointed to by path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvPicture [idc, [path]]
+%NextRawSyntax%
+_ctrl tvPicture [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvPicture [101, [0]];$/Code$
+%NextExample%
+$Code$_ctrl tvPicture [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetCurSel
+//KeywordEnd//
+DescriptionStart:
+Sets cursor to given item on given path. IDC means id of parent Tree View. To deselect all items use [-1] for the path param ( available since Arma 3 v1.55.133898 )
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetCurSel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetCurSel [idc, path]
+%NextRawSyntax%
+control tvSetCurSel path
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetCurSel [101, [0]];$/Code$
+%NextExample%
+$Code$_ctrl tvSetCurSel [0,0,0];$/Code$
+%NextExample%
+$Code$[] spawn
+{
+disableSerialization ;
+_CT_TREE = findDisplay 46 ctrlCreate ["RscTree", -1];
+_CT_TREE ctrlSetPosition [0,0,0.3,1];
+_CT_TREE ctrlCommit 0;
+_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"];
+sleep 1;
+hint "SELECT [0,0,0]";
+_CT_TREE tvSetCurSel [0,0,0];
+sleep 2;
+hint "DESELECT ALL";
+_CT_TREE tvSetCurSel [-1];
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetData
+//KeywordEnd//
+DescriptionStart:
+Sets string data to item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetData
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetData [idc, [path], data]
+%NextRawSyntax%
+_ctrl tvSetData [ [path], data]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetData [101, [0], "Test data"];$/Code$
+%NextExample%
+$Code$_ctrl tvSetData [ [0,0,0], "Test data"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPicture
+//KeywordEnd//
+DescriptionStart:
+Sets picture to item selected by path. IDC means id of parent Tree View. Name is picture name. The picture is searched in the mission directory.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPicture
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetPicture [idc, path, name]
+%NextRawSyntax%
+control tvSetPicture [path, name]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetPicture [101, [0], "picture"];$/Code$
+%NextExample%
+$Code$_ctrl tvSetPicture [[0,0,0], getText ( configFile "CfgWeapons" "optic_NVS" "picture")];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetPictureColor
+//KeywordEnd//
+DescriptionStart:
+Sets the colour of the picture (set via tvSetPicture ) under the specified tree view path.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetPictureColor
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetPictureColor [idc, path, color]
+%NextRawSyntax%
+ctrl tvSetPictureColor [path, color]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetPictureColor [101, [0,2], [1,0,1,1]];$/Code$
+%NextExample%
+$Code$_tree tvSetPictureColor [[0,2], [1,0,1,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetText
+//KeywordEnd//
+DescriptionStart:
+Sets string text to item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetText [idc, path, text]
+%NextRawSyntax%
+control tvSetText [path, text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetText [101, [0], "Test data"];$/Code$
+%NextExample%
+$Code$_ctrl tvSetText [[0,0,0], "Test data"];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetTooltip
+//KeywordEnd//
+DescriptionStart:
+Sets the tooltip associated with the specified tree view path.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetTooltip
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetTooltip [idc, path, text]
+%NextRawSyntax%
+ctrl tvSetTooltip [path, text]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetTooltip [101, [0,2], "This is a tooltip"];$/Code$
+%NextExample%
+$Code$_tree tvSetTooltip [[0,2], "This is a tooltip"];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSetValue
+//KeywordEnd//
+DescriptionStart:
+Sets scalar data to item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSetValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvSetValue [idc, [path], val]
+%NextRawSyntax%
+_ctrl tvSetValue [ [path], val]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvSetValue [101, [0], 555];$/Code$
+%NextExample%
+$Code$_ctrl tvSetValue [ [0,0,0], 14];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSort
+//KeywordEnd//
+DescriptionStart:
+Sorts childrens of given item by item name ( tvText ). IDC means id of parent Tree View.
+Param reversed is optional.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSort
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+_ctrl tvSort [ [path], reversed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl tvSort [ [], false ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvSortByValue
+//KeywordEnd//
+DescriptionStart:
+Sorts children of given item by value from highest to lowest. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvSortByValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+_ctrl tvSortByValue [ [path], reversed]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_ctrl tvSortByValue [ [0], false ];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(May 24, 2015)
+Seems to only affect sorting of parent tree (path [])
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvText
+//KeywordEnd//
+DescriptionStart:
+Returns shown text in the item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvText [idc, path]
+%NextRawSyntax%
+control tvText path
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvText [101, [0]];$/Code$
+%NextExample%
+$Code$_ctrl tvText [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+tvValue
+//KeywordEnd//
+DescriptionStart:
+Returns scalar data from item on given path. IDC means id of parent Tree View.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/tvValue
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+tvValue [idc, [path]]
+%NextRawSyntax%
+_ctrl tvValue [path]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$tvValue [101, [0]];$/Code$
+%NextExample%
+$Code$_ctrl tvValue [0,0,0];$/Code$
+//ExampleEnd//
+LocalityStart:
+local / local
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+type
+//KeywordEnd//
+DescriptionStart:
+Returns a string of a location's class name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/type
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+type location
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_locationType = type myLocation$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+typeName
+//KeywordEnd//
+DescriptionStart:
+Returns the data type of an expression.
+The type is returned as on of the following all-uppercase strings:
+" ARRAY "
+" BOOL "
+" CODE "
+" CONFIG "
+" CONTROL "
+" DISPLAY "
+" GROUP "
+" LOCATION "
+" OBJECT "
+" SCALAR "
+" SCRIPT "
+" SIDE "
+" STRING "
+" TEXT "
+" TEAM_MEMBER "
+" NAMESPACE "
+They represent the available data types in ArmA.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/typeName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+typeName anything
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_msg = "hello"; _result = typeName _msg; //_result will be "STRING"$/Code$
+%NextExample%
+$Code$_unit = player ; _result = typeName _unit; //_result becomes "OBJECT"$/Code$
+%NextExample%
+$Code$// Values representing direct Data Types :
+hint typeName 0; //SCALAR
+hint typeName ""; //STRING
+hint typeName true ; //BOOL
+hint typeName []; //ARRAY
+hint typeName {}; //CODE
+hint typeName objNull ; //OBJECT
+hint typeName grpNull ; //GROUP
+hint typeName controlNull ; //CONTROL
+hint typeName teamMemberNull ; //TEAM_MEMBER
+hint typeName displayNull ; //DISPLAY
+hint typeName taskNull ; //TASK
+hint typeName locationNull ; //LOCATION
+hint typeName sideUnknown ; //SIDE
+hint typeName text ""; //TEXT
+hint typeName configFile ; //CONFIG
+hint typeName configNull ; //CONFIG (Since Arma 3 v1.53.133130)
+hint typeName missionNamespace ; //NAMESPACE$/Code$
+%NextExample%
+$Code$if ( typeName _this != "ARRAY") exitWith {
+hint "_this is not an array!"
+}
+//is the same as
+if ( typeName _this != typeName []) exitWith {
+hint "_this is not an array!"
+}
+//is the same as
+if !(_this isEqualType []) exitWith {
+hint "_this is not an array!"$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+typeOf
+//KeywordEnd//
+DescriptionStart:
+Returns the class name of a given object.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/typeOf
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+typeOf vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_class = typeOf _mi24$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 4, 2006)
+(CWR 1.90)Try using this on an object pre-placed in the mission editor (such as a house): hint format ["%1", typeOf object xxx] Now place an object in the editor, save the map, and open up the Mission.sqm. Find the line: vehicle = "XXX", and replace XXX with the name of the object that you found above. Save it, and load the map. (this method is no longer available since ArmA)
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+UAVControl
+//KeywordEnd//
+DescriptionStart:
+Get array with unit connected to vehicle and position in that vehicle.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/UAVControl
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+UAVControl uav
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - in format: [unit_object,position_string]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uiNamespace
+//KeywordEnd//
+DescriptionStart:
+Returns the global namespace attached to user interface.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uiNamespace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uiNamespace
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uiNamespace setVariable ["LIB_interruptDisplay", _display];$/Code$
+%NextExample%
+$Code$uiNamespace setVariable ["myVar", 46];
+with uiNamespace do {
+hint str myVar; //46
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+variables in uiNamespace are not lost between mission changes, they are carried over. Also take note that the server can make use of uiNamespace.
+%NextNote%
+(29 September, 2014)
+^The same can be said with parsingNamespace.
+//NoteEnd//
+ReturnValueStart:
+Namespace
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uiSleep
+//KeywordEnd//
+DescriptionStart:
+Suspend execution of script for given uitime. uiSleep is a sleep method to delay script execution where script time/simulation time is stopped. uiSleep is basically using the system time (uiTime more specifically) and not simulation time. So in the cases where sleep command would get stuck indefinitely, uiSleep can still be used to effectively delay script execution. For example in a mission briefing or an editor or when simulation is paused in general.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uiSleep
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uiSleep delay
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uiSleep 0.5$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 28, 2016)
+If the game is paused in SP (via ESC) the sleep command will stop working, to prevent that use uiSleep.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unassignCurator
+//KeywordEnd//
+DescriptionStart:
+Unassign curator (will destroy both sides of connection).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unassignCurator
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unassignCurator curatorObj
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unassignCurator myCurator;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+This scripting command must be executed on the server to work properly in multiplayer
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unassignItem
+//KeywordEnd//
+DescriptionStart:
+Unassigns existing item and tries to put it into inventory. If there is no space in inventory the item simply disappears.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unassignItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit unassignItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit unassignItem "NVGoggles";
+bluforUnit removeItem "NVGoggles";
+opforUnit unassignItem "NVGoggles_OPFOR";
+opforUnit removeItem "NVGoggles_OPFOR";
+independentUnit unassignItem "NVGoggles_INDEP";
+independentUnit removeItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unassignTeam
+//KeywordEnd//
+DescriptionStart:
+Unassigns the unit (in the case of a vehicle its commander unit) from his team. This is equal to unit assignTeam "MAIN".
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unassignTeam
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unassignTeam vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unassignTeam _soldier2$/Code$
+//ExampleEnd//
+LocalityStart:
+local / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unassignVehicle
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unassignVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unassignVehicle unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$unassignVehicle player ;$/Code$
+%NextExample%
+$Code${ unassignVehicle _x } forEach crew _vehiclename;
+// Will make all the occupants of a vehicle disembark$/Code$
+//ExampleEnd//
+LocalityStart:
+local / global
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+underwater
+//KeywordEnd//
+DescriptionStart:
+Return whether object is fully underwater. Works as intended only on objects, not units. For units it returns "isSwimming" and not "underwater"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/underwater
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+underwater object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_isSwimming = underwater player ;$/Code$
+%NextExample%
+$Code$_isUnderwater = eyePos player select 2 0;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(September 21, 2014)
+This command name is MISLEADING. It returns true when player is in swimming position and false otherwise. Player can be standing fully underwater and this command would return false or swimming with head above water and this command would return true.
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uniform
+//KeywordEnd//
+DescriptionStart:
+Returns name of uniform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uniform
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uniform unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_uniform = uniform _unit$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uniformContainer
+//KeywordEnd//
+DescriptionStart:
+Returns a cargo container of a unit's uniform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uniformContainer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uniformContainer unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str uniformContainer player ; //2df7dd00# 163941: dummyweapon.p3d$/Code$
+%NextExample%
+$Code$hint str getMagazineCargo uniformContainer player ;
+// [
+//[ 30Rnd_65x39_caseless_mag ],
+//[3]
+//]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - cargo container or NULL-object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uniformItems
+//KeywordEnd//
+DescriptionStart:
+Get array with all items (of any kind, even weapons) from uniform.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uniformItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uniformItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uniformItems player ;[
+"FirstAidKit",
+"30Rnd_65x39_caseless_mag",
+"30Rnd_65x39_caseless_mag",
+"30Rnd_65x39_caseless_mag"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+uniformMagazines
+//KeywordEnd//
+DescriptionStart:
+Get array with all magazines from uniform of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/uniformMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+uniformMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$uniformMagazines player ;[
+"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](3x)"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitAddons
+//KeywordEnd//
+DescriptionStart:
+Returns list with addons the unit belongs to.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitAddons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitAddons className
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str unitAddons typeOf player ; //["A3_Characters_F_BLUFOR"]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array - addon names
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitBackpack
+//KeywordEnd//
+DescriptionStart:
+Returns unit's backpack
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitBackpack
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitBackpack unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$myBackpack = unitBackpack player$/Code$
+%NextExample%
+$Code$clearMagazineCargo unitBackpack player$/Code$
+%NextExample%
+$Code$player action [ gear, unitBackpack player]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitPos
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitPos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitPos unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str unitPos _unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitReady
+//KeywordEnd//
+DescriptionStart:
+Check if the unit is ready. Unit is busy when it is given some command like move, until the command is finished.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitReady
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitReady unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_it = unitReady _soldierOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 :)
+%NextNote%
+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
+};
+%NextNote%
+(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
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitRecoilCoefficient
+//KeywordEnd//
+DescriptionStart:
+Returns recoil coefficient of a soldier.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitRecoilCoefficient
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unitRecoilCoefficient soldier
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myRecoil = unitRecoilCoefficient player$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(September 7, 2013)
+If the unit doesn't exist / is null, -1 is returned.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+units
+//KeywordEnd//
+DescriptionStart:
+Returns an array with all the units in the group or group of the unit. For a destroyed object an empty array is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/units
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+units groupOrunit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myUnitCount = count units group player ;$/Code$
+%NextExample%
+$Code$_isInMyGroup = _soldier1 in units player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(September 24, 2009)
+The returned array on MP clients is not updated when team members die (only when they are deleted). ( Tested on VBS2 )
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unitsBelowHeight
+//KeywordEnd//
+DescriptionStart:
+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;
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unitsBelowHeight
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+units unitsBelowHeight height
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_allOnGroudUnits = group player unitsBelowHeight 10;$/Code$
+%NextExample%
+$Code$_units = allUnits unitsBelowHeight 30;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(Nov 12, 2009)
+the height is calculated above terrain level (ATL), not water level or building level.
+//NoteEnd//
+ReturnValueStart:
+Array of Objects
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unlinkItem
+//KeywordEnd//
+DescriptionStart:
+Unassign and delete existing item from its assigned slot. If item does not exist or is not in the assigned slot, command simply fails.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unlinkItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit unlinkItem item
+//RawSyntaxEnd//
+ExampleStart:
+$Code$bluforUnit unlinkItem "NVGoggles";
+opforUnit unlinkItem "NVGoggles_OPFOR";
+independentUnit unlinkItem "NVGoggles_INDEP";$/Code$
+//ExampleEnd//
+LocalityStart:
+global / global
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unlockAchievement
+//KeywordEnd//
+DescriptionStart:
+Unlock the given achievement.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unlockAchievement
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unlockAchievement name
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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/
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+unregisterTask
+//KeywordEnd//
+DescriptionStart:
+Unregister a task type.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/unregisterTask
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+teamMember unregisterTask name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player unregisterTask taskName;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+updateDrawIcon
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/updateDrawIcon
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map updateDrawIcon [object,string identifier,color,offset,width,height,maintain size?,angle,shadow]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+updateMenuItem
+//KeywordEnd//
+DescriptionStart:
+Sets the text and command for the menu item. index is index as returned from addMenuItem command. command is optional.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/updateMenuItem
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+map updateMenuItem [menu item index,text,command]
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+updateObjectTree
+//KeywordEnd//
+DescriptionStart:
+Update the editor object tree.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/updateObjectTree
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+updateObjectTree map
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+useAudioTimeForMoves
+//KeywordEnd//
+DescriptionStart:
+Switch between elapsed game time and audio time being used as animation timer. Used for audio/animation synchronization.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/useAudioTimeForMoves
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+soldier useAudioTimeForMoves toggle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player useAudioTimeForMoves true$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorAdd
+//KeywordEnd//
+DescriptionStart:
+Adds two 3D vectors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorAdd
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorAdd vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( velocity unit1 vectorAdd velocity unit2);$/Code$
+%NextExample%
+$Code$[5,10,5] vectorAdd [5,5,10]; //returns [10,15,15]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorCos
+//KeywordEnd//
+DescriptionStart:
+Cosine of angle between two 3D vectors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorCos
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorCos vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_cos = getPos player vectorCos [0,0,2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorCrossProduct
+//KeywordEnd//
+DescriptionStart:
+Cross product of two 3D vectors.
+In layman's terms, if you have a polygon (surface) defined by 3 points, you can find a normal to it (just like terrain surfaceNormal ). To invert direction of the normal, swap arguments around.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorCrossProduct
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorCrossProduct vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vector = [1,1,1] vectorCrossProduct [2,2,2];$/Code$
+%NextExample%
+$Code$_vectorUp = [0,1,0] vectorCrossProduct [-1,0,0]; //[0,-0,1]$/Code$
+%NextExample%
+$Code$_vectorSide = ( vectorDir player ) vectorCrossProduct ( vectorUp player );$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(28 Jun, 2014)
+(ArmA3 1.22)Algorithm:
+$Code$
+Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+Result = [(y1 * z2) – (z1 * y2),(z1 * x2) – (x1 * z2),(x1 * y2) – (y1 * x2)];
+$/Code$
+It is recommended to use vectorCrossProduct instead of BIS_fnc_crossProduct.
+//NoteEnd//
+ReturnValueStart:
+Array - vector [x, y, z]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDiff
+//KeywordEnd//
+DescriptionStart:
+Subtracts one 3D vector from another. (vector1 - vector2)
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDiff
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorDiff vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str ( velocity car vectorDiff velocity bike);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDir
+//KeywordEnd//
+DescriptionStart:
+Return object's normalized direction vector in world space ( [x,y,z] ).
+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]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorDir objectName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dirVector = vectorDir _unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Vector3D
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDirVisual
+//KeywordEnd//
+DescriptionStart:
+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]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDirVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorDirVisual objectName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dirVector = vectorDirVisual _unit;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Vector3D
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDistance
+//KeywordEnd//
+DescriptionStart:
+Distance between two 3D vectors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorDistance vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_euclideanDist = getPosASL player vectorDistance [0,0,0];$/Code$
+%NextExample%
+$Code$( getPosASL _a) vectorDistance ( getPosASL _b); /* same as */( getPosATL _a) distance ( getPosATL _b);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDistanceSqr
+//KeywordEnd//
+DescriptionStart:
+Squared distance between two 3D vectors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDistanceSqr
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorDistanceSqr vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_distSqr = getPos player vectorDistanceSqr [0,0,2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorDotProduct
+//KeywordEnd//
+DescriptionStart:
+Dot product of two 3D vectors.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorDotProduct
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorDotProduct vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_dot = [1,0,1] vectorDotProduct [0,0,2];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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 vectorDotProduct instead of BIS_fnc_dotProduct.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorFromTo
+//KeywordEnd//
+DescriptionStart:
+Unit vector, equal to direction from vector1 to vector2. In other words this command produces vectorNormalized between given 2 points. To get a normal vector use vectorDiff.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorFromTo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector1 vectorFromTo vector2
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[1,2,3] vectorFromTo [4,5,6]; //[0.57735,0.57735,0.57735]
+//is the same as
+vectorNormalized ([4,5,6] vectorDiff [1,2,3]); //[0.57735,0.57735,0.57735]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(19 Jul, 2014)
+(ArmA3 1.26) Algorithm:
+$Code$
+Vector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];
+Result = [(x1 – x2)/( sqrt ((x1 – x2) ^ 2 + (y1 – y2) ^ 2 + (z1 – z2) ^ 2)),
+(y1 – y2)/( sqrt ((x1 – x2) ^ 2 + (y1 – y2) ^ 2 + (z1 – z2) ^ 2)),
+(z1 – z2)/( sqrt ((x1 – x2) ^ 2 + (y1 – y2) ^ 2 + (z1 – z2) ^ 2))];
+$/Code$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorMagnitude
+//KeywordEnd//
+DescriptionStart:
+Magnitude of a 3D vector.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorMagnitude
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorMagnitude vector
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_size = vectorMagnitude [0,3,4]; //5$/Code$
+%NextExample%
+$Code$_speed = vectorMagnitude velocity player ; // return velocity of player in m/s
+_speed = ( vectorMagnitude velocity player ) * 3.6; // return velocity of player in Km/h
+_speed = ( vectorMagnitude velocity player ) * 2.23694; // return velocity of player in mph$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(28 Jun, 2014)
+(ArmA3 1.22)Algorithm:
+$Code$
+Vector = [x,y,z];
+Result = sqrt ((x ^ 2) + (y ^ 2) + (z ^ 2))
+$/Code$
+It is recommended to use vectorMagnitude instead of BIS_fnc_magnitude.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorMagnitudeSqr
+//KeywordEnd//
+DescriptionStart:
+Squared magnitude of a 3D vector.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorMagnitudeSqr
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorMagnitudeSqr vector
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_sizeSqr = vectorMagnitudeSqr [0,3,4]; //25$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorMultiply
+//KeywordEnd//
+DescriptionStart:
+Multiplies 3D vector by a scalar.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorMultiply
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vector vectorMultiply scalar
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_newVector = [1,2,3] vectorMultiply 3; //[3,6,9]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorNormalized
+//KeywordEnd//
+DescriptionStart:
+Returns normalized vector (unit vector, vectorMagnitude = 1) of given vector. If given vector is 0 result is a 0 vector as well.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorNormalized
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorNormalized vector
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vectorNormalized [12345,7890,38383]; //[0.300481,0.192045,0.934254]
+vectorMagnitude [0.300481,0.192045,0.934254]; //1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(19 Jul, 2014)
+(ArmA3 1.26) Algorithm:
+$Code$
+Vector = [x,y,z];
+Result = [x/( sqrt (x ^ 2 + y ^ 2 + z ^ 2)), y/( sqrt (x ^ 2 + y ^ 2 + z ^ 2)), z/( sqrt (x ^ 2 + y ^ 2 + z ^ 2))]
+$/Code$
+In mathematics, a unit vector in a normed vector space is a vector whose length is 1.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorUp
+//KeywordEnd//
+DescriptionStart:
+Return object's up vector in world Position coordinates ( [x, y, z] ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorUp
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorUp objectName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$objVector = vectorUp myObject;;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(28 Jun, 2014)
+(ArmA3 1.22) Returns the pitch and bank of an object in degrees, use BIS_fnc_getPitchBank instead.
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vectorUpVisual
+//KeywordEnd//
+DescriptionStart:
+Return object's up vector in world Position coordinates ( [x, y, z] ) in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vectorUpVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vectorUpVisual objectName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vUp = vectorUpVisual vehicle player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vehicle
+//KeywordEnd//
+DescriptionStart:
+Vehicle in which given unit is mounted. If none, unit is returned.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle unitName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS
+? vehicle player != player : hint "Player is in a vehicle"$/Code$
+%NextExample%
+$Code$// SQF (see Notes)
+if ( vehicle player != player ) then { hint "Player is in a vehicle"; };$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vehicleChat
+//KeywordEnd//
+DescriptionStart:
+Type text to vehicle radio channel.
+This function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on them.
+Object parameter must be a vehicle, not a player.
+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").
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicleChat
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName vehicleChat text
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vehicle player vehicleChat "Show this text";$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vehicleRadio
+//KeywordEnd//
+DescriptionStart:
+Send message to vehicle radio channel. Message is defined in description.ext.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicleRadio
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName vehicleRadio name
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicleOne vehicleRadio messageOne$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vehicles
+//KeywordEnd//
+DescriptionStart:
+Returns a list of all vehicles.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicles
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicles
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_vehicles = vehicles ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 24, 2007)
+(A1 1.08 )This command is returning only vehicles and no soldiers.
+%NextNote%
+(July 15, 2011)
+(A2 1.51)It returns both empty and crewed vehicles.
+%NextNote%
+(december 22, 2013)
+(A3)It will also return "WeaponHolderSimulated" of dead bodies (weapon on the ground).
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vehicleVarName
+//KeywordEnd//
+DescriptionStart:
+Returns the name of the variable which contains a primary editor reference to this object. This is the variable given in the Insert Unit dialog / name field, in the editor. It can be changed using setVehicleVarName.
+If object refers to a vehicle that wasn't given a name in the editor, the return value is an empty string, "".
+Since it is possible to setVehicleVarName individually on each PC, the value of vehicleVarName returned will be local to the PC on which command is executed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vehicleVarName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleVarName object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint vehicleVarName player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+global / local
+//LocalityEnd//
+NoteStart:
+(April 19, 2015)
+To get variable names referencing an object in mission namespace:
+$Code$KK_fnc_objectVarNames = {
+private "_names";
+_names = [];
+{
+if ( missionNamespace getVariable _x isEqualTo _this) then {
+_names pushBack _x;
+};
+} forEach allVariables missionNamespace ;
+_names
+};
+//example
+myGroup = group player ;
+aGroup = group player ;
+hint str ( group player call KK_fnc_objectVarNames); //["agroup","mygroup"]$/Code$
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+velocity
+//KeywordEnd//
+DescriptionStart:
+Return velocity (speed vector) of Unit as an array with format [x, y, z]. Units are in metres per second.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/velocity
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+velocity vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vector = velocity jeep;$/Code$
+%NextExample%
+$Code$? ( velocity _plane1 select 2) 50 : hint "Aircraft is climbing up too fast!";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+velocityModelSpace
+//KeywordEnd//
+DescriptionStart:
+Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z]. Vector is in model space.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/velocityModelSpace
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+velocityModelSpace vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$velocityModelSpace _chopper;
+comment "Returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+%NextNote%
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+verifySignature
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/verifySignature
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+verifySignature filename
+//RawSyntaxEnd//
+ExampleStart:
+$Code$verifySignature "@MyAddon\Addons\SomeAddon.pbo";$/Code$
+%NextExample%
+$Code$verifySignature "@MyAddon\Somefnc.dll";$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vest
+//KeywordEnd//
+DescriptionStart:
+Returns name of vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vest
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vest unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_myVest = vest player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vestContainer
+//KeywordEnd//
+DescriptionStart:
+Returns a cargo container of a unit's vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vestContainer
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vestContainer unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str vestContainer player ; //2df7d600# 163942: dummyweapon.p3d$/Code$
+%NextExample%
+$Code$hint str getMagazineCargo vestContainer player ;
+// [
+//[
+//30Rnd_65x39_caseless_mag,
+//16Rnd_9x21_Mag,
+//HandGrenade,
+//APERSMine_Range_Mag,
+//SmokeShell,
+//SmokeShellGreen,
+//Chemlight_green
+//],[
+//2,
+//2,
+//2,
+//3,
+//1,
+//1,
+//2
+//]
+//]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object - cargo container or NULL-object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vestItems
+//KeywordEnd//
+DescriptionStart:
+Get array with all items (of any kind, even weapons) from vest.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vestItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vestItems unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$vestItems player ;[
+"30Rnd_65x39_caseless_mag",
+"30Rnd_65x39_caseless_mag",
+"16Rnd_9x21_Mag",
+"16Rnd_9x21_Mag",
+"HandGrenade",
+"HandGrenade",
+"SmokeShell",
+"SmokeShellGreen",
+"Chemlight_green",
+"Chemlight_green"
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+vestMagazines
+//KeywordEnd//
+DescriptionStart:
+Get array with all magazines from vest of the given unit.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/vestMagazines
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vestMagazines unit
+//RawSyntaxEnd//
+ExampleStart:
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+viewDistance
+//KeywordEnd//
+DescriptionStart:
+Returns the rendering distance.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/viewDistance
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+viewDistance
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint ("my view distance is " + str viewDistance + " meters");$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visibleCompass
+//KeywordEnd//
+DescriptionStart:
+Checks if the player has compass opened and visible
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visibleCompass
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visibleCompass
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( visibleCompass ) then { hint "Compass is visible"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visibleGPS
+//KeywordEnd//
+DescriptionStart:
+Checks if the player has GPS receiver opened and visible
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visibleGPS
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visibleGPS
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( visibleGPS ) then { hint "GPS is visible"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visibleMap
+//KeywordEnd//
+DescriptionStart:
+Return true if the main map is shown (active).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visibleMap
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visibleMap
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if (visibleMap) then {hint "You're showing the map !"}$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visiblePosition
+//KeywordEnd//
+DescriptionStart:
+Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visiblePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visiblePosition object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playerRenderedPos = visiblePosition player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionAGLS
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visiblePositionASL
+//KeywordEnd//
+DescriptionStart:
+Returns an object's rendered 3D position ASL (z value above sea level) in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visiblePositionASL
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visiblePositionASL object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$playerRenderedPosASL = visiblePositionASL player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format PositionASL
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+visibleWatch
+//KeywordEnd//
+DescriptionStart:
+Checks if the player has watch opened and visible
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/visibleWatch
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+visibleWatch
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( visibleWatch ) then { hint "Watch is visible"};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waitUntil
+//KeywordEnd//
+DescriptionStart:
+Suspend execution of function or SQF based script until 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 condition is satisfied and the loop is aborted.
+Because of this script suspension use spawn or execVM to safely execute code containing waitUntil.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waitUntil
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waitUntil condition
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waitUntil { not alive player };$/Code$
+%NextExample%
+$Code$_i = 0; waitUntil { _i = _i + 1; _i = 100 };$/Code$
+%NextExample%
+$Code$waitUntil { sleep 0.1; not alive player };$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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.
+%NextNote%
+(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$
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waves
+//KeywordEnd//
+DescriptionStart:
+Return waves value.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waves
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waves
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waveIntensity = waves ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointAttachedObject
+//KeywordEnd//
+DescriptionStart:
+Gets the object attached to the waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointAttachedObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointAttachedObject waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointAttachedObject [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointAttachedVehicle
+//KeywordEnd//
+DescriptionStart:
+Gets the vehicle attached to the waypoint.
+A vehicle can be attached to a waypoint by
+creating the waypoint on top of the vehicle (in the editor)
+using waypointAttachVehicle
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointAttachedVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointAttachedVehicle waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointAttachedVehicle [groupOne,1]$/Code$
+%NextExample%
+$Code$waypointAttachedVehicle [ group player, currentWaypoint group player ]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Object
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointAttachObject
+//KeywordEnd//
+DescriptionStart:
+Attaches a static object via it's numeric ID to the given waypoint.
+The alternative syntax is (at least) available since Arma 2.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointAttachObject
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint waypointAttachObject objectID
+%NextRawSyntax%
+waypoint waypointAttachObject object
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] waypointAttachObject 1234$/Code$
+%NextExample%
+$Code$_wp = group player addWaypoint [[1907.5,5746.5,0.00144196],0];
+_wp waypointAttachObject (( waypointPosition _wp) nearestObject 66220);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(June 20, 2014)
+In Arma 3 1.22 only the alternative syntax is working.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointAttachVehicle
+//KeywordEnd//
+DescriptionStart:
+Attaches a Unit to the given Waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointAttachVehicle
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoint waypointAttachVehicle vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$[_grp, 2] waypointAttachVehicle vehicle player$/Code$
+%NextExample%
+$Code$[_grp, 2] waypointAttachVehicle _soldier1$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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.
+//NoteEnd//
+ReturnValueStart:
+Nothing
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointBehaviour
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint behavior.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointBehaviour
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointBehaviour waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointBehaviour [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointCombatMode
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint combat mode.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointCombatMode
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointCombatMode waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointCombatMode [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointCompletionRadius
+//KeywordEnd//
+DescriptionStart:
+Gets the radius around the waypoint where the waypoint is completed.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointCompletionRadius
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointCompletionRadius waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_radius = waypointCompletionRadius [groupOne, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointDescription
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint description.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointDescription
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointDescription waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointDescription [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointFormation
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint formation.
+Possible values are:
+"NO CHANGE"
+"COLUMN"
+"STAG COLUMN"
+"WEDGE"
+"ECH LEFT"
+"ECH RIGHT"
+"VEE"
+"LINE"
+"FILE"
+"DIAMOND"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointFormation
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointFormation waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointFormation [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointHousePosition
+//KeywordEnd//
+DescriptionStart:
+Gets the house position assigned to the waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointHousePosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointHousePosition waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointHousePosition [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointLoiterRadius
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint loiter radius. Waypoint uses format Waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointLoiterRadius
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointLoiterRadius Waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_radius = waypointLoiterRadius [groupOne, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointLoiterType
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint loiter type. Waypoint uses format Waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointLoiterType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointLoiterType Waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_type = waypointLoiterType [groupOne, 1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointName
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint name.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointName waypoint
+//RawSyntaxEnd//
+ExampleStart:
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointPosition
+//KeywordEnd//
+DescriptionStart:
+Get Waypoint 's Position. Note : This function is identical to getWPPos.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointPosition
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointPosition waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wPos = waypointPosition [_groupOne, 1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - format Position
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypoints
+//KeywordEnd//
+DescriptionStart:
+Returns an array of waypoints for the specified unit/group.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypoints
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypoints groupName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypoints player ;$/Code$
+%NextExample%
+$Code$_wPosArray = waypoints group10;
+// could return [[EAST 1-1-A,0],[EAST 1-1-A,1],[EAST 1-1-A,2]]$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array of waypoints each in format Waypoint
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointScript
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint script.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointScript
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointScript waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointScript [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointsEnabledUAV
+//KeywordEnd//
+DescriptionStart:
+Checks if the UAV has waypoints enabled.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointsEnabledUAV
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointsEnabledUAV uav
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_uav enableUAVWaypoints false ;
+hint str waypointsEnabledUAV _uav; // returns false$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointShow
+//KeywordEnd//
+DescriptionStart:
+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
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointShow
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointShow waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wpShow = waypointShow [groupOne,1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - see description
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointSpeed
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint speed.
+Possible values are:
+"UNCHANGED"
+"LIMITED"
+"NORMAL"
+"FULL"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointSpeed
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointSpeed waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_speed = waypointSpeed [groupOne,1];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String - see description
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointStatements
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint statements.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointStatements
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointStatements waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointStatements [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointTimeout
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint timeout values.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointTimeout
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointTimeout waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointTimeout [groupOne,1]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointTimeoutCurrent
+//KeywordEnd//
+DescriptionStart:
+Gets the current waypoint timeout or -1 if countdown is not in progress.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointTimeoutCurrent
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointTimeoutCurrent waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_timeout = waypointTimeoutCurrent groupOne;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointType
+//KeywordEnd//
+DescriptionStart:
+Gets the waypoint type.
+Type can be:
+"MOVE"
+"DESTROY"
+"GETIN"
+"SAD"
+"JOIN"
+"LEADER"
+"GETOUT"
+"CYCLE"
+"LOAD"
+"UNLOAD"
+"TR UNLOAD"
+"HOLD"
+"SENTRY"
+"GUARD"
+"TALK"
+"SCRIPTED"
+"SUPPORT"
+"GETIN NEAREST"
+"DISMISS"
+"AND"
+"OR"
+More details at Waypoint types.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointType
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointType waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$waypointType [groupOne,1],$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 6, 2015)
+With the new sling loading in Arma 3, 2 new waypoint types are added aswell being:
+Drop Cargo and Lift Cargo.
+The names for these 2 waypoints are:
+"UNHOOK" and "HOOK".
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+waypointVisible
+//KeywordEnd//
+DescriptionStart:
+Returns the visibility of the waypoint.
+Returns 0 ( Number ) for a non valid waypoint.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/waypointVisible
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+waypointVisible waypoint
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_visible = waypointVisible [groupOne, 1];$/Code$
+%NextExample%
+$Code$_visible = waypointVisible [group player, currentWayPoint (group player)];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponAccessories
+//KeywordEnd//
+DescriptionStart:
+Get array with all items linked to a given weapon.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponAccessories
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+unit weaponAccessories weapon
+//RawSyntaxEnd//
+ExampleStart:
+$Code$player weaponAccessories primaryWeapon player ; ["","acc_pointer_IR","optic_Aco",""]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(October 26, 2014)
+To check if currently selected muzzle has a silencer:
+$Code$_silencer = player weaponAccessories currentMuzzle player select 0;
+hasSilencer = ! isNil "_silencer" {_silencer != ""};$/Code$
+%NextNote%
+(March 16, 2015)
+Since revision 129742, this command also returns an attached bipod.
+//NoteEnd//
+ReturnValueStart:
+Array - [silencer, laserpointer/flashlight, optics, bipod]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponCargo
+//KeywordEnd//
+DescriptionStart:
+Get array with weapons from ammo box (or any general weapon holder container).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weaponCargo box
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str weaponCargo backpackContainer player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - Format: ["WeaponType1", "WeaponType1", "WeaponType2"...]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponDirection
+//KeywordEnd//
+DescriptionStart:
+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]
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponDirection
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicleName weaponDirection weaponName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weaponVectorDir = player weaponDirection currentWeapon player ;$/Code$
+%NextExample%
+$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$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(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$
+%NextNote%
+(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.
+%NextNote%
+(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
+%NextNote%
+(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).
+//NoteEnd//
+ReturnValueStart:
+Array - format Vector3D
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponLowered
+//KeywordEnd//
+DescriptionStart:
+True if given soldier's weapon is lowered.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponLowered
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weaponLowered unit
+//RawSyntaxEnd//
+ExampleStart:
+$Code$isWeaponLowered = weaponLowered player;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Boolean
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weapons
+//KeywordEnd//
+DescriptionStart:
+Returns array of names of all Unit 's weapons.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weapons
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weapons vehicleName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wArray = weapons player ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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"]
+%NextNote%
+(06:01, 3 March 2007 (CET))
+%NextNote%
+(11 March 2011)
+Use weaponsTurret to determine the weapons of a non gunner/turret position.
+%NextNote%
+(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.)
+%NextNote%
+(18 June 2013)
+Lists also weapons in inventory from Arma 3 ver. 0.70.
+//NoteEnd//
+ReturnValueStart:
+Array of weapon names.
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponsItems
+//KeywordEnd//
+DescriptionStart:
+Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons.
+Since Arma 3 v1.21.124406 it is possible to query weapon holders and ammo crates with this command. If weapon has no magazine, an empty array [] is returned instead of magazine info.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponsItems
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weaponsItems vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$hint str weaponsItems player ;[
+[//=PRIMARY=
+"arifle_MX_ACO_pointer_F",//weapon
+"muzzle_snds_H",//suppressor
+"acc_pointer_IR",//laser
+"optic_Aco",//optics
+[//loaded magazine
+"30Rnd_65x39_caseless_mag",//mag type
+30//mag ammo count
+],
+"bipod_01_F_blk"//bipod
+],
+[//=SECONDARY=
+"launch_NLAW_F",
+"",
+"",
+"",
+[
+"NLAW_F",
+1
+],
+""
+],
+[//=HANDGUN=
+"hgun_P07_F",
+"muzzle_snds_L",
+"",
+"",
+[
+"16Rnd_9x21_Mag",
+11
+],
+""
+]
+]$/Code$
+%NextExample%
+$Code$hint str weaponsItems vehicle player ;[
+[
+"gatling_30mm",
+"",
+"",
+"",
+[
+"250Rnd_30mm_HE_shells",
+250
+],
+""
+],
+[
+"missiles_SCALPEL",
+"",
+"",
+"",
+[
+"8Rnd_LG_scalpel",
+8
+],
+""
+],
+[
+"rockets_Skyfire",
+"",
+"",
+"",
+[
+"38Rnd_80mm_rockets",
+38
+],
+""
+]
+]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 17, 2013)
+Be careful with this function. The weapons are listed in the order they were taken by the unit, with the most recent at the bottom of the array. Therefore, do not assume the first one is always the primary weapon, and so on.
+Also, here's how the primary weapon looks if it has a grenade launcher with a loaded grenade:
+$Code$[
+"arifle_MX_GL_F",
+"muzzle_snds_H",
+"acc_pointer_IR",
+"optic_Aco",
+[
+"30Rnd_65x39_caseless_mag",
+30
+],
+[
+"1Rnd_HE_Grenade_shell",
+1
+],
+""
+]$/Code$
+%NextNote%
+(October 25, 2014)
+The output of this command is an array of arrays and is as follows: (If the unit only has 1 weapon, output is an array within an array.)
+$Code$[
+[
+((_arr select 0) select 0) //STRING - The weapon's classname
+((_arr select 0) select 1) //STRING - Classname of the unit's equipped 'Muzzle/Barrel Accessory'
+((_arr select 0) select 2) //STRING - Classname of the unit's equipped 'Side Accessory'
+((_arr select 0) select 3) //STRING - Classname of the unit's equipped 'Top/Optic Accessory'
+((_arr select 0) select 4) //ARRAY - Magazine information
+[
+(((_arr select 0) select 4) select 0) //STRING - Classname of the loaded magazine
+(((_arr select 0) select 4) select 1) //SCALAR(Number) - Amount of bullets in the mag
+]
+] //If unit has more than one weapon, the output will follow the same pattern as above except with a new element
+]$/Code$
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponsItemsCargo
+//KeywordEnd//
+DescriptionStart:
+Returns an array with subarrays contains class names and also names of connected items of all the vehicle's cargo weapons in weaponsItems format. If weapon has no magazine, an empty array [] is returned instead of magazine info.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponsItemsCargo
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weaponsItemsCargo vehicle
+//RawSyntaxEnd//
+ExampleStart:
+$Code$weaponsItemsCargo vehicle player ;$/Code$
+%NextExample%
+$Code$weaponsItemsCargo _weaponholder;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponState
+//KeywordEnd//
+DescriptionStart:
+Returns the current weapon state as an array of strings in the following format [WeaponName, MuzzleName, ModeName, MagazineName, AmmoCount] (AmmoCount is Number ).
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponState
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weaponState unitName
+%NextRawSyntax%
+weaponState [vehicle, turretPath]
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weaponStatePlayer = weaponState player ;$/Code$
+%NextExample%
+$Code$_weaponStateVehiclePlayer = weaponState [ vehicle player,[0]];$/Code$
+%NextExample%
+$Code$_SecondPositionOfThefirstTurret = weaponState [ vehicle player,[0,0,1]];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(February 17, 2012)
+The command does not work for a vehicle driver - even if he has weapons.
+The command only works for vehicle positions, if there was an unit on the position before. When a position has been occupied once, the command even works when there is no unit currently at the given vehicle position.
+//NoteEnd//
+ReturnValueStart:
+Array - ["m16a4","m16a4","Single","30Rnd_556x45_Stanag",29]
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weaponsTurret
+//KeywordEnd//
+DescriptionStart:
+Returns all weapons of given turret. Use turret path [-1] for driver's turret.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weaponsTurret
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+vehicle weaponsTurret turretPath
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_weapons = vehicle player weaponsTurret [0,0]$/Code$
+%NextExample%
+$Code$_weapons = _tank weaponsTurret [0]$/Code$
+%NextExample%
+$Code$_driverWeapon = _ka50pilot weaponsTurret [-1]$/Code$
+%NextExample%
+$Code$_weaponsForAnyTurrentPosition = (vehicle player) weaponsTurret ((assignedVehicleRole player) select 1)$/Code$
+//ExampleEnd//
+LocalityStart:
+global / undefined
+//LocalityEnd//
+NoteStart:
+(11 March 2011)
+Use assignedVehicleRole in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4.
+%NextNote%
+(11 March 2011)
+funcGetTurretsWeapons = {
+private [ _result, _getAnyMagazines, _findRecurse, _class ];
+_result = [];
+_getAnyMagazines = {
+private [ _weapon, _mags ];
+_weapon = configFile CfgWeapons _this;
+_mags = [];
+{
+_mags = _mags + getArray (
+(if (_x == this ) then { _weapon } else { _weapon _x }) magazines
+)
+} foreach getArray (_weapon muzzles );
+_mags
+};
+_findRecurse = {
+private [ _root, _class, _path, _currentPath ];
+_root = (_this select 0);
+_path = +(_this select 1);
+for _i from 0 to count _root -1 do {
+_class = _root select _i;
+if (isClass _class) then {
+_currentPath = _path + [_i];
+{
+_result set [count _result, [_x, _x call _getAnyMagazines, _currentPath, str _class]];
+} foreach getArray (_class weapons );
+_class = _class turrets ;
+if (isClass _class) then {
+[_class, _currentPath] call _findRecurse;
+};
+};
+};
+};
+_class = (
+configFile CfgVehicles (
+switch (typeName _this) do {
+case STRING : {_this};
+case OBJECT : {typeOf _this};
+default {nil}
+}
+) turrets
+);
+[_class, []] call _findRecurse;
+_result;
+};
+This call:
+"M1A2_US_TUSK_MG_EP1" call funcGetTurretsWeapons
+will return all turrets weapons, its magazines and its paths:
+[
+[ M256, [ 20Rnd_120mmSABOT_M1A2, 20Rnd_120mmHE_M1A2 ], [0], bin\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret ],
+[ M240_veh, [ 100Rnd_762x51_M240, 1200Rnd_762x51_M240 ], [0], bin\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret ],
+[ M2BC, [ 100Rnd_127x99_M2 ], [0, 0], bin\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/CommanderOptics ],
+[ SmokeLauncher, [ SmokeLauncherMag ], [0, 0], bin\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/CommanderOptics ],
+[ M240_veh_2, [ 100Rnd_762x51_M240, 1200Rnd_762x51_M240 ], [0, 1], bin\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/LoaderTurret ]
+]
+denisko.redisko (denvdmj)
+//NoteEnd//
+ReturnValueStart:
+Array of Strings
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+weightRTD
+//KeywordEnd//
+DescriptionStart:
+Returns weight of RTD helicopter.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/weightRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+weightRTD helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_taruWeight = weightRTD taru// Returns [7000,300,1990.56,0,0]$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - [fuselage weight, crew weight, fuel weight, custom weight, weapons weight] (kilograms)
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+west
+//KeywordEnd//
+DescriptionStart:
+West side.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/west
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+west
+//RawSyntaxEnd//
+ExampleStart:
+$Code$// SQS:
+?((side _unit) == west ) : hint "This is a western unit!"$/Code$
+%NextExample%
+$Code$// SQF:
+if (( side _unit) == west ) then {
+hint "This is a western unit!";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Side
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+WFSideText
+//KeywordEnd//
+DescriptionStart:
+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"
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/WFSideText
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+WFSideText param
+//RawSyntaxEnd//
+ExampleStart:
+$Code$WFSideText player ;$/Code$
+%NextExample%
+$Code$WFSideText group player ;$/Code$
+%NextExample%
+$Code$WFSideText west$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(August 17, 2014)
+WF stands for Warfare
+//NoteEnd//
+ReturnValueStart:
+String - unlocalized side text value
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+while
+//KeywordEnd//
+DescriptionStart:
+Repeats Code while condition is true. A part of while do construct.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/while
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+wind
+//KeywordEnd//
+DescriptionStart:
+Returns the current wind vector (in m/s) as array [x, z, y].
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/wind
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+wind
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_windarray = wind ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+In OFP 1.96, wind speed and direction are directly related to overcast.
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+windDir
+//KeywordEnd//
+DescriptionStart:
+Returns the current wind azimuth.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/windDir
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+windDir
+//RawSyntaxEnd//
+ExampleStart:
+$Code$if ( windDir 45 || windDir 315) then {
+hint "I feel a northern wind";
+};$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number - Azimuth
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+windStr
+//KeywordEnd//
+DescriptionStart:
+Returns the current wind strength.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/windStr
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+windStr
+//RawSyntaxEnd//
+ExampleStart:
+$Code$10 setWindStr (0.5 * windStr );$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+wingsForcesRTD
+//KeywordEnd//
+DescriptionStart:
+Returns force produced by wings.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/wingsForcesRTD
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+wingsForcesRTD RTD_helicopter
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_wingForce = wingsForcesRTD _rtdHelo$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(March 19, 2015)
+Advanced helicopter flight model MUST be enabled for this function to work, otherwise it returns an empty array.
+Returns a 3x3 two-dimensional array. In the editor while climbing in a little bird, it returned this:
+[ [ 0.3993577, 11.72865, -30.21434 ], [ 0.3053164, 11.17272, -30.17695 ], [ 94.33984, 51.3513, -40.4908 ] ]
+//NoteEnd//
+ReturnValueStart:
+Array
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+with
+//KeywordEnd//
+DescriptionStart:
+Executes given code inside given namespace.
+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 save.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/with
+//WikiPageEnd//
+
+%NextListItem%
+
+KeywordStart:
+worldName
+//KeywordEnd//
+DescriptionStart:
+Return the name of the currently loaded world.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/worldName
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+worldName
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_name = worldName ;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+String
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+worldSize
+//KeywordEnd//
+DescriptionStart:
+Returns config size of the current world.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/worldSize
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+worldSize
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_size = worldSize ; //8192$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Number
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+worldToModel
+//KeywordEnd//
+DescriptionStart:
+Converts position from world space to object model space.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/worldToModel
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object worldToModel position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_relPos = myObject worldToModel [0,0,0];$/Code$
+%NextExample%
+$Code$_relPos = player worldToModel position car;$/Code$
+%NextExample%
+$Code$_relPos = car worldToModel [12000,5000];$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - PositionRelative
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+worldToModelVisual
+//KeywordEnd//
+DescriptionStart:
+Converts position from world space to object model space in render time scope.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/worldToModelVisual
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+object worldToModelVisual worldPosition
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_relPos = myObject worldToModelVisual [0,0,0];$/Code$
+%NextExample%
+$Code$_relPos = player worldToModelVisual position car;$/Code$
+%NextExample%
+$Code$_relPos = car worldToModelVisual [12000,5000];$/Code$
+%NextExample%
+$Code$_relPos = unit worldToModelVisual position tank;$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+//NoteEnd//
+ReturnValueStart:
+Array - PositionRelative
+//ReturnValueEnd//
+
+%NextListItem%
+
+KeywordStart:
+worldToScreen
+//KeywordEnd//
+DescriptionStart:
+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.
+//DescriptionEnd//
+WikiPageStart:
+https://community.bistudio.com/wiki/worldToScreen
+//WikiPageEnd//
+SyntaxStart:
+//SyntaxEnd//
+RawSyntaxStart:
+worldToScreen position
+//RawSyntaxEnd//
+ExampleStart:
+$Code$_screenPos = worldToScreen getPos soldier1;$/Code$
+%NextExample%
+$Code$_screenPos = worldToScreen ( player modelToWorld [0,10,0]);$/Code$
+//ExampleEnd//
+LocalityStart:
+undefined / undefined
+//LocalityEnd//
+NoteStart:
+(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
+//NoteEnd//
+ReturnValueStart:
+Array - Screen position [x,y] (see SafeZone for more info)
+//ReturnValueEnd//
+
+
+
+//KeywordListEnd//
\ No newline at end of file
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/actions/WikiAction.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/actions/WikiAction.java
new file mode 100644
index 00000000..5efa0fe5
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/actions/WikiAction.java
@@ -0,0 +1,66 @@
+package raven.sqdev.actions;
+
+import java.awt.Desktop;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.ImageData;
+
+import raven.sqdev.exceptions.SQDevException;
+import raven.sqdev.pluginManagement.ResourceManager;
+import raven.sqdev.util.SQDevInfobox;
+
+/**
+ * The action that will take the user to the given wiki page when activated
+ *
+ * @author Raven
+ *
+ */
+public class WikiAction extends Action {
+
+ /**
+ * The URL to the wiki page
+ */
+ private URL wikiURL;
+
+ public WikiAction(URL wikiURL) {
+ Assert.isTrue(wikiURL != null, "Nullargument in WikiAction!");
+
+ this.wikiURL = wikiURL;
+
+ setToolTipText("Opens the respective wiki page in the system's default browser");
+
+ setImageDescriptor(new ImageDescriptor() {
+
+ @Override
+ public ImageData getImageData() {
+ ImageData data = new ImageData(ResourceManager.getManager()
+ .getInternalResourceStream(ResourceManager.WIKI_ICON));
+
+ return data;
+ }
+ });
+ }
+
+ @Override
+ public void run() {
+ try {
+ if (Desktop.isDesktopSupported()) {
+ // open the wiki page
+ Desktop desktop = Desktop.getDesktop();
+ desktop.browse(wikiURL.toURI());
+ } else {
+ throw new SQDevException("The system does not support the desktop API!");
+ }
+ } catch (SQDevException | IOException | URISyntaxException e) {
+ // tell the user that something went wrong
+ SQDevInfobox info = new SQDevInfobox("Failed at opening the wiki page", e);
+ info.open();
+ }
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java
index f183421c..eb630974 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/activator/Activator.java
@@ -6,16 +6,18 @@
import raven.sqdev.pluginManager.SQDevPluginManager;
public class Activator extends AbstractUIPlugin {
-
+
private static BundleContext context;
-
+
static BundleContext getContext() {
return context;
}
-
+
/*
* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ *
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.
+ * BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
@@ -23,10 +25,12 @@ public void start(BundleContext bundleContext) throws Exception {
SQDevPluginManager.getManager().register(this);
}
-
+
/*
* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
@@ -35,5 +39,5 @@ public void stop(BundleContext bundleContext) throws Exception {
super.stop(bundleContext);
}
-
+
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java
new file mode 100644
index 00000000..42d136a6
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/miscellaneous/AdditionalKeywordProposalInformation.java
@@ -0,0 +1,152 @@
+package raven.sqdev.miscellaneous;
+
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.jface.action.Action;
+
+import raven.sqdev.actions.WikiAction;
+import raven.sqdev.infoCollection.base.Keyword;
+import raven.sqdev.infoCollection.base.SQFCommand;
+import raven.sqdev.infoCollection.base.SQFElement;
+import raven.sqdev.interfaces.IProposalInformationCategory;
+import raven.sqdev.misc.AbstractAdditionalProposalInformation;
+import raven.sqdev.misc.SQDev;
+import raven.sqdev.misc.StyledProposalInformationCategory;
+
+/**
+ * An additional proposal information based on a Keyword
+ *
+ * @author Raven
+ *
+ */
+public class AdditionalKeywordProposalInformation extends AbstractAdditionalProposalInformation {
+
+ /**
+ * The Keyword
this info will correspond to
+ */
+ private Keyword keyword;
+ /**
+ * The action for taking the user to the wiki
+ */
+ private Action wikiAction;
+
+ public AdditionalKeywordProposalInformation(Keyword keyword) {
+ if (keyword == null) {
+ throw new NullPointerException();
+ }
+
+ this.keyword = keyword;
+
+ // directly computes the categories
+ doComputeCategories();
+ }
+
+ @Override
+ protected ArrayList computeCategories(
+ ArrayList categories) {
+ // Description
+ if (keyword.hasDescription()) {
+ categories.add(
+ new StyledProposalInformationCategory("Description", keyword.getDescription()));
+ }
+
+ if (keyword instanceof SQFElement) {
+ SQFElement element = (SQFElement) keyword;
+
+ computeWikiAction(element.getWikiPage());
+
+ if (keyword instanceof SQFCommand) {
+ SQFCommand command = (SQFCommand) keyword;
+
+ // create overview page
+ String overviewContent = "";
+
+ // description
+ if (command.getDescription().length() > 100) {
+ overviewContent += command.getDescription().substring(0, 99) + "...\n\n";
+ } else {
+ overviewContent += command.getDescription() + "\n\n";
+ }
+
+ // syntax
+ overviewContent += SQDev.BOLD.getOpener() + "Possible syntax: "
+ + SQDev.BOLD.getCloser()
+ + command.getRawSytaxes().get(command.getRawSytaxes().size() - 1) + "\n\n";
+
+ // locality
+ if (command.isArgumentLocalityDefined()) {
+ overviewContent += SQDev.BOLD.getOpener() + "Argument locality: "
+ + SQDev.BOLD.getCloser() + command.getArgumentLocality() + "\n\n";
+ }
+ if (command.isEffectLocalityDefined()) {
+ // remove one newLine
+ overviewContent = overviewContent.substring(0, overviewContent.length() - 1);
+ overviewContent += SQDev.BOLD.getOpener() + "Effect locality: "
+ + SQDev.BOLD.getCloser() + command.getEffectLocality() + "\n\n";
+ }
+
+ // return value
+ overviewContent += SQDev.BOLD.getOpener() + "Return Value: "
+ + SQDev.BOLD.getCloser() + command.getReturnType();
+
+ if (!overviewContent.isEmpty()) {
+ categories.add(0,
+ new StyledProposalInformationCategory("Overview", overviewContent));
+ }
+
+
+ if (command.hasExample()) {
+ categories.add(new StyledProposalInformationCategory("Example",
+ command.getExamples()));
+ }
+
+ if (command.hasNote()) {
+ categories
+ .add(new StyledProposalInformationCategory("Note", command.getNotes()));
+ }
+
+ if (command.hasRawSyntax()) {
+ categories.add(new StyledProposalInformationCategory("Raw Syntax",
+ command.getRawSytaxes()));
+ }
+
+ if (command.hasSyntax()) {
+ // TODO: add syntaxes
+ }
+ }
+ }
+
+ return categories;
+ }
+
+ /**
+ * Gets the Keyword
this info corresponds to
+ */
+ public Keyword getKeyword() {
+ return keyword;
+ }
+
+ /**
+ * Computes the WikiPage
that can be used in a respective
+ * toolbar
+ *
+ * @param wiki
+ * The URL
to the wikiPage
+ */
+ private void computeWikiAction(URL wiki) {
+ if (wiki == null) {
+ return;
+ }
+
+ wikiAction = new WikiAction(wiki);
+ }
+
+ /**
+ * Gets the Action
that should be added to the toolbar
+ */
+ public Action getToolbarAction() {
+ return wikiAction;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java
new file mode 100644
index 00000000..34dc1614
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/ResourceManager.java
@@ -0,0 +1,535 @@
+package raven.sqdev.pluginManagement;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.jar.JarInputStream;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+
+import raven.sqdev.exceptions.SQDevCoreException;
+import raven.sqdev.exceptions.SQDevException;
+import raven.sqdev.util.FileUtil;
+
+/**
+ * This ResourceManager
is responsible for managing the resources
+ * of this plugin including reading and writing
+ *
+ * @author Raven
+ *
+ */
+public class ResourceManager {
+ /**
+ * The extension used for backup resources
+ */
+ private static final String BACKUP_EXTENSION = ".back";
+
+ /**
+ * The ResourceManager itself
+ */
+ private static ResourceManager manager;
+
+ /**
+ * The name of the resource containing info about the versions of the
+ * plugins
+ */
+ public static final String VERSION_RESOURCE = "versions.txt";
+ /**
+ * The internal path to the icons folder
+ */
+ public static final String ICON_FOLDER = "/resources/icons";
+ /**
+ * The internal path to the wiki icon resource
+ */
+ public static final String WIKI_ICON = ICON_FOLDER + "/sqdevWikiIcon.png";
+ /**
+ * The internal path to the project icon resource
+ */
+ public static final String PROJECT_ICON = ICON_FOLDER + "/prj_obj.gif";
+ /**
+ * The internal path to the export icon resource
+ */
+ public static final String EXPORT_ICON = ICON_FOLDER + "/sqdevExportIcon.png";
+ /**
+ * The internal path to the import icon resource
+ */
+ public static final String IMPORT_ICON = ICON_FOLDER + "/sqdevImportIcon.png";
+ /**
+ * The internal path to the sqdev-file icon resource
+ */
+ public static final String SQDEVFILE_ICON = ICON_FOLDER + "/sqdevFileIcon.png";
+ /**
+ * The internal path to the SQF icon resource
+ */
+ public static final String SQF_ICON = ICON_FOLDER + "/SQF_image.gif";
+ /**
+ * The internal path to the SQFCommand icon resource
+ */
+ public static final String SQFCOMMAND_ICON = ICON_FOLDER + "/SQFCommandIcon.png";
+
+ private ClassLoader loader;
+ private URL locationURL;
+ private URI locationURI;
+ /**
+ * The path to the resource location of this plugin
+ */
+ private IPath resourceLocation;
+ /**
+ * The path to the backup resource location of this plugin containg older
+ * versions of resources
+ */
+ private IPath backupResourceLocation;
+
+ /**
+ * Creates an instance of this ResourceManager
+ */
+ private ResourceManager() {
+ setLoader(this.getClass().getClassLoader());
+ setLocationURL(this.getClass().getProtectionDomain().getCodeSource().getLocation());
+
+ try {
+ setLocationURI(new URI(getLocationURL().toString().replace(" ", "%20")));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+
+ setLocationURI(null);
+ }
+
+ initializeResourceLocation();
+ }
+
+ /**
+ * Gets the ResourceManager
+ */
+ public static final ResourceManager getManager() {
+ if (manager == null) {
+ manager = new ResourceManager();
+ }
+
+ return manager;
+ }
+
+ /**
+ * Gets the hard coded resource stored directly in this plugin's jar
+ *
+ * @param path
+ * The path within this plugin leading to the resource. (has to
+ * start with "/resources")
+ * @return The InputStream
to this resource or
+ * null
if this resource couldn't be found
+ */
+ public InputStream getInternalResourceStream(String path) {
+ if (!path.startsWith("/resources")) {
+ throw new IllegalArgumentException("Given path has to reference the resource-folder!");
+ }
+
+ InputStream in = null;
+
+ switch (getLocationURI().getScheme()) {
+ case "file":
+ in = getLoader().getResourceAsStream(path);
+ break;
+
+ case "jar":
+ try {
+ in = new JarInputStream(getLoader().getResourceAsStream(path));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ break;
+ }
+
+ return in;
+ }
+
+ /**
+ * Updates the resource file of the given name with the given content after
+ * backing up the current content of the resource file.
+ * Note: There's always only one backup for each resource file
+ *
+ * @param name
+ * The name of the resource. If it daoes not contain an extension
+ * the extension ".txt" will be added.
+ * If no such resource does exist it will be created.
+ * @param content
+ * The new content of this resourcefile
+ * @throws IOException
+ * @throws SQDevException
+ */
+ public void updateResource(String name, String content) throws IOException, SQDevException {
+ if (!resourceExists(name)) {
+ // create resource + backup
+ createResource(name);
+ }
+
+ // make windows compatible
+ content = content.replace("\r", "").replace("\n", "\r\n");
+
+ // backup resource
+ backupResource(name);
+
+ // write new content
+ FileWriter writer = new FileWriter(getResource(name).toFile());
+
+ writer.write(content);
+
+ writer.close();
+ }
+
+ /**
+ * Gets an InputStream
to the resource with the given name
+ *
+ * @param name
+ * The name of the resource. If it does not contain an exntension
+ * the extension ".txt" will be added.
+ * @return The InputStream
to this resource file or
+ * null
if the resource couldn't be found
+ */
+ public InputStream getResourceStream(String name) {
+ if (resourceExists(name)) {
+ try {
+ return new FileInputStream(getResource(name).toFile());
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets an InputStream
to the backup resource with the given
+ * name
+ *
+ * @param name
+ * The name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return The InputStream
to this backup resource file or
+ * null
if the resource couldn't be found
+ */
+ public InputStream getBackupResourceStream(String name) {
+ if (resourceExists(name)) {
+ try {
+ return new FileInputStream(getBackupResource(name).toFile());
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the content of the resource file with the given name
+ *
+ * @param name
+ * The name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return The content of this resource or null
if the
+ * gathering of this resource's content was not possible.
+ */
+ public String getResourceContent(String name) {
+ if (!resourceExists(name)) {
+ return null;
+ }
+
+ try {
+ return FileUtil.getContent(getResource(name).toFile());
+ } catch (SQDevException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ }
+
+ /**
+ * Gets the content of the backup resource file corresponding to the given
+ * name
+ *
+ * @param nameThe
+ * name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return
+ */
+ public String getBackupResourceContent(String name) {
+ if (!resourceExists(name)) {
+ return null;
+ }
+
+ try {
+ return FileUtil.getContent(getBackupResource(name).toFile());
+ } catch (SQDevException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ }
+
+ private ClassLoader getLoader() {
+ return loader;
+ }
+
+ private void setLoader(ClassLoader loader) {
+ this.loader = loader;
+ }
+
+ public URL getLocationURL() {
+ return locationURL;
+ }
+
+ private void setLocationURL(URL locationURL) {
+ this.locationURL = locationURL;
+ }
+
+ public URI getLocationURI() {
+ return locationURI;
+ }
+
+ private void setLocationURI(URI locationURI) {
+ this.locationURI = locationURI;
+ }
+
+ /**
+ * Initializes the resource location
+ */
+ private void initializeResourceLocation() {
+ // make sure the resource location exists
+ IPath stateLocation = Platform.getStateLocation(Platform.getBundle("raven.sqdev.util"));
+ resourceLocation = stateLocation.append("resources");
+ backupResourceLocation = resourceLocation.append("Backup");
+
+ if (!resourceLocation.toFile().exists()) {
+ // create resource location
+ resourceLocation.toFile().mkdir();
+
+ if (!backupResourceLocation.toFile().exists()) {
+ // create backup resource location
+ backupResourceLocation.toFile().mkdir();
+ }
+
+ // initialize necessary resources
+ try {
+ createResource("SQFKeywords.txt");
+
+ String content = FileUtil
+ .readAll(getInternalResourceStream("/resources/sqf/SQFKeywords.txt"));
+
+ // put content in respective resource files
+ FileWriter writer = new FileWriter(getResource("SQFKeywords.txt").toFile());
+ writer.write(content);
+ writer.close();
+
+ writer = new FileWriter(getBackupResource("SQFKeywords.txt").toFile());
+ writer.write(content);
+ writer.close();
+
+ } catch (IOException e) {
+ throw new SQDevCoreException("Failed at creating resources", e);
+ }
+ }
+
+ if (!backupResourceLocation.toFile().exists()) {
+ // create backup resource location
+ backupResourceLocation.toFile().mkdir();
+ }
+
+ if (!resourceExists(VERSION_RESOURCE)) {
+ try {
+ createResource(VERSION_RESOURCE);
+ } catch (IOException e) {
+ throw new SQDevCoreException("Failed at initializing reosurce location!", e);
+ }
+ }
+ }
+
+ /**
+ * Creates a resource file with the given name
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ * @return True
if the creation was successfull
+ * @throws IOException
+ */
+ public boolean createResource(String name) throws IOException {
+ if (!name.contains(".")) {
+ // make a text document out of it
+ name += ".txt";
+ }
+
+ IPath resourcePath = resourceLocation.append(name);
+ IPath backupResourceFile = backupResourceLocation.append(name + BACKUP_EXTENSION);
+
+ if (!resourcePath.toFile().exists()) {
+ resourcePath.toFile().createNewFile();
+ backupResourceFile.toFile().createNewFile();
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Gets the path to the resource with the given name
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ * @return The Path
to the resource fileor null
if
+ * there is no such resourcefile
+ */
+ private IPath getResource(String name) {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ IPath resourcePath = resourceLocation.append(name);
+
+ if (resourcePath.toFile().exists()) {
+ return resourcePath;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the path to the backup resource with the given name
+ *
+ * @param name
+ * The name of the backup resource file. If it does not contain
+ * an extension the extension ".txt" will be added
+ * @return The Path
to the resource fileor null
if
+ * there is no such resourcefile
+ */
+ private IPath getBackupResource(String name) {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ if (!name.endsWith(BACKUP_EXTENSION)) {
+ // add the backup extension
+ name += BACKUP_EXTENSION;
+ }
+
+ IPath backupResourcePath = backupResourceLocation.append(name);
+
+ if (backupResourcePath.toFile().exists()) {
+ return backupResourcePath;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Will write the current content of the resource with the given name into
+ * it's corresponding backup resource file
+ *
+ * @param name
+ * The name of the backup resource file. If it does not contain
+ * an extension the extension ".txt" will be added
+ * @throws SQDevException
+ */
+ private void backupResource(String name) throws SQDevException {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ try {
+ if (!resourceExists(name)) {
+ // create resources if they don't exist
+ createResource(name);
+
+ return;
+ }
+
+ // get the content of current resource
+ String content = FileUtil.getContent(getResource(name).toFile());
+
+ // write the content into the backup
+ FileWriter writer = new FileWriter(getBackupResource(name).toFile());
+ writer.write(content);
+ writer.close();
+
+ } catch (IOException e) {
+ throw new SQDevCoreException("Failed at backing up resource!", e);
+ }
+ }
+
+ /**
+ * Checks if a resource with the given name and it's corresponding backup
+ * resource does exist
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ */
+ public boolean resourceExists(String name) {
+ return (getResource(name) != null && getBackupResource(name) != null);
+ }
+
+ /**
+ * Checks if the given resource is already accessed as it's backup resource
+ * (= the content of the resource is equal to the content of it's backup
+ * resource)
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ */
+ public boolean isOnBackup(String name) {
+ try {
+ String content = FileUtil.getContent(getResource(name).toFile());
+ String backup = FileUtil.getContent(getBackupResource(name).toFile());
+
+ // compare the two
+ return content.equals(backup);
+ } catch (SQDevException e) {
+ throw new SQDevCoreException(e);
+ }
+ }
+
+ /**
+ * Switches the given resource to it's backup resource (The content of the
+ * backup resource is transferred to the resource itself). This cannot be
+ * undone!
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added.
+ * @return True
if switching was successful
+ */
+ public boolean switchToBackup(String name) {
+ if (!resourceExists(name)) {
+ return false;
+ }
+
+ try {
+ // get backup content
+ String content = FileUtil.getContent(getBackupResource(name).toFile());
+
+ // write the content into the current resource
+ FileWriter writer = new FileWriter(getResource(name).toFile());
+ writer.write(content);
+ writer.close();
+
+ // all good
+ return true;
+ } catch (SQDevException | IOException e) {
+ e.printStackTrace();
+
+ // smoething went wrong
+ return false;
+ }
+ }
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java
new file mode 100644
index 00000000..72c824f7
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/SQDevEclipseEventManager.java
@@ -0,0 +1,136 @@
+package raven.sqdev.pluginManagement;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * A manager for general eclipse events where certain behaviour patterns can be
+ * registered for a certain event
+ *
+ * @author Raven
+ *
+ */
+public class SQDevEclipseEventManager {
+ /**
+ * The manager instance
+ */
+ private static SQDevEclipseEventManager manager;
+
+ private List jobs;
+
+ private SQDevEclipseEventManager() {
+ jobs = new ArrayList(0);
+
+ PlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {
+
+ @Override
+ public boolean preShutdown(IWorkbench workbench, boolean forced) {
+ AtomicBoolean shutDown = new AtomicBoolean(true);
+
+ for (Job currentJob : jobs) {
+ if (currentJob != null && currentJob.getState() == Job.RUNNING) {
+ // inform about currently running jobs and
+ // offers to terminate them
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ MessageBox box = new MessageBox(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(),
+ SWT.ICON_WARNING | SWT.YES | SWT.NO);
+
+ box.setText("Running Job");
+ box.setMessage("The Job \"" + currentJob.getName()
+ + "\" is still running!\n\n"
+ + " Do you want to cancel this job now?");
+
+ int result = box.open();
+
+ switch (result) {
+ case SWT.YES:
+ boolean running = false;
+
+ for (Job current : jobs) {
+ running = !current.cancel();
+ }
+
+ // if one job is running then
+ // kill all after 3 secs
+
+ if (running) {
+ try {
+ currentJob.getThread().join(3000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ // kill Thread after max. 3
+ // secs
+ for (Job current : jobs) {
+ current.getThread().interrupt();
+ }
+ }
+
+ break;
+
+ default:
+ // don't close
+ shutDown.set(false);
+ }
+ }
+ });
+
+ break;
+ }
+ }
+
+ return shutDown.get();
+ }
+
+ @Override
+ public void postShutdown(IWorkbench workbench) {
+ }
+ });
+ }
+
+ /**
+ * Gets the SQDevManager for eclipse events
+ *
+ * @return The
+ */
+ public static SQDevEclipseEventManager getManager() {
+ if (manager == null) {
+ manager = new SQDevEclipseEventManager();
+ }
+
+ return manager;
+ }
+
+ /**
+ * Adds a job to the list of jobs being checked when eclipse is closed.
+ * If any running jobs are registered while closing eclipse a popup will
+ * appear asking if these jobs should be terminated. If so a cancel request
+ * will be send to them and then the jobs have 3secs to terminate themselve.
+ * After this time their Thread will be interrupted
+ *
+ * @param job
+ * The job to register
+ */
+ public void registerCloseSuspendingJob(Job job) {
+ // add the job
+ jobs.add(job);
+
+ // check for null jobs and remove them
+ while (jobs.contains(null)) {
+ jobs.remove(null);
+ }
+ }
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/VersionManager.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/VersionManager.java
new file mode 100644
index 00000000..82347912
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/pluginManagement/VersionManager.java
@@ -0,0 +1,158 @@
+package raven.sqdev.pluginManagement;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.osgi.framework.Version;
+
+import raven.sqdev.constants.ESQDevPlugin;
+import raven.sqdev.exceptions.SQDevCoreException;
+import raven.sqdev.exceptions.SQDevException;
+import raven.sqdev.exceptions.SQDevSyntaxException;
+import raven.sqdev.interfaces.IVersionListener;
+import raven.sqdev.misc.VersionChangeEvent;
+
+/**
+ * A manager dealing with the plugin versions inside the SQDev feature
+ *
+ * @author Raven
+ *
+ */
+public class VersionManager {
+
+ /**
+ * A list of listeners
+ */
+ private List listeners;
+
+ /**
+ * The manager instance itself
+ */
+ private static VersionManager manager;
+
+ private VersionManager() {
+ listeners = new ArrayList(0);
+ }
+
+ // TODO: check versions on start
+
+ /**
+ * Gets the manager instance
+ */
+ public static VersionManager getManager() {
+ if (manager == null) {
+ manager = new VersionManager();
+ }
+
+ return manager;
+ }
+
+ /**
+ * Registers an appropriate listener if it has not been before
+ *
+ * @param listener
+ * The Listener to register
+ */
+ public void addVersionListener(IVersionListener listener) {
+ if (!listeners.contains(listener)) {
+ listeners.add(listener);
+ }
+ }
+
+ /**
+ * Removes the given listener
+ *
+ * @param listener
+ * The listener to remove
+ */
+ public void removeVersionListener(IVersionListener listener) {
+ listeners.remove(listener);
+ }
+
+ /**
+ * Checks whether the current plugin versions are the same as listed in the
+ * respective resource and if not it will update them after notifying the
+ * IVersionListeners
that a new version of a plugin has started
+ */
+ public void checkVersions() {
+ ResourceManager manager = ResourceManager.getManager();
+
+ String content = manager.getResourceContent(ResourceManager.VERSION_RESOURCE);
+
+ String versionContent = "";
+ boolean versionHasChanged = false;
+
+ if (content.isEmpty()) {
+ // versions of all plugins have changed
+ versionHasChanged = true;
+
+ for (ESQDevPlugin current : ESQDevPlugin.values()) {
+ // assume that the fictional version 0.0.0 was the old version
+ versionChanged(current, new Version(0, 0, 0), current.getVersion());
+
+ versionContent += current.getID() + ": " + current.getVersion() + "\n";
+ }
+ } else {
+ for (String currentLine : content.split("\n")) {
+ currentLine = currentLine.trim();
+
+ if (!currentLine.contains(":")) {
+ // the colon has to be present
+ throw new SQDevSyntaxException(
+ "Wrong syntax in resource: " + ResourceManager.VERSION_RESOURCE);
+ }
+
+ String id = currentLine.substring(0, currentLine.indexOf(":"));
+ Version storedVersion = Version
+ .valueOf(currentLine.substring(currentLine.indexOf(":") + 1));
+ ESQDevPlugin plugin = ESQDevPlugin.resolve(id);
+
+ if (storedVersion == null || plugin == null) {
+ // these values have to be resolvable
+ throw new SQDevSyntaxException(
+ "Wrong syntax in resource: " + ResourceManager.VERSION_RESOURCE);
+ }
+
+ if (storedVersion.compareTo(plugin.getVersion()) != 0) {
+ // version has changed
+ versionChanged(plugin, storedVersion, plugin.getVersion());
+
+ versionHasChanged = true;
+ }
+ }
+ }
+
+ // store current versions
+ if (versionHasChanged) {
+ if (versionContent.isEmpty()) {
+ // gather new versions
+ for (ESQDevPlugin current : ESQDevPlugin.values()) {
+ versionContent += current.getID() + ": " + current.getVersion() + "\n";
+ }
+ }
+ // update the versions file
+ try {
+ manager.updateResource(ResourceManager.VERSION_RESOURCE, versionContent);
+ } catch (IOException | SQDevException e) {
+ throw new SQDevCoreException("Couldn't update version list!", e);
+ }
+ }
+ }
+
+ /**
+ * Notifies the listeners that a version has changed
+ *
+ * @param plugin
+ * The ESQDevPlugin
this change occured on
+ * @param oldVersion
+ * The old version
+ * @param newVersion
+ * The new version
+ */
+ private void versionChanged(ESQDevPlugin plugin, Version oldVersion, Version newVersion) {
+ for (IVersionListener currentListener : listeners) {
+ currentListener.versionChanged(new VersionChangeEvent(plugin, oldVersion, newVersion));
+ }
+ }
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAnnotation.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAnnotation.java
index d9cc450a..e1a29194 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAnnotation.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAnnotation.java
@@ -10,13 +10,18 @@
*/
public enum ESQDevFileAnnotation {
/**
- * Defines a file that shouldbe ignored during export
+ * Defines a file that should be ignored during export
*/
IGNORE {
@Override
public String toString() {
return "ignore";
}
+
+ @Override
+ public String getDescription() {
+ return "Defines a file that should be ignored during export";
+ }
},
/**
* Defines a file that should not get deleted during the clean of an export
@@ -26,8 +31,12 @@ public String toString() {
public String toString() {
return "preserve";
}
- }
- ;
+
+ @Override
+ public String getDescription() {
+ return "Defines a file that should not get deleted during the clean of an export";
+ }
+ };
/**
* The values of this annotation
@@ -36,7 +45,9 @@ public String toString() {
/**
* Checks if the given line contains a valid annotation in a SQDevFile.
- * @param inputLine The line to be checked
+ *
+ * @param inputLine
+ * The line to be checked
* @return True
if it's an annotation
*/
public static boolean isAnnotation(String inputLine) {
@@ -49,8 +60,8 @@ public static boolean isAnnotation(String inputLine) {
String possibleAnnotation = (inputLine.contains(" "))
? inputLine.substring(1, inputLine.indexOf(" ")) : inputLine.substring(1);
- for(ESQDevFileAnnotation current : ESQDevFileAnnotation.values()) {
- if(current.toString().equals(possibleAnnotation)) {
+ for (ESQDevFileAnnotation current : ESQDevFileAnnotation.values()) {
+ if (current.toString().equals(possibleAnnotation)) {
return true;
}
}
@@ -67,6 +78,7 @@ public ArrayList getValues() {
/**
* Sets the list of values of this annotation
+ *
* @param values
*/
public void setValues(ArrayList values) {
@@ -75,12 +87,19 @@ public void setValues(ArrayList values) {
/**
* Adds a value to the list
- * @param value The value to add
+ *
+ * @param value
+ * The value to add
*/
public void addValue(String value) {
- if(values == null) {
+ if (values == null) {
values = new ArrayList();
}
values.add(value);
}
+
+ /**
+ * Gets the description for this annotation
+ */
+ public abstract String getDescription();
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAttribute.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAttribute.java
index 92d05dd5..c43e99c0 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAttribute.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/ESQDevFileAttribute.java
@@ -21,6 +21,12 @@ public String toString() {
public String getDefault() {
return "false";
}
+
+ @Override
+ public String getDescription() {
+ return "The attribute specifying whether the project "
+ + "should get exported/synced every time a file changes";
+ }
},
/**
* The attribute defining where the project should be exported to
@@ -36,6 +42,11 @@ public String getDefault() {
// export location has to specified
return null;
}
+
+ @Override
+ public String getDescription() {
+ return "The attribute defining where the project should be exported to";
+ }
},
/**
* The attribute defining the terrain the mission should play on
@@ -52,8 +63,17 @@ public String getDefault() {
return null;
}
+ @Override
+ public String getDescription() {
+ return "The attribute defining the terrain the mission should play on";
+ }
+
},
+ /**
+ * The attribute defining to which profile this mission/project should be
+ * associated to
+ */
PROFILE {
@Override
public String toString() {
@@ -66,6 +86,12 @@ public String getDefault() {
// project should get exported to
return null;
}
+
+ @Override
+ public String getDescription() {
+ return "The attribute defining to which profile this "
+ + "mission/project should be associated to";
+ }
};
/**
@@ -143,4 +169,9 @@ public static boolean isAttribute(String inputLine) {
// if it coudn't be found it can't be a valid attribute
return false;
}
+
+ /**
+ * Gets the description for this attribute
+ */
+ public abstract String getDescription();
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java
index a883036c..d7085413 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/sqdevFile/SQDevFile.java
@@ -21,7 +21,7 @@
import raven.sqdev.exceptions.SQDevFileNoSuchAttributeException;
import raven.sqdev.exceptions.SQDevIllegalFileChangeException;
import raven.sqdev.util.SQDevInfobox;
-import raven.sqdev.util.StringUtils;
+import raven.sqdev.util.TextUtils;
/**
* A SQDevFile
contains some project specific information for the
@@ -266,7 +266,7 @@ public boolean isValid() {
}
for (String currentAttribute : getAttributesAsString()) {
- if (StringUtils.countMatches(completeFile, currentAttribute) > 1) {
+ if (TextUtils.countMatches(completeFile, currentAttribute) > 1) {
// Each attribute may only be specified once
return false;
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java
new file mode 100644
index 00000000..bb654ac3
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/startup/SQDevStarter.java
@@ -0,0 +1,60 @@
+package raven.sqdev.startup;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IStartup;
+
+import raven.sqdev.interfaces.IVersionListener;
+import raven.sqdev.misc.VersionChangeEvent;
+import raven.sqdev.pluginManagement.VersionManager;
+import raven.sqdev.util.SQDevInfobox;
+
+/**
+ * The SQDev class that gets loaded when the workbench is initialized
+ *
+ * @author Raven
+ *
+ */
+public class SQDevStarter implements IStartup, IVersionListener {
+
+ @Override
+ public void earlyStartup() {
+ // check the versions
+ VersionManager.getManager().addVersionListener(this);
+ VersionManager.getManager().checkVersions();
+ }
+
+ @Override
+ public void versionChanged(VersionChangeEvent event) {
+ // perform compability operation and/or notifications
+ switch (event.getPlugin()) {
+ case EDITORS:
+ break;
+ case MISC:
+ break;
+ case PREFERENCES:
+ preferenceVersionChange(event);
+ break;
+ case SQFEDITOR:
+ break;
+ case UTIL:
+ break;
+ case WIZARDS:
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void preferenceVersionChange(VersionChangeEvent event) {
+ if (event.isUpdate()) {
+ // inform the user about possible additions in the preferences
+ SQDevInfobox info = new SQDevInfobox(
+ "The preferences where updated.\n\nMake sure you check them "
+ + "out in order to make the plugin work properly",
+ SWT.ICON_INFORMATION);
+
+ info.open();
+ }
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java
index e9c7df87..a270afe1 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ColorUtils.java
@@ -36,7 +36,7 @@ public static RGB decodeRGB(String str) {
RGB rgb = new RGB(0, 0, 0);
try {
- if (StringUtils.countMatches(str, ",") != 2) {
+ if (TextUtils.countMatches(str, ",") != 2) {
throw new IllegalRGBSyntaxException(
"The string \"" + str + "\" has an illegal syntax for decoding as RGB!");
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java
new file mode 100644
index 00000000..af778243
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/EditorUtil.java
@@ -0,0 +1,93 @@
+package raven.sqdev.util;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * A class containing various static util methods for usage with editors
+ *
+ * @author Raven
+ *
+ */
+public class EditorUtil {
+
+ /**
+ * Gets the wordpart in this document that occurs directly before the given
+ * offset. It will take all characters that are considered valid by
+ * TextUtil.isWordPart(char c)
+ *
+ * @param document
+ * The document to search on
+ * @param offset
+ * The offset the search should use (has to be in range of the
+ * document!)
+ * @return The found wordpart (may be empty)
+ */
+ public static String getWordPartBeforeOffset(IDocument document, int offset) {
+ Assert.isTrue(document.getLength() >= offset);
+
+ // get relevant content in reverse order
+ String relevantContent = new StringBuilder(document.get().substring(0, offset)).reverse()
+ .toString();
+
+ String word = "";
+
+ for (char currentChar : relevantContent.toCharArray()) {
+ if (TextUtils.isWordPart(currentChar)) {
+ word += currentChar;
+ } else {
+ // word has ended
+ break;
+ }
+ }
+
+ // bring the word in correct order again
+ word = new StringBuilder(word).reverse().toString();
+
+ return word;
+ }
+
+ /**
+ * Gets the wordpart in this document that occurs directly after the given
+ * offset. It will take all characters that are considered valid by
+ * TextUtil.isWordPart(char c)
+ *
+ * @param document
+ * The document to search on
+ * @param offset
+ * The offset the search should use (has to be in range of the
+ * document!)
+ * @return The found wordpart (may be empty)
+ */
+ public static String getWordPartAfterOffset(IDocument document, int offset) {
+ Assert.isTrue(document.getLength() >= offset);
+
+ String relevantContent = document.get().substring(offset);
+
+ String word = "";
+
+ for (char currentChar : relevantContent.toCharArray()) {
+ if (TextUtils.isWordPart(currentChar)) {
+ word += currentChar;
+ } else {
+ // word has ended
+ break;
+ }
+ }
+
+ return word;
+ }
+
+ /**
+ * Gets the word the given offset corresponds to
+ *
+ * @param document
+ * The doument to search in
+ * @param offset
+ * The offset to search for. Has to bein range of the document!
+ * @return The found word (may be empty)
+ */
+ public static String getWordAroundOffset(IDocument document, int offset) {
+ return getWordPartBeforeOffset(document, offset) + getWordPartAfterOffset(document, offset);
+ }
+}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/FileUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/FileUtil.java
index 1055b7e9..57859559 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/FileUtil.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/FileUtil.java
@@ -2,14 +2,19 @@
import java.io.BufferedReader;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
+import raven.sqdev.exceptions.SQDevException;
+
/**
* A class containing static util methods for files
*
@@ -136,4 +141,83 @@ public static File copyFolder(File folder, Path destination) {
return targetFolder;
}
+ /**
+ * Gets the content of the given file
+ *
+ * @param file
+ * The File
whose content should be obtained. Has to
+ * exist!
+ * @return The file's content
+ * @throws SQDevException
+ * If anything goes wrong
+ */
+ public static String getContent(File file) throws SQDevException {
+ if (!file.exists()) {
+ throw new SQDevException(
+ "Failed at getting content of file \"" + file.getAbsolutePath() + "\"",
+ new FileNotFoundException("The requested file does not exist"));
+ }
+
+ try {
+// BufferedReader reader = new BufferedReader(new FileReader(file));
+//
+// String content = "";
+// String currentLine = "";
+//
+// while ((currentLine = reader.readLine()) != null) {
+// content += (content.isEmpty()) ? currentLine : "\n" + currentLine;
+// }
+//
+// reader.close();
+//
+// return content;
+
+ return readAll(new FileInputStream(file), (int) file.length());
+
+ } catch (IOException e) {
+ throw new SQDevException(
+ "Failed at getting content of file \"" + file.getAbsolutePath() + "\"", e);
+ }
+ }
+
+ /**
+ * Reads the complete InputStream into a String.
+ *
+ * @param in
+ * The InputStream
to read from
+ * @param size
+ * The length of the InputStream
or -1
+ * if unknown.
+ * @return The created String
+ * @throws IOException
+ */
+ public static String readAll(InputStream in, int size) throws IOException {
+ byte[] bytes;
+
+ if (size < 0) {
+ bytes = new byte[in.available()];
+ } else {
+ bytes = new byte[size];
+ }
+
+ in.read(bytes);
+
+ return new String(bytes);
+ }
+
+ /**
+ * Reads the complete InputStream into a String. If the size of the
+ * InputStream
can be obtained
+ * readAll(InputStream in, int size)
should be used for safer
+ * results.
+ *
+ * @param in
+ * The InputStream
to read from
+ * @return The created String
+ * @throws IOException
+ */
+ public static String readAll(InputStream in) throws IOException {
+ return readAll(in, -1);
+ }
+
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ResourceManager.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ResourceManager.java
index f691ca8d..eab9428a 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ResourceManager.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/ResourceManager.java
@@ -1,5 +1,10 @@
package raven.sqdev.util;
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -7,12 +12,41 @@
import java.net.URL;
import java.util.jar.JarInputStream;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+
+import raven.sqdev.exceptions.SQDevCoreException;
+import raven.sqdev.exceptions.SQDevException;
+
+/**
+ * This ResourceManager
is responsible for managing the resources
+ * of this plugin including reading and writing
+ *
+ * @author Raven
+ *
+ */
public class ResourceManager {
+ /**
+ * The extension used for backup resources
+ */
+ private static final String BACKUP_EXTENSION = ".back";
private ClassLoader loader;
private URL locationURL;
private URI locationURI;
+ /**
+ * The path to the resource location of this plugin
+ */
+ private IPath resourceLocation;
+ /**
+ * The path to the backup resource location of this plugin containg older
+ * versions of resources
+ */
+ private IPath backupResourceLocation;
+ /**
+ * Creates an instance of this ResourceManager
+ */
public ResourceManager() {
setLoader(this.getClass().getClassLoader());
setLocationURL(this.getClass().getProtectionDomain().getCodeSource().getLocation());
@@ -24,16 +58,21 @@ public ResourceManager() {
setLocationURI(null);
}
+
+ initializeResourceLocation();
}
/**
- * Searches for the resource
+ * Gets the hard coded resource stored directly in this plugin's jat
*
- * @param path The path within this structure
- * @return
+ * @param path
+ * The path within this plugin leading to the resource. (has to
+ * start with "/resources")
+ * @return The InputStream
to this resource or
+ * null
if this resource couldn't be found
*/
- public InputStream findResource(String path) {
- if(!path.startsWith("/resources")) {
+ private InputStream getHardResourceStream(String path) {
+ if (!path.startsWith("/resources")) {
throw new IllegalArgumentException("Given path has to reference the resource-folder!");
}
@@ -56,6 +95,129 @@ public InputStream findResource(String path) {
return in;
}
+ /**
+ * Updates the resource file of the given name with the given content after
+ * backing up the current content of the resource file.
+ * Note: There's always only one backup for each resource file
+ *
+ * @param name
+ * The name of the resource. If it daoes not contain an extension
+ * the extension ".txt" will be added.
+ * If no such resource does exist it will be created.
+ * @param content
+ * The new content of this resourcefile
+ * @throws IOException
+ */
+ public void updateResource(String name, String content) throws IOException {
+ if (resourceExists(name)) {
+ // create resource + backup
+ createResource(name);
+ }
+
+ // backup resource
+ backupResource(name);
+
+ // write new content
+ FileWriter writer = new FileWriter(getResource(name).toFile());
+
+ writer.write(content);
+
+ writer.close();
+ }
+
+ /**
+ * Gets an InputStream
to the resource with the given name
+ *
+ * @param name
+ * The name of the resource. If it does not contain an exntension
+ * the extension ".txt" will be added.
+ * @return The InputStream
to this resource file or
+ * null
if the resource couldn't be found
+ */
+ public InputStream getResourceStream(String name) {
+ if (resourceExists(name)) {
+ try {
+ return new FileInputStream(getResource(name).toFile());
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets an InputStream
to the backup resource with the given
+ * name
+ *
+ * @param name
+ * The name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return The InputStream
to this backup resource file or
+ * null
if the resource couldn't be found
+ */
+ public InputStream getBackupResourceStream(String name) {
+ if (resourceExists(name)) {
+ try {
+ return new FileInputStream(getBackupResource(name).toFile());
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the content of the resource file with the given name
+ *
+ * @param name
+ * The name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return The content of this resource or null
if the
+ * gathering of this resource's content was not possible.
+ */
+ public String getResourceContent(String name) {
+ if (!resourceExists(name)) {
+ return null;
+ }
+
+ try {
+ return FileUtil.getContent(getResource(name).toFile());
+ } catch (SQDevException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ }
+
+ /**
+ * Gets the content of the backup resource file corresponding to the given
+ * name
+ *
+ * @param nameThe
+ * name of the normal resource. If it does not contain an
+ * exntension the extension ".txt" will be added.
+ * @return
+ */
+ public String getBackupResourceContent(String name) {
+ if (!resourceExists(name)) {
+ return null;
+ }
+
+ try {
+ return FileUtil.getContent(getBackupResource(name).toFile());
+ } catch (SQDevException e) {
+ e.printStackTrace();
+
+ return null;
+ }
+ }
+
private ClassLoader getLoader() {
return loader;
}
@@ -80,4 +242,237 @@ private void setLocationURI(URI locationURI) {
this.locationURI = locationURI;
}
+ /**
+ * Initializes the resource location
+ */
+ private void initializeResourceLocation() {
+ // make sure the resource location exists
+ IPath stateLocation = Platform.getStateLocation(Platform.getBundle("raven.sqdev.util"));
+ resourceLocation = stateLocation.append("resources");
+ backupResourceLocation = resourceLocation.append("Backup");
+
+ if (!resourceLocation.toFile().exists()) {
+ // create resource location
+ resourceLocation.toFile().mkdir();
+
+ if (!backupResourceLocation.toFile().exists()) {
+ // create backup resource location
+ backupResourceLocation.toFile().mkdir();
+ }
+
+ // initialize necessary resources
+ try {
+ createResource("SQFKeywords.txt");
+
+ String content = FileUtil
+ .readAll(getHardResourceStream("/resources/sqf/SQFKeywords.txt"));
+
+ // put content in respective resource files
+ FileWriter writer = new FileWriter(getResource("SQFKeywords.txt").toFile());
+ writer.write(content);
+ writer.close();
+
+ writer = new FileWriter(getBackupResource("SQFKeywords.txt").toFile());
+ writer.write(content);
+ writer.close();
+
+ } catch (IOException e) {
+ throw new SQDevCoreException("Failed at creating resources", e);
+ }
+ }
+
+ if (!backupResourceLocation.toFile().exists()) {
+ // create backup resource location
+ backupResourceLocation.toFile().mkdir();
+ }
+ }
+
+ /**
+ * Creates a resource file with the given name
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ * @return True
if the creation was successfull
+ * @throws IOException
+ */
+ public boolean createResource(String name) throws IOException {
+ if (!name.contains(".")) {
+ // make a text document out of it
+ name += ".txt";
+ }
+
+ IPath resourcePath = resourceLocation.append(name);
+ IPath backupResourceFile = backupResourceLocation.append(name + BACKUP_EXTENSION);
+
+ if (!resourcePath.toFile().exists()) {
+ resourcePath.toFile().createNewFile();
+ backupResourceFile.toFile().createNewFile();
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Gets the path to the resource with the given name
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ * @return The Path
to the resource fileor null
if
+ * there is no such resourcefile
+ */
+ private IPath getResource(String name) {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ IPath resourcePath = resourceLocation.append(name);
+
+ if (resourcePath.toFile().exists()) {
+ return resourcePath;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the path to the backup resource with the given name
+ *
+ * @param name
+ * The name of the backup resource file. If it does not contain
+ * an extension the extension ".txt" will be added
+ * @return The Path
to the resource fileor null
if
+ * there is no such resourcefile
+ */
+ private IPath getBackupResource(String name) {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ if (!name.endsWith(BACKUP_EXTENSION)) {
+ // add the backup extension
+ name += BACKUP_EXTENSION;
+ }
+
+ IPath backupResourcePath = backupResourceLocation.append(name);
+
+ if (backupResourcePath.toFile().exists()) {
+ return backupResourcePath;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Will write the current content of the resource with the given name into
+ * it's corresponding backup resource file
+ *
+ * @param name
+ * The name of the backup resource file. If it does not contain
+ * an extension the extension ".txt" will be added
+ */
+ private void backupResource(String name) {
+ if (!name.contains(".")) {
+ name += ".txt";
+ }
+
+ try {
+ if (!resourceExists(name)) {
+ // create resources if they don't exist
+ createResource(name);
+
+ return;
+ }
+
+ // get the content of current resource
+ BufferedReader reader = new BufferedReader(new FileReader(getResource(name).toFile()));
+
+ String currentLine = "";
+ String content = "";
+
+ while ((currentLine = reader.readLine()) != null) {
+ content += (content.isEmpty()) ? currentLine : "\n" + currentLine;
+ }
+
+ reader.close();
+
+ // write the content into the backup
+ FileWriter writer = new FileWriter(getBackupResource(name).toFile());
+ writer.write(content);
+ writer.close();
+
+ } catch (IOException e) {
+ throw new SQDevCoreException("Failed at backing up resource!", e);
+ }
+ }
+
+ /**
+ * Checks if a resource with the given name and it's corresponding backup
+ * resource does exist
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ */
+ public boolean resourceExists(String name) {
+ return (getResource(name) != null && getBackupResource(name) != null);
+ }
+
+ /**
+ * Checks if the given resource is already accessed as it's backup resource
+ * (= the content of the resource is equal to the content of it's backup
+ * resource)
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added
+ */
+ public boolean isOnBackup(String name) {
+ try {
+ String content = FileUtil.getContent(getResource(name).toFile());
+ String backup = FileUtil.getContent(getBackupResource(name).toFile());
+
+ // compare the two
+ return content.equals(backup);
+ } catch (SQDevException e) {
+ throw new SQDevCoreException(e);
+ }
+ }
+
+ /**
+ * Switches the given resource to it's backup resource (The content of the
+ * backup resource is transferred to the resource itself). This cannot be
+ * undone!
+ *
+ * @param name
+ * The name of the resource file. If it does not contain an
+ * extension the extension ".txt" will be added.
+ * @return True
if switching was successful
+ */
+ public boolean switchToBackup(String name) {
+ if (!resourceExists(name)) {
+ return false;
+ }
+
+ try {
+ // get backup content
+ String content = FileUtil.getContent(getBackupResource(name).toFile());
+
+ // write the content into the current resource
+ FileWriter writer = new FileWriter(getResource(name).toFile());
+ writer.write(content);
+ writer.close();
+
+ // all good
+ return true;
+ } catch (SQDevException | IOException e) {
+ e.printStackTrace();
+
+ // smoething went wrong
+ return false;
+ }
+ }
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
index 1ea45a49..e6a27e67 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevInfobox.java
@@ -61,7 +61,7 @@ public SQDevInfobox(String message, int style) {
* for what went wrong.
*/
public SQDevInfobox(String message, Exception exception) {
- this((exception.getMessage() != null) ? message + "\n\nReason: " + exception.getMessage()
+ this((exception.getMessage() != null) ? message + "\n\nReason:\n" + exception.getMessage()
: message + "\n\nReason: Unknown", SWT.ICON_ERROR);
}
@@ -80,7 +80,14 @@ public int open() {
@Override
public void run() {
- MessageBox box = new MessageBox(Display.getCurrent().getActiveShell(), style);
+ Shell activeShell = Display.getCurrent().getActiveShell();
+
+ if(activeShell == null) {
+ // can't report error because user is not in eclipse anymore
+ return;
+ }
+
+ MessageBox box = new MessageBox(activeShell, style);
box.setText("SQDev Info");
box.setMessage(message);
@@ -89,9 +96,10 @@ public void run() {
Shell active = Display.getCurrent().getActiveShell();
- if (!active
+ if (style == SWT.ERROR && !active
.equals(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell())) {
- active.dispose();
+ // close every other opened window
+ active.close();
}
}
});
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java
index 42c87434..521bdf82 100644
--- a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/SQDevPreferenceUtil.java
@@ -157,8 +157,8 @@ public static String getArmaProgramDirectory() {
/**
* Gets the value of the
* SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_KEY
- * preference that holds the path to the ArmA folder in the programs
- * directory
+ * preference that indicates whether matching brackets should get
+ * highlighted
*
* @see {@linkplain SQDevPreferenceConstants}
*/
@@ -170,8 +170,7 @@ public static boolean areMatchingBracketsShown() {
/**
* Gets the value of the
* SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY
- * preference that holds the path to the ArmA folder in the programs
- * directory
+ * preference that indicates whether the current line should be highlighted
*
* @see {@linkplain SQDevPreferenceConstants}
*/
@@ -180,11 +179,23 @@ public static boolean isCurrentLineHighlighted() {
.getBoolean(SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_KEY);
}
+ /**
+ * Gets the value of the
+ * SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY
+ * preference that indicates whether the content assist will insert the
+ * proposal automatically when there is only one proposal
+ *
+ * @see {@linkplain SQDevPreferenceConstants}
+ */
+ public static boolean isAutoCompleteEnabled() {
+ return getPreferenceStore()
+ .getBoolean(SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY);
+ }
+
/**
* Gets the value of the
* SQDevPreferenceConstants.SQDEV_EDITOR_MATCHING_BRACKETS_COLOR_KEY
- * preference that holds the path to the ArmA folder in the programs
- * directory
+ * preference that indicates whether matching brackets should be highlighted
*
* @see {@linkplain SQDevPreferenceConstants}
*/
@@ -196,8 +207,7 @@ public static Color getMatchingBracketHighlightingColor() {
/**
* Gets the value of the
* SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY
- * preference that holds the path to the ArmA folder in the programs
- * directory
+ * preference that defines the color for the highlight of the current line
*
* @see {@linkplain SQDevPreferenceConstants}
*/
@@ -209,8 +219,7 @@ public static Color getCurrentLineHighlightingColor() {
/**
* Gets the value of the
* SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY
- * preference that holds the path to the ArmA folder in the programs
- * directory
+ * preference that defines the color for the hihlighting of keywords
*
* @see {@linkplain SQDevPreferenceConstants}
*/
@@ -264,4 +273,29 @@ public static String getDefaultProfile() {
public static String getDefaultTerrain() {
return getPreferenceStore().getString(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_TERRAIN);
}
+
+ /**
+ * Gets the value of the
+ * SQDevPreferenceConstants.SQDEV_COLLECTION_STARTCOMMAND
+ * preference that holds the first command in the BIKI that should be
+ * processed
+ *
+ * @see {@linkplain SQDevPreferenceConstants}
+ */
+ public static String getFirstCommand() {
+ return getPreferenceStore()
+ .getString(SQDevPreferenceConstants.SQDEV_COLLECTION_STARTCOMMAND);
+ }
+
+ /**
+ * Gets the value of the
+ * SQDevPreferenceConstants.SQDEV_COLLECTION_ENDCOMMAND
+ * preference that holds the last command in the BIKI that should be
+ * processed
+ *
+ * @see {@linkplain SQDevPreferenceConstants}
+ */
+ public static String getLastCommand() {
+ return getPreferenceStore().getString(SQDevPreferenceConstants.SQDEV_COLLECTION_ENDCOMMAND);
+ }
}
diff --git a/plugin/Raven.SQDev.Util/src/raven/sqdev/util/TextUtils.java b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/TextUtils.java
new file mode 100644
index 00000000..14b7f75e
--- /dev/null
+++ b/plugin/Raven.SQDev.Util/src/raven/sqdev/util/TextUtils.java
@@ -0,0 +1,201 @@
+package raven.sqdev.util;
+
+import java.util.ArrayList;
+
+import raven.sqdev.constants.TextConstants;
+
+/**
+ * A class containing various static text functions
+ *
+ * @author Raven
+ *
+ */
+public class TextUtils {
+ /**
+ * An array containing all special characters that are allowed in project
+ * names
+ */
+ public static final char[] ALLOWED_SPECIAL_CHARACTER_PROJECTNAME = { '.', ' ', '_' };
+
+ /**
+ * Counts the occurence of a String in another String
+ *
+ * @param str
+ * The String to be searched
+ * @param match
+ * The String to be searched for
+ * @return How often the searched string has been found
+ */
+ public static int countMatches(String str, String match) {
+ int counter = 0;
+
+ while (str.contains(match)) {
+ counter++;
+
+ str = str.substring(str.indexOf(match) + match.length());
+ }
+
+ return counter;
+ }
+
+ /**
+ * Checks if the given name is valid.
+ * A name is considered valid if it starts with a letter and then continues
+ * with either letters or digits or any character specified in
+ * allowedChars
.
+ * If you don't want any additional characters to be allowed just pass
+ * null
+ *
+ * @param name
+ * The name to validate
+ * @param allowedChars
+ * A list of additional characters that are allowed for this
+ * name. May be null
+ */
+ public static boolean isValidName(String name, ArrayList allowedChars) {
+ if (name.isEmpty() || name == null) {
+ // an empty name can't be valid
+ return false;
+ }
+
+ if (allowedChars == null) {
+ // initialize empty list
+ allowedChars = new ArrayList();
+ }
+
+ char[] chars = name.toCharArray();
+
+ if (!Character.isLetter(chars[0])) {
+ // name has to start with a letter
+ return false;
+ }
+
+ for (char currentChar : chars) {
+ if (!Character.isLetterOrDigit(currentChar)) {
+ // check if special character is allowed
+ if (!allowedChars.contains((Character) currentChar)) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks for the reason the given name is invalid.
+ *
+ * @param name
+ * The invalid name (mustn't be valid)
+ * @param allowedChars
+ * A list of additional characters that are allowed for this
+ * name. May be null
+ * @return The error message explaining why the given name isn't valid.
+ */
+ public static String whyIsInvalidName(String name, ArrayList allowedChars) {
+ if (isValidName(name, allowedChars) || name == null) {
+ // if it is a valid name no error message can be found
+ return null;
+ }
+
+ if (name.isEmpty()) {
+ return "A name must not be empty!";
+ }
+
+ if (allowedChars == null) {
+ // initialize empty list
+ allowedChars = new ArrayList();
+ }
+
+ char[] chars = name.toCharArray();
+
+ if (!Character.isLetter(chars[0])) {
+ // name has to start with a letter
+ return "A name has to start with a letter!";
+ }
+
+ for (char currentChar : chars) {
+ if (!Character.isLetterOrDigit(currentChar)) {
+ // check if special character is allowed
+ if (!allowedChars.contains((Character) currentChar)) {
+ return "Invalid character '" + currentChar + "' in \"" + name + "\"!";
+ }
+ }
+ }
+
+ // one of the above has to have matched
+ return null;
+ }
+
+ /**
+ * Checks if the given name is a valid project name
+ *
+ * @param name
+ * The name to check
+ * @see #isValidName
+ */
+ public static boolean isValidProjectName(String name) {
+ ArrayList allowedChars = new ArrayList();
+
+ for (char currentChar : ALLOWED_SPECIAL_CHARACTER_PROJECTNAME) {
+ allowedChars.add((Character) currentChar);
+ }
+
+ return isValidName(name, allowedChars);
+ }
+
+ /**
+ * Get the error code for why the name isn't valid
+ *
+ * @param name
+ * The name to check (mustn't be valid)
+ * @see #whyIsInvalidName
+ */
+ public static String whyIsInvalidProjectName(String name) {
+ ArrayList allowedChars = new ArrayList();
+
+ for (char currentChar : ALLOWED_SPECIAL_CHARACTER_PROJECTNAME) {
+ allowedChars.add((Character) currentChar);
+ }
+
+ return whyIsInvalidName(name, allowedChars);
+ }
+
+ /**
+ * Checks if the given character is a bracket
+ *
+ * @param c
+ * @see #BRACKETS
+ */
+ public static boolean isBracket(char c) {
+ for (char currentChar : TextConstants.BRACKETS) {
+ if (currentChar == c) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given character can be part of a word
+ *
+ * @param c
+ * The character to check
+ */
+ public static boolean isWordPart(char c) {
+ if (Character.isLetterOrDigit(c)) {
+ return true;
+ }
+
+ // check for valid special characters
+ for (char currentChar : TextConstants.SPECIAL_WORD_CHARACTERS) {
+ if (c == currentChar) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+}
diff --git a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class
index 02ad2925..de42ec8a 100644
Binary files a/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class and b/plugin/Raven.SQDev.Wizards/bin/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.class differ
diff --git a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java
index 1349641a..92f1335f 100644
--- a/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java
+++ b/plugin/Raven.SQDev.Wizards/src/raven/sqdev/wizards/sqdevProject/SQDevProjectWizardPage.java
@@ -20,7 +20,7 @@
import raven.sqdev.util.EProjectType;
import raven.sqdev.util.SQDevInformation;
import raven.sqdev.util.SQDevPreferenceUtil;
-import raven.sqdev.util.StringUtils;
+import raven.sqdev.util.TextUtils;
import raven.sqdev.util.Util;
/**
@@ -215,8 +215,8 @@ private void validate() {
}
// check if the entered project name is valid
- if (!StringUtils.isValidProjectName(getProjectName())) {
- updateStatus(StringUtils.whyIsInvalidProjectName(getProjectName()));
+ if (!TextUtils.isValidProjectName(getProjectName())) {
+ updateStatus(TextUtils.whyIsInvalidProjectName(getProjectName()));
return;
}
diff --git a/plugin/Raven.SQDev/feature.xml b/plugin/Raven.SQDev/feature.xml
index fa23b0ab..4d2126cd 100644
--- a/plugin/Raven.SQDev/feature.xml
+++ b/plugin/Raven.SQDev/feature.xml
@@ -2,7 +2,7 @@
@@ -43,21 +43,21 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRES
id="raven.sqdev.editors"
download-size="0"
install-size="0"
- version="0.2.0"
+ version="0.3.0"
unpack="false"/>
diff --git a/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF b/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
index e0877f51..81c99e13 100644
--- a/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
+++ b/plugin/RavenSQDev.Preferences/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Preferences
Bundle-SymbolicName: raven.sqdev.preferences;singleton:=true
-Bundle-Version: 0.2.0
+Bundle-Version: 0.3.0
Bundle-Activator: raven.sqdev.preferences.activator.Activator
Bundle-Vendor: Raven
Require-Bundle: org.eclipse.ui,
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class
index e17c769b..03379105 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/activator/Activator.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class
index 63d717c7..18046867 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class
index 7dc04870..e84ae7f6 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1$1.class
new file mode 100644
index 00000000..3dd6eab5
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1.class
new file mode 100644
index 00000000..bd94941d
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class
new file mode 100644
index 00000000..05f9737b
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2$1.class
new file mode 100644
index 00000000..e1441b2c
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class
new file mode 100644
index 00000000..7354fd99
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage$2.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class
new file mode 100644
index 00000000..59a3c150
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevPreferencePage.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevPreferencePage.class
index 4b46abe0..5832474a 100644
Binary files a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevPreferencePage.class and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/pages/SQDevPreferencePage.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor$1.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor$1.class
new file mode 100644
index 00000000..ab334bed
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor$1.class differ
diff --git a/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.class b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.class
new file mode 100644
index 00000000..7fe9cfe3
Binary files /dev/null and b/plugin/RavenSQDev.Preferences/bin/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.class differ
diff --git a/plugin/RavenSQDev.Preferences/plugin.xml b/plugin/RavenSQDev.Preferences/plugin.xml
index a2fa348f..3ea8defe 100644
--- a/plugin/RavenSQDev.Preferences/plugin.xml
+++ b/plugin/RavenSQDev.Preferences/plugin.xml
@@ -20,6 +20,12 @@
id="raven.sqdev.preferences.sqdevlinkingpreferencepage"
name="Linking">
+
+
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java
index 990f0b4e..e518777e 100644
--- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/activator/Activator.java
@@ -16,12 +16,6 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
- /**
- * The constructor
- */
- public Activator() {
- }
-
/*
* (non-Javadoc)
*
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java
index 7f9be29e..0adf76a6 100644
--- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/initializer/SQDevPreferenceInitializer.java
@@ -37,13 +37,13 @@ public void initializeDefaultPreferences() {
// set default profile
store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_PROFILE,
System.getProperty("user.name"));
-
+
// set deafult map
store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_TERRAIN, "Altis");
// set default autoExport
store.setDefault(SQDevPreferenceConstants.SQDEV_INFO_DEFAULT_AUTOEXPORT, false);
-
+
// let the preference page always ask for saving
store.setDefault(SQDevPreferenceConstants.SQDEV_PREF_ALWAYS_SAVE_ON_EXIT, false);
@@ -57,12 +57,19 @@ public void initializeDefaultPreferences() {
store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_HIGHLIGHT_CURRENTLINE_COLOR_KEY,
ColorUtils.getRGBValuesAsString(ISQDevColorConstants.CURRENTLINE));
+ // enable autoComplete
+ store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY, true);
+
// set syntax highlighting
store.setDefault(SQDevPreferenceConstants.SQDEV_EDITOR_SYNTAXHIGHLIGHTING_COLOR_KEY,
ColorUtils.getRGBValuesAsString(ISQDevColorConstants.KEYWORD));
// set autoClean
store.setDefault(SQDevPreferenceConstants.SQDEV_EXPORT_AUTOCLEAN, false);
+
+ // set start and end command for keyword update
+ store.setDefault(SQDevPreferenceConstants.SQDEV_COLLECTION_STARTCOMMAND, "abs");
+ store.setDefault(SQDevPreferenceConstants.SQDEV_COLLECTION_ENDCOMMAND, "worldToScreen");
}
/**
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java
index a5e420f5..b590bc44 100644
--- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevEditorPreferencePage.java
@@ -11,7 +11,7 @@
* The preferencePage that contains all settings concerning the editor
*
* @author Raven
- *
+ *
*/
public class SQDevEditorPreferencePage extends SQDevPreferencePage {
@@ -43,7 +43,13 @@ public void init(IWorkbench workbench) {
behaviour);
addPreferenceEditor(enableBracketMatchEditor);
-
+ addPreferenceEditor(new BooleanSQDevPreferenceEditor(
+ SQDevPreferenceConstants.SQDEV_EDITOR_ENABLE_AUTOCOMPLETE_KEY,
+ "&Enable autoComplete:",
+ "Enables/Disables autoComplete meaning that content assist will insert the proposal automatically if there is only one choice",
+ behaviour));
+
+
// preferences for the coloring
Group colors = createGroup("Colors");
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java
new file mode 100644
index 00000000..efa2d7f8
--- /dev/null
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevMiscPreferencePage.java
@@ -0,0 +1,169 @@
+package raven.sqdev.preferences.pages;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+import raven.sqdev.constants.SQDevPreferenceConstants;
+import raven.sqdev.exceptions.SQDevException;
+import raven.sqdev.infoCollection.SQFCommandCollector;
+import raven.sqdev.infoCollection.base.KeywordList;
+import raven.sqdev.pluginManagement.ResourceManager;
+import raven.sqdev.pluginManagement.SQDevEclipseEventManager;
+import raven.sqdev.preferences.preferenceEditors.ValueSQDevPreferenceEditor;
+import raven.sqdev.util.SQDevInfobox;
+import raven.sqdev.util.SQDevPreferenceUtil;
+
+public class SQDevMiscPreferencePage extends SQDevPreferencePage {
+ /**
+ * The job used for updating the keywords
+ */
+ private static Job collectionJob;
+ /**
+ * The button corresponding to the update function
+ */
+ private Button updateButton;
+
+ public SQDevMiscPreferencePage() {
+ super();
+ }
+
+ @Override
+ public void init(IWorkbench workbench) {
+ setDescription("Miscellaneous preferences about the plugin");
+
+
+ Group keywordGroup = createGroup("Keyword collection/updating");
+
+ addPreferenceEditor(new ValueSQDevPreferenceEditor(
+ SQDevPreferenceConstants.SQDEV_COLLECTION_STARTCOMMAND, "&First command:",
+ "The name of the first command in the list in the BIKI that should be"
+ + " processed. If there is no urgent need do not change this value!",
+ keywordGroup));
+
+ addPreferenceEditor(new ValueSQDevPreferenceEditor(
+ SQDevPreferenceConstants.SQDEV_COLLECTION_ENDCOMMAND, "&Last command:",
+ "The name of the last command in the list in the BIKI that should be"
+ + " processed. If there is no urgent need do not change this value!",
+ keywordGroup));
+
+ // SQF keyword collection
+ updateButton = new Button(createContainer(), SWT.PUSH);
+ updateButton.setToolTipText(
+ "Updates the SQF keywords according to the BIKI. This may take a while");
+ updateButton.setEnabled(collectionJob == null || collectionJob.getResult() != null);
+
+ // set text according to status
+ if (!updateButton.isEnabled()) {
+ updateButton.setText("Updating keywords...");
+ } else {
+ updateButton.setText("Update keywords");
+ }
+
+ updateButton.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // change button status
+ updateButton.setEnabled(false);
+ updateButton.setText("Updating keywords...");
+ updateButton.pack(true);
+
+ updateKeywords();
+ }
+ });
+ }
+
+ /**
+ * Schedules the keyword update Job
+ */
+ private void updateKeywords() {
+ collectionJob = new Job("Updating keywords") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask("Updating keywords", IProgressMonitor.UNKNOWN);
+
+ try {
+ // gather keywords from the wiki
+ KeywordList list = new SQFCommandCollector(
+ new URL("https://community.bistudio.com/wiki/Category:"
+ + "Scripting_Commands_Arma_3"),
+ SQDevPreferenceUtil.getFirstCommand(),
+ SQDevPreferenceUtil.getLastCommand()).collect(monitor);
+
+ if (monitor.isCanceled()) {
+ // ask whether to save the list
+ SQDevInfobox info = new SQDevInfobox(
+ "The keyword update has been interrupted.\n"
+ + "Do you wish to store the current keywords?"
+ + " (This will override the current keword list and may"
+ + " leed to an incomplete list)",
+ SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+
+ if (info.open() != SWT.YES) {
+ // don't save
+ return Status.OK_STATUS;
+ }
+ }
+
+ // save the keywords
+ monitor.done();
+ monitor.beginTask("Storing keywords...", IProgressMonitor.UNKNOWN);
+
+ ResourceManager manager = ResourceManager.getManager();
+ manager.updateResource("SQFKeywords.txt", list.getSaveableFormat());
+
+ // tell the user to restart
+ SQDevInfobox info = new SQDevInfobox(
+ "In order for the new keywords to take effect"
+ + " you have to restart all respective editors",
+ SWT.ICON_INFORMATION);
+
+ info.open();
+
+ } catch (IOException | SQDevException e) {
+ SQDevInfobox info = new SQDevInfobox("Failed at updating keywords", e);
+ info.open();
+
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } finally {
+ if (!PlatformUI.getWorkbench().getDisplay().isDisposed()) {
+ // reset buton status
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (updateButton != null && !updateButton.isDisposed()) {
+ updateButton.setText("Update keywords");
+ updateButton.setEnabled(true);
+ updateButton.pack(true);
+ }
+ }
+ });
+ }
+
+ monitor.done();
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+
+ // make sure eclipse is not closed with this job running
+ SQDevEclipseEventManager.getManager().registerCloseSuspendingJob(collectionJob);
+
+ collectionJob.schedule();
+ }
+
+}
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevPreferencePage.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevPreferencePage.java
index a3598fc5..ed218d8f 100644
--- a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevPreferencePage.java
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/pages/SQDevPreferencePage.java
@@ -13,7 +13,6 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import raven.sqdev.exceptions.SQDevException;
@@ -29,9 +28,9 @@
* LayoutManager that lays out the different preferenceEditors.
*
* @author Raven
- *
+ *
*/
-public class SQDevPreferencePage extends PreferencePage
+public abstract class SQDevPreferencePage extends PreferencePage
implements ISQDevPreferencePage, ISQDevPreferenceEditorListener {
private SQDevPreferenceComposite SQDevPreferencePageContainer;
@@ -60,10 +59,6 @@ protected Control createContents(Composite parent) {
return SQDevPreferencePageContainer;
}
- @Override
- public void init(IWorkbench workbench) {
- }
-
/**
* Sets the page up
*/
@@ -193,7 +188,7 @@ public Composite createDefaultComposite(Composite parent) {
container.setLayout(layout);
container.setFont(parent.getFont());
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
+ container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return container;
}
diff --git a/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.java b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.java
new file mode 100644
index 00000000..1bb14d4a
--- /dev/null
+++ b/plugin/RavenSQDev.Preferences/src/raven/sqdev/preferences/preferenceEditors/ValueSQDevPreferenceEditor.java
@@ -0,0 +1,216 @@
+package raven.sqdev.preferences.preferenceEditors;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+import raven.sqdev.preferences.pages.ISQDevPreferencePage;
+import raven.sqdev.preferences.util.EStatus;
+import raven.sqdev.preferences.util.SQDevChangeEvent;
+
+/**
+ * A preference editor for simple String values
+ *
+ * @author Raven
+ *
+ */
+public class ValueSQDevPreferenceEditor extends AbstractSQDevPreferenceEditor {
+
+ /**
+ * The text for the value
+ */
+ private Text valueText;
+
+ /**
+ * The initial content of this editor
+ */
+ private String initialContent;
+
+ /**
+ * Creates a new SQDevPreferenceEditor
+ * This constructor can only be used if the given container is an
+ * instance of ISQDevPreferenceComposite
or one of it's parents
+ * is.
+ *
+ * @param preferenceKey
+ * The key of the preference to work on
+ * @param labelText
+ * The text of the label
+ * @param container
+ * The container the GUI elements should be placed in
+ */
+ public ValueSQDevPreferenceEditor(String preferenceKey, String labelText, Composite container) {
+ super(preferenceKey, labelText, container);
+ }
+
+ /**
+ * Creates a new SQDevPreferenceEditor
+ * This constructor can only be used if the given container is an
+ * instance of ISQDevPreferenceComposite
or one of it's parents
+ * is.
+ *
+ * @param preferenceKey
+ * The key of the preference to work on
+ * @param labelText
+ * The text of the label
+ * @param tooltip
+ * The tooltip that will be displayed on the editor's preference
+ * value-field
+ * @param container
+ * The container the GUI elements should be placed in
+ */
+ public ValueSQDevPreferenceEditor(String preferenceKey, String labelText, String tooltip,
+ Composite container) {
+ super(preferenceKey, labelText, tooltip, container);
+ }
+
+ /**
+ * Creates a new SQDevPreferenceEditor
+ *
+ * @param preferenceKey
+ * The key of the preference to work on
+ * @param labelText
+ * The text of the label
+ * @param container
+ * The container the GUI elements should be placed in
+ * @param page
+ * The ISQDevPreferencePage
this editor is apllied
+ * to
+ */
+ public ValueSQDevPreferenceEditor(String preferenceKey, String labelText, Composite container,
+ ISQDevPreferencePage page) {
+ super(preferenceKey, labelText, container, page);
+ }
+
+ /**
+ * Creates a new SQDevPreferenceEditor
+ *
+ * @param preferenceKey
+ * The key of the preference to work on
+ * @param labelText
+ * The text of the label
+ * @param tooltip
+ * The tooltip that will be displayed on the editor's preference
+ * value-field
+ * @param container
+ * The container the GUI elements should be placed in
+ * @param page
+ * The ISQDevPreferencePage
this editor is apllied
+ * to
+ */
+ public ValueSQDevPreferenceEditor(String preferenceKey, String labelText, String tooltip,
+ Composite container, ISQDevPreferencePage page) {
+ super(preferenceKey, labelText, tooltip, container, page);
+ }
+
+ @Override
+ public boolean needsSave() {
+ return willNeedSave(valueText.getText());
+ }
+
+ @Override
+ public void doLoad() {
+ load(getPreferenceStore().getString(getPreferenceKey()));
+ }
+
+ @Override
+ public void doLoadDefault() {
+ load(getPreferenceStore().getDefaultString(getPreferenceKey()));
+ }
+
+ private void load(String content) {
+ Assert.isNotNull(content);
+ Assert.isTrue(!content.isEmpty());
+
+ if (valueText == null || valueText.isDisposed()) {
+ initialContent = content;
+ } else {
+ valueText.setText(content);
+
+ evaluateInput();
+ updateSaveStatus(content);
+ }
+
+ changed(new SQDevChangeEvent(SQDevChangeEvent.SQDEV_VALUE_LOADED));
+ }
+
+ @Override
+ public boolean doSave() {
+ super.doSave();
+
+ getPreferenceStore().setValue(getPreferenceKey(), valueText.getText());
+
+ updateSaveStatus(valueText.getText());
+
+ return true;
+ };
+
+ @Override
+ public void evaluateInput() {
+ EStatus status = EStatus.OK;
+
+ if (valueText.getText().isEmpty()) {
+ status = EStatus.ERROR;
+ status.setHint("Value may not be empty");
+
+ setStatus(status);
+
+ valueText.setBackground(
+ new Color(PlatformUI.getWorkbench().getDisplay(), 255, 153, 153));
+ return;
+ }
+
+ valueText.setBackground(
+ PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_WHITE));
+ setStatus(status);
+ }
+
+ @Override
+ public int getComponentCount() {
+ return 2;
+ }
+
+ @Override
+ public void createComponents(Composite container) {
+ // name label
+ label = new Label(container, SWT.NULL);
+ label.setText(getLabelText());
+ label.setToolTipText(getTooltip());
+
+ valueText = new Text(container, SWT.SINGLE | SWT.BORDER);
+ valueText.setToolTipText(getTooltip());
+ valueText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ valueText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ updateSaveStatus(((Text) e.widget).getText());
+ evaluateInput();
+ }
+ });
+
+ if (initialContent == null) {
+ doLoad();
+ } else {
+ load(initialContent);
+ }
+ }
+
+ @Override
+ public boolean willNeedSave(String content) {
+ if (getPreferenceStore().getString(getPreferenceKey()).equals(content)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
diff --git a/plugin/SQDev/SQDev_0.4.0.zip b/plugin/SQDev/SQDev_0.4.0.zip
new file mode 100644
index 00000000..c8f81a28
Binary files /dev/null and b/plugin/SQDev/SQDev_0.4.0.zip differ
diff --git a/plugin/SQDev/SQDev_0.5.0.zip b/plugin/SQDev/SQDev_0.5.0.zip
new file mode 100644
index 00000000..0383dd77
Binary files /dev/null and b/plugin/SQDev/SQDev_0.5.0.zip differ
diff --git a/plugin/SQDev/artifacts.jar b/plugin/SQDev/artifacts.jar
index daa32abe..39a4749d 100644
Binary files a/plugin/SQDev/artifacts.jar and b/plugin/SQDev/artifacts.jar differ
diff --git a/plugin/SQDev/content.jar b/plugin/SQDev/content.jar
index 52598331..66ebcac1 100644
Binary files a/plugin/SQDev/content.jar and b/plugin/SQDev/content.jar differ
diff --git a/plugin/SQDev/features/raven.sqdev_0.5.0.jar b/plugin/SQDev/features/raven.sqdev_0.5.0.jar
new file mode 100644
index 00000000..ef7875d7
Binary files /dev/null and b/plugin/SQDev/features/raven.sqdev_0.5.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar
new file mode 100644
index 00000000..38bab4b5
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors.sqfeditor_0.3.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.editors_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.editors_0.3.0.jar
new file mode 100644
index 00000000..0e2edcb3
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.editors_0.3.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar b/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar
new file mode 100644
index 00000000..3b2e2219
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.misc_0.2.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar b/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar
new file mode 100644
index 00000000..a0d93b5d
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.preferences_0.3.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.util_0.4.0.jar b/plugin/SQDev/plugins/raven.sqdev.util_0.4.0.jar
new file mode 100644
index 00000000..06bcae13
Binary files /dev/null and b/plugin/SQDev/plugins/raven.sqdev.util_0.4.0.jar differ
diff --git a/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.0.jar b/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.0.jar
index a04e3407..4d879563 100644
Binary files a/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.0.jar and b/plugin/SQDev/plugins/raven.sqdev.wizards_0.2.0.jar differ
diff --git a/plugin/SQDev/site.xml b/plugin/SQDev/site.xml
index 7c435620..6b0bd8a5 100644
--- a/plugin/SQDev/site.xml
+++ b/plugin/SQDev/site.xml
@@ -1,6 +1,6 @@
-
+