Advertisement
pit_ESUS

Untitled

Nov 15th, 2020
1,863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.43 KB | None | 0 0
  1. /*
  2. -------STATIC TEXTS (only fade in and out, no movement)
  3. */
  4.     //Simple text, one line, middle of the screen;
  5. titletext ["MISSION NAME    By: Author name","plain"];
  6.  
  7.     //Simple text, two lines, middle of the screen;
  8. titletext ["MISSION NAME    By: Author name \n Date: HH:MM","plain"];
  9.  
  10.     //Simple text, two lines, bottom of the screen;
  11. titletext ["MISSION NAME    By: Author name \n Date: HH:MM","plain down"];
  12.  
  13.     //Titletext with a variable containing structured text;
  14. a = format ["Mission name, By: Author name \n %1 : %2",str (date select 3),str (date select 4)];
  15. titletext  [a,"plain"];
  16.  
  17.  
  18. /*
  19. --------------ANIMATED TEXTS (use predefined functions to animate the letters)
  20. */
  21.  
  22.     //Individual letters appear quickly in random order, then disappear. Bottom right corner.
  23. any= ["Mission name" ,
  24. "By: Author name" ,
  25.  "Date"
  26. ] spawn BIS_fnc_infoText;
  27.  
  28.  
  29.     //Letters appear gradually, upper part of the screen, middle;
  30. any=[
  31.     [
  32.         ["Mission name","<t align = 'center' size = '0.7'>%1</t><br/>"],
  33.         ["Author name","<t align = 'center' size = '0.7'>%1</t><br/>"],
  34.         ["Date","<t align = 'center' size = '0.7'>%1</t>"]
  35.  
  36.     ]
  37. ] spawn BIS_fnc_typeText;
  38.  
  39.     //Letters appear gradually, upper right corner of the screen, few effects added;
  40.         // changed font, size and color
  41. any =
  42. [
  43.     [
  44.         ["Mission name","align = 'center' size = '0.7' font='PuristaBold'"],
  45.         ["","<br/>"],
  46.         ["Author name","align = 'center' size = '0.8'","#aaaaaa"],
  47.         ["","<br/>"],
  48.         ["Date","align = 'center' size = '0.7'"]
  49.     ]
  50. ]
  51. spawn BIS_fnc_typeText2;
  52.  
  53.  
  54.     //InfoText again with variables in the third line;
  55. // takes hours and minutes from the date command (in-game date, format YYYY:MM:DD:HH:MM) and displays them
  56. any= ["Mission name" ,
  57. "By: Author name" ,
  58.  str (date select 3) + ":" + str (date select 4)]
  59. spawn BIS_fnc_infoText;
  60.  
  61.  
  62.     //TypeText again with variables in the third line;
  63.         //Same variation as above, only with different function.
  64. any=[
  65.     [
  66.         ["Mission name","<t align = 'center' size = '0.7'>%1</t><br/>"],
  67.         ["Author name","<t align = 'center' size = '0.7'>%1</t><br/>"],
  68.         [str (date select 3) + ":" + str (date select 4),"<t align = 'center' size = '0.7'>%1</t>"]
  69.  
  70.     ]
  71. ] spawn BIS_fnc_typeText;
  72.  
  73.  
  74.     //TypeText2 again with variables in the third line;
  75. any =
  76. [
  77.     [
  78.         ["Mission name","align = 'center' size = '0.7' font='PuristaBold'"],
  79.         ["","<br/>"],
  80.         ["Author name","align = 'center' size = '0.7'","#aaaaaa"],
  81.         ["","<br/>"],
  82.         [str (date select 3) + ":" + str (date select 4),"align = 'center' size = '0.7'"]
  83.     ]
  84. ]
  85.  spawn BIS_fnc_typeText2;
  86.  
  87.  
  88.  
  89. /*
  90. Additional info:
  91. To pass to a new line, use the following:
  92. TitleText - \n
  93. InfoText - a new parameter ( ["blabla","new line","third line"] )
  94. TypeText - ["text","<t>%1</t> <br/>"], the <br/> indicates that the next text will be on another line
  95. TypeText - ["","<br/>"],
  96.  
  97. To combine a fixed text with variables, you can use + if you are writing a structured text.
  98. A structured text is used in animated text variants and functions.
  99. str (date select 3) + ":" + str (date select 4)
  100. date select 3 = 6, date select 4 = 35
  101. str 6 = 6, str 35 = 35
  102. So now we have a text "6", a text ":" and "35"
  103. final result 6:35
  104.  
  105. TitleText or CutText don't support structured text as a part of the command. You can see in the advanced TitleText examples that I did the text formatting before using the command itself, that way I used structured text, saved it into a variable
  106. and only then used it in the command.
  107. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement