Working on quest system

This commit is contained in:
Vladislav Khorev committed 2026-06-03 14:37:09 +03:00
1 parent aaae368a07
commit e7ae148ead
22 files changed
+357 -103

No files matched your search

+22 -2
View File
@@ -6,6 +6,7 @@ lection_is_over = false
player_hold_book = false
player_hold_knife = false
player_hold_key = false
teacher_arrived = false
teacher_told_about_book = false
@@ -21,12 +22,22 @@ player_ghost_aware = false
ghost_gone = false
function dialog_aiperi_give_key()
if (player_hold_key == false) then
game_api.pickup_item("teacher_room_key")
game_api.quest_unlock("aiperi_knife")
game_api.quest_set_objective_completed("aiperi_knife", "aiperi_knife_keys")
player_hold_key = true
end
end
function lection_hall_zone001_enter_callback()
--game_api.start_dialogue("")
--Start cutscene
if (lection_is_over == false) then
game_api.player_stop()
game_api.start_cutscene("test_cutscene_01")
game_api.quest_set_objective_completed("study_beginning", "study_beginning_lecture")
end
end
@@ -42,7 +53,11 @@ function knife_dialog_zone001_enter_callback()
if (day == 0) then
if (player_hold_knife == false) then
if lection_is_over then
if (player_hold_key) then
game_api.start_dialogue("knife_dialog002")
else
game_api.start_dialogue("knife_dialog001")
end
game_api.switch_navigation(4)
end
else
@@ -82,6 +97,7 @@ game_api.set_npc_enabled(1, false)
player_hold_knife = true
game_api.set_trigger_zone_enabled(2, true)
game_api.npc_walk_to(0, -4.57412, 0, 6.78495, on_teacher_arrived2)
game_api.quest_set_objective_completed("aiperi_knife", "aiperi_knife_take")
end
function on_book_pickup()
@@ -136,7 +152,11 @@ function on_npc_interact(npc_index)
local day = game_api.getIntValue("day")
if (day == 0) then
if (player_hold_key) then
game_api.start_dialogue("knife_dialog002")
else
game_api.start_dialogue("knife_dialog001")
end
else
if (player_ghost_aware) then
local player_alik_aware = game_api.getIntValue("player_alik_aware")
@@ -261,8 +281,8 @@ function on_teachers_door_click()
game_api.start_dialogue("door_dialog001")
end
elseif (not teacher_arrived) then
game_api.start_dialogue("door_dialog001")
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)