========module_mesh.py
("mm_spyglass_ui", 0, "dedal_scope", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("mm_spyglass_ui2", 0, "dedal_scope2", 0, 0, 0, 0, 0, 0, 1, 1, 1),
========module_mission_templates.py
( 0, 0, 0, [ (game_key_is_down,gk_zoom),
],
[
(neg|is_presentation_active,"prsnt_spyglass_dummy"),
(get_player_agent_no,":agent_id"),
(agent_is_alive,":agent_id"),
(start_presentation,"prsnt_spyglass_dummy"),
]),
======module_presentation.py
("spyglass_dummy", prsntf_read_only|prsntf_manual_end_only, 0,
[
(ti_on_presentation_load, [
#(call_script,"script_client_get_my_agent"),
#(assign,":agent_id",reg0),
(get_player_agent_no,":agent_id"),
#(agent_is_active,":agent_id"),
(agent_is_alive,":agent_id"),
(agent_set_visibility, ":agent_id", 0),
(set_fixed_point_multiplier,100),
(try_begin),
(agent_get_wielded_item,":item_id",":agent_id",0),
(eq,":item_id","itm_flintlock_pistol"),
(set_zoom_amount,195),
(create_mesh_overlay, reg0, "mesh_mm_spyglass_ui"),
(position_set_x, pos1, 50), #-1
(position_set_y, pos1, 40), #-1
(overlay_set_position, reg0, pos1),
(position_set_x, pos1, 101), #-1
(position_set_y, pos1, 100), #-1
(overlay_set_size, reg0, pos1),
(presentation_set_duration, 99999),
(else_try),
(agent_get_wielded_item,":item_id",":agent_id",0),
(neq,":item_id","itm_flintlock_pistol"),
(set_zoom_amount,150),
(create_mesh_overlay, reg0, "mesh_mm_spyglass_ui2"),
(position_set_x, pos1, 50), #-1
(position_set_y, pos1, 40), #-1
(overlay_set_position, reg0, pos1),
(position_set_x, pos1, 101), #-1
(position_set_y, pos1, 100), #-1
(overlay_set_size, reg0, pos1),
(presentation_set_duration, 99999),
(try_end),
]),
(ti_on_presentation_run,
[
#(call_script,"script_client_get_my_agent"),
#(assign,":agent_id",reg0),
(get_player_agent_no,":agent_id"),
#(agent_is_active,":agent_id"),
(assign,":continue",0),
(try_begin),
(neg|game_key_is_down,gk_zoom),
(assign,":continue",1),
(try_end),
(eq,":continue",1),
(set_fixed_point_multiplier,100),
(set_zoom_amount,0),
(agent_set_visibility, ":agent_id", 1),
(presentation_set_duration, 0),
]),
]),
|