BIS fnc initInspectable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (Arguments fix)
Line 17: Line 17:
* [[String]] - texture path
* [[String]] - texture path
* [[Array]] - [texture, index, aspectRatio]:
* [[Array]] - [texture, index, aspectRatio]:
** texture: [[String]] - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore.
** texture: [[String]] - texture path
** index: [[Number]] - (Optional, default -1) aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default.
** index: [[Number]] - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore.
* [[Bool]] - true show the full-screen preview instantly ('''following params are ignored''') |= Parameter 2
** aspectRatio: [[Number]] - (Optional, default -1) texture aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default.
* [[Bool]] - [[true]] to instantly show the ''inspectable'' full-screen preview ('''following params are then ignored''') |= Parameter 2


|p3= fullScreenText: [[String]] - text to be shown after clicking on READ button. Ideally localized. |= Parameter 3
|p3= fullScreenText: [[String]] - text to be shown after clicking on READ button. Ideally localized. |= Parameter 3

Revision as of 08:48, 21 April 2018

Hover & click on the images for description

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:
Uncategorised

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.
  • Bool - 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

See also:
BIS_fnc_holdActionAddBIS_fnc_holdActionRemove

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