Hi everyone, I wanted to share an OSP from my mod Fracture Moment: Rise of Ottoman.
-What is this ?
+ As you see in films, movies, there is a generic screen that writes place and date. Like ; January 16, 1534
Rome outskirts
So, I was thought it should have in my mod's scenario. Then i wrote this.
Actually, I was wrote this about 2-3 months ago, but forgot to share here . Anyways,
module_presentations;
module_strings;
Any mission in module_mission_templates;
Here is the proof ;
To use this code, You should give credits to me. And tell me that you are going to use it. I would like to see how this code implemented on mods
-What is this ?
+ As you see in films, movies, there is a generic screen that writes place and date. Like ; January 16, 1534
Rome outskirts
So, I was thought it should have in my mod's scenario. Then i wrote this.
Actually, I was wrote this about 2-3 months ago, but forgot to share here . Anyways,
module_presentations;
Code:
# screen write
("screen_write",prsntf_read_only,0,[
(ti_on_presentation_load,
[
(assign, "$g_presentation_obje_1", -1),
(assign, "$g_presentation_obje_2", -1),
(assign, "$g_presentation_obje_1_alpha", 0),
(assign, "$g_presentation_obje_2_alpha", 0),
(mission_cam_set_screen_color, 0xFF000000), #Blackout the screen first
]),
(ti_on_presentation_run,
[
(store_trigger_param_1, ":cur_time"),
(set_fixed_point_multiplier, 1000),
(presentation_set_duration, 1000000),
(try_begin),
(lt, "$g_presentation_obje_1", 0),
(str_store_string, s1, "str_date_string"),#first string
(create_text_overlay, "$g_presentation_obje_1", s1, tf_center_justify|tf_double_space|tf_vertical_align_center),
(overlay_set_color, "$g_presentation_obje_1", 0xFF0000),
(overlay_set_alpha, "$g_presentation_obje_1", 0),
(position_set_x, pos1, 1750),
(position_set_y, pos1, 1750),
(overlay_set_size, "$g_presentation_obje_1", pos1),
(position_set_x, pos1, 500),
(position_set_y, pos1, 375),
(overlay_set_position, "$g_presentation_obje_1", pos1),
(overlay_animate_to_alpha, "$g_presentation_obje_1", 2000, 0xFF),
(else_try),
(gt, ":cur_time", 6000), # If 6 seconds past
(lt, "$g_presentation_obje_2", 0), #then second string
(str_store_string, s2, "str_place_string"),
(create_text_overlay, "$g_presentation_obje_2", s2, tf_center_justify|tf_double_space|tf_vertical_align_center),
(overlay_set_color, "$g_presentation_obje_2", 0xFF0000),
(overlay_set_alpha, "$g_presentation_obje_2", 0),
(position_set_x, pos1, 1500),
(position_set_y, pos1, 1500),
(overlay_set_size, "$g_presentation_obje_2", pos1),
(position_set_x, pos1, 500),
(position_set_y, pos1, 295),
(overlay_set_position, "$g_presentation_obje_2", pos1),
(overlay_animate_to_alpha, "$g_presentation_obje_2", 2000, 0xFF),
(else_try),
(gt, ":cur_time", 7500), #If 7.5 seconds past
(eq, "$g_presentation_obje_1_alpha", 0),
(assign, "$g_presentation_obje_1_alpha", 1),
(overlay_animate_to_alpha, "$g_presentation_obje_1", 1500, 0x00), #lose the string1
(else_try),
(gt, ":cur_time", 8500), #If 8.5 seconds past
(eq, "$g_presentation_obje_2_alpha", 0),
(assign, "$g_presentation_obje_2_alpha", 1),
(overlay_animate_to_alpha, "$g_presentation_obje_2", 1500, 0x00),#lose the string2
(else_try),
(gt, ":cur_time", 11000), #If 11 seconds past
(mission_cam_animate_to_screen_color, 0x00000000, 3000), # bright the screen in 3 seconds
(else_try),
(gt, ":cur_time", 15000), # If 15 seconds past
(presentation_set_duration, 0), #end the party
(try_end),
]),
]),
# screen write ends
module_strings;
Code:
# screen write
("place_string", "Place..."),
("date_string", "Date..."),
# screen write ends
Any mission in module_mission_templates;
Code:
# screen write
(ti_after_mission_start, 0, ti_once, [],
[(start_presentation, "prsnt_screen_write"),]),
# screen write ends
Here is the proof ;
To use this code, You should give credits to me. And tell me that you are going to use it. I would like to see how this code implemented on mods
Last edited: