BIS fnc sceneCheckWeapons: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Text replacement - "(\|p[0-9]+ *= *[^(]+\(Optional(, default[^)]*)\) )A([a-z])" to "$1a$3")
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|Comments=
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |Game name=
|game2= arma2oa
|version2= 1.50


|1.00|Game version=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| <pre>
|game4= arma3
/**************************************************************************************************************************
|version4= 0.50
Version: 1.0
Name: CheckWeaponsBefore scene
DESCRIPTION: Checks if participants haven't missing weapon or haven't it selected before scene
Function works as toggle -
1st run of script: running in SETUP mode - sets correct weapons for scene
2nd run of script: running in RESTORE mode - restore origin weapons(delete weapons after scene if character hadn't any)
There is default SETUP: [[BIS_Cooper, "primary"],[BIS_Ohara, "primary"],[BIS_Rodriguez, "primary"],[BIS_Sykes, "primary"],[BIS_Miles, "primary"]]
 
PARAMETERS: _participants: ARRAY of arrays in format [[character1, "typeofweapon"],[character2, "typeofweapon"],..,[characterx, "typeofweapon"]]
where character is for example BIS_Cooper and typeofweapon is one of primary/pistol
RETURNED VALUE: nothing
****************************************************************************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |DESCRIPTION=
|gr1= Scenes
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_sceneCheckWeapons]]; --> |SYNTAX=
|descr= Checks if participants have not missing weapon or have not it selected before scene<br>Function works as a toggle:
* 1st run of script: running in SETUP mode - sets correct weapons for scene
* 2nd run of script: running in RESTORE mode - restore origin weapons(delete weapons after scene if character hadn't any)


|p1= |PARAMETER1=
|s1= [participants] call [[BIS_fnc_sceneCheckWeapons]]


| |RETURNVALUE=
|p1= participants: [[Array]] of [[Array]]s - (Optional, default <sqf inline>[[BIS_Cooper, "primary"],[BIS_Ohara, "primary"],[BIS_Rodriguez, "primary"],[BIS_Sykes, "primary"],[BIS_Miles, "primary"]]</sqf>) an array of arrays in format:<br>
____________________________________________________________________________________________
0: [[Object]] - Unit to check<br>
1: [[String]] - Weapon type (primary, pistol)


|x1= <code></code> |=
|r1= [[Nothing]]
____________________________________________________________________________________________


| |SEEALSO=
|x1= <sqf>
[
[BIS_Cooper, "primary"],
[BIS_Ohara, "primary"],
[BIS_Rodriguez, "primary"],
[BIS_Sykes, "primary"],
[BIS_Miles, "primary"]
] call BIS_fnc_sceneCheckWeapons;
</sqf>


|seealso= [[BIS_fnc_sceneSetObjects]] [[BIS_fnc_objectsGrabber]] [[BIS_fnc_objectsMapper]]
}}
}}
<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:Function Group: Scenes|{{uc:sceneCheckWeapons}}]]
[[Category:Functions|{{uc:sceneCheckWeapons}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:sceneCheckWeapons}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:sceneCheckWeapons}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:sceneCheckWeapons}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:sceneCheckWeapons}}]]

Latest revision as of 11:17, 8 November 2023

Hover & click on the images for description

Description

Description:
Checks if participants have not missing weapon or have not it selected before scene
Function works as a toggle:
  • 1st run of script: running in SETUP mode - sets correct weapons for scene
  • 2nd run of script: running in RESTORE mode - restore origin weapons(delete weapons after scene if character hadn't any)
Execution:
call
Groups:
Scenes

Syntax

Syntax:
[participants] call BIS_fnc_sceneCheckWeapons
Parameters:
participants: Array of Arrays - (Optional, default [[BIS_Cooper, "primary"],[BIS_Ohara, "primary"],[BIS_Rodriguez, "primary"],[BIS_Sykes, "primary"],[BIS_Miles, "primary"]]) an array of arrays in format:
0: Object - Unit to check
1: String - Weapon type (primary, pistol)
Return Value:
Nothing

Examples

Example 1:
[ [BIS_Cooper, "primary"], [BIS_Ohara, "primary"], [BIS_Rodriguez, "primary"], [BIS_Sykes, "primary"], [BIS_Miles, "primary"] ] call BIS_fnc_sceneCheckWeapons;

Additional Information

See also:
BIS_fnc_sceneSetObjects BIS_fnc_objectsGrabber BIS_fnc_objectsMapper

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