hintC: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) |
Killzone Kid (talk | contribs) (combined all syntaxes) |
||
Line 9: | Line 9: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | 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. |= Description | ||
____________________________________________________________________________________________ | |||
| '''hintC''' content |= Syntax | |||
|p1 = content: [[String]] | |||
| [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | |||
|s2= title '''hintC''' [content1, content2, ...] |= Syntax2 | |||
|p21= title: [[String]]: |= Parameter 1 | |||
|p22= [content1, content2, ...]: [[Array]] of [[String]]s or [[Structured Text]]s. |= Parameter 2 | |||
|r2= [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | |||
|s3= title '''hintC''' content |= Syntax3 | |||
|p41= title: [[String]] |= Parameter 1 | |||
|p42= content: [[Structured Text]] |= Parameter 2 | |||
|r3= [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| '''hintC''' | |s4= title '''hintC''' content |= Syntax3 | ||
| | |||
| [[Nothing]] | |p61= title: [[String]] |= Parameter 1 | ||
|p62= content: [[String]] |= Parameter 2 | |||
|r4= [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1 = <code>[[hintC]] "Press W to move forward"; </code> | |x1 = <code>[[hintC]] "Press W to move forward"; </code> | ||
Line 30: | Line 58: | ||
[[Image:HintC.jpg|400px]] | [[Image:HintC.jpg|400px]] | ||
| [[hint]], [[ | |x3= <code>"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." | |||
];</code> |= Example 1 | |||
|x4= Same as the above in Arma3 but without second [[hint]] displayed: <code>"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]] ""; | |||
}; | |||
}];</code> | |||
[[Image:HintC_array.jpg|400px]] |= Example 2 | |||
|x5= <code>_separator1 = [[parseText]] "<nowiki><br />------------------------<br /></nowiki>"; | |||
_image = "\ca\ui\textures\aus_flag.paa"; | |||
_txt = [[composeText]] <nowiki>[</nowiki>[[image]] _image, "Heading Text", _separator1, "Content"]; | |||
[[hintC]] _txt;</code> |=Example 5 | |||
| [[hint]], [[hintCadet]], [[hintSilent]] |= See also | |||
}} | }} | ||
Line 36: | Line 90: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- 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: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. | |||
<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. | |||
Without a [[sleep]] statement ''hintC'' will not suspend the script it has been called from. | |||
<!-- Note Section END --> | <!-- 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> | </dl> | ||
Revision as of 10:49, 19 March 2015
Description
- Description:
- 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.
- Groups:
- Uncategorised
Syntax 1
Syntax 2
- Syntax:
- title hintC [content1, content2, ...]
- Parameters:
- title: String:
- [content1, content2, ...]: Array of Strings or Structured Texts.
- Return Value:
- Nothing
Syntax 3
- Syntax:
- title hintC content
- Parameters:
- title: String
- content: Structured Text
- Return Value:
- Nothing
Syntax 4
Examples
- Example 1:
hintC "Press W to move forward";
- Example 2:
- Same as the above in Arma3 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 Arma3 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:
_separator1 = parseText "<br />------------------------<br />"; _image = "\ca\ui\textures\aus_flag.paa"; _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].
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.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Command Group: Interaction
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters