Some new scripts, dialogs and animations
This commit is contained in:
1 parent
2cae9998a0
commit
d6417eba1b
15 files changed
+114720
-92
No files matched your search
@@ -11,7 +11,7 @@
|
|||||||
"positionY": 1.0911,
|
"positionY": 1.0911,
|
||||||
"positionZ": 0.91977,
|
"positionZ": 0.91977,
|
||||||
"scale": 1.0,
|
"scale": 1.0,
|
||||||
"interactionRadius": 1.5,
|
"interactionRadius": 0.5,
|
||||||
"activateFunction": "on_bookshelf_clicked"
|
"activateFunction": "on_bookshelf_clicked"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
"positionX": 1.97952,
|
"positionX": 1.97952,
|
||||||
"positionY": 0.95746,
|
"positionY": 0.95746,
|
||||||
"positionZ": 0.786023,
|
"positionZ": 0.786023,
|
||||||
"scale": 1.0,
|
"scale": 0.5,
|
||||||
"interactionRadius": 1.5,
|
"interactionRadius": 1.5,
|
||||||
"activateFunction": "on_book_pickup"
|
"activateFunction": "on_book_pickup"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"npcs": [
|
"npcs": [
|
||||||
{
|
{
|
||||||
"id": "npc_02_woman",
|
"id": "npc_01_woman",
|
||||||
"name": "Студентка",
|
"name": "Бермет",
|
||||||
"animationIdlePath": "resources/w/girl/girl_walk010.txt",
|
"animationIdlePath": "resources/w/girl/girl_idle001.txt",
|
||||||
"animationWalkPath": "resources/w/girl/girl_walk010.txt",
|
"animationWalkPath": "resources/w/girl/girl_walk010.txt",
|
||||||
"meshTextures": {
|
"meshTextures": {
|
||||||
"polySurface1": "resources/w/girl/Chat_02_diff_1.png"
|
"polySurface1": "resources/w/girl/Chat_02_diff_1r006.png"
|
||||||
},
|
},
|
||||||
"positionX": 1.03298,
|
"positionX": 1.03298,
|
||||||
"positionY": 0.0,
|
"positionY": 0.0,
|
||||||
@@ -19,6 +19,26 @@
|
|||||||
"modelCorrectionRotY": 180.0,
|
"modelCorrectionRotY": 180.0,
|
||||||
"modelCorrectionRotZ": 0.0,
|
"modelCorrectionRotZ": 0.0,
|
||||||
"interactionRadius": 2.0
|
"interactionRadius": 2.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "npc_02_woman",
|
||||||
|
"name": "Алтынай",
|
||||||
|
"animationIdlePath": "resources/w/girl/girl_idle001.txt",
|
||||||
|
"animationWalkPath": "resources/w/girl/girl_walk010.txt",
|
||||||
|
"meshTextures": {
|
||||||
|
"polySurface1": "resources/w/girl/Chat_02_diff_1r006.png"
|
||||||
|
},
|
||||||
|
"positionX": 4.03298,
|
||||||
|
"positionY": 0.0,
|
||||||
|
"positionZ": -3.61801,
|
||||||
|
"facingAngle" : 0,
|
||||||
|
"walkSpeed": 1.8,
|
||||||
|
"rotationSpeed": 8.0,
|
||||||
|
"modelScale": 0.016,
|
||||||
|
"modelCorrectionRotX": 0.0,
|
||||||
|
"modelCorrectionRotY": 180.0,
|
||||||
|
"modelCorrectionRotZ": 0.0,
|
||||||
|
"interactionRadius": 2.0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
{
|
{
|
||||||
"id": "npc_02_woman",
|
"id": "npc_02_woman",
|
||||||
"name": "Айпери",
|
"name": "Айпери",
|
||||||
"animationIdlePath": "resources/w/girl/girl_walk002.txt",
|
"animationIdlePath": "resources/w/girl/girl_idle001.txt",
|
||||||
"animationWalkPath": "resources/w/girl/girl_walk002.txt",
|
"animationWalkPath": "resources/w/girl/girl_walk002.txt",
|
||||||
"meshTextures": {
|
"meshTextures": {
|
||||||
"polySurface1": "resources/w/girl/Chat_02_diff_1.png"
|
"polySurface1": "resources/w/girl/Chat_02_diff_1r006.png"
|
||||||
},
|
},
|
||||||
"positionX": 0.764049,
|
"positionX": 0.764049,
|
||||||
"positionY": 0.0,
|
"positionY": 0.0,
|
||||||
|
|||||||
@@ -17,6 +17,25 @@
|
|||||||
"radius": 1.0,
|
"radius": 1.0,
|
||||||
"hysteresis": 0.1,
|
"hysteresis": 0.1,
|
||||||
"enabled": true
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "teacher_dialog_zone001",
|
||||||
|
"positionX":-3.96016,
|
||||||
|
"positionY": 0.0,
|
||||||
|
"positionZ": 5.927,
|
||||||
|
"radius": 3.0,
|
||||||
|
"hysteresis": 0.1,
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "book_dialog_zone001",
|
||||||
|
"positionX":-0.757994,
|
||||||
|
"positionY": 0.0,
|
||||||
|
"positionZ": 6.17516,
|
||||||
|
"radius": 2.0,
|
||||||
|
"hysteresis": 0.1,
|
||||||
|
"enabled": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +25,32 @@
|
|||||||
"type": "End"
|
"type": "End"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "knife_dialog_second001",
|
||||||
|
"start": "line_1",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"id": "line_1",
|
||||||
|
"type": "Line",
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||||
|
"text": "Куда Айпери убежала?",
|
||||||
|
"next": "line_2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "line_2",
|
||||||
|
"type": "Line",
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||||
|
"text": "Ладно, я отдам ей нож завтра.",
|
||||||
|
"next": "end_1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "end_1",
|
||||||
|
"type": "End"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "teacher_dialog001",
|
"id": "teacher_dialog001",
|
||||||
@@ -73,14 +99,6 @@
|
|||||||
{
|
{
|
||||||
"id": "line_6",
|
"id": "line_6",
|
||||||
"type": "Line",
|
"type": "Line",
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/w/avatar_teacher.png",
|
|
||||||
"text": "Там в библиотеке есть компьютер, напиши презентацию прямо на нем.",
|
|
||||||
"next": "line_7"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "line_7",
|
|
||||||
"type": "Line",
|
|
||||||
"speaker": "Бекзат",
|
"speaker": "Бекзат",
|
||||||
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||||
"text": "Ладно...",
|
"text": "Ладно...",
|
||||||
@@ -117,35 +135,47 @@
|
|||||||
"type": "End"
|
"type": "End"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "book_dialog002",
|
||||||
|
"start": "line_1",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"id": "line_1",
|
||||||
|
"type": "Line",
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||||
|
"text": "Сначала мне нужно найти книку в библиотеке.",
|
||||||
|
"next": "end_1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "end_1",
|
||||||
|
"type": "End"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"cutscenes": [
|
"cutscenes": [
|
||||||
{
|
{
|
||||||
"id": "test_cutscene_01",
|
"id": "test_cutscene_01",
|
||||||
"background": "resources/test_cutscene001.png",
|
"background": "resources/test_cutscene001.png",
|
||||||
"durationMs": 25000,
|
"durationMs": 5000,
|
||||||
"fadeOutMs": 500,
|
"fadeOutMs": 500,
|
||||||
"fadeInMs": 500,
|
"fadeInMs": 500,
|
||||||
"endFadeOutMs": 500,
|
"endFadeOutMs": 500,
|
||||||
"endFadeInMs": 500,
|
"endFadeInMs": 500,
|
||||||
"cameraTrack": [
|
"cameraTrack": [
|
||||||
{
|
{
|
||||||
"durationMs": 6000,
|
"durationMs": 3000,
|
||||||
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.10, "rotationDeg": 0.0 },
|
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.10, "rotationDeg": 0.0 },
|
||||||
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.00, "rotationDeg": 0.0 },
|
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.00, "rotationDeg": 0.0 },
|
||||||
"easing": "EaseInOutSine"
|
"easing": "EaseInOutSine"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"durationMs": 6000,
|
"durationMs": 3000,
|
||||||
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.0, "rotationDeg": 0.0 },
|
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.0, "rotationDeg": 0.0 },
|
||||||
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.1, "rotationDeg": 0.0 },
|
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.1, "rotationDeg": 0.0 },
|
||||||
"easing": "EaseInOutCubic"
|
"easing": "EaseInOutCubic"
|
||||||
},
|
|
||||||
{
|
|
||||||
"durationMs": 6000,
|
|
||||||
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.1, "rotationDeg": 0.0 },
|
|
||||||
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.0, "rotationDeg": 0.0 },
|
|
||||||
"easing": "EaseOutSine"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"lines": [
|
"lines": [
|
||||||
@@ -160,62 +190,6 @@
|
|||||||
"portrait": "resources/hero.png",
|
"portrait": "resources/hero.png",
|
||||||
"text": "В эпизоде \"Семетей\" трилогии \"Манас\", изменники Канчоро и Кыяз захватывают власть над кыргызами.",
|
"text": "В эпизоде \"Семетей\" трилогии \"Манас\", изменники Канчоро и Кыяз захватывают власть над кыргызами.",
|
||||||
"durationMs": 3000
|
"durationMs": 3000
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Чтобы спасти раненого богатыря Семетея, фея Кёкмончок с помощью заклинания уводит его в иной мир.",
|
|
||||||
"durationMs": 3000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Этот мир описан в эпосе Манас как Кайып или Аль-Гайб, но некоторые ученые называют его миром теней.",
|
|
||||||
"durationMs": 3000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "В этом мире обитают феи, духи и джинны. Простым смертным в этот мир дорога закрыта.",
|
|
||||||
"durationMs": 3000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Время там течет по другому - за один день в теневом мире могут пройти годы жизни обычного мира.",
|
|
||||||
"durationMs": 3000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Обычно, мир теней никак не пересекается с нашим миром живых людей.",
|
|
||||||
"durationMs": 2000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Но в критические моменты для народа, обитатели теневого мира могут приходить в наш мир.",
|
|
||||||
"durationMs": 2000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "Совсем недавно закончилась пандемия, а сегодня мир захлестнули кровавые войны.",
|
|
||||||
"durationMs": 2000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"speaker": "Аида Дженибековна",
|
|
||||||
"portrait": "resources/hero.png",
|
|
||||||
"text": "В такие кризисные моменты истории, грань между мирами становится особенно тонкой.",
|
|
||||||
"durationMs": 2000,
|
|
||||||
"background": "resources/test_cutscene001.png"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"speaker": "Аида Дженибековна",
|
"speaker": "Аида Дженибековна",
|
||||||
@@ -227,24 +201,48 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "test_cutscene_silent_01",
|
"id": "test_cutscene_02",
|
||||||
"background": "resources/first_cutscene.png",
|
"background": "resources/test_cutscene001.png",
|
||||||
"durationMs": 5200,
|
"durationMs": 5000,
|
||||||
|
"fadeOutMs": 500,
|
||||||
|
"fadeInMs": 500,
|
||||||
|
"endFadeOutMs": 500,
|
||||||
|
"endFadeInMs": 500,
|
||||||
"cameraTrack": [
|
"cameraTrack": [
|
||||||
{
|
{
|
||||||
"durationMs": 2600,
|
"durationMs": 3000,
|
||||||
"from": { "focusX": 0.40, "focusY": 0.54, "zoom": 1.00, "rotationDeg": 0.0 },
|
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.10, "rotationDeg": 0.0 },
|
||||||
"to": { "focusX": 0.58, "focusY": 0.54, "zoom": 1.22, "rotationDeg": 0.8 },
|
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.00, "rotationDeg": 0.0 },
|
||||||
"easing": "EaseInOutSine"
|
"easing": "EaseInOutSine"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"durationMs": 2600,
|
"durationMs": 3000,
|
||||||
"from": { "focusX": 0.58, "focusY": 0.54, "zoom": 1.22, "rotationDeg": 0.8 },
|
"from": { "focusX": 0.3, "focusY": 0.50, "zoom": 1.0, "rotationDeg": 0.0 },
|
||||||
"to": { "focusX": 0.72, "focusY": 0.48, "zoom": 1.34, "rotationDeg": -0.5 },
|
"to": { "focusX": 0.7, "focusY": 0.50, "zoom": 1.1, "rotationDeg": 0.0 },
|
||||||
"easing": "EaseOutCubic"
|
"easing": "EaseInOutCubic"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"lines": []
|
"lines": [
|
||||||
|
{
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/hero.png",
|
||||||
|
"text": "Я начал делать презентацию по книге.",
|
||||||
|
"durationMs": 3000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/hero.png",
|
||||||
|
"text": "Книга была такая скучная что я уснул.",
|
||||||
|
"durationMs": 3000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "Бекзат",
|
||||||
|
"portrait": "resources/hero.png",
|
||||||
|
"text": "И я проснулся уже ночью",
|
||||||
|
"durationMs": 2000,
|
||||||
|
"background": "resources/test_cutscene001.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "test_cutscene_pan_01",
|
"id": "test_cutscene_pan_01",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
lection_is_over = false
|
lection_is_over = false
|
||||||
|
|
||||||
player_hold_book = false
|
player_hold_book = false
|
||||||
|
player_hold_knife = false
|
||||||
|
teacher_arrived = false
|
||||||
|
|
||||||
|
night_time = false
|
||||||
|
|
||||||
function lection_hall_zone001_enter_callback()
|
function lection_hall_zone001_enter_callback()
|
||||||
--game_api.start_dialogue("")
|
--game_api.start_dialogue("")
|
||||||
@@ -19,10 +23,15 @@ game_api.set_trigger_zone_callbacks("lection_hall_zone001",
|
|||||||
|
|
||||||
function knife_dialog_zone001_enter_callback()
|
function knife_dialog_zone001_enter_callback()
|
||||||
print("knife_dialog_zone001_enter_callback--!")
|
print("knife_dialog_zone001_enter_callback--!")
|
||||||
|
if (player_hold_knife == false) then
|
||||||
if lection_is_over then
|
if lection_is_over then
|
||||||
game_api.start_dialogue("knife_dialog001")
|
game_api.start_dialogue("knife_dialog001")
|
||||||
game_api.switch_navigation(0)
|
game_api.switch_navigation(0)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
game_api.start_dialogue("knife_dialog_second001")
|
||||||
|
game_api.set_trigger_zone_enabled(1, false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function knife_dialog_zone001_exit_callback()
|
function knife_dialog_zone001_exit_callback()
|
||||||
@@ -39,6 +48,10 @@ game_api.set_trigger_zone_callbacks("knife_dialog_zone001",
|
|||||||
function on_knife_pickup()
|
function on_knife_pickup()
|
||||||
game_api.pickup_item("knife")
|
game_api.pickup_item("knife")
|
||||||
game_api.deactivate_interactive_object("Knife001")
|
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
|
end
|
||||||
|
|
||||||
function on_book_pickup()
|
function on_book_pickup()
|
||||||
@@ -58,10 +71,12 @@ function on_bookshelf_clicked()
|
|||||||
game_api.pickup_item("book")
|
game_api.pickup_item("book")
|
||||||
game_api.deactivate_interactive_object("Book001")
|
game_api.deactivate_interactive_object("Book001")
|
||||||
player_hold_book = true
|
player_hold_book = true
|
||||||
|
game_api.set_trigger_zone_enabled(3, true)
|
||||||
else
|
else
|
||||||
game_api.remove_item("book")
|
game_api.remove_item("book")
|
||||||
game_api.activate_interactive_object("Book001")
|
game_api.activate_interactive_object("Book001")
|
||||||
player_hold_book = false
|
player_hold_book = false
|
||||||
|
game_api.set_trigger_zone_enabled(3, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -72,12 +87,73 @@ function on_npc_interact(npc_index)
|
|||||||
if npc_index == 1 then
|
if npc_index == 1 then
|
||||||
game_api.start_dialogue("knife_dialog001")
|
game_api.start_dialogue("knife_dialog001")
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
game_api.set_cutscene_callback("test_cutscene_01", function()
|
game_api.set_cutscene_callback("test_cutscene_01", function()
|
||||||
print("Cutscene done!")
|
print("Cutscene done!")
|
||||||
lection_is_over = true
|
lection_is_over = true
|
||||||
|
if (player_hold_knife == false) then
|
||||||
game_api.set_npc_enabled(1, true)
|
game_api.set_npc_enabled(1, true)
|
||||||
|
end
|
||||||
|
game_api.npc_walk_to(0, 3.19574, 0, 6.45595, on_teacher_arrived)
|
||||||
end)
|
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!")
|
print("Lua script loaded successfully!")
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -173,6 +173,7 @@ namespace ZL
|
|||||||
uniInteriorParams.interactiveObjectsJsonPath = "resources/config2/interactive_objects_uni_interior.json";
|
uniInteriorParams.interactiveObjectsJsonPath = "resources/config2/interactive_objects_uni_interior.json";
|
||||||
uniInteriorParams.playerPosition = Eigen::Vector3f(0.942694, 0, -9.63104);
|
uniInteriorParams.playerPosition = Eigen::Vector3f(0.942694, 0, -9.63104);
|
||||||
|
|
||||||
|
|
||||||
locations["uni_interior"] = std::make_shared<Location>(renderer, inventory);
|
locations["uni_interior"] = std::make_shared<Location>(renderer, inventory);
|
||||||
locations["uni_interior"]->setup(uniInteriorParams);
|
locations["uni_interior"]->setup(uniInteriorParams);
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,17 @@ namespace ZL {
|
|||||||
this_impl->triggerExitCallbacks[zoneId] = onExit.as<sol::protected_function>();
|
this_impl->triggerExitCallbacks[zoneId] = onExit.as<sol::protected_function>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
api.set_function("set_trigger_zone_enabled",
|
||||||
|
[game](int index, bool value) {
|
||||||
|
auto& triggerZones = game->triggerZones;
|
||||||
|
if (index < 0 || index >= static_cast<int>(triggerZones.size())) {
|
||||||
|
std::cerr << "[script] set_trigger_zone_enabled: index " << index << " out of range\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
triggerZones[index].enabled = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// set_npc_enabled(index, enabled)
|
// set_npc_enabled(index, enabled)
|
||||||
api.set_function("set_npc_enabled",
|
api.set_function("set_npc_enabled",
|
||||||
[game](int index, bool value) {
|
[game](int index, bool value) {
|
||||||
|
|||||||
Reference in new issue
Block a user