Difference between revisions of "hintC"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|r3= Nothing |RETURNVALUE= " to "|r3= Nothing |RETURNVALUE3= ")
m (Text replacement - " <dl class="command_description"> <dt><dt>" to " <dl class="command_description"> <dt><dt>")
 
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
+
{{RV|type=command
____________________________________________________________________________________________
 
  
| ofp |Game name=
+
|game1= ofp
 +
|version1= 1.00
  
|1.00|Game version=
+
|game2= ofpe
 +
|version2= 1.00
  
|eff= local |Multiplayer Effects=
+
|game3= arma1
____________________________________________________________________________________________
+
|version3= 1.00
  
| Displays attractive hint in the center of the screen. Player control is taken away until user presses "Continue". 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.|DESCRIPTION=
+
|game4= arma2
___________________________________________________________________________________________
+
|version4= 1.00
  
| '''hintC''' content |SYNTAX=
+
|game5= arma2oa
|p1 =  content: [[String]]
+
|version5= 1.50
| [[Nothing]]  |RETURNVALUE=
 
  
____________________________________________________________________________________________
+
|game6= tkoh
 +
|version6= 1.00
  
|s2= title '''hintC''' [content1, content2, ...] |SYNTAX=2
+
|game7= arma3
 +
|version7= 0.50
  
|p21= title: [[String]] |PARAMETER21=
+
|eff= local
  
|p22= [content1, content2, ...]: [[Array]] of [[String]]s or [[Structured Text]]s. |PARAMETER2=
+
|gr1= Interaction
  
 +
|gr2= Structured Text
  
|r2= [[Nothing]] |RETURNVALUE2=
+
|gr3= Strings
  
____________________________________________________________________________________________
+
|descr= Displays a very basic message dialog in the center of the screen. Player control is taken away until "Continue" is pressed. The message dialog can be dragged around on the screen. After "Continue" has been pressed, the content of the [[hintC]] is repeated in a normal [[hint]].
 +
{{Feature | Informative | In Singleplayer, the game is paused while the message dialog is visible.}}
  
|s3= title '''hintC''' content |SYNTAX=3
+
|s1= [[hintC]] message
  
|p41= title: [[String]] |PARAMETER1=
+
|p1= message: [[String]]
  
|p42= content: [[Structured Text]] |PARAMETER2=
+
|r1= [[Nothing]]
  
|r3= [[Nothing]] |RETURNVALUE3=
+
|s2= title [[hintC]] message
____________________________________________________________________________________________
 
  
|s4= title '''hintC''' content |SYNTAX=3
+
|p21= title: [[String]] - message title
 +
|p22= message: [[String]], [[Structured Text]], [[Array]] of [[String]]s or [[Array]] of [[Structured Text]]
  
|p61= title: [[String]] |PARAMETER1=
+
|r2= [[Nothing]]
  
|p62= content: [[String]] |PARAMETER2=
+
|x1= <code>[[hintC]] "Press W to move forward";</code>
  
|r4= [[Nothing]] |RETURNVALUE4=
+
|x2= Same as the above in {{arma3}} but without second [[hint]] displayed:
____________________________________________________________________________________________
+
<code>[[hintC]] "Press W to move forward";
|x1 = <code>[[hintC]] "Press W to move forward"; </code>
+
hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] ["Unload", {
 
+
_this [[spawn]] {
|x2 = Same as the above in Arma3 but without second [[hint]] displayed:<code>[[hintC]] "Press W to move forward";
+
_this [[select]] 0 [[displayRemoveEventHandler]] ["Unload", hintC_EH];
hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] ["unload", {
 
0 = _this [[spawn]] {
 
_this [[select]] 0 [[displayRemoveEventHandler]] ["unload", hintC_EH];
 
 
[[hintSilent]] "";
 
[[hintSilent]] "";
 
};
 
};
 
}];</code>
 
}];</code>
  
[[Image:HintC.jpg|400px]]  
+
[[Image:HintC.jpg|400px]]
  
|x3= <code>"Instructions" '''hintC''' [
+
|x3= <code>"Instructions" [[hintC]] [
 
"Press W to move forward.",
 
"Press W to move forward.",
 
"Press S to move backwards.",
 
"Press S to move backwards.",
 
"Use the mouse to turn right or left.",
 
"Use the mouse to turn right or left.",
 
"Press V for weapon sights."
 
"Press V for weapon sights."
];</code> |EXAMPLE1=
+
];</code>
|x4= Same as the above in Arma3 but without second [[hint]] displayed: <code>"Instructions" '''hintC''' [
+
 
 +
|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 70: Line 72:
 
"Press V for weapon sights."
 
"Press V for weapon sights."
 
];
 
];
hintC_arr_EH = [[findDisplay]] 72 [[displayAddEventHandler]] ["unload", {
+
hintC_EH = [[findDisplay]] 72 [[displayAddEventHandler]] ["Unload", {
0 = _this [[spawn]] {
+
_this [[spawn]] {
_this [[select]] 0 [[displayRemoveEventHandler]] ["unload", hintC_arr_EH];
+
_this [[select]] 0 [[displayRemoveEventHandler]] ["Unload", hintC_EH];
 
[[hintSilent]] "";
 
[[hintSilent]] "";
 
};
 
};
 
}];</code>  
 
}];</code>  
  
  [[Image:HintC_array.jpg|400px]] |EXAMPLE2=
