BIS fnc respect: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling - missing example)
m (Text replacement - "\|seealso= ([^ ]+)(\]\]|\}\}), *(\[\[|\{\{)" to "|seealso= $1$2 $3")
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| RESpect - The Effective Calculation Process. |Description=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| [mode'', param1, param2, param3''] call [[BIS_fnc_respect]] |Syntax=
|game4= arma3
|version4= 0.50


|p1= mode: [[String]] - '''case-sensitive''', can be one of "SET", "ADD", "MODIFY", "KILLED" |Parameter 1=
|gr1= Sides
 
|descr= RESpect - The Effective Calculation Process.
 
|s1= [mode, param1, param2, param3] call [[BIS_fnc_respect]]
 
|p1= mode: [[String]] - '''case-sensitive''', can be one of "SET", "ADD", "MODIFY", "KILLED"


|p2= depending on ''mode'':
|p2= depending on ''mode'':
Line 22: Line 29:
* "MODIFY" - change given respect value
* "MODIFY" - change given respect value
** param1: [[Object]] - unit of which respect value will be changed
** param1: [[Object]] - unit of which respect value will be changed
** param2: [[String]] - [[Faction|faction]] of which respect will be changed
** param2: [[String]] - [[faction]] of which respect will be changed
** param3: [[String]] - [[Code|code]] which defines formula for change (current respect value is stored in variable _r) - e.g. "_r / 2"
** param3: [[String]] - [[Code|code]] which defines formula for change (current respect value is stored in variable _r) - e.g. "_r / 2"
* "KILLED" - modify global town respect after civilian has been killed
* "KILLED" - modify global town respect after civilian has been killed
** param1: [[Object]] - killer
** param1: [[Object]] - killer
** param2: [[Object]] - town logic
** param2: [[Object]] - town logic
** param3: [[Number]] - change coefficient |Parameter 2=
** param3: [[Number]] - change coefficient


|
|r1=
* "SET": [[Array]] with zero respect values  (if [[Object]] is passed as argument, 1 is on place of object's faction)
* "SET": [[Array]] with zero respect values  (if [[Object]] is passed as argument, 1 is on place of object's faction)
* "ADD": unit's respect values
* "ADD": unit's respect values
* "MODIFY": modified respect value
* "MODIFY": modified respect value
* "KILLED": modified town respect value |Return value=
* "KILLED": modified town respect value
____________________________________________________________________________________________


|x1= <code></code> |Example 1=
|x1=
____________________________________________________________________________________________


| [[addRating]], [[Ambient Civilians]] |See also=
|seealso= [[addRating]] [[Ambient Civilians]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:respect}}]]
[[Category:Function Group: Systems|{{uc:respect}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:respect}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:respect}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:respect}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:respect}}]]

Latest revision as of 12:58, 1 July 2022

Hover & click on the images for description

Description

Description:
RESpect - The Effective Calculation Process.
Execution:
call
Groups:
Sides

Syntax

Syntax:
[mode, param1, param2, param3] call BIS_fnc_respect
Parameters:
mode: String - case-sensitive, can be one of "SET", "ADD", "MODIFY", "KILLED"
depending on mode:
  • "SET" - set respect default values
  • "ADD" - add respect values depending on global town respect
    • param1: Object - unit to which is given respect from assigned town with random difference defined in third argument
    • param2: Number - range of random difference
  • "MODIFY" - change given respect value
    • param1: Object - unit of which respect value will be changed
    • param2: String - faction of which respect will be changed
    • param3: String - code which defines formula for change (current respect value is stored in variable _r) - e.g. "_r / 2"
  • "KILLED" - modify global town respect after civilian has been killed
Return Value:
  • "SET": Array with zero respect values (if Object is passed as argument, 1 is on place of object's faction)
  • "ADD": unit's respect values
  • "MODIFY": modified respect value
  • "KILLED": modified town respect value

Examples

Examples:
Example needed

Additional Information

See also:
addRating Ambient Civilians

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