getSuppression: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(moved oukej's note to description for better visibility)
m (Text replacement - "<sqf>([^ ]+) <\/sqf>" to "<sqf>$1</sqf>")
 
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|1.42|= Game version
|version1= 1.42
|arg= local|= Arguments in MP
|arg= local
____________________________________________________________________________________________


| Gets the suppression value of given unit. Returns SCALAR between 0 and 1. Suppression is not calculated for player entities. |= Description
|gr1= Object Manipulation
____________________________________________________________________________________________


| '''getSuppression''' unit |= Syntax
|descr= Gets the suppression value for the given unit. Returns varying [[Number]] between 0 and 1, or -1 if suppression is disabled ({{hl|[[disableAI]] "SUPPRESSION"}}) or the suppression value is not available. Suppression is not calculated for player entities and is always 0, unless it is set with [[setSuppression]]. In this case the return value is the set value. Before Arma 3 v1.92 this command could return [[nil]].<br><br> 
{{Feature | important | The unit must not be [[objNull]], must be [[Multiplayer Scripting#Locality|local]] and [[alive]]}}


|p1= unit: [[Object]] |= PARAMETER1
|s1= [[getSuppression]] unit


| [[Number]] |= RETURNVALUE
|p1= unit: [[Object]]


|r1= [[Number]] - from 0 to 1, or -1 if suppression is not available.


|x1= <code> '''getSuppression''' AI_unit_1;
|x1= <sqf>getSuppression AI_unit_1;</sqf>
</code>|= EXAMPLE1


____________________________________________________________________________________________
|seealso= [[setSuppression]] [[suppressFor]] [[disableAI]] [[enableAI]]
 
| [[setSuppression]], [[suppressFor]] |= SEEALSO
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:04, 13 May 2022

Hover & click on the images for description

Description

Description:
Gets the suppression value for the given unit. Returns varying Number between 0 and 1, or -1 if suppression is disabled (disableAI "SUPPRESSION") or the suppression value is not available. Suppression is not calculated for player entities and is always 0, unless it is set with setSuppression. In this case the return value is the set value. Before Arma 3 v1.92 this command could return nil.

The unit must not be objNull, must be local and alive
Groups:
Object Manipulation

Syntax

Syntax:
getSuppression unit
Parameters:
unit: Object
Return Value:
Number - from 0 to 1, or -1 if suppression is not available.

Examples

Example 1:
getSuppression AI_unit_1;

Additional Information

See also:
setSuppression suppressFor disableAI enableAI

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note