Working with scripts, testing new chair
This commit is contained in:
1 parent
4044acefb2
commit
49501e32ce
9 files changed
+63646
-88
No files matched your search
@@ -13,6 +13,8 @@ night_time = false
|
||||
|
||||
player_in_darklands = false
|
||||
|
||||
player_ghost_aware = false
|
||||
|
||||
function lection_hall_zone001_enter_callback()
|
||||
--game_api.start_dialogue("")
|
||||
--Start cutscene
|
||||
@@ -101,14 +103,23 @@ end
|
||||
function on_npc_interact(npc_index)
|
||||
print("[Lua] NPC interaction! Index: " .. tostring(npc_index))
|
||||
if npc_index == 1 then
|
||||
if (player_ghost_aware) then
|
||||
game_api.start_dialogue("aiperi_dialog001")
|
||||
else
|
||||
game_api.start_dialogue("knife_dialog001")
|
||||
end
|
||||
end
|
||||
if npc_index == 0 then
|
||||
if (player_ghost_aware) then
|
||||
game_api.start_dialogue("teacher_dialog003")
|
||||
else
|
||||
game_api.start_dialogue("teacher_dialog001")
|
||||
end
|
||||
--game_api.set_trigger_zone_enabled(2, false)
|
||||
end
|
||||
if npc_index == 2 then
|
||||
game_api.start_dialogue("dialog_with_ghost001")
|
||||
player_ghost_aware = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -305,4 +316,42 @@ game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
|
||||
function setDay1setup()
|
||||
game_api.switch_navigation(5)
|
||||
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.activate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
game_api.set_npc_enabled(0, true)
|
||||
game_api.set_npc_enabled(1, true)
|
||||
game_api.set_npc_enabled(2, false)
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
end
|
||||
|
||||
game_api.set_location_callbacks(
|
||||
function()
|
||||
print("Enter location uni interior")
|
||||
local hp = game_api.getIntValue("player_hp")
|
||||
game_api.set_player_hp(hp)
|
||||
|
||||
local need_sleep = game_api.getIntValue("need_sleep")
|
||||
local day = game_api.getIntValue("day")
|
||||
if (day==1) then
|
||||
setDay1setup()
|
||||
end
|
||||
end,
|
||||
function()
|
||||
local hp = game_api.get_player_hp()
|
||||
game_api.setIntValue("player_hp", hp)
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
print("Lua script loaded successfully!")
|
||||
Reference in new issue
Block a user