Working on fixing dorm bugs and some uni
This commit is contained in:
1 parent
939136c705
commit
c891161d69
16 files changed
+200
-230
No files matched your search
@@ -172,16 +172,6 @@ function on_npc_interact(npc_index)
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
end
|
||||
end
|
||||
--[[
|
||||
if (day == 0) then
|
||||
if (player_hold_key) then
|
||||
game_api.start_dialogue("knife_dialog002")
|
||||
else
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("dialog_aiperi_morning001")
|
||||
end]]
|
||||
end
|
||||
if npc_index == 0 then
|
||||
if (player_ghost_aware == 1) then
|
||||
@@ -213,6 +203,9 @@ function on_npc_interact(npc_index)
|
||||
game_api.start_dialogue("dialog_with_ghost001")
|
||||
end
|
||||
end
|
||||
if npc_index == 6 then
|
||||
game_api.start_dialogue("dialog_female_student002")
|
||||
end
|
||||
end
|
||||
|
||||
function on_quest_over()
|
||||
@@ -397,6 +390,7 @@ function on_hall_door_click()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
end)
|
||||
game_api.set_npc_enabled(0, true)
|
||||
game_api.set_npc_enabled(6, true)
|
||||
end
|
||||
else
|
||||
if (game_api.is_night()) then
|
||||
@@ -445,10 +439,17 @@ end
|
||||
|
||||
function on_teacher_arrived()
|
||||
print("Teacher arrived")
|
||||
game_api.npc_rotate_to(0, 180)
|
||||
end
|
||||
|
||||
function on_student_arrived()
|
||||
print("Student arrived")
|
||||
game_api.npc_rotate_to(6, 270)
|
||||
end
|
||||
|
||||
function on_teacher_arrived2()
|
||||
print("Teacher arrived2")
|
||||
game_api.npc_rotate_to(0, 0)
|
||||
end
|
||||
|
||||
function book_dialog_zone001_enter_callback()
|
||||
@@ -515,6 +516,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.set_npc_enabled(6, false)
|
||||
game_api.switch_navigation(16)
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", 0)
|
||||
game_api.set_object_rotation("Hall_Leaf001", 0)
|
||||
@@ -539,16 +541,23 @@ function on_teacher_arrived_intermediate()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(2)
|
||||
game_api.npc_walk_to(0, 3.19574, 0, 6.45595, on_teacher_arrived)
|
||||
game_api.npc_walk_to(0, 4.94194, 0, 6.64111, on_teacher_arrived)
|
||||
teacher_arrived = true
|
||||
end
|
||||
|
||||
function on_lection_cutscene_fadein_callback()
|
||||
print("Lection cutscene in progress!")
|
||||
game_api.player_set_position(-2.41002, 0, 10.375)
|
||||
game_api.player_set_rotation(180)
|
||||
end
|
||||
|
||||
game_api.set_cutscene_callback("lection_cutscene001", function()
|
||||
print("Cutscene done!")
|
||||
game_api.setIntValue("lection_is_over", 1)
|
||||
|
||||
game_api.set_npc_enabled(1, true)
|
||||
game_api.npc_walk_to(0, 0.758123, 0, 6.50063, on_teacher_arrived_intermediate)
|
||||
game_api.npc_walk_to(6, 5.28998, 0, -5.525, on_student_arrived)
|
||||
|
||||
local aiperi_knife_aware = game_api.getIntValue("aiperi_knife_aware")
|
||||
|
||||
@@ -601,6 +610,7 @@ game_api.set_darklands_callbacks(
|
||||
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.set_npc_enabled(1, false)
|
||||
game_api.set_npc_enabled(6, false)
|
||||
|
||||
if (ghost_gone) then
|
||||
game_api.set_npc_enabled(2, false)
|
||||
@@ -632,6 +642,7 @@ game_api.set_darklands_callbacks(
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.set_npc_enabled(6, false)
|
||||
|
||||
--game_api.setIntValue("need_sleep", 1)
|
||||
--player_left_darklands = true
|
||||
@@ -642,16 +653,23 @@ game_api.set_darklands_callbacks(
|
||||
|
||||
local px = game_api.get_player_x()
|
||||
local pz = game_api.get_player_z()
|
||||
|
||||
print("darklands exit px = ")
|
||||
print(px)
|
||||
|
||||
print("darklands exit pz = ")
|
||||
print(pz)
|
||||
|
||||
|
||||
if (pz > 8.0) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
morning_can_open_door_index = 6
|
||||
elseif (pz <= 8.0) and (pz > 0) and (px >= 1.5) then
|
||||
elseif (pz <= 8.0) and (pz > 0) and (px >= 1.5 + 0.1) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
morning_can_open_door_index = 5
|
||||
elseif (pz <= 8.0) and (pz > 0) and (px <= -1.5) then
|
||||
elseif (pz <= 8.0) and (pz > 0) and (px <= -1.5 - 0.1) then
|
||||
if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
else
|
||||
@@ -659,15 +677,15 @@ game_api.set_darklands_callbacks(
|
||||
end
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
morning_can_open_door_index = 3
|
||||
elseif (pz <= 0.0) and (pz > -8) and (px >= 1.5) then
|
||||
elseif (pz <= 0.0) and (pz > -8) and (px >= 1.5 + 0.1) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
morning_can_open_door_index = 4
|
||||
elseif (pz <= 0.0) and (pz > -8) and (px <= -1.5) then
|
||||
elseif (pz <= 0.0) and (pz > -8) and (px <= -1.5 - 0.1) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
morning_can_open_door_index = 2
|
||||
elseif (pz <= -8.0) and (px <= -1.5) then
|
||||
elseif (pz <= -8.0) and (px <= -1.5-0.1) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
morning_can_open_door_index = 1
|
||||
@@ -677,6 +695,19 @@ game_api.set_darklands_callbacks(
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end
|
||||
morning_can_open_door_index = 0
|
||||
if (px >=1.4) and (px < 1.6) then
|
||||
-- stick to 1.4
|
||||
print("Edge case with px = ")
|
||||
print (px)
|
||||
game_api.player_set_position(1.35, 0, pz)
|
||||
end
|
||||
|
||||
if (px <=-1.4) and (px > -1.6) then
|
||||
-- stick to -1.48
|
||||
print("Edge case2 with px = ")
|
||||
print (px)
|
||||
game_api.player_set_position(-1.35, 0, pz)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -720,6 +751,8 @@ function setDay0setup()
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.set_npc_enabled(6, false)
|
||||
|
||||
end
|
||||
|
||||
function setDay1setup()
|
||||
@@ -754,6 +787,7 @@ function setDay1setup()
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.set_npc_enabled(6, true)
|
||||
|
||||
game_api.npc_set_position(1, 0.98998, 0, -7.525)
|
||||
end
|
||||
@@ -798,6 +832,7 @@ function setDay1MorningSetup()
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.set_npc_enabled(6, false)
|
||||
|
||||
game_api.npc_set_position(1, 0.98998, 0, -7.525)
|
||||
|
||||
@@ -892,6 +927,7 @@ function setDay1NightSetup()
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.set_npc_enabled(6, false)
|
||||
|
||||
local px = game_api.get_player_x()
|
||||
local pz = game_api.get_player_z()
|
||||
@@ -941,30 +977,6 @@ game_api.set_enter_night_callback(
|
||||
end
|
||||
)
|
||||
|
||||
--[[
|
||||
game_api.set_chat_callbacks(
|
||||
function()
|
||||
if (game_api.is_night()) then
|
||||
if (game_api.is_dawn()) then
|
||||
if not (morning_can_open_door_index == 0) and not (morning_can_open_door_index == 3) then
|
||||
game_api.start_dialogue("phone_morning_aiperi001")
|
||||
else
|
||||
--TODO: add aiperi that she already came to the uni
|
||||
end
|
||||
else
|
||||
local asked_help_locked = game_api.getIntValue("asked_help_locked")
|
||||
if not (asked_help_locked == 1) then
|
||||
game_api.start_dialogue("phone_night_aiperi001")
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
nil,
|
||||
nil
|
||||
)
|
||||
]]
|
||||
|
||||
|
||||
game_api.set_chat_callbacks(
|
||||
function()
|
||||
if (game_api.is_night()) then
|
||||
@@ -1020,27 +1032,8 @@ game_api.set_chat_callbacks(
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--[[
|
||||
if aiperi_chat_opened == 0 then
|
||||
game_api.setIntValue("aiperi_chat_opened", 1)
|
||||
|
||||
if (player_hold_knife) and (aiperi_talked_after_knife == 0) then
|
||||
game_api.start_dialogue("dialog_chat_aiperi003")
|
||||
game_api.setIntValue("aiperi_talked_after_knife", 1)
|
||||
else
|
||||
if aiperi_knife_aware == 0 then
|
||||
local lection_is_over = game_api.getIntValue("lection_is_over")
|
||||
if (lection_is_over == 1) then
|
||||
game_api.start_dialogue("dialog_chat_aiperi002")
|
||||
else
|
||||
game_api.start_dialogue("dialog_chat_aiperi001")
|
||||
end
|
||||
end
|
||||
end
|
||||
end]]
|
||||
end
|
||||
end,
|
||||
function()
|
||||
@@ -1243,35 +1236,6 @@ game_api.set_location_callbacks(
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
local day = game_api.getIntValue("day")
|
||||
if (day == 0)then
|
||||
was_state_when_player_left = 0
|
||||
elseif game_api.is_darklands() then
|
||||
was_state_when_player_left = 1
|
||||
elseif game_api.is_dawn() then
|
||||
was_state_when_player_left = 2
|
||||
elseif game_api.is_night() then
|
||||
was_state_when_player_left = 3
|
||||
else
|
||||
was_state_when_player_left = 4
|
||||
end
|
||||
possible situation combinations:
|
||||
left from darklands
|
||||
left from morning
|
||||
left from day
|
||||
left from night
|
||||
|
||||
arrive in darklands
|
||||
arrive in morning
|
||||
arrive in day
|
||||
arrive in night
|
||||
|
||||
]]
|
||||
|
||||
|
||||
|
||||
if (day > 0) and (game_api.is_night() == false) then
|
||||
print("entered day setup")
|
||||
setDay1setup()
|
||||
|
||||
Reference in new issue
Block a user