Difference between revisions of "API ConfigureMultipleWeaponGroups"

From Vendetta Lua
Jump to: navigation, search
(split)
 
 
Line 1: Line 1:
=== ConfigureMultipleWeaponGroups ===
+
{{Function
'''Definition:'''<br>
+
| name        = ConfigureMultipleWeaponGroups
ConfigureMultipleWeaponGroups({table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}, function cb) -> nil
+
| desc        = configures weapon groups according to given tables.
<br>
+
| arg1_name    =  
'''Description:'''<br>
+
| arg1_type    = table
configures weapon groups according to given tables.
+
| arg1_desc    = {table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}<br/>
<br>
+
''group*key*'' Each table represents one group key. Key 1-6 map to the primary trigger, 7-12 secondary and 13-18 tertiary.  Each index in the tables represents a port. Weapon ports start at index 2. Valid values for each port are nil or true.
'''Arguments:'''<br>
+
| arg1_opt    =
''group*key*'' Each table represents one group key. Key 1-6 map to the primary trigger, 7-12 secondary and 13-18 tertiary.  Each index in the tables represents a port. Weapon ports start at index 2. Valid values for each port are nil or true.<br>
+
| arg2_name    = cb
''cb'' function to call on completition (optional)
+
| arg2_type    = function
<br>
+
| arg2_desc    = function to call on completion
'''Example:'''<br>
+
| arg2_opt    = true
 +
| ret1_type    = nil
 +
| notes        = '''Example:'''<br>
 
<source lang=lua>
 
<source lang=lua>
 
-- enable port 1 for the primary trigger and port 2 for the secondary  
 
-- enable port 1 for the primary trigger and port 2 for the secondary  
Line 16: Line 18:
 
ConfigureMultipleWeaponGroups{[1]={nil, true, nil}, [2]={nil, nil, true}}
 
ConfigureMultipleWeaponGroups{[1]={nil, true, nil}, [2]={nil, nil, true}}
 
</source>
 
</source>
 +
}}

Latest revision as of 03:35, 19 October 2011

ConfigureMultipleWeaponGroups

Definition

ConfigureMultipleWeaponGroups( table [,  function  cb ]) ->  nil
Description

configures weapon groups according to given tables.
Arguments

Type Name Description
table {table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}
group*key* Each table represents one group key. Key 1-6 map to the primary trigger, 7-12 secondary and 13-18 tertiary. Each index in the tables represents a port. Weapon ports start at index 2. Valid values for each port are nil or true.
function cb function to call on completion (optional)
Returns

Type Name Description
nil
Notes

Example:

-- enable port 1 for the primary trigger and port 2 for the secondary 
-- index 1 is the power cell port
ConfigureMultipleWeaponGroups{[1]={nil, true, nil}, [2]={nil, nil, true}}