BIS fnc curatorObjectRegisteredTable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|Comments=
|game1= arma3
____________________________________________________________________________________________
|version1= 1.16


| arma3 |= Game name
|gr1= Curator


|1.16|Game version=
|descr= Register curator object costs from a table.<br>
____________________________________________________________________________________________
A table can be exported into a spreadsheet using [[BIS_fnc_exportCuratorCostTable]] and used as argument for this function.


| Register curator object costs from a table.<br/>
|s1= [curatorLogic, [className, cost, className, cost...]] call [[BIS_fnc_curatorObjectRegisteredTable]]
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]]; |SYNTAX=
|p1= curatorLogic: [[Object]] - the curator logic to set the object costs for.


|p1= curatorLogic: [[Object]] - The curator logic to set the object costs for. |PARAMETER1=
|p2= 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.


|p2= 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. |PARAMETER2=
|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.


|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. |PARAMETER3=
|r1= [[Boolean]]


| [[Boolean]] |RETURNVALUE=
|x1= <sqf>// 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;</sqf>


|x1= <code>// Nothing but the listed flare modules will show up in the curator's unit list<br/>[ [[getAssignedCuratorLogic]] [[player]], ["ModuleFlareWhite_F",0.02,"ModuleFlareYellow_F",0.02,"ModuleFlareGreen_F",0.02]] call [[BIS_fnc_curatorObjectRegisteredTable]];</code> |=
|seealso= [[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)
 
| mp= Must be executed where the logic is local (on the machine of the player it is assigned to) |MPBEHAVIOUR=
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Curator|{{uc:curatorObjectRegisteredTable}}]]
[[Category:Functions|{{uc:curatorObjectRegisteredTable}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:curatorObjectRegisteredTable}}]]


<!-- CONTINUE Notes -->
<dt></dt>
<dl class="command_description">
<dd class="notedate">Posted on 2014-11-10 - 17:02 (UTC)</dd>
<dd class="notedate">Posted on November 10, 2014 - 17:02 (UTC)</dd>
<dt class="note">[[User:SilentSpike|SilentSpike]]</dt>
<dt class="note">[[User:SilentSpike|SilentSpike]]</dt>
<dd class="note">
<dd class="note">
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.
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.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
Register curator object costs from a table.
A table can be exported into a spreadsheet using BIS_fnc_exportCuratorCostTable and used as argument 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:
Curator

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
Posted on 2014-11-10 - 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.