Fixing minor bugs in scripts
This commit is contained in:
1 parent
80133aa8c8
commit
87fb6d4655
14 files changed
+490
-234
No files matched your search
@@ -151,7 +151,7 @@
|
||||
"positionX": 1.5,
|
||||
"positionY": 0.975,
|
||||
"positionZ": 6.965,
|
||||
"approachRadius": 0.7,
|
||||
"approachRadius": 0.8,
|
||||
"boundsMaxX": 0.067857146263122559,
|
||||
"boundsMaxY": 1.0,
|
||||
"boundsMaxZ": 0.49353456497192383,
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
"positionX": 1.5,
|
||||
"positionY": 0.975,
|
||||
"positionZ": 6.965,
|
||||
"approachRadius": 0.7,
|
||||
"approachRadius": 0.8,
|
||||
"boundsMaxX": 0.06785714626312256,
|
||||
"boundsMaxY": 1.0,
|
||||
"boundsMaxZ": 0.49353456497192383,
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
"meshTextures": {
|
||||
"Girl_Low": "resources/w/girlfriend/Girl_Base_color.png"
|
||||
},
|
||||
"positionX": 1.0,
|
||||
"positionX": 0.799619,
|
||||
"positionY": 0.0,
|
||||
"positionZ": -7.525,
|
||||
"positionZ": -9.55679,
|
||||
"facingAngle" : 180,
|
||||
"walkSpeed": 1.66,
|
||||
"rotationSpeed": 8.0,
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
"positionZ": 0.0,
|
||||
"radius": 1.5,
|
||||
"active": false,
|
||||
"automatic": true,
|
||||
"automaticRadius": 1.4,
|
||||
"destinationLocation": "uni_exterior",
|
||||
"destinationPositionX": -14.8449,
|
||||
"destinationPositionY": 0.0,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"positionY": 0.0,
|
||||
"positionZ": 6.17516,
|
||||
"radius": 2.5,
|
||||
"hysteresis": 0.2,
|
||||
"hysteresis": 0.3,
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -659,10 +659,10 @@
|
||||
{
|
||||
"id": "game_complete_cutscene001",
|
||||
"skippable": true,
|
||||
"durationMs": 5000,
|
||||
"durationMs": 12000,
|
||||
"fadeOutMs": 0,
|
||||
"fadeInMs": 500,
|
||||
"endFadeOutMs": 500,
|
||||
"endFadeOutMs": 0,
|
||||
"endFadeInMs": 500,
|
||||
"onFadeInCallback": "",
|
||||
"imageSegments": [
|
||||
@@ -671,7 +671,7 @@
|
||||
"width": 1280,
|
||||
"height": 720,
|
||||
"startMs": 0,
|
||||
"endMs": 12500,
|
||||
"endMs": 13500,
|
||||
"fadeInMs": 0,
|
||||
"fadeOutMs": 0,
|
||||
"easing": "Linear",
|
||||
|
||||
@@ -35,6 +35,24 @@
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dialog_contaier003",
|
||||
"start": "line_1",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "line_1",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Я уже забрал курсовую работу Бегимай, больше мне незачем сюда лезть.",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
"id": "end_1",
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dialog_contaier002",
|
||||
@@ -62,6 +80,7 @@
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Ага, нашел! Вот и она!",
|
||||
"luaCallback": "dialog_contaier002_get_coursework",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
{
|
||||
"dialogues": [
|
||||
{
|
||||
"id": "darklands_day_dialog001",
|
||||
"start": "line_1",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "line_1",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Это заклинание не работает днем.",
|
||||
"next": "line_2"
|
||||
},
|
||||
{
|
||||
"id": "line_2",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Чтобы перейти в теневой мир, мне нужно дождаться ночи.",
|
||||
"next": "line_3"
|
||||
},
|
||||
{
|
||||
"id": "line_3",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Чтобы время пролетело быстро, я могу посидеть в телефоне и позалипать в короткие видео.",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
"id": "end_1",
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "darklands_morning_dialog001",
|
||||
"start": "line_1",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "line_1",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "У меня силы закончились и мне спать хочется. Достаточно теневого мира на сегодня, поехали в общагу.",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
"id": "end_1",
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "knife_dialog001",
|
||||
"start": "line_1",
|
||||
@@ -310,7 +362,7 @@
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Хорошо что эти двери открываются изнутри.",
|
||||
"text": "Хорошо, что у меня уже есть ключ от этой двери.",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
@@ -1079,6 +1131,24 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "computer_dialog004",
|
||||
"start": "line_1",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "line_1",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/dialogue/portrait_hero_neutral.png",
|
||||
"text": "Похоже, компьютеры в теневом режиме не функционируют никак.",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
"id": "end_1",
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dialog_report_card001",
|
||||
"start": "line_1",
|
||||
|
||||
@@ -22,29 +22,38 @@ end
|
||||
|
||||
function on_container_clicked()
|
||||
local player_container_aware = game_api.getIntValue("player_container_aware")
|
||||
if player_container_aware == 1 then
|
||||
local player_has_coursework = game_api.getIntValue("player_has_coursework")
|
||||
if (player_has_coursework == 1) then
|
||||
game_api.start_dialogue("dialog_contaier003")
|
||||
elseif player_container_aware == 1 then
|
||||
game_api.start_dialogue("dialog_contaier002")
|
||||
game_api.pickup_item("coursework")
|
||||
game_api.setIntValue("player_has_coursework", 1)
|
||||
game_api.quest_set_objective_completed("ghost_coursework", "ghost_coursework_find")
|
||||
else
|
||||
game_api.start_dialogue("dialog_contaier001")
|
||||
end
|
||||
end
|
||||
|
||||
function dialog_contaier002_get_coursework()
|
||||
game_api.pickup_item("coursework")
|
||||
game_api.quest_set_objective_completed("ghost_coursework", "ghost_coursework_find")
|
||||
game_api.quest_set_objective_completed("ghost_coursework", "ghost_coursework_find")
|
||||
end
|
||||
|
||||
game_api.set_enter_night_callback(
|
||||
function()
|
||||
game_api.start_dialogue("dialog_video001")
|
||||
end
|
||||
)
|
||||
|
||||
function on_darklands_over()
|
||||
game_api.set_player_hp(10)
|
||||
end
|
||||
|
||||
game_api.set_darklands_callbacks(
|
||||
nil,
|
||||
function()
|
||||
game_api.start_cutscene("darklands_exit001")
|
||||
print("Setting to day 1----")
|
||||
game_api.setIntValue("day", 1)
|
||||
game_api.setIntValue("need_sleep", 1)
|
||||
game_api.set_player_hp(10)
|
||||
game_api.set_dawn()
|
||||
end
|
||||
)
|
||||
|
||||
+238
-117
@@ -10,7 +10,9 @@ teacher_told_about_book = false
|
||||
|
||||
night_time = false
|
||||
|
||||
player_left_darklands = false
|
||||
--player_left_darklands = false
|
||||
|
||||
was_darklands = false
|
||||
|
||||
morning_can_open_door_index = 0
|
||||
morning_did_open_door_index = 0
|
||||
@@ -153,18 +155,6 @@ function on_npc_interact(npc_index)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("dialog_aiperi_morning001")
|
||||
--[[
|
||||
if (player_ghost_aware) then
|
||||
local player_alik_aware = game_api.getIntValue("player_alik_aware")
|
||||
if player_alik_aware == 1 then
|
||||
game_api.start_dialogue("aiperi_dialog002")
|
||||
else
|
||||
game_api.start_dialogue("aiperi_dialog001")
|
||||
game_api.setIntValue("player_alik_aware", 1)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("aiperi_dialog003")
|
||||
end]]
|
||||
end
|
||||
end
|
||||
if npc_index == 0 then
|
||||
@@ -292,82 +282,98 @@ function on_teachers_door_click()
|
||||
game_api.start_dialogue("door_teacher_dialog001")
|
||||
end
|
||||
else
|
||||
print("morning_can_open_door_index is")
|
||||
print(morning_can_open_door_index)
|
||||
|
||||
if (game_api.is_dawn()) then
|
||||
print("morning_can_open_door_index is")
|
||||
print(morning_can_open_door_index)
|
||||
|
||||
if (teacher_door_opened == false) then
|
||||
teacher_door_opened = true
|
||||
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)
|
||||
else
|
||||
--Player was in corridor, but tries to open the teacher's door
|
||||
--s3 only
|
||||
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(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--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
|
||||
elseif (game_api.is_night()) then
|
||||
if (teacher_door_opened == false) 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(16)
|
||||
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)
|
||||
else
|
||||
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
|
||||
|
||||
elseif (morning_did_open_door_index == 2) then
|
||||
--s2 + s3
|
||||
game_api.switch_navigation(10)
|
||||
|
||||
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)
|
||||
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]]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -458,8 +464,8 @@ end
|
||||
function on_n2_door_click()
|
||||
|
||||
|
||||
print("player_left_darklands")
|
||||
print(player_left_darklands)
|
||||
--print("player_left_darklands")
|
||||
--print(player_left_darklands)
|
||||
print("morning_can_open_door_index")
|
||||
print(morning_can_open_door_index)
|
||||
print("morning_did_open_door_index")
|
||||
@@ -507,9 +513,9 @@ function book_dialog_zone001_enter_callback()
|
||||
print("book_dialog_zone001_enter_callback step 3")
|
||||
if (player_hold_book) and (night_time == false) then
|
||||
print("book_dialog_zone001_enter_callback step 4")
|
||||
game_api.player_stop()
|
||||
game_api.start_dialogue("book_dialog001")
|
||||
game_api.switch_navigation(0)
|
||||
game_api.player_stop()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -530,25 +536,29 @@ function on_computer_clicked()
|
||||
print("on_computer_clicked--1")
|
||||
game_api.start_dialogue("computer_dialog003")
|
||||
else
|
||||
if teacher_told_about_book then
|
||||
print("on_computer_clicked--2")
|
||||
if (night_time == false) then
|
||||
print("on_computer_clicked--3")
|
||||
if (player_hold_book) then
|
||||
print("on_computer_clicked--4")
|
||||
game_api.quest_set_objective_completed("study_project", "study_project_write")
|
||||
game_api.start_cutscene("computer_cutscene001")
|
||||
if game_api.is_darklands() then
|
||||
game_api.start_dialogue("computer_dialog004")
|
||||
else
|
||||
if teacher_told_about_book then
|
||||
print("on_computer_clicked--2")
|
||||
if (night_time == false) then
|
||||
print("on_computer_clicked--3")
|
||||
if (player_hold_book) then
|
||||
print("on_computer_clicked--4")
|
||||
game_api.quest_set_objective_completed("study_project", "study_project_write")
|
||||
game_api.start_cutscene("computer_cutscene001")
|
||||
else
|
||||
print("on_computer_clicked--5")
|
||||
game_api.start_dialogue("book_dialog002")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--5")
|
||||
game_api.start_dialogue("book_dialog002")
|
||||
print("on_computer_clicked--6")
|
||||
game_api.start_dialogue("computer_dialog002")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--6")
|
||||
game_api.start_dialogue("computer_dialog002")
|
||||
print("on_computer_clicked--7")
|
||||
game_api.start_dialogue("computer_dialog001")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--7")
|
||||
game_api.start_dialogue("computer_dialog001")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -576,6 +586,8 @@ function on_sleep_cutscene()
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Main_Hall_001", 1)
|
||||
game_api.activate_interactive_object("Note001")
|
||||
|
||||
teacher_door_opened = false
|
||||
end
|
||||
|
||||
function on_teacher_arrived_intermediate()
|
||||
@@ -675,8 +687,9 @@ game_api.set_darklands_callbacks(
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.setIntValue("day", 1)
|
||||
game_api.setIntValue("need_sleep", 1)
|
||||
player_left_darklands = true
|
||||
print("Setting to day 1----x")
|
||||
--game_api.setIntValue("need_sleep", 1)
|
||||
--player_left_darklands = true
|
||||
morning_did_open_door_index = 0
|
||||
setDay1MorningSetup()
|
||||
game_api.set_dawn()
|
||||
@@ -694,9 +707,14 @@ game_api.set_darklands_callbacks(
|
||||
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
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
else
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
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
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
@@ -711,7 +729,11 @@ game_api.set_darklands_callbacks(
|
||||
morning_can_open_door_index = 1
|
||||
else
|
||||
--All set before
|
||||
if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end
|
||||
morning_can_open_door_index = 0
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -761,6 +783,7 @@ function setDay0setup()
|
||||
end
|
||||
|
||||
function setDay1setup()
|
||||
print("Enter setDay1setup")
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_North_2_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_North_3_001", 1)
|
||||
@@ -802,7 +825,11 @@ function setDay1MorningSetup()
|
||||
|
||||
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")
|
||||
--[[if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
else]]
|
||||
game_api.activate_interactive_object("Room_Cover_South_3_001")
|
||||
--end
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.activate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
|
||||
@@ -811,7 +838,11 @@ function setDay1MorningSetup()
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_0_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_1_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 0)
|
||||
if (teacher_door_opened) then
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 90)
|
||||
else
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 0)
|
||||
end
|
||||
game_api.set_object_rotation("Hall_Leaf001", 0)
|
||||
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
@@ -822,6 +853,8 @@ function setDay1MorningSetup()
|
||||
game_api.set_object_alpha("Room_Cover_South_3_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Corridor_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Main_Hall_001", 1)
|
||||
|
||||
-- TODO: Make check for teacher_door_opened false or true
|
||||
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.set_npc_enabled(1, false)
|
||||
@@ -833,34 +866,61 @@ function setDay1MorningSetup()
|
||||
if morning_did_open_door_index == 1 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.set_object_rotation("Room_S_0_Leaf001", 90)
|
||||
game_api.switch_navigation(8)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(16)
|
||||
else
|
||||
game_api.switch_navigation(8)
|
||||
end
|
||||
elseif morning_did_open_door_index == 2 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.set_object_rotation("Room_S_1_Leaf001", 90)
|
||||
game_api.switch_navigation(9)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(15)
|
||||
else
|
||||
game_api.switch_navigation(9)
|
||||
end
|
||||
elseif morning_did_open_door_index == 3 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 90)
|
||||
|
||||
game_api.switch_navigation(10)
|
||||
|
||||
elseif morning_did_open_door_index == 4 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.set_object_rotation("Room_N_1_Leaf001", -90)
|
||||
game_api.switch_navigation(11)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(14)
|
||||
else
|
||||
game_api.switch_navigation(11)
|
||||
end
|
||||
elseif morning_did_open_door_index == 5 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", -90)
|
||||
game_api.switch_navigation(7)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(13)
|
||||
else
|
||||
game_api.switch_navigation(7)
|
||||
end
|
||||
elseif morning_did_open_door_index == 6 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
game_api.set_object_rotation("Hall_Leaf001", 90)
|
||||
game_api.switch_navigation(6)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(12)
|
||||
else
|
||||
game_api.switch_navigation(6)
|
||||
end
|
||||
else
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(10)
|
||||
else
|
||||
game_api.switch_navigation(17)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function setDay1NightSetup()
|
||||
night_time = true
|
||||
teacher_door_opened = false
|
||||
|
||||
print("setDay1NightSetup")
|
||||
morning_did_open_door_index = 0
|
||||
@@ -985,7 +1045,15 @@ function on_aiperi_opens_door()
|
||||
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(6)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
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)
|
||||
else
|
||||
game_api.switch_navigation(6)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, 6.5)
|
||||
@@ -1003,7 +1071,15 @@ function on_aiperi_opens_door()
|
||||
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(7)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
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)
|
||||
else
|
||||
game_api.switch_navigation(7)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0.0, 0, 6.43818)
|
||||
@@ -1022,7 +1098,14 @@ function on_aiperi_opens_door()
|
||||
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(11)
|
||||
if (teacher_door_opened) then
|
||||
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)
|
||||
else
|
||||
game_api.switch_navigation(11)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -1.7911)
|
||||
@@ -1042,7 +1125,15 @@ function on_aiperi_opens_door()
|
||||
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(9)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
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)
|
||||
else
|
||||
game_api.switch_navigation(9)
|
||||
end
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -1.7911)
|
||||
game_api.set_npc_enabled(1, true)
|
||||
@@ -1062,7 +1153,14 @@ function on_aiperi_opens_door()
|
||||
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(8)
|
||||
if (teacher_door_opened) then
|
||||
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)
|
||||
else
|
||||
game_api.switch_navigation(8)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -9.77948)
|
||||
@@ -1081,10 +1179,31 @@ end
|
||||
|
||||
game_api.set_location_callbacks(
|
||||
function()
|
||||
print("Enter location uni interior")
|
||||
player_left_darklands = false
|
||||
print("Enter location uni interior-")
|
||||
--player_left_darklands = false
|
||||
local hp = game_api.getFloatValue("player_hp")
|
||||
game_api.set_player_hp(hp)
|
||||
local day = game_api.getIntValue("day")
|
||||
|
||||
print("day is:")
|
||||
print(day)
|
||||
|
||||
if (day > 0) and (game_api.is_night()==false) then
|
||||
print("entered day setup")
|
||||
setDay1setup()
|
||||
game_api.switch_navigation(3)
|
||||
end
|
||||
|
||||
print("entered exited-")
|
||||
|
||||
if (was_darklands) and (game_api.is_darklands() == false) and game_api.is_dawn() then
|
||||
--Player died in exterior and then in the morning returned back
|
||||
print("setDay1MorningSetup entered-")
|
||||
setDay1MorningSetup()
|
||||
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
local need_sleep = game_api.getIntValue("need_sleep")
|
||||
local day = game_api.getIntValue("day")
|
||||
@@ -1095,13 +1214,15 @@ game_api.set_location_callbacks(
|
||||
game_api.switch_navigation(3)
|
||||
else
|
||||
--Do nothing, it should have been already set up
|
||||
end
|
||||
end]]
|
||||
end,
|
||||
function()
|
||||
print("Exit location uni interior")
|
||||
player_left_darklands = false
|
||||
--player_left_darklands = false
|
||||
local hp = game_api.get_player_hp()
|
||||
game_api.setFloatValue("player_hp", hp)
|
||||
|
||||
was_darklands = game_api.is_darklands()
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user