BIS fnc initInspectable: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.76 | |1.76 | ||
|gr1 = Interaction | |gr1 = Interaction | ||
| Initialize inspectable object: add "Inspect" action to the object. When a player activates it, full-screen detail of the objects is shown. | | Initialize inspectable object: add "Inspect" action to the object. When a player activates it, full-screen detail of the objects is shown. | ||
| [inspectable, textureInfos, fullScreenText, soundName] call [[BIS_fnc_initInspectable]] | | [inspectable, textureInfos, fullScreenText, soundName] call [[BIS_fnc_initInspectable]] | ||
|p1= inspectable: [[Object]] - object on which the action is added | |p1= inspectable: [[Object]] - object on which the action is added | ||
|p2= textureInfos: can be one of the following: | |p2= textureInfos: can be one of the following: | ||
Line 19: | Line 19: | ||
** index: [[Number]] - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore. | ** index: [[Number]] - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore. | ||
** aspectRatio: [[Number]] - (Optional, default -1) texture aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default. | ** aspectRatio: [[Number]] - (Optional, default -1) texture aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default. | ||
* [[Boolean]] - [[true]] to instantly show the ''inspectable'' full-screen preview ('''following params are then ignored''') | * [[Boolean]] - [[true]] to instantly show the ''inspectable'' full-screen preview ('''following params are then ignored''') | ||
|p3= fullScreenText: [[String]] - text to be shown after clicking on READ button. Ideally localized. | |p3= fullScreenText: [[String]] - text to be shown after clicking on READ button. Ideally localized. | ||
|p4= soundName: [[String]] - sound played when entering full-screen preview. Sould be defined in [[Description.ext#CfgSounds|CfgSounds]]. | |p4= soundName: [[String]] - sound played when entering full-screen preview. Sould be defined in [[Description.ext#CfgSounds|CfgSounds]]. | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[myLeaflet, "#(argb,8,8,3)color(1,0,1,1)", "This is some Magic Pink"] [[call]] [[BIS_fnc_initInspectable]]; {{codecomment|// Initialize}}</code> | |x1= <code>[myLeaflet, "#(argb,8,8,3)color(1,0,1,1)", "This is some Magic Pink"] [[call]] [[BIS_fnc_initInspectable]]; {{codecomment|// Initialize}}</code> | ||
|x2= <code>[myLeaflet, [[true]]] [[call]] [[BIS_fnc_initLeaflet]]; {{codecomment|// Show preview instantly}}</code> | |x2= <code>[myLeaflet, [[true]]] [[call]] [[BIS_fnc_initLeaflet]]; {{codecomment|// Show preview instantly}}</code> | ||
| [[BIS_fnc_holdActionAdd]], [[BIS_fnc_holdActionRemove]] | | [[BIS_fnc_holdActionAdd]], [[BIS_fnc_holdActionRemove]] | ||
}} | }} |
Revision as of 23:12, 17 January 2021
Description
- Description:
- Initialize inspectable object: add "Inspect" action to the object. When a player activates it, full-screen detail of the objects is shown.
- Execution:
- call
- Groups:
- Interaction
Syntax
- Syntax:
- [inspectable, textureInfos, fullScreenText, soundName] call BIS_fnc_initInspectable
- Parameters:
- inspectable: Object - object on which the action is added
- textureInfos: can be one of the following:
- String - texture path
- Array - [texture, index, aspectRatio]:
- texture: String - texture path
- index: Number - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore.
- aspectRatio: Number - (Optional, default -1) texture aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default.
- Boolean - true to instantly show the inspectable full-screen preview (following params are then ignored)
- fullScreenText: String - text to be shown after clicking on READ button. Ideally localized.
- soundName: String - sound played when entering full-screen preview. Sould be defined in CfgSounds.
- Return Value:
- Nothing
Examples
- Example 1:
[myLeaflet, "#(argb,8,8,3)color(1,0,1,1)", "This is some Magic Pink"] call BIS_fnc_initInspectable; // Initialize
- Example 2:
[myLeaflet, true] call BIS_fnc_initLeaflet; // Show preview instantly
Additional Information
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