OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: SaOk on 14 Sep 2010, 15:40:00
-
How can I create those new "Operation Arrowhead"-hints with time bar? Those you see a lot in OA tutorial missions.
-
BIS use some functions of theirs.
Can't really say how it works, you can for example depbo the training missions to see how they use it.
You can also find BIS_fnc_hints from the Functions module.
EDIT:
Not that it clarifies anything, BIS have again succesfully kept everything silent and secret.. ::)
-
I havent yet managed to unpack OA pbo-files on my 64bit Vista, but I´ll try more and also check that function. I let you know if I find out how the time bar works.
-
Latest version of Kegetys' cpbo works just fine on 64bit 7.
And so does Eliteness.
-
Do you want to use the timebar?
Or do you want to use the colored texts?
for the latter,
you have to use the XML parseText command.
SAMPLE(put in init.sqf) :
_text1 = "<t color='#ffffff'> Name of player is : </t>" + str (name player);
_lineBreak1 = "<br/>";
_text2 = "<t size='1.5'> This is a bigger text.</t>";
_final = _text1+_lineBreak1 +_text2;
hint parseText _final;
Commands (AFAIK) :
TEXT
---------
Tags :
<t></t>
tag attributes :
color -
desired color (obtain color code in other programs such as PhotoShop)
format : color='#colorcode'
size -
1 - default size
format - size='number'
LINEBREAK
-------------
<br/>
format : "first line<br/>secondLine"
NOT </br>!
hope this helps
Regards,
haroon1992
-
Thx, haroon1992. I wasnt looking for those colored text/font sizes since I already have used them before, more of those new symbols and the new time bar presented in OA. But thanks for help anyway.
That Eliteness works great. I found the advanced hint system. They look complicated with endless variables and paths to different folders, but here is a working code for simple welcome hint shown in tutorial mission. It needs a pic to work without error and have forced "tutorial mission"-text shown, but here is how it works trought script (function module is needed):
[] call bis_fnc_hints;
BIS_MissionName = "Mission name";
BIS_Objectives = [
"Destroy trucks",
"Move back to HQ",
"Sleep",
"Meet your team"
];
sleep 5;
[BIS_MissionName,BIS_Objectives] call BIS_AdvHints_createWelcome;
Edit: Here is more examples for advanced hints:
Hint that wait player to press "space" before dissapearing:
[] call bis_fnc_hints;
sleep 4;
BIS_AdvHints_Header = "";
BIS_AdvHints_Text = "";
BIS_AdvHints_Footer = "";
BIS_AdvHints_Duration = -1;
BIS_AdvHints_ShowCond = "true";
BIS_AdvHints_ShowCode = "";
BIS_AdvHints_HideCond = "";
BIS_AdvHints_HideCode = "";
BIS_AdvHints_Silent = false;
BIS_AdvHints_Seamless = false;
BIS_AdvHints_KeyPress = "";
BIS_AdvHints_CanSkip = true;
BIS_AdvHints_NoFooter = false;
call BIS_AdvHints_setDefaults;
sleep 5;
BIS_AdvHints_THeader = "Headline text";
BIS_AdvHints_TInfo = "Info text";
BIS_AdvHints_TAction = "";
BIS_AdvHints_TBinds = "";
BIS_AdvHints_Text = call BIS_AdvHints_formatText;
call BIS_AdvHints_showHint;
Hint that requires "G" to be pressed:
...
BIS_AdvHints_THeader = "Headline text";
BIS_AdvHints_TInfo = "Info text";
BIS_AdvHints_TAction = "";
BIS_AdvHints_TBinds = "";
BIS_AdvHints_TBinds = ["press gear button to continue",
{'Gear' call BIS_getKeyBind}
];
BIS_AdvHints_Text = call BIS_AdvHints_formatText;
BIS_AdvHints_KeyPress = "Gear";
call BIS_AdvHints_showHint;
Hint with 7sec timer:
...
BIS_AdvHints_THeader = "Headline text";
BIS_AdvHints_TInfo = "Info text";
BIS_AdvHints_TAction = "";
BIS_AdvHints_TBinds = "";
BIS_AdvHints_Text = call BIS_AdvHints_formatText;
BIS_AdvHints_Duration = 7;
BIS_AdvHints_Seamless = true;
BIS_AdvHints_Silent = true;
call BIS_AdvHints_showHint;