getSuppression: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (moved oukej's note to description for better visibility) |
Killzone Kid (talk | contribs) (no nil return) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Gets the suppression value of given unit. Returns | | Gets the suppression value of given unit. Returns varying [[Number]] between 0 and 1, or -1 if suppression is disabled 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.91.145360 this command could return [[nil]].<br><br> | ||
{{Important | The unit must not be [[objNull]], must be [[local]] and [[alive]]}} |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 14: | Line 15: | ||
|p1= unit: [[Object]] |= PARAMETER1 | |p1= unit: [[Object]] |= PARAMETER1 | ||
| [[Number]] |= RETURNVALUE | | [[Number]] - from 0 to 1, or -1 if suppression is not available. |= RETURNVALUE | ||
|x1= <code> [[getSuppression]] AI_unit_1; | |||
|x1= <code> | |||
</code>|= EXAMPLE1 | </code>|= EXAMPLE1 | ||
Revision as of 19:58, 19 February 2019
Description
- Description:
- Gets the suppression value of given unit. Returns varying Number between 0 and 1, or -1 if suppression is disabled 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.91.145360 this command could return nil.
- Groups:
- Uncategorised
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:
- setSuppressionsuppressFor
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