hintC: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (New hintC dialog ID ("#define IDD_HINTC_EX 72", ui_f.pbo\hpp\defineResincl.inc line 557))
m (Text replacement - "[] spawn" to "0 spawn")
 
(54 intermediate revisions by 7 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 |= Effects in MP
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| Works the same way as [[hint]], except the text is also displayed in the middle of the screen.
|game4= arma2
|version4= 1.00


The game is paused until the player presses "Continue". |= Description
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| '''hintC''' text |= Syntax
|game6= tkoh
|p1 =  text: [[String]]
|version6= 1.00
| [[Nothing]]  |= Return value
____________________________________________________________________________________________
|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";
|game7= arma3
hintC_EH = [[findDisplay]] 72 [[displayAddEventHandler]] ["unload", {
|version7= 0.50
0 = _this [[spawn]] {
 
_this [[select]] 0 [[displayRemoveEventHandler]] ["unload", hintC_EH];
|eff= local
[[hintSilent]] "";
 
|gr1= Interaction
 
|gr2= Structured Text
 
|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.}}
 
|s1= [[hintC]] message
 
|p1= message: [[String]]
 
|r1= [[Nothing]]
 
|s2= title [[hintC]] message
 
|p21= title: [[String]] - message title
 
|p22= message: [[String]], [[Structured Text]], [[Array]] of [[String]]s or [[Array]] of [[Structured Text]]
 
|r2= [[Nothing]]
 
|x1= <sqf>hintC "Press W to move forward";</sqf>
 
|x2= Same as the above in {{arma3}} but without second [[hint]] displayed:<br>[[File:HintC.jpg|400px|right]]
<sqf>
hintC "Press W to move forward";
hintC_EH = findDisplay 57 displayAddEventHandler ["Unload", {
_this spawn {
_this select 0 displayRemoveEventHandler ["Unload", hintC_EH];
hintSilent "";
};
}];
</sqf>
 
|x3= <sqf>
"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."
];
</sqf>
 
|x4= Same as the above in {{arma3}} but without second [[hint]] displayed:<br>[[File:HintC_array.jpg|400px|right]]
<sqf>
"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 "";
};
};
}];</code>
}];
</sqf>


[[Image:HintC.jpg|400px]]  
|x5= <sqf>
private _separator = parseText "<br/>------------------------<br/>";
private _image = "\ca\ui\textures\aus_flag.paa";
private _message = composeText [image _image, "Heading Text", _separator, "Content"];
"" hintC _message;
</sqf>


| [[hint]], [[hintCadet]], [[hintC array]], [[hintC structuredText]], [[hintC text]], [[hintSilent]] |= See also
|seealso= [[hint]] [[hintCadet]] [[hintSilent]] [[BIS_fnc_guiMessage]]
}}


{{Note
|user= Str
|timestamp= 20060731181800
|text= 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.
}}
}}
<h3 style="display:none">Notes</h3>
<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:ArmAtec|ArmAtec]]'''<dd class="note">
HintC can be used with formatting like this:
HintC format["Hello %1",player]
<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 -->
{{Note
</dl>
|user= Worldeater
|timestamp= 20090515234200
|text= To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed.
<sqf>hintC "foo"; sleep 0.1; hintC "bar"</sqf>
Without a [[sleep]] statement [[hintC]] will not suspend the script it has been called from.
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
[[Category:Scripting Commands|HINTC]]
|user= Killzone_Kid
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
|timestamp= 20150319095200
[[Category:Scripting Commands OFP 1.96|HINTC]]
|text= "Titled" [[hintC]] uses {{hl|display #72}} while "untitled" one uses {{hl|display #57}}. If you are trying examples in Arma 3 debug console, add a little delay like this:
[[Category:Scripting Commands OFP 1.46|HINTC]]
<sqf>0 spawn { sleep 0.5; /* your example code goes here*/ };</sqf> or no [[hintC]] will be displayed.
[[Category:Scripting Commands ArmA|HINTC]]
}}
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:24, 2 September 2024

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.jpg
hintC "Press W to move forward"; hintC_EH = findDisplay 57 displayAddEventHandler ["Unload", { _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:
HintC array.jpg
"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 ""; }; }];
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 - c
Posted on Jul 31, 2006 - 18:18 (UTC)
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 - c
Posted on May 15, 2009 - 23:42 (UTC)
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.
Killzone_Kid - c
Posted on Mar 19, 2015 - 09:52 (UTC)
"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:
0 spawn { sleep 0.5; /* your example code goes here*/ };
or no hintC will be displayed.