Fixing navigation
This commit is contained in:
1 parent
dcdeae75bc
commit
77c8471636
29 files changed
+15148
-139
No files matched your search
@@ -251,9 +251,9 @@ function on_library_door_click()
|
||||
print("Library door step 2")
|
||||
print("morning_did_open_door_index")
|
||||
print(morning_did_open_door_index)
|
||||
print("game.is_dawn()")
|
||||
print(game.is_dawn())
|
||||
if (not game.is_dawn() or not (morning_did_open_door_index == 4)) then
|
||||
print("game_api.is_dawn()")
|
||||
print(game_api.is_dawn())
|
||||
if (not game_api.is_dawn() or not (morning_did_open_door_index == 5)) then
|
||||
print("Library door step 3")
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
@@ -295,6 +295,64 @@ function on_teachers_door_click()
|
||||
else
|
||||
print("morning_can_open_door_index is")
|
||||
print(morning_can_open_door_index)
|
||||
|
||||
--game_api.start_dialogue("door_unlock_dialog001")
|
||||
|
||||
|
||||
if (morning_can_open_door_index == 3) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
else
|
||||
if (morning_did_open_door_index == 1) then
|
||||
--s1 + s3
|
||||
|
||||
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)
|
||||
game_api.switch_navigation(16)
|
||||
|
||||
elseif (morning_did_open_door_index == 2) then
|
||||
--s2 + s3
|
||||
|
||||
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)
|
||||
game_api.switch_navigation(15)
|
||||
elseif (morning_did_open_door_index == 5) then
|
||||
--n3 + s3
|
||||
|
||||
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)
|
||||
game_api.switch_navigation(13)
|
||||
elseif (morning_did_open_door_index == 4) then
|
||||
--n2 + s3
|
||||
|
||||
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)
|
||||
game_api.switch_navigation(14)
|
||||
elseif (morning_did_open_door_index == 6) then
|
||||
--hall + s3
|
||||
|
||||
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)
|
||||
game_api.switch_navigation(12)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
if (morning_can_open_door_index == 3) then
|
||||
print("morning_did_open_door_index is")
|
||||
print(morning_did_open_door_index)
|
||||
@@ -310,36 +368,8 @@ function on_teachers_door_click()
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
end]]
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
if (player_left_darklands) then
|
||||
if (morning_can_open_door_index == 3) then
|
||||
if (morning_did_open_door_index == 0) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.start_dialogue("door_unlock_dialog001")
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
elseif (not player_hold_key) then
|
||||
game_api.start_dialogue("door_teacher_dialog001")
|
||||
elseif (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)
|
||||
game_api.switch_navigation(3)
|
||||
end]]
|
||||
end
|
||||
|
||||
function on_hall_door_click()
|
||||
@@ -530,7 +560,7 @@ function on_sleep_cutscene()
|
||||
game_api.set_night()
|
||||
--game_api.set_trigger_zone_enabled(1, false)
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.switch_navigation(0)
|
||||
game_api.switch_navigation(17)
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", 0)
|
||||
game_api.set_object_rotation("Hall_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 0)
|
||||
@@ -826,7 +856,7 @@ function setDay1MorningSetup()
|
||||
game_api.set_object_rotation("Hall_Leaf001", 90)
|
||||
game_api.switch_navigation(6)
|
||||
else
|
||||
game_api.switch_navigation(0)
|
||||
game_api.switch_navigation(17)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -914,6 +944,7 @@ game_api.set_enter_night_callback(
|
||||
function()
|
||||
game_api.start_dialogue("dialog_video001")
|
||||
setDay1NightSetup()
|
||||
game_api.switch_navigation(17)
|
||||
end
|
||||
)
|
||||
|
||||
@@ -1075,7 +1106,29 @@ game_api.set_location_callbacks(
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
function debugAllOpen()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_1_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
|
||||
game_api.rotate_object("Hall_Leaf001", 90, 0.5, nil)
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.rotate_object("Room_S_1_Leaf001", 90, 0.5, nil)
|
||||
game_api.rotate_object("Room_S_0_Leaf001", 90, 0.5, nil)
|
||||
game_api.rotate_object("Room_N_1_Leaf001", -90, 0.5, nil)
|
||||
game_api.rotate_object("Room_N_2_Leaf001", -90, 0.5, nil)
|
||||
end
|
||||
|
||||
|
||||
|
||||
setDay0setup()
|
||||
game_api.switch_navigation(0)
|
||||
|
||||
--debugAllOpen()
|
||||
print("Lua script loaded successfully!")
|
||||
Reference in new issue
Block a user