BIS fnc initInspectable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported)
m (Some wiki formatting)
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


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


| arma3 |= Game name
|gr1= Interaction


|1.00|= Game version
|descr= Initialize inspectable object: add "Inspect" action to the object. When a player activates it, full-screen detail of the objects is shown.
____________________________________________________________________________________________


| <pre>/*
|s1= [inspectable, textureInfos, fullScreenText, soundName] call [[BIS_fnc_initInspectable]]


Description:
|p1= inspectable: [[Object]] - object on which the action is added
Initialize inspectable object.
Adds "Inspect" action to the object. When player activates it, full-screen detail of the objects is shown.


Parameter(s):
|p2= textureInfos: can be one of the following:
0: OBJECT - object on which the action is added
* [[String]] - texture path
1:
* [[Array]] - [texture, index, aspectRatio]:
STRING - texture
** texture: [[String]] - texture path
ARRAY of following items:
** index: [[Number]] - (Optional, default 0) index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore.
0: STRING - texture
** aspectRatio: [[Number]] - (Optional, default -1) texture aspect ratio. 0.5 means width will be 0.5 of the height. -1 means texture default.
1 (Optional): NUMBER - index on which the texture will be mapped on the object using setObjectTexture. Use -1 to ignore. Default is 0.
* [[Boolean]] - [[true]] to instantly show the ''inspectable'' full-screen preview ('''following params are then ignored''')
2 (Optional): NUMBER - aspect ratio. 0.5 means width will be 0.5 of the height. Default is -1, which means texture default.
BOOL - show the full-screen preview instantly (following params are ignored)
2: (Optional) STRING - text of the texture, shown after clicking on READ button. Ideally localized.
3 (Optional): STRING - sound played when enetering full-screen preview. Class from CfgSounds.


Examples:
|p3= fullScreenText: [[String]] - text to be shown after clicking on READ button. Ideally localized.
// Initialize
[this,"#(argb,8,8,3)color(1,0,1,1)","Pink"] call bis_fnc_initInspectable;


// Show preview instantly
|p4= soundName: [[String]] - sound played when entering full-screen preview. Sould be defined in [[Description.ext#CfgSounds|CfgSounds]].
[myLeaflet,true] call bis_fnc_initLeaflet;


Returns:
|r1= [[Nothing]]
NOTHING
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x1= <sqf>[myLeaflet, "#(argb,8,8,3)color(1,0,1,1)", "This is some Magic Pink"] call BIS_fnc_initInspectable; // initialize</sqf>
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_initInspectable]]; --> |= Syntax
|x2= <sqf>[myLeaflet, true] call BIS_fnc_initLeaflet; // Show preview instantly</sqf>
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


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

Latest revision as of 11:46, 6 May 2022

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

See also:
BIS_fnc_holdActionAdd BIS_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