Added covers, cross-fade
This commit is contained in:
1 parent
0f2b2e55af
commit
e618c91415
29 files changed
+40462
-29
No files matched your search
@@ -11,6 +11,8 @@ teacher_told_about_book = false
|
||||
|
||||
night_time = false
|
||||
|
||||
player_in_darklands = false
|
||||
|
||||
function lection_hall_zone001_enter_callback()
|
||||
--game_api.start_dialogue("")
|
||||
--Start cutscene
|
||||
@@ -32,8 +34,10 @@ function knife_dialog_zone001_enter_callback()
|
||||
game_api.switch_navigation(0)
|
||||
end
|
||||
else
|
||||
if (night_time == false) then
|
||||
game_api.start_dialogue("knife_dialog_second001")
|
||||
game_api.set_trigger_zone_enabled(1, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -114,22 +118,25 @@ game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
|
||||
function on_library_door_click()
|
||||
if (night_time) then
|
||||
game_api.start_dialogue("door_night_dialog001")
|
||||
else
|
||||
if (not lection_is_over) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
end
|
||||
if (night_time) then
|
||||
game_api.start_dialogue("door_night_dialog001")
|
||||
else
|
||||
if (not lection_is_over) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function on_teachers_door_click()
|
||||
if (not lection_is_over) then
|
||||
if (not teacher_arrived) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
else
|
||||
if (not teacher_door_opened) then
|
||||
teacher_door_opened = true
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -138,12 +145,15 @@ function on_hall_door_click()
|
||||
if (not hall_door_opened) then
|
||||
hall_door_opened = true
|
||||
game_api.rotate_object("Hall_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
end)
|
||||
game_api.set_npc_enabled(0, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function on_teacher_arrived()
|
||||
teacher_arrived = true
|
||||
print("Teacher arrived")
|
||||
end
|
||||
|
||||
@@ -165,6 +175,7 @@ end
|
||||
end
|
||||
|
||||
function on_computer_clicked()
|
||||
print("on_computer_clicked--")
|
||||
if (night_time == false) then
|
||||
if (player_hold_book) then
|
||||
game_api.start_cutscene("test_cutscene_02")
|
||||
@@ -176,7 +187,11 @@ end
|
||||
|
||||
function on_teacher_arrived_intermediate()
|
||||
game_api.rotate_object("Room_N_2_Leaf001", -90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_North_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
end)
|
||||
game_api.npc_walk_to(0, 3.19574, 0, 6.45595, on_teacher_arrived)
|
||||
teacher_arrived = true
|
||||
end
|
||||
|
||||
|
||||
@@ -192,11 +207,93 @@ end)
|
||||
game_api.set_cutscene_callback("test_cutscene_02", function()
|
||||
print("Cutscene 2 done!")
|
||||
night_time = true
|
||||
game_api.set_trigger_zone_enabled(1, false)
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.switch_navigation(0)
|
||||
game_api.rotate_object("Room_N_2_Leaf001", 90, 0.01, nil)
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.activate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
game_api.activate_interactive_object("Room_Cover_North_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_3_001")
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_North_1_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 1, 0.01, nil)
|
||||
game_api.activate_interactive_object("Note001")
|
||||
|
||||
end)
|
||||
|
||||
function on_note_pickup()
|
||||
game_api.start_dialogue("note_dialog001")
|
||||
game_api.pickup_item("note_spell")
|
||||
game_api.deactivate_interactive_object("Note001")
|
||||
|
||||
-- After the moving to darklands:
|
||||
player_in_darklands = true
|
||||
darklands_fadein = 2.0
|
||||
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_1_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_2_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_1_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_1_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_2_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_3_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_S_0_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_0_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_S_1_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_1_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_S_2_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_2_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_N_1_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_N_1_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_N_2_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_N_2_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Hall_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Hall_Leaf001")
|
||||
end)
|
||||
|
||||
game_api.set_npc_enabled(2, true)
|
||||
game_api.set_npc_enabled(3, true)
|
||||
game_api.set_npc_enabled(4, true)
|
||||
game_api.set_npc_enabled(5, true)
|
||||
|
||||
end
|
||||
|
||||
|
||||
game_api.set_trigger_zone_callbacks("teacher_dialog_zone001",
|
||||
teacher_zone001_enter_callback,
|
||||
nil
|
||||
@@ -207,4 +304,16 @@ game_api.set_trigger_zone_callbacks("book_dialog_zone001",
|
||||
book_dialog_zone001_exit_callback
|
||||
)
|
||||
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_1_001")
|
||||
game_api.deactivate_interactive_object("Note001")
|
||||
|
||||
|
||||
game_api.set_npc_enabled(0, false)
|
||||
|
||||
game_api.set_npc_enabled(2, false)
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
|
||||
print("Lua script loaded successfully!")
|
||||
Reference in new issue
Block a user