hintC: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2") |
Lou Montana (talk | contribs) (Fix description and clean comments) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| ofp | |game1= ofp | ||
|1.00 | |version1= 1.00 | ||
|eff= local | |eff= local | ||
| Displays attractive hint in the center of the screen. Player control is taken away until | |descr= Displays attractive hint in the center of the screen. Player control is taken away until "Continue" is pressed. | ||
| | {{Informative | In Singleplayer, the game is paused as well.}} | ||
After user confirmation, the content of the [[hintC]] is repeated again in a normal [[hint]]. This type of hint can also have a title. It is also possible to drag this type of hint around the screen. | |||
| | |s1= [[hintC]] content | ||
| | |p1= content: [[String]] | ||
|r1= [[Nothing]] | |||
|s2= title [[hintC]] content | |||
| | |p21= title: [[String]] - message title | ||
|p22= content: [[String]], [[Structured Text]], [[Array]] of [[String]]s or [[Array]] of [[Structured Text]] | |||
| | |r2= [[Nothing]] | ||
| | |x1 = <code>[[hintC]] "Press W to move forward";</code> | ||
|x2 = Same as the above in {{arma3}} but without second [[hint]] displayed:<code>[[hintC]] "Press W to move forward"; | |||
|x2 = Same as the above in | |||
hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] ["unload", { | hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] ["unload", { | ||
0 = _this [[spawn]] { | 0 = _this [[spawn]] { | ||
Line 56: | Line 39: | ||
}];</code> | }];</code> | ||
[[Image:HintC.jpg|400px]] | |||
|x3= <code>"Instructions" | |x3= <code>"Instructions" [[hintC]] [ | ||
"Press W to move forward.", | "Press W to move forward.", | ||
"Press S to move backwards.", | "Press S to move backwards.", | ||
Line 65: | Line 48: | ||
];</code> |EXAMPLE3= | ];</code> |EXAMPLE3= | ||
|x4= Same as the above in | |x4= Same as the above in {{arma3}} but without second [[hint]] displayed: <code>"Instructions" [[hintC]] [ | ||
"Press W to move forward.", | "Press W to move forward.", | ||
"Press S to move backwards.", | "Press S to move backwards.", | ||
Line 78: | Line 61: | ||
}];</code> | }];</code> | ||
[[Image:HintC_array.jpg|400px]] | [[Image:HintC_array.jpg|400px]] | ||
|x5= <code>_separator1 = [[parseText]] "<nowiki><br />------------------------<br /></nowiki>"; | |x5= <code>[[private]] _separator1 = [[parseText]] "<nowiki><br />------------------------<br /></nowiki>"; | ||
_image = "\ca\ui\textures\aus_flag.paa"; | [[private]] _image = "\ca\ui\textures\aus_flag.paa"; | ||
_txt = [[composeText]] <nowiki | [[private]] _txt = [[composeText]] [<nowiki/>[[image]] _image, "Heading Text", _separator1, "Content"]; | ||
"" [[hintC]] _txt;</code> | "" [[hintC]] _txt;</code> | ||
| [[hint]], [[hintCadet]], [[hintSilent]] | |seealso= [[hint]], [[hintCadet]], [[hintSilent]] | ||
}} | |||
<h3 style="display:none">Notes</h3> | <h3 style="display:none">Notes</h3> | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dt class="note"> | |||
<dd class="notedate"> | |||
<dt class="note">[[User:Str|Str]] | |||
<dd class="note">This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command. | <dd class="note">This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command. | ||
<dt class="note"> | |||
<dd class="note">To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed. hintC "foo"; sleep 0.1; hintC "bar" | <dd class="notedate"> | ||
<dt class="note">[[User:Worldeater|Worldeater]] | |||
<dd class="note">To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed. | |||
<code>[[hintC]] "foo"; [[sleep]] 0.1; [[hintC]] "bar"</code> | |||
Without a [[sleep]] statement [[hintC]] will not suspend the script it has been called from. | |||
<dd class="notedate"> | |||
<dt class="note">[[User:ArmAtec|ArmAtec]] | |||
<dd class="note">HintC can be used with formatting like this: <code>[[hintC]] [[format]] ["Hello %1", [[player]]]</code> | |||
<dd class="notedate">Posted on March 19, 2015 - 09:52 (UTC)</dd> | |||
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> | |||
<dd class="note">"Titled" [[hintC]] uses <tt>display #72</tt> while "untitled" one uses <tt>display #57</tt>. If you are trying examples in Arma 3 debug console, add a little delay like this: <code>[] spawn {sleep 0.5; {{codecomment|/* your example code goes here*/}} };</code> or no [[hintC]] will be displayed. | |||
</dd> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands| | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands OFP 1. | [[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands OFP 1.96| | [[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands OFP 1. | [[Category:Scripting Commands OFP 1.99|Scripting Commands OFP 1.99]] | ||
[[Category:Scripting Commands ArmA | [[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]] | |||
Revision as of 20:35, 10 January 2020
Description
- Description:
- Displays attractive hint in the center of the screen. Player control is taken away until "Continue" is pressed. hintC is repeated again in a normal hint. This type of hint can also have a title. It is also possible to drag this type of hint around the screen. After user confirmation, the content of the
- Groups:
- Uncategorised
Syntax
Alternative Syntax
- Syntax:
- title hintC content
- Parameters:
- title: String - message title
- content: String, Structured Text, Array of Strings or Array of Structured Text
- Return Value:
- Nothing
Examples
- Example 1:
hintC "Press W to move forward";
- Example 2:
- Same as the above in Arma 3 but without second hint displayed:
hintC "Press W to move forward"; hintC_EH = findDisplay 57 displayAddEventHandler ["unload", { 0 = _this spawn { _this select 0 displayRemoveEventHandler ["unload", hintC_EH]; hintSilent ""; }; }];
- Example 3:
"Instructions" hintC [ "Press W to move forward.", "Press S to move backwards.", "Use the mouse to turn right or left.", "Press V for weapon sights." ];
- Example 4:
- Same as the above in Arma 3 but without second hint displayed:
"Instructions" hintC [ "Press W to move forward.", "Press S to move backwards.", "Use the mouse to turn right or left.", "Press V for weapon sights." ]; hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", { 0 = _this spawn { _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH]; hintSilent ""; }; }];
- Example 5:
private _separator1 = parseText "<br />------------------------<br />"; private _image = "\ca\ui\textures\aus_flag.paa"; private _txt = composeText [image _image, "Heading Text", _separator1, "Content"]; "" hintC _txt;
Additional Information
- See also:
- hinthintCadethintSilent
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
- Str
- This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command.
- Worldeater
- To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed.
hintC "foo"; sleep 0.1; hintC "bar"
Without a sleep statement hintC will not suspend the script it has been called from. - ArmAtec
- HintC can be used with formatting like this:
hintC format ["Hello %1", player]
- Posted on March 19, 2015 - 09:52 (UTC)
- Killzone Kid
- "Titled" hintC uses display #72 while "untitled" one uses display #57. If you are trying examples in Arma 3 debug console, add a little delay like this:
[] spawn {sleep 0.5; /* your example code goes here*/ };
or no hintC will be displayed.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Local Effect
- Scripting Commands OFP 1.46
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands ArmA
- Scripting Commands Arma 2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Interaction