BIS fnc curatorObjectRegisteredTable: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
m (template:command argument fix) |
||
Line 10: | Line 10: | ||
| Register curator object costs from a table.<br/> | | Register curator object costs from a table.<br/> | ||
You can export a table into spreadsheet using [[BIS_fnc_exportCuratorCostTable]] and use the result as param for this function. | You can export a table into spreadsheet using [[BIS_fnc_exportCuratorCostTable]] and use the result as param for this function. | ||
|= | |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [curatorLogic, [className, cost, className, cost...]] call [[BIS_fnc_curatorObjectRegisteredTable]]; |= | | [curatorLogic, [className, cost, className, cost...]] call [[BIS_fnc_curatorObjectRegisteredTable]]; |SYNTAX= | ||
|p1= curatorLogic: [[Object]] - The curator logic to set the object costs for. |= Parameter 1 | |p1= curatorLogic: [[Object]] - The curator logic to set the object costs for. |= Parameter 1 | ||
Line 21: | Line 21: | ||
|p3= cost: [[Number]] - The cost you wish to assign to the preceding object. The cost should be between 0 and 1, with 1 representing the entire resource bar of the curator. |= Parameter 3 | |p3= cost: [[Number]] - The cost you wish to assign to the preceding object. The cost should be between 0 and 1, with 1 representing the entire resource bar of the curator. |= Parameter 3 | ||
| [[Boolean]] |= | | [[Boolean]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 27: | Line 27: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[BIS_fnc_exportCuratorCostTable]] |= | | [[BIS_fnc_exportCuratorCostTable]] |SEEALSO= | ||
| mp= Must be executed where the logic is local (on the machine of the player it is assigned to) |MPBEHAVIOUR= | | mp= Must be executed where the logic is local (on the machine of the player it is assigned to) |MPBEHAVIOUR= |
Revision as of 12:27, 7 April 2019
Description
- Description:
- Register curator object costs from a table.
You can export a table into spreadsheet using BIS_fnc_exportCuratorCostTable and use the result as param for this function. - Execution:
- call
- Multiplayer:
- Must be executed where the logic is local (on the machine of the player it is assigned to)
- Groups:
- Uncategorised
Syntax
- Syntax:
- [curatorLogic, [className, cost, className, cost...]] call BIS_fnc_curatorObjectRegisteredTable;
- Parameters:
- curatorLogic: Object - The curator logic to set the object costs for.
- className: String - The class name of the object you wish to assign a cost to. Any objects not listed in the array won't appear in the curator's unit list.
- cost: Number - The cost you wish to assign to the preceding object. The cost should be between 0 and 1, with 1 representing the entire resource bar of the curator.
- Return Value:
- Boolean
Examples
- Example 1:
// Nothing but the listed flare modules will show up in the curator's unit list
[ getAssignedCuratorLogic player, ["ModuleFlareWhite_F",0.02,"ModuleFlareYellow_F",0.02,"ModuleFlareGreen_F",0.02]] call BIS_fnc_curatorObjectRegisteredTable;
Additional Information
- See also:
- BIS_fnc_exportCuratorCostTable
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
Notes
Bottom Section
- Posted on November 10, 2014 - 17:02 (UTC)
- SilentSpike
- Be aware that you must provide an equal number of elements to the array of class names and costs. That mean every class name should be followed by an associated cost. You can add as many objects as you want as long as this condition is met.