Some new scripts, dialogs and animations
This commit is contained in:
1 parent
2cae9998a0
commit
d6417eba1b
15 files changed
+114724
-96
No files matched your search
@@ -3,6 +3,10 @@
|
||||
lection_is_over = false
|
||||
|
||||
player_hold_book = false
|
||||
player_hold_knife = false
|
||||
teacher_arrived = false
|
||||
|
||||
night_time = false
|
||||
|
||||
function lection_hall_zone001_enter_callback()
|
||||
--game_api.start_dialogue("")
|
||||
@@ -19,9 +23,14 @@ game_api.set_trigger_zone_callbacks("lection_hall_zone001",
|
||||
|
||||
function knife_dialog_zone001_enter_callback()
|
||||
print("knife_dialog_zone001_enter_callback--!")
|
||||
if lection_is_over then
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
game_api.switch_navigation(0)
|
||||
if (player_hold_knife == false) then
|
||||
if lection_is_over then
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
game_api.switch_navigation(0)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("knife_dialog_second001")
|
||||
game_api.set_trigger_zone_enabled(1, false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,6 +48,10 @@ game_api.set_trigger_zone_callbacks("knife_dialog_zone001",
|
||||
function on_knife_pickup()
|
||||
game_api.pickup_item("knife")
|
||||
game_api.deactivate_interactive_object("Knife001")
|
||||
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)
|
||||
end
|
||||
|
||||
function on_book_pickup()
|
||||
@@ -58,10 +71,12 @@ function on_bookshelf_clicked()
|
||||
game_api.pickup_item("book")
|
||||
game_api.deactivate_interactive_object("Book001")
|
||||
player_hold_book = true
|
||||
game_api.set_trigger_zone_enabled(3, true)
|
||||
else
|
||||
game_api.remove_item("book")
|
||||
game_api.activate_interactive_object("Book001")
|
||||
player_hold_book = false
|
||||
game_api.set_trigger_zone_enabled(3, false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -72,12 +87,73 @@ function on_npc_interact(npc_index)
|
||||
if npc_index == 1 then
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
end
|
||||
if npc_index == 0 then
|
||||
--game_api.start_dialogue("teacher_dialog001")
|
||||
--game_api.set_trigger_zone_enabled(2, false)
|
||||
end
|
||||
end
|
||||
|
||||
function teacher_zone001_enter_callback()
|
||||
game_api.start_dialogue("teacher_dialog001")
|
||||
game_api.set_trigger_zone_enabled(2, false)
|
||||
end
|
||||
|
||||
function on_teacher_arrived()
|
||||
teacher_arrived = true
|
||||
print("Teacher arrived")
|
||||
end
|
||||
|
||||
function on_teacher_arrived2()
|
||||
print("Teacher arrived2")
|
||||
end
|
||||
|
||||
function book_dialog_zone001_enter_callback()
|
||||
if (night_time == false) then
|
||||
game_api.start_dialogue("book_dialog001")
|
||||
game_api.switch_navigation(0)
|
||||
end
|
||||
end
|
||||
|
||||
function book_dialog_zone001_exit_callback()
|
||||
if (night_time == false) then
|
||||
game_api.switch_navigation(0)
|
||||
end
|
||||
end
|
||||
|
||||
function on_computer_clicked()
|
||||
if (night_time == false) then
|
||||
if (player_hold_book) then
|
||||
game_api.start_cutscene("test_cutscene_02")
|
||||
else
|
||||
game_api.start_dialogue("book_dialog002")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
game_api.set_cutscene_callback("test_cutscene_01", function()
|
||||
print("Cutscene done!")
|
||||
lection_is_over = true
|
||||
if (player_hold_knife == false) then
|
||||
game_api.set_npc_enabled(1, true)
|
||||
end
|
||||
game_api.npc_walk_to(0, 3.19574, 0, 6.45595, on_teacher_arrived)
|
||||
end)
|
||||
|
||||
game_api.set_cutscene_callback("test_cutscene_02", function()
|
||||
print("Cutscene 2 done!")
|
||||
night_time = true
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.switch_navigation(0)
|
||||
end)
|
||||
|
||||
game_api.set_trigger_zone_callbacks("teacher_dialog_zone001",
|
||||
teacher_zone001_enter_callback,
|
||||
nil
|
||||
)
|
||||
|
||||
game_api.set_trigger_zone_callbacks("book_dialog_zone001",
|
||||
book_dialog_zone001_enter_callback,
|
||||
book_dialog_zone001_exit_callback
|
||||
)
|
||||
|
||||
print("Lua script loaded successfully!")
|
||||
Reference in new issue
Block a user