+
  [[Image:HintC_array.jpg|400px]]
  
|x5= <code>_separator1 = [[parseText]] "<nowiki><br />------------------------<br /></nowiki>";  
+
|x5= <code>[[private]] _separator = [[parseText]] "<nowiki><br/>------------------------<br/></nowiki>";  
_image = "\ca\ui\textures\aus_flag.paa";  
+
[[private]] _image = "\ca\ui\textures\aus_flag.paa";  
_txt = [[composeText]] <nowiki>[</nowiki>[[image]] _image, "Heading Text", _separator1, "Content"];  
+
[[private]] _message = [[composeText]] [<nowiki/>[[image]] _image, "Heading Text", _separator, "Content"];  
"" [[hintC]] _txt;</code> |EXAMPLE5=
+
"" [[hintC]] _message;</code>
  
| [[hint]], [[hintCadet]], [[hintSilent]] |SEEALSO=
+
|seealso= [[hint]] [[hintCadet]] [[hintSilent]] [[BIS_fnc_guiMessage]]
 +
}}
  
}}
 
<h3 style="display:none">Notes</h3>
 
 
<dl class="command_description">
 
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<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.
 
<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. hintC "foo"; sleep 0.1; hintC "bar"; Without a [[sleep]] statement ''hintC'' will not suspend the script it has been called from.
 
<!-- Note Section END -->
 
<dt class="note">'''[[User:ArmAtec|ArmAtec]]'''
 
<dd class="note">HintC can be used with formatting like this: HintC format["Hello %1",player].
 
</dl>
 
  
<h3 style="display:none">Bottom Section</h3>
+
<dt><dt>
[[Category:Scripting Commands|HINTC]]
+
<dd class="notedate"></dd>
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
+
<dt class="note">[[User:Str|Str]]</dt>
[[Category:Scripting Commands OFP 1.96|HINTC]]
+
<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>
[[Category:Scripting Commands OFP 1.46|HINTC]]
+
 
[[Category:Scripting Commands ArmA|HINTC]]
+
<dt><dt>
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
+
<dd class="notedate"></dd>
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
+
<dt class="note">[[User:Worldeater|Worldeater]]</dt>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
+
<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.
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
+
<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>
 +
 
 +
<dt><dt>
 +
<dd class="notedate"></dd>
 +
<dt class="note">[[User:ArmAtec|ArmAtec]]</dt>
 +
<dd class="note">HintC can be used with formatting like this: <code>[[hintC]] [[format]] ["Hello %1", [[player]]]</code></dd>
  
<!-- CONTINUE Notes -->
+
<dt><dt>
<dl class="command_description">
 
 
<dd class="notedate">Posted on March 19, 2015 - 09:52 (UTC)</dd>
 
<dd class="notedate">Posted on March 19, 2015 - 09:52 (UTC)</dd>
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">
+
<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>
"Titled" [[hintC]] all use display #72 while "untitled" one uses display #57. If you are trying examples in Arma 3 debug console, add little delay like this: <code>[] spawn {sleep 0.5; ....your example code goes here ...};</code> or no [[hintC]] will be displayed.
+
 
</dd>
 
 
</dl>
 
</dl>
<!-- DISCONTINUE Notes -->
 

Latest revision as of 16:48, 12 June 2021

Hover & click on the images for description

Description

Description:
Displays a very basic message dialog in the center of the screen. Player control is taken away until "Continue" is pressed. The message dialog can be dragged around on the screen. After "Continue" has been pressed, the content of the hintC is repeated in a normal hint.
In Singleplayer, the game is paused while the message dialog is visible.
Groups:
InteractionStructured TextStrings

Syntax

Syntax:
hintC message
Parameters:
message: String
Return Value:
Nothing

Alternative Syntax

Syntax:
title hintC message
Parameters:
title: String - message title
message: 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", { _this spawn { _this select 0 displayRemoveEventHandler ["Unload", hintC_EH]; hintSilent ""; }; }]; HintC.jpg
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_EH = findDisplay 72 displayAddEventHandler ["Unload", { _this spawn { _this select 0 displayRemoveEventHandler ["Unload", hintC_EH]; hintSilent ""; }; }]; HintC array.jpg
Example 5:
private _separator = parseText "<br/>------------------------<br/>"; private _image = "\ca\ui\textures\aus_flag.paa"; private _message = composeText [image _image, "Heading Text", _separator, "Content"]; "" hintC _message;

Additional Information

See also:
hint hintCadet hintSilent BIS_fnc_guiMessage

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