hintC: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |game5= arma2oa |version5= 1.51" to " |game5= arma2oa |version5= 1.50") |
(Fixed description, added BIS_fnc_guiMessage to See Also) |
||
Line 30: | Line 30: | ||
|gr3= Strings | |gr3= Strings | ||
|descr= Displays | |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]] | |||
|p1= | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|s2= title [[hintC]] | |s2= title [[hintC]] message | ||
|p21= title: [[String]] - message title | |p21= title: [[String]] - message title | ||
|p22= | |p22= message: [[String]], [[Structured Text]], [[Array]] of [[String]]s or [[Array]] of [[Structured Text]] | ||
|r2= [[Nothing]] | |r2= [[Nothing]] | ||
Line 51: | Line 48: | ||
|x1 = <code>[[hintC]] "Press W to move forward";</code> | |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 {{arma3}} but without second [[hint]] displayed: | ||
hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] [" | <code>[[hintC]] "Press W to move forward"; | ||
hintC_EH = [[findDisplay]] 57 [[displayAddEventHandler]] ["Unload", { | |||
_this [[select]] 0 [[displayRemoveEventHandler]] [" | _this [[spawn]] { | ||
_this [[select]] 0 [[displayRemoveEventHandler]] ["Unload", hintC_EH]; | |||
[[hintSilent]] ""; | [[hintSilent]] ""; | ||
}; | }; | ||
Line 74: | Line 72: | ||
"Press V for weapon sights." | "Press V for weapon sights." | ||
]; | ]; | ||
hintC_EH = [[findDisplay]] 72 [[displayAddEventHandler]] ["Unload", { | |||
_this [[spawn]] { | _this [[spawn]] { | ||
_this [[select]] 0 [[displayRemoveEventHandler]] [" | _this [[select]] 0 [[displayRemoveEventHandler]] ["Unload", hintC_EH]; | ||
[[hintSilent]] ""; | [[hintSilent]] ""; | ||
}; | }; | ||
Line 83: | Line 81: | ||
[[Image:HintC_array.jpg|400px]] | [[Image:HintC_array.jpg|400px]] | ||
|x5= <code>[[private]] | |x5= <code>[[private]] _separator = [[parseText]] "<nowiki><br/>------------------------<br/></nowiki>"; | ||
[[private]] _image = "\ca\ui\textures\aus_flag.paa"; | [[private]] _image = "\ca\ui\textures\aus_flag.paa"; | ||
[[private]] | [[private]] _message = [[composeText]] [<nowiki/>[[image]] _image, "Heading Text", _separator, "Content"]; | ||
"" [[hintC]] | "" [[hintC]] _message;</code> | ||
|seealso= [[hint]] | |seealso= [[hint]] [[hintCadet]] [[hintSilent]] [[BIS_fnc_guiMessage]] | ||
}} | }} | ||
Revision as of 22:08, 5 May 2021
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.
- Groups:
- InteractionStructured TextStrings
Syntax
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 ""; }; }];
- 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 ""; }; }];
- 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.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Interaction
- Command Group: Structured Text
- Command Group: Strings
- Scripting Commands: Local Effect