Difference between revisions of "BIS fnc assignPlayerRole"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
 
 
{{Function|= Comments
 
{{Function|= Comments
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
Line 6: Line 5:
  
 
|1.00|= Game version
 
|1.00|= Game version
 +
 +
|Eff= local |= Effect
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| <pre>/*
+
| Ensures the player can only get in the specific vehicle role. |= Description
 +
____________________________________________________________________________________________
  
Description:
+
| [vehicle, role, path] call [[BIS_fnc_assignPlayerRole]] |= Syntax
Ensures the player can only get in the specific vehicle role
 
  
Parameter(s):
+
|p1= vehicle: [[Object]] - targeted vehicle |= Parameter 1
_this select 0: vehicle (Object)
 
_this select 1: role (String)
 
_this select 2: index / path (Scalar or Array)
 
  
Returns:
+
|p2= role: [[String]] - can be one of:
Bool
+
* "driver"
*/
+
* "gunner"
 +
* "commander"
 +
* "cargo"
 +
* "turret" |= Parameter 2
  
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
+
|p3= path: [[Array]] or [[Number]] - the turret path |= Parameter 3
____________________________________________________________________________________________
 
  
| <!-- [] call [[BIS_fnc_assignPlayerRole]]; --> |= Syntax
+
| [[Boolean]] - [[true]] when done |= Return value
 
 
|p1= |= Parameter 1
 
 
 
| |= Return value
 
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code></code> |=  
+
|x1= <code>[myVehicle, "turret", [0, 1]] [[call]] [[BIS_fnc_assignPlayerRole]];</code> |= Example 1
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| |= See also
+
| [[assignAsDriver]], [[assignAsGunner]], [[assignAsCommander]], [[assignAsCargo]], [[assignAsTurret]] |= See also
 
 
 
}}
 
}}
  

Revision as of 14:23, 27 April 2018

Template:Function

Notes

Bottom Section